Brian,
It would be appreciated if you can put a sample code of how you
rebootthe device after installing the apk.
As for installing the update, I have come up with the following algorithm:
1. When our remote server have a new application for the user,
theremote servers will scp two files to the android device (to
apre-defined path e.g. /setup). The first file is the apk itself.
Andthe second file is a dummy text file (same name as the apk)
toindicate that the apk has been transferred successfully. Note that
thefilename contains the version number of the application.
e.g.app_name_xx_yy.apk and app_name_xx_yy.txt
2. In my application I have timer which every 60 seconds will
check/setup directory for all .txt files.  It will then extract the
xx_yyfrom the txt file and compare it against the installed version.
If theversion number is not the same then the application will
initiate theinstall process. Yes the user can choose to not install
it, howeverthey will then be prompted every 60 seconds and the hope is
that userwill eventually get tired of clicking on the cancel button
and willinstall the update. The version number is in the
AndroidManifest.xmlfile
Note the whole point of transferring the txt file is to indicate
thatthe apk file has transferred successfully otherwise it could
happenthat the remote server is transferring the file and the timer
alsochecks at the same time.
Let me know if you want code on how to check for installed version.
Iwill wait for some code sample from your end.
What device are you using? We are using device from
TechNexionhttp://www.technexion.com/index.php/development-kits/tsunamipack
One other issue we face is that my application automatically starts
atboot up. However, at bootup we are shown the android home screen
forabout 2 seconds. Do you have similar problem?
ThanksAsh
On 11 November 2011 07:36, zombiexl <[email protected]> wrote:
> Ash,
> I'm doing the same sort for thing for a client (i rooted the device
> and created a flashable rom). I am having the device restart the
> device when it closes. The difference is we do allow some users to use
> the exit button and get to the device (mainly for debugging).
> Otherwise the exit button causes the device to reboot. Also in the
> case of an abend the app is restarted automatically.
>
> If you are still looking and interested in my solution then let me
> know and i'll put together some sample code.
>
> I do have a question for you however. How do you install the update
> programatically. I am doing it, but the user is prompted and we can't
> always trust our users to actually install the update.
>
> Brian
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to