0

I work in the automotive industry and we are using not Android mobile but we are using Android Automotive . In Android automotive you cannot have a launcher activity. Instead a service will be called by the OS. So in this service I want to start an activity to show a GUI. Is that possible ?? I tried it like that.

Intent dialogIntent = new Intent(this, AddressBookActivity.class);
dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
this.startActivity(dialogIntent);

And in the emulator I use my gui was shown sometimes. But strangely it did not work all the time.

Alicia17
  • 75
  • 5

1 Answers1

1

Yes . It does. Android in general have full control on what will be run on Force Ground ( top activity in main screen). So not all activity request to start implicitly "will be start" It can be start in some case if Android system check all condition like: Memory, Current Activity priority ...vv, Idle time and so on...

So it is not strange if your beheavior like you mentioned. You can also check logcat to see what exactly happend to your Start request. Sometime it related to permission ... for service running in Backround (likely in this case).

Xuân Tâm
  • 156
  • 8