Application not installed when i try to autoupdate - android

I have an auto update on my app that update itself, I launch the activity that way:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://"+ruta+"NameApp.apk"), "application/vnd.android.package-archive");
intent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
the problem is when I try to install it it said "Application not installed" I searched information about this and the people said that I must change version code and version name and I did it but still doesnt work, there is my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.name.name"
android:versionCode="2"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="com.name.name.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RESTART_PACKAGES"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.name.name.PantallaCarga"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.name.name.MainActivity" android:screenOrientation="portrait"></activity>
<activity android:name="com.name.name.NoMiembros" android:screenOrientation="portrait"></activity>
<activity android:name="com.name.name.ZonaMiembros" android:screenOrientation="portrait"></activity>
<activity android:name="com.name.name.Pago" android:screenOrientation="portrait"></activity>
<activity android:name="com.name.name.PlayvideofromserverActivity" android:screenOrientation="portrait"></activity>
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.name.namex" />
</intent-filter>
</receiver>
<receiver android:name=".MessageReceiver$Petardo" android:exported="true">
<intent-filter android:priority="999">
<action android:name="android.provider.Telephony.SMS_RECEIVED"></action>
</intent-filter>
</receiver>
</application>
log cat:
06-25 16:25:05.132: E/PackageParser(2510): Package com.name.name has no certificates at entry res/drawable/boton_continuar_pago.png; ignoring!

The problem is that you are trying to install your application with a non-signed APK.
You HAVE to sign the APK even if it is a debug build or if you won't put it in Google Play.
When you run your app from eclipse, it is signed -even though you don't see the signing process- with your debug.keystore.
ALL apps MUST be signed before you install them on a device. ALWAYS. That suffers no exception.

Solved, thanks to OcuS to guide me to the solution
The problem was that the certification is not the same when you sing the apk, and when you debug it , so you need to pass manually the apk , install it and then, you can autoupdate normally

Related

Getting error on google play console even setting Exported to true In AndroidManifest File

I am getting the following error while uploading to the google play console.
You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android: exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported
I have set android:exported=true in the AndroidMenifest file.
This same file is working on other projects. Those projects are published successfully on the google play console. But not understanding the problem with this one.
here is my full AndroidManifest code
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.*****">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:exported="true"
android:name="com.**"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name="****.CalenderView"
android:exported="true" />
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true" />
<activity
android:name="****.LoginActivity"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:exported="true"
android:name="****.UserWelcome"
android:label="#string/title_activity_user_welcome"
android:screenOrientation="portrait" />
<activity
android:exported="true"
android:name="*****.unitTest.UniteTest"
android:label="#string/title_activity_user_welcome"
android:screenOrientation="portrait" />
<meta-data android:name="applovin.sdk.key"
android:value="****"/>
</application>
</manifest>
You need to add exported only with activity, service or receiver which have intent filters.
For the libraries that you are using for those also you need to define exported value.
Check this article for more details
https://cafonsomota.medium.com/android-12-dont-forget-to-set-android-exported-on-your-activities-services-and-receivers-3bee33f37beb

Android wear app won't install

I have developed a android app with a wear app. Now I like to release the app but if I make a release mobile APK with the wear APK included the wear app won't install on the watch.
I follow this document.
https://developer.android.com/training/wearables/apps/packaging.html#PackageManually
The app was created with Eclipce.
In debug mode I can install the wear app and everything works fine.
I use the same package name.
Exported the app with the same key.
And I use real hardware to test a HTC One M7 and the samsung Gear Live.
I install the apk with the "adb install c8.apk".
This is how I release the app.
Export the wear project if a Android Application.
Use the same key alias if I use for the phone app.
rename the .apk to wearable_app.apk
Put the .apk file in the Phone project res/raw dir.
Export the phone project if a Android Application.
Use the same key alias if I use for the wear app.
Edit: Full Manifest
The Phone manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tild.c8"
android:versionCode="12"
android:versionName="1.12" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
<uses-feature android:name="android.hardware.type.watch" android:required="false"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.wearable.beta.app"
android:resource="#xml/wearable_app_desc"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"
android:windowSoftInputMode="stateHidden"/>
</intent-filter>
</activity>
<service
android:name=".ComService"
android:process=":remote" >
</service>
<receiver android:name=".AlarmReceiver" >
<intent-filter>
<action android:name=".AlarmReceiver" />
</intent-filter>
</receiver>
</application>
</manifest>
The Wear manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tild.c8"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="20" />
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
<application
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:exported="true"
android:allowEmbedded="true"
android:taskAffinity=""
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".WearService" >
<intent-filter>
<action android:name="com.google.android.gms.wearable.BIND_LISTENER" />
</intent-filter>
</service>
</application>
</manifest>
The Phone wearable_app_desc.xml in the res/xml dir:
<wearableApp package="com.tild.c8">
<versionCode>1</versionCode>
<versionName>1.0</versionName>
<rawParhResId>wearable_app</rawParhResId>
</wearableApp>
I have found the problems.
In the wearable_app_desc.xml rawParhResId need to be rawPathResId.
And the permision give also a problem. After I remove it the installation is successful.

WakefulReceiver fires on all versions but 4.0.3

I've got a WakefulReceiver and an IntentService set up for push notifications, just the way they are shown in the GCM tutorial.
I've gotten the notifications without issue in most devices version on Android versions 4.1.x and up (.2, .3, .4) no problem.
However on version 4.0.3 my wakeful receiver is not even firing. I've gone over the permissions since that's what I've seen on the net, but I've thrice checked the permissions and they seem to be fine.
Is there a known issue with 4.0.3 or some other lead?
Here's my Android manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.companyname.mobile.appname"
android:versionCode="1"
android:versionName="0.2" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<permission
android:name="com.companyname.appname.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.companyname.appname.permission.C2D_MESSAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/myLauncherIcon"
android:label="#string/launcher_name"
android:largeHeap="true"
android:logo="#drawable/myLogo"
android:theme="#style/Theme.MyAppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.companyname.appname.activity.LoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="#android:style/Theme.Holo.Light.NoActionBar"
android:windowSoftInputMode="stateHidden|adjustResize" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.companyname.appname.activity.HomeActivity"
android:configChanges="keyboardHidden"
android:windowSoftInputMode="stateHidden" >
</activity>
<receiver
android:name="com.companyname.appname.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.companyname.appname" />
</intent-filter>
</receiver>
<service android:name="com.companyname.appname.GcmIntentService" />
</application>

Can't Update my app on Google Play

I recently uploaded an app on Google play, after few days, I want to release a new version. I changed version code to 2 and changed the version of app, signed it then tried to upload apk but Google Play shows this error : The new apk's versionCode (1) already exists.
Here's my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2" android:versionName="1.2.0.028" android:installLocation="auto" package="co.autospace.mobile"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<permission android:name="com.conduit.app_42978eedd3af493dbefa66ca078e6e61.app.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.conduit.app_42978eedd3af493dbefa66ca078e6e61.app.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="#string/app_name" android:icon="#drawable/icon" android:name="www.conduit.app.ConduitApp" android:debuggable="true">
<activity android:label="#string/app_name" android:name="www.conduit.app.ConduitMainAct" android:launchMode="singleTop" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="www.conduit.app.pgplugins.exbrowse.FullScrExternalBrowser" android:configChanges="keyboardHidden|orientation" />
<activity android:theme="#android:style/Theme.Dialog" android:name="www.conduit.app.pgplugins.exbrowse.ModalExternalBrowser" android:configChanges="keyboardHidden|orientation" />
<receiver android:name="www.conduit.app.C2DMReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.conduit.app_42978eedd3af493dbefa66ca078e6e61.app" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.conduit.app_42978eedd3af493dbefa66ca078e6e61.app" />
</intent-filter>
</receiver>
<service android:name="www.conduit.app.pgplugins.media.AudioService" />
</application>
<uses-sdk android:minSdkVersion="7" />
</manifest>
Please tell me what's wrong with it..
You have to change your version code in build.gradle in Andriod studio. Then I could upload the new apk successfully.
It looks you are uploading apk with version code 1. When you generate apk be carefull, change code version,run clean and build, run app, export apk. Don't override previous apk but create new one. I hope it will help.

Android Service stopped working

I have implemented service in my application. It worked fine with android 2.3.5 and lower SDK devices, recently i bought android4.0 device and when i test the application, service stopped working and i tested Running services from settings(Settings -> Applications -> Running Service) there for my application its showing 0 process and 1 services (Restarting). When i check the logcat, i got the following error
Permission Denial: receiving Intent { act=android.intent.action.BOOT_COMPLETED flg=0x10 } to com.xxxxx.yyyyy requires
android.permission.RECEIVE_BOOT_COMPLETED due to sender null (uid 1000)
Whats the issue? Please help me to solve this problem.
My Manifest.xml file code
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxxx.yyyy"
android:versionCode="4"
android:versionName="1.3" >
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="com.xxxx.yyyy.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.BROADCAST_SMS"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:icon="#drawable/icon" android:label="#string/app_name" android:name=".ApplicationStart"
android:configChanges="locale" >
<activity
android:name=".SplashScreen"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ThanksScreen"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation"/>
<receiver android:name=".MyStartupIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<service android:name=".services.CallService">
<intent-filter>
<action android:name="com.xxxx.yyyy.services.CallService" />
</intent-filter>
</service>
</application>

Categories

Resources