Android :: Programmatically Install An APK File
Jan 27, 2010
How can I programmatically install an apk file ?
I've foud that the PackageManager.installPackage(...) method was used to do that, but is no longer supported (http://developer.android.com/ sdk/api_diff/4/changes/android.content.pm.PackageManager.html)
View 3 Replies
May 24, 2010
I was hoping to write a service on Android that would list all applications installed as per previous post.Then, It would decide to update automatically some apps and install others. Is there any class on the SDK that has this kind of functionality? That is, can I call some API or code to install an application on the phone? Can I force some updates as well?
View 3 Replies
View Related
Jul 22, 2010
Let's say I have 2 files on Desktop: (Note that I have another file than .apk application.)
.apk file
.zip file (wich contains a large of data that .apk must unizp and do some work with it).
I want to plug an Android device and programmatically copy these both files to Android.
The application must be visible to user and the .zip file must be "visible" to the application, wich will unzip it and do some work with it.
With PalmOS, I use HotSync API. With WinMobile I use ActiveSync (rapi) API. How to do it on Android?
View 1 Replies
View Related
Jun 27, 2010
Is there any way to determine programmatically the time at which an Android application was installed? I don't see anything in PackageInfo, etc.
--EDIT--
To clarify, App A is installed at Time X. At some later time, Time Y, App B is installed. Is there any way App B can know when App A was installed? The link http://stackoverflow.com/questions/2831333/how-to-get-app-install-time-from-android/2920310#2920310 indicates that reading the modify time on the source dir of the App is sufficient. Is this really correct? Why?
View 3 Replies
View Related
Aug 10, 2009
I want to create an XML file to Store my Application Settings into. ( I can't use SharedPrefs because i want that Settings file later to be accessed by Some other Code.)
I can easily create an XML with java's code and store it in File too. but in Android I can create xml with the same java code but can't save it into the file coz they have removed the package javax.xml.transform from SDK.
I am Attaching the Java code here...
CODE:....................
View 2 Replies
View Related
Jul 29, 2010
I'm sure that you all have already known AppBrain's Fast Web Installer which is able to programmatically install free applications in android market to the device.
How could it be possible ?
View 2 Replies
View Related
Nov 11, 2009
i am downloading files from web server programatically. after download is complete, i checked the file.the size ,extension and all other parameters are correct but i when i try to play that file in media player it is showing that it is corrupt.
byte[] b = null; InputStream in = null; b = new byte[Integer.parseInt(size)]; // size of the file. in = OpenHttpConnection(URL); in.read(b); in.close();
File folder = new File("/sdcard", "folder");
boolean check = folder.mkdirs();
Log.d("HttpDownload", "check " + check);
File myFile = new File("/sdcard/folder/" + name);
myFile.createNewFile();
OutputStream filoutputStream = new FileOutputStream(myFile);
filoutputStream.write(b);
filoutputStream.flush();
filoutputStream.close();
View 2 Replies
View Related
Apr 5, 2010
I was wondering if it were possible to dynamically create an XML layout file to be displayed to the user. The idea would be to be able to retrieve a layout file from a central server, which could display this dynamic, server driven GUI.
View 2 Replies
View Related
May 27, 2010
How to find when user clicks the ics file ? In android programmatically
View 1 Replies
View Related
Oct 2, 2013
We are developing Android application (Android UI and C application through JNI). Target device is external SD on Android mobile.
I like to know whether any API is there OR any method to recover deleted files.
View 1 Replies
View Related
Mar 2, 2010
Does Android have a "best practices" guideline on creating & populating the db/tables programmatically vs. deploying a .db file in assets?
What are the pros/cons of both approaches?
I have a db with big long strings in several columns, and about 50 rows, so writing the insert statements alone would take quite some space. It seems a waste.
View 2 Replies
View Related
Sep 5, 2013
I have made a little application pushed in /system/app with adb qui connect to a server and sometime download apk for updating/installing apk on the device.
My application is a kind of "updater". I alreay can : install new apk
But I can't update an apk which is already installed in /system/app/
I don't know why, but the update is in /data/app/my-update-1.apk
The application use the new version but, if i reboot the device (a Tao3530 tsunami board), the apk in /data/app/ is deleted and the old /system/app/original.apk version used.
How could i update an /system/app apk ? (without using ADb of course). If i need to use SU command (to push from download folder to /system/app, how could i root the board ?*
View 1 Replies
View Related
Jun 8, 2012
I have a png file in my res/drawable-ldpi folder. I'm working in Eclipse with the emulator, but I've tried this on my 2.2.1 Android phone and I get the same behavior. I have an ImageView and I want to set the src programatically, based on a database call. If I just put
Code:
src="@drawable.norusdpyr"
in the Activity's XML file, the file displays fine. BUT, if I put
Code:
String imageresource = "R.drawable." + parsedData[4].toString();
chart.setImageURI(Uri.parse(imageresource));
where parsedData[4].toString() = "nor_usdpyr" I don't see anything. I've also tried
Code:
String imageresource = "android.resource://" + getPackageName() + "/R.drawable." + parsedData[4].toString();
chart.setImageURI(Uri.parse(imageresource));
and
Code:
InputStream is = getClass().getResourceAsStream("/drawable/" + parsedData[4].toString());
chart.setImageDrawable(Drawable.createFromStream(is, ""));
and
Code:
String imageresource = "R.drawable." + parsedData[4].toString();
File file = new File(imageresource);
chart.setImageDrawable(Drawable.createFromPath(file.getAbsolutePath()));
and
Code:
Context context = getApplicationContext();
int ResID = context.getResources().getIdentifier(imageresource, "drawable", "com.KnitCard.project");
chart.setImageResource(ResID);
finally,
Code:
chart.setImageURI(Uri.parse("android.resource://" + getPackageName() + "/R.drawable.nor_usdpyr"));
doesn't work.
None of these work. What am I doing wrong?
View 2 Replies
View Related
Oct 8, 2012
Let's say you don't have internet access at the moment. Let's say all you have is fresh install of CyanogenMod 9, which for some reason, does not come with a File Manager :
Let's say you have an apk file on your SD card. How would you install the apk file? Terminal emulator, using which commands or another way?
By the way, ASTRO File Manager vs. ES File Explorer, which one and why?
View 8 Replies
View Related
Apr 16, 2010
I have an android's .apk signed file , how can I install it OTA on my Android 2.1 device.
View 4 Replies
View Related
May 27, 2010
I am new to android.I have fileexplorer.apk file.how to install / use the application in the android emulator?
View 2 Replies
View Related
Sep 16, 2010
How to install the .apk file into blackberry.
View 12 Replies
View Related
Feb 3, 2010
I recently came across a game (not through Android market) in .bat format. Does anyone kknow which program I could use to install it?
View 5 Replies
View Related
Sep 13, 2010
About installation of apk file in my android phone.
I am using htc android phone in that i am trying to install my application.
I developed application using eclipse ADT plugin and taken apk file and copied in my phone SD card -> Android folder.
After that i installed Astro file manager in my phone and trying to browse my apk file but still i unable to find Android folder and my apk file in the Astro file manager.
View 1 Replies
View Related
Sep 27, 2010
I installed the old version of astrid via their web site as the new version's alarms and reminders will not work on my Droid Incredible (Froyo).Do I need to install a file manager such as astro to use apps installed off market? Astrid seems to be working fine without such a file manager installed.And finally, once installed astrid download is listed under my internet downloads.Is there any way to move this file or will it just remain under downloads on Internet? If I clear Internet downloads, then astrid will be gone?
View 1 Replies
View Related
Aug 15, 2009
How can I install .apk file by using java code. that is , we can install .apk from cmd "adb install program_name.apk" I wonder that how can we install .apk file bu using another program. To summarize I will have button and when user click it another program(in sdcard) will be installed to phone.
View 3 Replies
View Related
Apr 30, 2010
Is there any tool in eclipse to generate build.xml for my android project. I couldn't get solution to write build.xml. Is it possible to generate APK file and install it on emulator using ANT.
View 2 Replies
View Related
Sep 7, 2010
I want to test my build on my device. Please provide some tool/information regarding installation of application on device ?
View 2 Replies
View Related
Sep 29, 2009
I am trying to install apk file in G1 device and get following error:
Failure[INSTALL_FAILED_ALREADY_EXISTS]
I have already change the name of main file using Manifest too. change the icon too.
though the same problem is come over.
View 3 Replies
View Related
Sep 16, 2010
How to install and run the android .apk file in blackberry ,
What are the step i should follow,
View 1 Replies
View Related
Nov 24, 2010
I have some problem installing my apk file in code. Wondering if anyone could find out what I did wrong.
What I was trying to do is put a Check Upgrade function in our program. When user clicks it, it will send request to our web server and find out what is the latest version. I use app versionName to stamp a version, something like 2010.11.23. I don't use the version code in Manifest.xml file. So our program sees the latest VersionName is later than itself, it will download the latest one, and then use the following code to install the new apk file:
CODE:........
Now looks like, everytime when I changed the VersionName, it will fail to install the apk file. It downloads the file fine. I don't know exactly why. Sometimes, in Eclips, when I hit debug, I got error saying "Re-installation failed due to different application signatures". I don't know if this is the same error caused the installation failed.
So, looks like my questions are:
Should that upgrade logic work? I am wondering if it has something to do with the VersoinName.
What could cause the application signature change? (I did sign our program before I put it on our server, but I always use the same key file for different versionName. )
View 1 Replies
View Related
Jan 12, 2010
I want to hide some info (encryption keys) in a private area. I know there are a lot of threads on the topic and from what i can tell - it basically comes down to - there's no security just kidding. It seems like the data you have in your private area /data/data/com.company.product/files is only accessible to your application, so it would be sufficient to store anything (like encryption keys for example) in just plain text files there if you wanted. the big drawback of doing this though is that a "rooted" phone would be able to access that area -- therefore, no security. does "copy protection" solve this problem? if I "copy protect" my .apk bundle, I know that that makes it so that it cannot be seen by "rooted" phones in the Android Market, but what about if the .apk bundle got out in the wild (i.e. posted on some website, not via market). Would a "rooted" phone then be able to grab and install the .apk file (and ultimately gain access to the app-private area)? Could someone install the copy protected .apk file in an emulator?
View 8 Replies
View Related
Feb 12, 2009
I kept my .apk file in my "apache" webserver at "Document root" path. This is the only file at Document Root . I had removed index.html file at this location. If I keep the index.html file then other files where not displayed if I open the URL i.e http://<ip_address> using a web browser Now from my Google phone browser I'm able to download the apk file and and install it in Google phone. Note 1: I had not done any settings to add the MIME type "application/ vnd.android.package-archive" in apache web server. Note 2: I was connecting to my webserver through WiFi. But the same apk file I was not able to download from my Gmail (as attachment) and I got "unknown file type" error in this case. After reading few related topics, I came to know about the MIME type support required in webserver for android applications. Now I'm wondering how come file gets installed sucessfully from my apache webserver even without adding the MIME type "application/ vnd.android.package-archive". Any clues what's happening here?
View 4 Replies
View Related
Sep 20, 2010
1) I am using Eclipse IDE and Android SDK 2.1 for my application. My application reads some data files from the File System, so using DDMS i push all the files in "/data/data/com.mypackage/" folder and run my application on emulator. I am able to see my desired output properly on the emulator.
2) Now i have Android device and i don't know how to push the files in the Internal memory of the phone. I have installed driver CD. But it only shows me the SD card directory.
3) Actually what i want is that the moment my application is installed and run it should read the data files from the file system. So there should be no added efforts to push the files in the file system.
4)Means can i pack my data files with my .apk file and when the apk is getting installed can the data files be placed directly in the internal memory(file system) i.e. "/data/data/com.mypackage/" folder. Is this possible ?
View 3 Replies
View Related
Jun 14, 2010
Just rooted my EVO with the toast root. Seems to have worked fine, was able to make a backup, etc. Now I want to install the Fresh 0.2 ROM but Im stuck. I have downloaded the .zip file to my PC, but now what? How do I actually run the install of the zip file? All the instructions say are to "Download" the ROM zip file...but what do you do after that? Extract or copy it to the SDCard? Through cmd prompt? Need SDK/Java/Eclipse etc in order to install it?
View 3 Replies
View Related