0

AFAIK there is absolutely no way to detect the moment when app gets uninstalled.

I am currently writing an app which should among else toggle on/off 3G data. It went ok before 2.3 with ITelephony reflection calls, but from Android 2.3 this is not possible.

So I had to resort to APNDroid-style way of adding suffixes to APNs in content://telephony/carriers. This seems to work, but I stumble on the same problem as APNDroid has: since we can't detect when the app is removed, all the suffixes will remain if the user first turns off 3G with the app and then uninstalls the app.

This is an ugly and dangerous solution, because the end user may be left with all APNs broken.

It's possible to detect uninstallation from another application, but how would one force the user to install another application to just monitor the first one? It seems there is no way from 2.3 on to write a 3G-managing app.

Any ideas?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
iseeall
  • 3,381
  • 9
  • 34
  • 43

1 Answers1

1

AFAIK there is absolutely no way to detect the moment when app gets uninstalled.

Correct.

I am currently writing an app which should among else toggle on/off 3G data. It went ok before 2.3 with ITelephony reflection calls, but from Android 2.3 this is not possible.

Which means that you should not be implementing the app as an SDK application. You should have not implemented the app using "ITelephony reflection calls", either.

This is an ugly and dangerous solution, because the end user may be left with all APNs broken.

Which means that you should not be implementing the app as an SDK application.

how would one force the user to install another application to just monitor the first one?

You can't.

It seems there is no way from 2.3 on to write a 3G-managing app.

Correct.

You are welcome to try to contribute changes to the AOSP Settings application, or create a new firmware application, that offers the features you seek.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491