Effective App reminder - Alarms wiped out when user clears RAM

We all know what is app reminder and what it does.
still i am giving small introduction about it and the issues coming across to implement it.

What is App reminder?
User has installed your app and has not used/opened for many days.
Remind him to use the app after 7-8 days with the help of notification.

How to implement it?

  • Set alarm on phone boot
  • Use alarm manager and handle it in the broadcast receiver.
  • use shared prefs to store the count/session etc.

What are the issues?

  • All the alarms wiped out when user clear the RAM
  • I do not want to use the permanent service as it gives impression to user that app consumes battery
  • moreover service will he overhead only for one task.

Please share your code or any pointer.

[edit]
wait… I think I did not read your question in detail. After reading it again I guess my previous answer is no longer valid. I don’t think you can do anything without the service. About clearing the ram, you can load it up again on device boot completed for example - most users restart their phones from time to time.

I will preffer a one time service for only one task.
As you must be knowing that service can be configured in such a way that it will terminate after doing specified task

but considering that user is not very habitual of restarting the phone and RAM has been cleared many times. In this case alarm manager logic for app reminder will not work.

i have seen few apps which do not.run the service,but remind about the apps on times.

so what i want to implement?
one time service for app reminder using alarm manager.
Assumption is that user will not restart the phone very often and will clear the RAM many times.

any idea?

@gcc I do this for my app:

1, Alarm receiver
https://developer.android.com/training/scheduling/alarms.html

2, Wifi/3G on receiver

android - BroadcastReceiver when wifi or 3g network state changed - Stack Overflow