Download, Install and Delete the Apk programmatically? - Java for Android App Development

I'm making an Android App where the requirement is to place the apk on the website from where the user can able to download it after finishing the download it will automatically install the app. Once the Installation finished it should automatically delete the apk from the device. In the same manner when someone download the app from Google Play. It will be appreciated if you give me a step by step approach, it would be good for me to understand the logic cleary as i'm new to Android Programming.
Please help me on this situation!
Thanks in Advance!!!!!

First of all, the apk is needed to run the app and you cannot install the apk automatically after downloading.
The user has to allow unknown sources in the settings and then install it manually.
Afaik you cannot delete the apk from the app.
Second: This sounds as if you want to do something illegal/install a virus and then cover the tracks. That's not what XDA is for.
I'm sorry if I am wrong, but it really sounds like that. Prove me wrong by explaining when this would be useful.

Related

Can anyone test this .apk for me?

Basically all I want is to test this Shop Savvy. Just download this .apk file, try to install it on your phone and tell me if it works. Here is the direct download link: http://dl.getdropbox.com/u/594052/Android/com.biggu.shopsavvy.apk
If you want to know the details, just go there -> click and read all the posts starting with this one #758
Thanks in advance for the reports. Oh, I need people who don't have the apps on sd.
All you need is the .apk file and this is how the backup applications work.
and if you have a file manager apk, all you need to do is click on the apk file and it'll install itself. (no need to adb push)

Android 2.0.1 installation problem, system.img?

Hello
i've downloaded Android 2.0.1, launched and installed. When i click con Android icon, it's starts but after finding rootfs it stops because it can't find "system.img".
I've searched into XDA but i can't find any guide to find or create that file.
Can someone help me please??
really thanks!!
Pisolo said:
Hello
i've downloaded Android 2.0.1, launched and installed. When i click con Android icon, it's starts but after finding rootfs it stops because it can't find "system.img".
I've searched into XDA but i can't find any guide to find or create that file.
Can someone help me please??
really thanks!!
Click to expand...
Click to collapse
This SHOULD be posted in 'question' forum...not in the main forum....
Anyway, HOW did you install it? from Cab or from Zip?
Either way, you've not carried out one of the instructions... I'd recommend you try again and read every single little note on the installation instructions.
It's very easy to get excited and want to run Android quickly, and accidentally miss and installation step.
So, you need to explain WHICH version of Android you've installed, what device you have, what steps you THINK you took etc.
p.s.
If you installed using my zip, the number on common error is that people don't perform the mortscript setup / installer after unzipping (this is not necessary using the cab version).
Also some folks install to their device when they SHOULD install to their SD Card
Also, some folks extract the zip without the folder structure
All of these are common mistakes
Oh, and the other common issue is install OVER an existing installation... sometimes this can be done, sometimes it can't. If you want a simple life, never do this
delete evrything and re-try! this should help!
Ok Thanks and sorry for the position of this thread
With cab it can't run so i've downloaded only the zip and extracted into SD....
i can only on thing : "It's FANTASTIC" :O
Can i ask you one more thing ? i've see that i can install new apps and games from market, but how can i install new themes? i need another app?
At the end... how can i boot Android when i power up my Blackstone without passing throw WM6.5 ? Thanks!!

WebView help needed

Hi guys and gals I am having a issue with my app I'm making. The app uses webview to load a special web page to let a user download files mostly .pkg files but some zip files and exe's as well. I have the app built and it loads the website url I need it to but when I click on a file to download it to the storage card it does nothing at all. I know I need to do something with the DownloadListener I'm just not sure what or how. The snippets of code I have found on the net to try to understand it has not worked. I have given permission to the net and SD card in the manifest file. Any help with this would be great Thanks
p.s. for some reason it wont let me post my code. if anyone can help + rep for you
No one on this? ok well I know I need to set up a downloadlistener but I am unsure how to do this everything I have found is only to force media to be played somewhere but I need to just make it download the file to the root of the sdcard. any help even to a good tutorial or link with a code snippet for a different file type that i could modify to work would be very helpful

[Q] Where is the apk file downloaded from google play stored?

I have a question. You download an app from google play store to your device. And it fails to install due to device incompatibility or certificate error.
So where is the downloaded apk file stored in the device. Like in windows we have a temp folder, do we have a temp folder where the apk file is stored temporarily?
I don't think you can grasp the apk file after install failed as you can't even see the file after it installed correctly. (please correct me if that is wrong) I think this is about copyright protection issues.
Anyways as (almost) always there is an app for that: Try "appmonster". There is a free trial availbe in google play. It saves downloaded apk's to your sd card so you can install it again and again.
I hope that helped you ;-)
Manipur, try to look into /data/apps folder. You may require root permission to access this folder. There should be all user installed apk packages stored. But I'm not sure if there are also apks of applications that failed to install. Just look there and you'll see
boelze said:
I don't think you can grasp the apk file after install failed as you can't even see the file after it installed correctly. (please correct me if that is wrong) I think this is about copyright protection issues.
Anyways as (almost) always there is an app for that: Try "appmonster". There is a free trial availbe in google play. It saves downloaded apk's to your sd card so you can install it again and again.
I hope that helped you ;-)
Click to expand...
Click to collapse
Thanks. But applications that failed to install are not backed up.
t-fuse said:
Manipur, try to look into /data/apps folder. You may require root permission to access this folder. There should be all user installed apk packages stored. But I'm not sure if there are also apks of applications that failed to install. Just look there and you'll see
Click to expand...
Click to collapse
Apps that failed to install are not backed up though.
There is a program called "APK Downloader" (codekiem.com) which is able to download apk's from Google Play. It only works with free apps so it is "not illegal" but it is against the ToS of Google Play. Use at your own risk!
I have not tested it though...

How to keep signature after modify apk

How to keep signature after modify apk?
Google said just replace the classes.dex and some files.
But I cant install the apk.
You cannot. And that limitation is there for a reason! That way nobody else than the developer himself can insert code and therefore malware into an app's code. The user will be notified that there's something wrong with the apk. It's more secure for the user and for the developer.
If you want to install your app though, uninstall the app and then you'll be able to install the new, modified apk.
If you happen to be using Eclipse, there is a setting to automatically uninstall the old app if they have different signatures. As somebody who bounces back and forth between computers (each use a different signature when running debug), as well as the live version of my app, this is incredibly helpful, as it saves about 20 seconds of having to go into settings and uninstalling.
You can keep the signature bynot modyfying the manifest. Also theres an window app taht called VTS. that can preserve the signature sir.

Resources