Avoid Autostart Nebula

is there a way to avoid the auto start of nebula when connecting the glasses? I’d like to directly start my own MR app from the android home screen.

From my perspective it needs Nebula as a “bridge” between the App and the glasses - if the apk had everything the Nebula app offers, it could work I think. But for now you need the Nebula app I think - what you can do to autostart your app everytime nebula starts:

Press on the Nebula Icon in “About” a lot until there stands “you are a developer” or something, then in the settings there is a new dev settings where you can specify the auto start apk name

1 Like

cool, that helps a lot.

1 Like

Sorry for delayed reply. Nebula needs to handle the hardware connection first, and then transfer the access handle to MR app. The MR app can’t handle the connection directly.

1 Like

I agree it would be nice for Nebula to start up faster and more in the background.

Note, however, that now, if you enable developer mode within Nebula, you can set it to automatically launch your app on start up, which is almost as good as what you want (plug in glasses => nebula starts automatically => then after 5 seconds or so, your app starts automatically).

A nice development from the NReal team I think.

1 Like

Press on the Nebula Icon in “About” a lot until there stands “you are a developer” or something, then in the settings there is a new dev settings where you can specify the auto start apk name

Are these instructions still relevant? I’m trying to setup an autostarting application and if I run

$ adb shell pm list packages | grep nreal

I see nebula is installed, however in the presented ai.nreal.launcher I don’t see an About section or way to get to it in order to enable developer mode and setup the auto start apk.

I tried manually launching nebula with

$ adb shell am start -n ai.nreal.nebula/.SplashActivity

Which does seem to be relaunching nebula, but that just then hooks into launcher again without presenting a different menu.

Is it still possible to do this?

Edit: Kept digging in on this issue while waiting for my post to be approved. It seems my issue is that I am using a dev kit with compute unit. I know due to Qualcomm contracts it doesn’t look like we will be getting an Android 11 update on the pucks (which are sitting on 8.1). Are there any plans to port Nebula 2 to the red/black pucks @nreal-dev ? Are there any plans to release a new compute unit that ships with 11 or do I need to switch to phone dev?

For devices lacking Nebula 2 and it’s hidden autolaunch option you can use the following steps:

In order to setup autolaunch on headset attachment there are a couple steps to take on the nreal dev pucks.

Create a new file named Config.json
Open Config.json in text editor and set the contents to:

      "launchAppName": "com.packageName"

Replace the package name to match the version you want autolaunched on device headset plug-in

Use this command from terminal in order to place the config file into the right spot:

adb push Config.json /sdcard/NRResource/Config.json

If you want access to the dashboard again you can simple remove the config file:

adb shell rm -f /sdcard/NRResource/Config.json

Note that these steps do differ from the Nebula 2 method on the Samsung phones and other android 11 devices.

Hi XREAL-dev,

How do we get /sdcard/ NRResource on android device?

Hi Tom,

does it work? How do we get /sdcard/ NRResource on android device?

Assuming you found this answer, but in case someone else comes along with the same question. That’s a path to use when you are connected to the device via adb Android Debug Bridge (adb)  |  Android Studio  |  Android Developers once you are connected (you can validate connection status with adb devices) then you can traverse the device’s filesystem with adb shell or manipulate the filesystem with adb push etc.

Nreal/xreal didn’t reply likely since this is Android Dev SOP and not nreal specific

1 Like