let's say I want to implement an app which exposes services to other apps (like Google Play Services..).
potential apps would register to my special events associated with my services, and would be notified at the right time.
I was thinking to implement this exactly like Google did with the Google Play services:
thanks to Android Inter-Process Communication, other apps could bind to my app Service
, and by that - pass to my app PendingIntent
"callback" that I could execute for them at the right time.
now, I'll get to the problem:
my app process currently running (in background) and holding reference to
PendingIntent
provided by other app.now, from some reason (System decisions/ user explicitly) my process been stopped.
my process cumming back in some point, and come back to "do it's thing.."
in that point - I lost reference to the PendingIntent
provided to me before, and I don't see any way in the API to retrieve back reference to it.
also I don't see any way to save persistently(database/sharedPreferences/file system) saving the pending intent for latter on usage
my questions are:
is it possible to store pending intent persistently somehow?
is it possible to "get back" reference to the same pending intent I already got before?
if not, is there any other suggestion to implement such thing as I described?