0

Is it possible to switch to fullscreen another app which I launched from my app trougth Intent? I tried this

intentScan.putExtra("force_fullscreen", true);

but this code doesn't hide action bar. Thanks for every help!

Václav Pavlíček
  • 419
  • 2
  • 9
  • 21

3 Answers3

2

Try something like this in your AndroidManifest file:

<activity android:name=".ActivityName"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>

(Copied from Fullscreen Activity in Android)

Community
  • 1
  • 1
cdslijngard
  • 196
  • 1
  • 10
  • I know that I can add it to manifest. But I want to turn into fullscreen mode another app which I launched from my app. Thanks for answer. – Václav Pavlíček Feb 07 '16 at 19:58
  • You can't do that, at least without root or adb permissions, you don't have access to its context for that and thus it would be a security issue – Kieron Feb 07 '16 at 20:27
1

you can try this in the next activity's onCreate:

Intent intent=getIntent();
    boolean isfullScreen =  intent.getBooleanExtra("force_fullscreen", false);

if(getIntent()!=null)
{ 
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
} 
j2emanue
  • 60,549
  • 65
  • 286
  • 456
0

That's why Fragments came about, you have another app entry point with another class and theme, but they all point to the same Fragment and app logic.