Context: Earlier this year Facebook updated their android app without using the google play services : http://liliputing.com/2013/03/facebook-pushes-android-update-to-enable-silent-updates-bypassing-the-play-store.html
I would like to try a similar thing with my android app. (I'm aware of the implications so please don't post regarding the same.)
Description: I have gone through the the related Android classes Package Manager - Androidxref and resources like: Install apps silently, with granted INSTALL_PACKAGES permission but could not find any non-rooted method. Ways like:
public static int installAPP(String absolutePath){
int status = -1;
File file = new File(absolutePath);
if(file.exists()){
try {
String command = "adb install -r " + StringUtil.insertEscape(absolutePath);
Process install = Runtime.getRuntime().exec(new String[] { "su", "-c", command });
status = install.waitFor();
} catch (Exception e) {
Log.e(TAG, "Not Installed!");
} finally { return status;}
}
}
works just fine, but then again it's for rooted devices.
Any information/hints for possible ways of doing and and any relevant information/hacks regarding the same is much appreciated. Thank You.
PS. I am working on a ROM.