android-install-apk

Delete an application (*.apk) after installation

北战南征 提交于 2021-02-18 03:34:09
问题 I've created an android application, and exported it as *.apk . Is it possible to make the apk file to be deleted automatically upon successful installation? 回答1: If you are installing some other APK downloading through you application and want to remove if after successful install, follow me :-) Step 1: declare following permissions in your AndroidManifest.xml <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE

Android install apk programmatically error - Package Parse error

删除回忆录丶 提交于 2021-02-10 00:25:29
问题 I create an Edittext at my page, to allow user to update the apps by downloading the apk and install. I am using loojp library to handle the Asynctask. My code at activity: f0textupdate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { try { view.setEnabled(false); final ProgressBar f0progress = (ProgressBar) findViewById(R.id.f0progress); f0progress.setProgress(0); mHttpClient.get("http://google.com/apps.apk", new FileAsyncHttpResponseHandler

Android install apk programmatically error - Package Parse error

半城伤御伤魂 提交于 2021-02-10 00:24:16
问题 I create an Edittext at my page, to allow user to update the apps by downloading the apk and install. I am using loojp library to handle the Asynctask. My code at activity: f0textupdate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { try { view.setEnabled(false); final ProgressBar f0progress = (ProgressBar) findViewById(R.id.f0progress); f0progress.setProgress(0); mHttpClient.get("http://google.com/apps.apk", new FileAsyncHttpResponseHandler

Force android app to open when it's installation complete

只谈情不闲聊 提交于 2021-01-28 00:23:35
问题 I'm running an android app to be the only app to run on the system, so, when boot-completed I launch the app and prevent the user from exiting it for any reason(which made me disable both navigation status bars). Then, to achieve an update to the app, I look if there is a new one, and if so, I run a background task to download the new update from the sftp server using jsch, and when the app finish downloading, I install the apk using ACTION_VIEW intent: Intent intent = new Intent(Intent

Install the updated Apk from the same application itself programmatically.[Update apk]

风格不统一 提交于 2021-01-24 10:46:13
问题 I am using following code to install an application from my app. Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/InstallTest.apk")), "application/vnd.android.package-archive"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); Let the package for above code is com.xyz.one. Now if I install any other package application with the mentioned code then it works fine. But if I try the same

How to fix INSTALL_FAILED_INVALID_APK error in Android Studio?

时光怂恿深爱的人放手 提交于 2020-06-12 05:03:53
问题 I have recently updated my Android Studio to 3.6.1, thereby also updating gradle plugin to 3.6.1 and the gradle wrapper to 5.6.4 When running the debug build, I keep getting this error Install failed: The application could not be installed: INSTALL_FAILED_INVALID_APK The APKs are invalid. I have checked my package and applicationId and it is the same I tried using android:extractNativeLibs="true" on the manifest <application> tag and it is still does not work Kept on cleaning and rebuilding

Error in running flutter project which no permission

南楼画角 提交于 2020-06-11 01:03:10
问题 Launching lib/main.dart on Android SDK built for x86 in debug mode... [!] Gradle does not have execution permission. You should change the ownership of the project directory to your user, or move the project to a directory with execute permissions. Gradle task assembleDebug failed with exit code 1 Exited (sigterm) 回答1: I got the same error trying to execute flutter run on a mac. Apparently, in your flutter project, there is a file android/gradlew that is expected to be executable (and it wasn

Android studio- adding signing configurations to gradle

蓝咒 提交于 2020-04-28 09:44:26
问题 I am very new to the android world and I was trying to just get to run a simple hello world app on my phone. when I tried this I learnt that the APK generated by an android studio is an unsigned one. So to sign this I have gone through the process of creating a Key store and then a private Key, its alias and I was successful in signing the APK and installing on my phone and running it too. Then I went through this link for adding signing configurations to the gradle to automatically sign the

App installation blocked with a pop-up saying app may collect data to track user

三世轮回 提交于 2020-03-15 05:53:10
问题 While installing the latest version of our app (outside of Google Play), a pop-up message shows up: Installation Blocked This app can collect data that may be used to track you. Even if you have heard of this app or the app developer, it's still dangerous to install an app from an untrusted source. so What can make Google Play to detect an app harmfully? How do we understand what's Google Play problem with our app? 回答1: after asking form google support about my problem they said to me that

App installation blocked with a pop-up saying app may collect data to track user

[亡魂溺海] 提交于 2020-03-15 05:52:10
问题 While installing the latest version of our app (outside of Google Play), a pop-up message shows up: Installation Blocked This app can collect data that may be used to track you. Even if you have heard of this app or the app developer, it's still dangerous to install an app from an untrusted source. so What can make Google Play to detect an app harmfully? How do we understand what's Google Play problem with our app? 回答1: after asking form google support about my problem they said to me that