When I download a apk file I need to first save it before I can install. Is there anyway to dirctly install it without saving? Do I need to make any changes in the AndroidManifest.xml?
It think what manifest file hasn't any power here. It is up to OS to do this. And it think (as a user) what download must not lead to auto installation of downloaded program.
AFAIK, an app is not extracted when it is installed, but the whole APK reacts as the self contained application. Thus, you must keep the APK in order to use the application. And if you're keeping it, then downloading it is the only option.
Related
I'm trying to find a way to "package" my apps in one super app that downloads and installs all my apps.
So far my options seem to be:
Make an interface app that links to each of my apps in the app store (too many steps).
Create a big apk file containing all my apps that would drop my apps in a folder on the device and run a script to install them all (not sure if possible).
?
Any help very much appreciated.
create a big apk file containing all my apps that would drop my apps in a folder on the device and run a script to install them all (not sure if possible)
You cannot install them. You can help the user install them, by calling startActivity() to bring up each one in sequence, but this will be a similar number of steps to the approach that you rejected. It also means that you will take up double the disk space (copy in your "super" APK plus the installed copy of each app).
???
Have only one app in the first place.
For systems that have ROOT permission,copy apks to /data/app directory.For the other,achieve every function in one package and show these functions' activities in launcher.Just like several apks have been inatalled in one time.
I want to protect my application from being copied by users from device to another device. I know that wont be possible because once the apk is installed any third party application may be able to copy or extract the apk. I mostly care about the private data of the application rather than the apk itself. So, my questions are :
1- Can I protect the apk from being copied to another device by the user ?
2- If user copied an application from device to another (e.g. via third party app or by bluetooth) will he/she be able to copy the private data as well ? If yes, can I protect that ?
Thanks in advance.
To answer briefly, AFAIK, No.
Regarding the single questions:
if device is rooted it's really easy to access the /data/app/ dir and copy your apk, even on the device itself.
For un-rooted devices you need to issue some adb commands. For reference, look here:
https://stackoverflow.com/a/11013175/1865860
https://stackoverflow.com/a/17135554/1865860
How to get a list of installed android applications and pick one to run
the same applies to /data/data/com.example.app/ for the private app's data. Just different folder and possibly many files to copy.
Basically the difference it's not in having root or not, but in the ease of realization.
you can use google licence in your app even if its copied from rooted device it wont work until its downloaded from playstore
second /data/data/<packagename>/ can be copied from rooted device
I have developed an android .apk file and I need to put it on my website for OTA installation (For some reasons, I cannot put it on Android Market). The idea is, I will send sms with the link of .apk file to the android device and by clicking the application should start download and installation process.
At the moment, when I try, it is a two step process -
1. it downloads the .apk file
2. I need to click on .apk file to install it.
Is there anyway to remove step 2 (click on .apk file to install it) and by clicking on url of .apk file, it gets downloaded and installed (of course by asking all the necessary permission from user so it is not a security threat to user).
I have done similar thing on Blackberry/Symbian/Winmo and it is just one step process (clicking on the link downloads and runs the installer) so I thought there should be a way on android as well.
Any help would be appreciated.
Regards
Simple answer: No.
If you already have an application running on the user's device, you could register for a special URI and download and open the file yourself. Android itself does not have such an option (for obivous reasons).
So, I've downloaded my own application from the market and installed it on my phone. Now, I am trying to install a temporary new version from Eclipse, but here is the message I get:
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. WARNING: This will remove the application data!
Please execute 'adb uninstall com.applicationName' in a shell.
Launch canceled!
Now, I really really don't want to uninstall the application, because I will lose all my data. One solution I found is to Export my application, creating new .apk, and then install it via HTC Sync (probably a different program based on what phone you have). The problem is this takes a long time to do, since I need to enter the password for the keystore each time and then wait for HTC Sync. It's a pain in the ass!
So the question is: Is there a way to make Eclipse automatically use my keystore to sign the application (quickly and automatically)? Or perhaps to replace debug keystore with my own? Or perhaps just tell it to remember the password, so I don't have to enter it every time...? Or some other way to solve this problem?
In Eclipse, select Window --> Preferences--> Android --> Build
You can have your keystore pointed here
Just rename the temp app's package in Eclipse. Change com.appname to com.appname2. Now you can debug as normal, and the apps will run side by side.
This isn't a signing problem, it's due to the fact that Android won't allow any 2 applications to share the same namespace.
Make sure you change the icon for the temp one or something though, otherwise it'll be annoying to tell them apart!
Beside the obvious part where you don't download it from the market when you can get it so much easier update it right from eclipse, there is a way.
First, I recommend getting Android Studio as you can save passwords, which shortens down the time used by a few seconds. This is something you can skip.
Now, you have some options:
Use Google Drive, or any other cloud sync tool that allows you to upload files and download on your phone.
Have your phone download folder available and easily accessible from your computer, alongside the folder where the APK is stored after the signing. Simply drag the file into the downloads and run it from the phone
You could replace the debug.keystore file with your own keystore (rename yours).
This file is located in the .android folder of your documents (at least on XP).
Edit: bah, GSree beat me to it. His/Her answer is more user friendly than mine!
Edit 2: Your question was specifically,
"So the question is: Is there a way to
make Eclipse automatically use my
keystore to sign the application
(quickly and automatically)? Or
perhaps to replace debug keystore with
my own?"
I would suggest asking a different question if you don't like the answers.
Not a full solution, but adding the '-k' param to the "adb uninstall" command will keep your data and cache dirs:
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
I want a know if it's possible to install a android application that I created but without passing by the market place, because the apps is for my company only. And the solution must also be legal.
Compile into .apk, send the file to everyone (in email) and use android to open the apk file and it will ask if you want to install it.
Moreover, make sure the settings in your phone allows unknown source installation.
Yes, it's possible and 100% legal. Just build the apk (using Eclipse with the plugin or the command line tools) and distribute it as you like.
If you don't have an ATT phone, then you can do this easily by clicking "allow installations of 3rd party apps" or whatever that setting is called. You can then just put the .apk file onto your SD card and open it with a file explorer like astro.
If you have an ATT phone, you'll have to download the android sdk and use ADB to push the app onto your phone.