5

I have an application installed on phones sitting in locked boxes in different states. It runs 24/7 and has little to no user interaction.

I know how to push updates to the marketplace...can I have a thread running in my application that sees an app update, installs the apk, and opens the new apk, replacing the currently running version with it?

Tom G
  • 2,595
  • 5
  • 20
  • 16
  • You could probably be able to open the downloaded apk, but ultimately you would need user interaction to hit the install button. Perhaps you could tweak the Android sources and come up with a custom firmware that allows for app installation without user interaction: http://source.android.com/ – Julio Gorgé Sep 13 '10 at 22:56
  • I think it's not possible. And that's because it's a big security risk. Imagine that I create an app like that, but instead of updating itself, it downloads and install an APK that contains a trojan or something harmful... would you like to install my app? Though... I'd like to know what kind of updates would you install; if it's something easy to apply, you could try to inject some inline java code. – Cristian Sep 13 '10 at 23:00
  • As long as the permissions don't change, the user (on Froyo at least, was it on Eclair?) can set it to update automatically. Any permission changes will still require a manual update though. – Kevin Coppock Sep 13 '10 at 23:03
  • Christian, therein lies the beauty (and the horror) of Android. – Tom G Sep 14 '10 at 02:42

1 Answers1

1

Shouldn't be a problem with 2.2, you cannot do with this 2.1 or older versions. You don't even need to run a thread, you can let the market updater handle it for you. You just need to initially set the app to auto-update. And as kcoppock said, you can't change permissions.

nolan
  • 480
  • 1
  • 7
  • 14