capacitor-community / background-geolocation

A Capacitor plugin that sends you geolocation updates, even while the app is in the background.
MIT License
180 stars 56 forks source link

Add Custom path/route when tap on Notification to open specific screen. #38

Closed javierjlujan closed 2 years ago

javierjlujan commented 2 years ago

Describe the solution you'd like When the user taps on the notification, opens a specific screen. Add to addWatcher one more parameter in the same way that when receiving a push notification you can pass a parameter to open a specific screen.

When I tap on the notification it opens the application settings and not the application itself.

The plugin works wonderfully :)

diachedelic commented 2 years ago

When I tap on the notification it opens the application settings and not the application itself.

That is a bug which occurs when the notification icon is not correctly configured. Are you specifying a notification icon in strings.xml?

diachedelic commented 2 years ago

If you wouldn't mind setting a breakpoint here, I would love to get to the bottom of why some people are being redirected to the settings.

javierjlujan commented 2 years ago

Sorry, I've been with the project on pause. I am restarting the development today. I will send you any questions.

It would be interesting in the doc to have a demo of how to customize the icon, message and tab notification path.

javierjlujan commented 2 years ago

Hello, Merry Christmas! I solved my problem in the following way. I had already configured all my icons and that generated me some problems. The solution was to delete the following line from string.xml

<string name="capacitor_background_geolocation_notification_icon">
        drawable/ic_tracking
    </string>