android-install-apk

Can we do silent updation for android application?

我与影子孤独终老i 提交于 2019-12-23 01:53:16
问题 Is there any way to make automatic silent update for corporative app? We have an app that working only with local network and WEB-service. Tablets works thru Wi-Fi, but has no access to internet because of security. We need to get something like this functionality: Administrator put some updates to server. App downloads files and automaticly update itself without any additional action of users. Is there any way to do this? 回答1: Such an upgrade without the android market is possible only if

Installing APK programmatically in background

人走茶凉 提交于 2019-12-21 23:36:09
问题 I have scenario where I have to download apk in background and install it without prompting any dialog to user. However when I try to install it using below code File file = new File(filename); if(file.exists()){ try { String command; command = "pm install -r " + filename; Process proc = Runtime.getRuntime().exec(new String[] { "su", "-c", command }); proc.waitFor(); Config.debug("Apk installed"); } catch (Exception e) { e.printStackTrace(); } } It ask for super user access. Is there any way

Crash while self updating APK (component class does not exist)

你。 提交于 2019-12-21 03:37:29
问题 I am working on a system application which updates itslef by downloading an apk and installing it by using PackageManager's installPackage() method. I am getting the following exception: Fatal Exception: java.lang.IllegalArgumentException: Component class com.myapp.package.receivers.SomeOldReceiver does not exist in com.myapp.package at android.os.Parcel.readException(Parcel.java:1544) at android.os.Parcel.readException(Parcel.java:1493) at android.content.pm.IPackageManager$Stub$Proxy

How to run (not only install) an android application using .apk file?

蹲街弑〆低调 提交于 2019-12-17 07:07:45
问题 Is there any command on cmd.exe that would allow me to start the main activity of a particular android application using the .apk file of that application. Please note that I know this command which only installs an android application: adb install myapp.apk This command will only install myapp onto the emulator and I have to manually run this application from the emulator (by performing single click on its icon). What I want to do is use a command which not only installs the application but

How do I solve the INSTALL_FAILED_DEXOPT error?

余生长醉 提交于 2019-12-17 03:02:50
问题 I am developing an Android application using Android 2.2, my application APK size is 22.5 MB, and I would like to create a new build for a Samsung tablet. I got the following error: INSTALL_FAILED_DEXOPT How do I solve this kind of error? 回答1: Restarting the emulator from the Android SDK and AVD Manager and selecting the option Wipe User Data has solved this problem for me. You can find the option as highlighted in the below given image: 回答2: This seemed to be related to disk space for me. A

How to attach any file to APK for installing?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 21:14:39
问题 I want attach any file or data to APK for install , and when to install that APK , my attachment file or data install on our device , how can I do it? thanks 回答1: You could directly add a data file to your APK (by making your file part of the assets or raw folder for example) and unpack/move/parse this file when your application starts up for the first time. An alternative is to use an APK expansion file (only available on Google Play): Google Play hosts the expansion files for your

How to know if an app has been installed successfully in android

我是研究僧i 提交于 2019-12-13 15:18:52
问题 How can I know if an app has been installed successfully in android? I am using the following method to install apk files. Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive"); startActivity(intent); 回答1: private boolean isAppInstalled(String uri) { PackageManager pm = getPackageManager(); boolean installed = false; try { pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); installed = true;

App not installed after signed apk

这一生的挚爱 提交于 2019-12-13 11:14:02
问题 I'm trying to install my signed apk, generated from Android Studio 1.5.1, I can not understand why the release version I can not install it, I set debuggable to false , I have only one MainActivity in the Manifest.xml , all looks ok, but the .apk do not install, anyone can explain to me why? P.S I uninstalled the debug version of my phone 回答1: I've solved by launch: adb uninstall my.package.id The app was already uninstall but the data had remained somewhere 来源: https://stackoverflow.com

Android app gets installed 3 times when ran once on android device [closed]

一个人想着一个人 提交于 2019-12-13 01:27:37
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . When running my app on my phone it gets installed 3 times, not sure why it does this, anyone know how I can solve this? my manifest <application android

Check if Download Manager downloaded the file

↘锁芯ラ 提交于 2019-12-12 16:08:32
问题 How can I check if file has been downloaded and run its installation? I have a code: public void downloadUpdate(String url){ DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); request.setDescription("Downloading..."); request.setTitle("App Update"); request.allowScanningByMediaScanner(); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); String name = URLUtil.guessFileName(url, null, MimeTypeMap.getFileExtensionFromUrl