Is it possible to install an apk programmatically in the background or does the user have to accept the installation.
My scenario is that I want my employees to all have the same set of applications installed.
Of course they can install applications by them self, but I want them all to have at least some applications installed.
I'm not talking about installing applications from the market.
solution in this link
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "app.apk")),"application/vnd.android.package-archive");
startActivity(intent);
Let me get this straight, you want to remotely put an app on a large number of phones and have it install itself? I don't think that's possible. If it were, think of the virus possibilities!
I think you can email the APK to the phones and have the user use something like Apps-Installer to install it, but I've heard of problems with that method. For your situation though, I would recommend trying it.
The only other alternative I can see beside putting them in the market would be to manually collect all the phones you want it on and manually put it on each one with the ADB, but that would be a huge pain.
adb install <apk name>
using above statement we can install apk into devices.For more information
install apk
It's a huge security concern and I do not think that Android allows that!
At least, I would not allow any util or service to install any app without informing me.
The best way would be console installation using command adb install <apk name>. You can have APKs in a remote server and all employees have to install them and send you the console output.
Some more requirements would be useful. Is the user required to have these apps? Do you want the apps to be updatable through the market? here's my thoughts in lieu of that information ...
The problem with not going through the market is that they won't get update notices and won't see those apps in the "my apps" list in the market. i'd rethink that ... It's probably not what the user wants, unless you are installing for example enterprise apps that aren't on the market anyway.
You could for example create a "recommended apps" app. It can show your list of apps, and indicate which are installed, and link to the market install page. This of course doesn't force them to have the app installed, but this is actually a friendlier thing to do.
There's also nothing stopping you from creating your own market app. The tools are all there in the SDK. Personally, I'd hate this as a user and would prefer the lighter weight integration on top of the existing market I mentioned above.
Related
is it possible to create an android application that is meant only for internal use? Basically a private application not meant to be installed by non-approved phones?
If so what is the basic process of deployment? How do you get the app on the employees phone's?
thanks!
The easiest way is to email it to them. Any email with an .apk attachment will get an "Install" button that you can tap to install the app.
Installing from non-market sources needs to be enabled -- which is a bit of a security risk -- but the user will be prompted to turn that on if they need to, and even given a button that will take them right to the appropriate settings page. The whole process is really quite slick. :)
Alternatively, you can copy it to the phone (e.g. after connecting the phone in USB storage mode) and then use a file system app to locate the file and install it.
Emailing it is the easiest way, however.
Edit: I'm assuming you meant private as in "only sent to certain individuals" and you're not actually looking for a method that will prevent the apps from being run on non-approved devices should they end up on one.
There's a proper way to do it now: Google Play Private Channel for Google Apps. You publish app on Private Channel and then send invitations to users. It won't be seen by other users of Google Play.
Option 1
Using Google Play Private Channel is probably the best way, but is useful only for Google Apps users.
Option 2
You can use new Developer dashboard options that let your app be in Alpha or beta phase and is available to only selected google accounts (using groups or google plus circles). Your app can stay in beta indefinitely so not become visible to other users. if you like this method you can also use services like TestFlight.
Option 3
Mail distribution is also ok it's even mentioned in documentation which I find a little bit odd, but I would advise you to use some file storage like Dropbox and just distribute the link to selected people.
Two major ways:
You can either use the non-market application installation method, or adb from a connected PC to install an apk which you distribute as a bare file. The downside is that anyone in possession of the apk can install your application.
Alternatively, you can distribute the application through the android market, but make it require an account on a server you control in order to do anything useful. The upside is that possession of the apk doesn't get an unauthorized user much; the downside is negative ratings from confused randoms, and that you've made your apk very available for interested parties to know about and decompile. (There is or was also a way to put an app on the market but not list it so it was only accessible via a full url, however don't rely on that)
Yes. As of right now I use such a method, I have to manually load the app on the phone, however other techniques can be used. Once loaded the app checks the main server to see if it is up to date. If it is not, it downloads and installs the new version of itself.
If you go to your eclipse workspace and go to yours app's folder, in the bin folder assuming you develop with eclipse, you will find a .apk file somewhere in there. Copy it to the phone and then use something like EZ File Explorer (or something like that) to access your android filesystem, click on the .apk and it will install and be ready to use.
How does Google play store app installs updates to the existing user apps ? I am trying to mimic a part of the functionality of Google play store, which is auto updating my app. I tried with the following approaches :
1) Run adb command "install -r -g /sdcard/myapp.apk" --> It failed giving the error:
'IOException:Error executing command'
2) Intent i = Intent(Action_View); i.setDAtaAndType(Uri.fromFile("pathTomyapk"); But no luck, this intent launches a launcher which inturn asks user to install the updates.
I want to get rid of that launcher, any ideas?
Build your own custom ROM, where your Play Store replacement is the designated market for the device, the way the Amazon AppStore for Android is on Fire devices.
There might be something for auto-update for devices that are part of Android for Work, though I haven't looked into that.
Otherwise, apps cannot silently update themselves, for obvious security reasons.
You should have a look at https://www.pushlink.com/
It has different update strategies that may be interesting for you. Of course, the "totally silent" update is only for rooted device, but the other more conventionnal strategies have the advantage of updating the app without neither leaving the app nor opening the Play Store to validate etc.
PS : I'm not affiliated to PushLink :)
Well the answer for my question is - It's not possible. Atleast without rooting or without flashing a custom ROM. If you are trying on a rooting device probably the adb commands would work. If you are able to include your app in /system partition of a device then it is possible. For now Thanks for reading this.
I am new to android. I could install an APK pro-grammatically which is present in the SD card ..It will prompt the user to install the APK. But i need to install without prompting, as we do in Android Market (Google Play), where we click INSTALL and automatically the app gets installed without prompting.
Note:* I found some links on stackoverflow, but all those mechanism will prompt the user.
How to do this? Plz help
There is some information here :
Install apps silently, with granted INSTALL_PACKAGES permission
and here :
How does AppBrain's installation app work?
I don't think is a really good idea to install something without telling it to the user and/or without showing him the permissions you're asking for. In the second link, CommonsWare give a really good comment about this idea.
You can take a look on the Android's Developer Distribution Agreement, article 4.5, if you want to publish your app on the Play Store.
I'm pretty sure you can't.
I suppose Play Store has access to APIs that you can't use because it is signed with the Google key.
Your apps needs to be signed with platform signature to install apps directly from your app.
Could you please make it clear what exactly do you mean by "I could install an APK pro-grammatically which is present in the SD card " & "need to install without prompting".
But according to my guess of what you actually mean, if you want the install APKs which are not from the market, then check the option 'Unknown Sources' in the security tab of settings.
AFAIK only then you would be able to install unsigned APKs
I'm writing an app and would like users to be able to download the apk and install it from my website. However, I would like the app to still be able to update through the market, is this possible?
I don't believe that it is possible.
You are better off to link them to the market from your website rather than hosting the APK file.
market://search?q=pname:your.package.name
That will open the market on the users phone. It is safer and easier than plugging in the phone and installing over USB.
As far as I know and tested, applications installed using .apk files, will be recognized from the android market. Some games though like Angry Birds, do not appear on my list of installed applications and unfortunately I can't find out why.
But for what is worth the following link will help you more.
http://androidforums.com/application-development/65282-can-you-keep-your-paid-app-updating-illegally-installed-apk.html
This is not possible without apps like Titanium Backup. Titanium Backup can link apps to their market counter-parts but you cannot do it without an app like that (which requires Root).
As i know - it's not possible.
Even if you'll use the same package names and signing certificates.
is it possible to create an android application that is meant only for internal use? Basically a private application not meant to be installed by non-approved phones?
If so what is the basic process of deployment? How do you get the app on the employees phone's?
thanks!
The easiest way is to email it to them. Any email with an .apk attachment will get an "Install" button that you can tap to install the app.
Installing from non-market sources needs to be enabled -- which is a bit of a security risk -- but the user will be prompted to turn that on if they need to, and even given a button that will take them right to the appropriate settings page. The whole process is really quite slick. :)
Alternatively, you can copy it to the phone (e.g. after connecting the phone in USB storage mode) and then use a file system app to locate the file and install it.
Emailing it is the easiest way, however.
Edit: I'm assuming you meant private as in "only sent to certain individuals" and you're not actually looking for a method that will prevent the apps from being run on non-approved devices should they end up on one.
There's a proper way to do it now: Google Play Private Channel for Google Apps. You publish app on Private Channel and then send invitations to users. It won't be seen by other users of Google Play.
Option 1
Using Google Play Private Channel is probably the best way, but is useful only for Google Apps users.
Option 2
You can use new Developer dashboard options that let your app be in Alpha or beta phase and is available to only selected google accounts (using groups or google plus circles). Your app can stay in beta indefinitely so not become visible to other users. if you like this method you can also use services like TestFlight.
Option 3
Mail distribution is also ok it's even mentioned in documentation which I find a little bit odd, but I would advise you to use some file storage like Dropbox and just distribute the link to selected people.
Two major ways:
You can either use the non-market application installation method, or adb from a connected PC to install an apk which you distribute as a bare file. The downside is that anyone in possession of the apk can install your application.
Alternatively, you can distribute the application through the android market, but make it require an account on a server you control in order to do anything useful. The upside is that possession of the apk doesn't get an unauthorized user much; the downside is negative ratings from confused randoms, and that you've made your apk very available for interested parties to know about and decompile. (There is or was also a way to put an app on the market but not list it so it was only accessible via a full url, however don't rely on that)
Yes. As of right now I use such a method, I have to manually load the app on the phone, however other techniques can be used. Once loaded the app checks the main server to see if it is up to date. If it is not, it downloads and installs the new version of itself.
If you go to your eclipse workspace and go to yours app's folder, in the bin folder assuming you develop with eclipse, you will find a .apk file somewhere in there. Copy it to the phone and then use something like EZ File Explorer (or something like that) to access your android filesystem, click on the .apk and it will install and be ready to use.