Jump to content

Have the starting application be something other than the Viveport Menu


Modal

Recommended Posts

Is it possible for the headset on boot to start an application that is not the Viveport menu?

 

The idea is that when the headsets are available for commercial use, we'd like the consumer to only see the app that they chose before hand and not give them a menu where they have multiple options

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

JustinVive,

We are currently developing a majory themed attraction starting with 50 Vive Focus headsets with the possibility of more in the future.  We need to able to launch our application on headset boot also we need to remove the Controller Sync message that comes up every time the headset is taken off and put back on. 

 

We don't have a contact with Vive and hoped you could help us find one. It sounds like we need this business software you mention in this thread.

Link to comment
Share on other sites

It's the same as in any Android device, you can define a launcher activity with:

<intent-filter>    <action android:name="android.intent.action.MAIN" />    <category android:name="android.intent.category.LAUNCHER" /></intent-filter>

then see the ADB tips sheet to see how to select default launcher from the command line.

Link to comment
Share on other sites

Hey Dario,

 

The android XML already had the Launcher intent so the problem is telling the HMD to launch a specific application I loaded instead of the com.htc.mobilevr.launcher package

 

I looked through this link

http://community.viveport.com/t5/Vive-Wave-SDK/Focus-Android-Debug-Bridge-Quick-Tips/gpm-p/12668#M5

which I thought was the tips sheet you were refering too but I don't see anyway to replace the launcher application in there.

 

I also looked through this link as well:

https://developer.android.com/studio/command-line/adb.html

But couldn't find anything about changing the launcher application there either.

 

I did find this link:

https://stackoverflow.com/questions/6391902/how-do-i-start-my-app-on-startup

which is how I assume the com.htc.mobilevr.launcher package is doing it but wanted to know if there was an easier way to do it than that.

Link to comment
Share on other sites

HI Dario -

 

We are able to successfully start our application using the following command:

./adb shell am start -n com.xstudios.JumpLeague/com.htc.vr.unity.WVRUnityVRActivity

 

However, we are unable to set the home activity to make it the default launcher when the headset boots. We get the following error:

./adb shell cmd package set-home-activity com.xstudios.JumpLeague/com.htc.vr.unity.WVRUnityVRActivityjava.lang.IllegalArgumentException: Component ComponentInfo{com.xstudios.JumpLeague/com.htc.vr.unity.WVRUnityVRActivity} cannot be home on user 0

 

Here is the activity defined in the AndroidManifest.xml:

<activity            android:label="@ref/0x7f050001"            android:name="com.htc.vr.unity.WVRUnityVRActivity"            android:launchMode="2"            android:screenOrientation="0"            android:configChanges="0x40003fff"            android:enableVrMode="@ref/0x7f050003">            <intent-filter>                <action                    android:name="android.intent.action.MAIN" />                <category                    android:name="android.intent.category.LAUNCHER" />                <category                    android:name="com.htc.intent.category.VRAPP" />                <category                    android:name="android.intent.category.LEANBACK_LAUNCHER" />            </intent-filter>            <meta-data                android:name="unityplayer.UnityActivity"                android:value="true" />            <meta-data                android:name="unityplayer.SkipPermissionsDialog"                android:value="true" />        </activity>

Any help you can provide is greatly appreciated. Thanks.

 

 

Link to comment
Share on other sites

We have added both of the following:

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.HOME" />

 And while running the set-home-activity command shows success, it still does not launch the app on reboot.  It still launches to the Viveport Menu.  

  

./adb shell cmd package set-home-activity com.xstudios.JumpLeague/com.htc.vr.unity.WVRUnityVRActivitySuccess

 

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...