Pergunta

I'm trying to find out if it is possible to modify the notification of another app (the calendar app from Samsung) from my own app. Specifically I'd like to change the alarm for a calendar event from a one-time sound (which is silent, if the phone is set to vibrate) to a repeating vibrate.

Can I even modify the notifications belonging to a differnt app?

If I can't, could my app get notified about all notifications and just rethrow my own, modified notifications?

Foi útil?

Solução

You probably won't be able to change the notifications of that app because you'd have to modify the app's code directly, where the notification is being fired.

To your second question: If the calendar app communicates over intents, you could create an app which registers on the desired intent (through an Intent filter). When the appropriate intent is fired by the calendar app, you would see a dialog which lets you choose between the applications which can accept it, where also yours should appear. At the same dialog you could then set your app as the default and then handle the notification of the data properly.

Hypothetically, because in the end it depends on how the mentioned Samsung calendar app has been implemented.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top