<activity android:name=".MainActivity" ... <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="com.google.intent.category.ZENBO" /> <category android:name="com.google.intent.category.ZENBO_LAUNCHER" /> </intent-filter> </activity>
Note:
<category android:name="android.intent.category.LAUNCHER" />: suggest. User can’t open app by touch. Just open app by voice command.
<category android:name="com.google.intent.category.ZENBO" />: state that this activity is compatible with Zenbo SDK. This category is used by the Zenbo app to list compatible apps installed on the robot.
<category android:name="com.google.intent.category.ZENBO_LAUNCHER" />: Let your app show in the Zenbo Launcher.
@Override protected void onResume() { super.onResume(); mRobotAPI.robot.registerListenCallback(dsCallback); } @Override protected void onPause() { super.onPause(); mRobotAPI.robot.unregisterListenCallback(); }
When app is in onPause status, callback is still working. App need to call unregisterListenCallback to block the connection. If app back to onResume, app call registerListenCallback to re-connect the link.
Suggest hiding navigation and status bar for UI
RobotActivity is the starting point for coding an app using the Zenbo SDK. RobotActivity is the base activity that provides easy integration with Zenbo. It handles commonly required when creating an activity for Zenbo. Please reference example app.