Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7633587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:55:36+00:00 2026-05-31T06:55:36+00:00

I defined a new Activity on my project and I have some trouble with

  • 0

I defined a new Activity on my project and I have some trouble with fullScreen.

I defined in the manifest file like this:

<activity android:name=".Test"
     android:launchMode="singleInstance" android:screenOrientation="portrait"
     android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
     .............
>

If I start the activity from another activity, I got the desired full screen. The problem is when I start this activity from a BroadcastReceiver – I need to open this activity inside a BroadcastReceiver something like this:

public void onReceive(Context context, Intent intent) {
     Intent test = new Intent(context, Test.class);
     test.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
     context.startActivity(test);
}

I tried like this too:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
       WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(R.layout.test);
}

and no full screen if the activity starts from my BroadcastReciever.

Why I don’t get full screen on this case? There is any way to request full screen after the Activity is created and visible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:55:38+00:00Added an answer on May 31, 2026 at 6:55 am

    I fond the issue. There is a method I omitted to add in question text – I didn’t thought it’s relevant. Because I want this activity to intercept (do not react) home button press, and for this reason I override onAttachedToWindow() method like this:

    public void onAttachedToWindow() {
        getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
        super.onAttachedToWindow();
    }
    

    And here is the issue. Some times, because of this, my activity didn’t get full screen. To fix this, I don’t know if this is the best way, I added a delay to this code, like this:

    public void onAttachedToWindow() {
        handler.sendEmptyMessageDelayed(100,100);
        super.onAttachedToWindow();
    }
    

    and the handler:

    public boolean handleMessage(Message msg) {
        getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
    }
    

    and this solved my issue. I hope this help someone!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script which creates a user-defined object like this: obj = new
I have an activity defined thus: [Activity (Label = MyActivity)] [IntentFilter (new[]{Intent.ActionView}, Categories=new[]{Intent.CategoryDefault, Intent.CategoryBrowsable},
hi im new to android i have added defined login screen in one screen
I have a button defined in my XML file. The button works exactly like
I currently have an activity with some buttons. In my xml, buttons are defined
I have a ViewFlipper defined in a separate class. It looks like this: public
I have defined a new dialog and its controls in an already existing resource
I have defined a class A and derived a new class B from A
Let's say I have defined a route: routes.Add(new Route(Users/{id}, new MvcRouteHandler()) { Defaults =
If I have a Quartz.NET trigger defined as follows: SimpleTrigger fourPm = new SimpleTrigger(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.