Android Question Start app from Firebase Service

Nizze

Active Member
Licensed User
Longtime User
Hi
Im trying to start my app from PUSH .
I have a Firebasemessaging service running .

And an intent to start my app

But it ends up with :

Foreground service started from background can not have location/camera/microphone access:

So now i made an app without any real function att all .
But i get the same error.

What can i do to make it work ?

Br
Nizze
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Your app IS started already. At least the firebasemessaging service.
You should create a Notification when one arrives.

It is up to the user to click the Notification then to start the app.
 
Upvote 0

Nizze

Active Member
Licensed User
Longtime User
Your app IS started already. At least the firebasemessaging service.
You should create a Notification when one arrives.

It is up to the user to click the Notification then to start the app.
Hi

I want to make it poosible for me to remotly start my app after it has been stopped by OS.
I have not made any Notifications or other stuff in the FBM service:
Below is the code for starting App

B4X:
If MessageType = "RemoteStart" Then
      Log("Starting app from Push")
      StartActivity(Main)
           
      Dim myIntent As Intent
      Intent.Initialize(myIntent.ACTION_MAIN,"")
      Intent.SetComponent("com.XXX.yyy/.main")
      StartActivity(Intent)
End if

// Nizze
 
Upvote 0
Top