I am working on a watchface. I need to launch an activity in order to request runtime permissions for my watchface.
I can easily launch an activity from inside my watchface engine like so:
Intent permissionIntent = new Intent(
getApplicationContext(),
PermissionActivity.class);
permissionIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(permissionIntent);
But I would like to get the result of this activity so I can transfer a new state to the engine.
I read that there is a startActivityForResult
that would fit me but that is not possible because I am running this inside a service.
Is there maybe any other way ?