As Wear Mini launcher constantly retain a zone of the screen from being touched, it may cause issue with your app. Here is how you can disable it when your app is running.
Add this line to your Manifest. Wear Mini Launcher will retrieve this meta to put your app in the exclusion list by default (the user will be able to revert this setting).
<manifest>
<application>
<meta-data android:name="default-block-wml" android:value="true" />
...
</application>
</manifest>
If an app is in the exclusion list, the drawer will stop when the app is launched by the launcher and will be restarted when the watch enter the dim mode. To refine this behavior, you can explicitly request the launcher to be closed and re-launched.
public class MainActivity extends Activity {
...
@Override
protected void onResume() {
Intent i = new Intent();
i.setAction("com.npi.wearminilauncher.APPLAUNCHED");
i.putExtra("package", getPackageName());
i.putExtra("activity", MainActivity.class.getName());
sendBroadcast(i);
super.onResume();
}
@Override
protected void onPause() {
Intent i = new Intent();
i.setAction("com.npi.wearminilauncher.APPCLOSED");
i.putExtra("package", getPackageName());
i.putExtra("activity", MainActivity.class.getName());
sendBroadcast(i);
super.onPause();
}
}
Be careful though, this will work only if your Activity
is launchable. If you have multiple activities in your workflow, please use the launchable activity getName()
.
To be launchable an activity has to have this category in the manifest:
<category android:name="android.intent.category.LAUNCHER" />
You can activate a debug mode in Wear Mini Launcher. To do so, tap 7 times on the top of the list of the watch app and enable the debug mode.
You can now see the drawer handles