# Possible to access "onCreate" of the RootActivity

**URL:** <https://forums.fusetools.com/t/possible-to-access-oncreate-of-the-rootactivity/2305>\
**Category:** How-to Discussions\
**Created:** [October 8, 2016, 8:07am UTC](https://forums.fusetools.com/t/possible-to-access-oncreate-of-the-rootactivity/2305 "2016-10-08T08:07:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RanzQ](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RanzQ](https://forums.fusetools.com/u/RanzQ)\
**Post date:** [October 8, 2016, 8:07am UTC](https://forums.fusetools.com/t/possible-to-access-oncreate-of-the-rootactivity/2305/1 "2016-10-08T08:07:37Z")

</div>

Is it possible to do stuff in onCreate state of the RootActivity? I guess the app lifecycle is managed by Fuse but I’d need to run some code on that state.

UPDATE: I managed to achieve what I was after by manually editing the generated .java file and the running `build.bat`

That didn’t solve the original problem though. I’m trying to set a fullscreen mode for a device with API level 15, and after googling how it should be done I noticed the method `SystemUI.EnterFullscreen()` does exactly that. It almost works but can’t get rid of the navbar (it’s not visible but the black bar is still there). What I tried:

```auto
@Override
protected void onCreate(Bundle savedInstanceState)
{
    // Set action bar default state
    _appState.SystemUI.StatusBarOnCreate(this);

    // This is what I'd like to work
    _appState.SystemUI.EnterFullscreen();

    // Set current view
    _appState.Layout.AttachToActivity(this);

    // mandatory call to super
    super.onCreate(savedInstanceState);

```

So, if anyone has a solution for this API level (I know it’s not supported), I’m interested. I’m not sure but I think this problem has something to do with the fact that `EnterFullscreen`runs on UI thread but `AttachToActivity` doesn’t.

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [October 9, 2016, 1:13pm UTC](https://forums.fusetools.com/t/possible-to-access-oncreate-of-the-rootactivity/2305/2 "2016-10-09T13:13:37Z")

</div>

Hi,

I think you are attacking this problem from a too low-level. I don’t fully understand your question.

Instead of asking about something this deep down in the stack and specific to Android, perhaps try telling us what you want to acheive on a higher level, and perhaps there already is a high level Fuse feature to acheive what you want. For example, you can configure the status bars on iOS and Android using the `<Android.StatusBarConfig` and `<iOS.StatusBarConfig` UX tags.

---

<div class="post-metadata">

**Author:** ![RanzQ](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RanzQ](https://forums.fusetools.com/u/RanzQ)\
**Post date:** [October 9, 2016, 2:58pm UTC](https://forums.fusetools.com/t/possible-to-access-oncreate-of-the-rootactivity/2305/3 "2016-10-09T14:58:25Z")

</div>

What I’m after is a fullscreen app without statusbar and navbar. The guides I’ve found for Fuse work at least on Android 4.4+ but not on 4.0. It should be possible to hide the navbar on 4.0 too.

The build command I’m using:

```auto
fuse build -t=android --set:SDK.BuildToolsVersion="23.0.3" --set:SDK.CompileVersion="23" --set:SDK.TargetVersion="15" --set:SDK.MinVersion="15"

```

Otherwise Fuse apps seem to work well on that API level too. I don’t have a real screenshot atm but the app I’ve build has a black bar without nav buttons, like this: [https://i.imgur.com/x74hUwS.png](https://i.imgur.com/x74hUwS.png)

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [November 4, 2016, 11:59am UTC](https://forums.fusetools.com/t/possible-to-access-oncreate-of-the-rootactivity/2305/4 "2016-11-04T11:59:42Z")

</div>

To acheive a fullscreen app in fuse, simply do:

```
 <Android.StatusBarConfig IsVisible="false" />
```

---

<div class="post-metadata">

**Author:** ![RanzQ](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RanzQ](https://forums.fusetools.com/u/RanzQ)\
**Post date:** [November 4, 2016, 5:59pm UTC](https://forums.fusetools.com/t/possible-to-access-oncreate-of-the-rootactivity/2305/5 "2016-11-04T17:59:35Z")

</div>

I know that one, but doesn’t work on Android 4.0. A screenshot from an AVD:

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/sHBuVrApR55s-image-1478282217424.png)

This thread can be closed since Fuse doesn’t support that API level and I’m aware of it. I tried to achieve the same thing on Unity and it creates the fullscreen correctly.
