Android app downloading NULL data from remote mysql db - android

I'm new this Android world, and I'm facing a very peculiar issue these days and hence wanted to share with you. Please guide me if you know the solution.
I've installed and configured wampserver (mysql, php, apache) in remote Azure VM and I've opened all the ports for access. Please see the pics for Inbound and Outbound access.
Now the issue is: When I installed app in mobile (debug mode) through android studio and data cable, then it can both insert and fetch/download data from remote mysql db (through all php api scripts)… that means no issues in my app, php code, azure vm setup and access to it.
But when I published the same app in playstore and downloaded from there and installed in my same mobile, then its not able to fetch data, however it can insert data only into same mysql db. While fetching all php-apis are returning only null values, because of which all my recycler views are showing in mobile but with no data.
Anything should I take care in permission or in manifest file or where im missing ? please let me know if you know the answer. Thank you very much all in advance.
FYI, manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission-sdk-23 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" />
<application
android:allowBackup="true"
android:dataExtractionRules="#xml/data_extraction_rules"
android:fullBackupContent="#xml/backup_rules"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:preserveLegacyExternalStorage="true"
android:requestLegacyExternalStorage="true"
android:roundIcon="#mipmap/ic_launcher"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
tools:targetApi="31">
build.gradle file:
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
}
android {
namespace 'com.project.localshop'
compileSdk 33
defaultConfig {
applicationId "com.project.localshop"
minSdk 21
targetSdk 33
versionCode 5
versionName "3.2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.annotation:annotation:1.5.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'com.google.firebase:firebase-auth:21.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.github.bumptech.glide:glide:4.14.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.github.smarteist:autoimageslider:1.4.0'
implementation 'com.etebarian:meow-bottom-navigation-java:1.2.0'
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation "com.google.code.gson:gson:2.8.6"
implementation 'com.google.android.material:material:1.9.0-alpha01'
implementation 'com.karumi:dexter:6.2.3'
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'com.google.android.gms:play-services-location:21.0.1'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
//noinspection GradleCompatible
implementation 'com.android.support:design:27.1.0'
implementation "com.airbnb.android:lottie:5.2.0"
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'com.android.volley:volley:1.2.1'
implementation 'androidx.browser:browser:1.5.0'
//implementation 'com.cashfree.pg:android-sdk:1.7.28'
implementation platform('com.google.firebase:firebase-bom:31.2.2')
implementation 'com.google.firebase:firebase-analytics'
}

Related

Cannot get rid of error thrown by Crashlytics on a complex project

I have been trying for over a week to integrate Crashlytics in one of my project. I have tried the following things..
If I tried to implement in a newly created project containing none of the dependencies and their usage too, which I will show you below, Crashlytics gets configured automatically after following the official docs by Firebase.
If I tried to implement it in a project containing the following dependencies and their usage too in the project, it throws 3 kinds of errors.
Must initialize Fabric before using singleton.
When I initialize Fabric in one of my Application class, then after compiling, it shows following error..
Fabric Api key is missing from manifest, Please add it in manifest or something like that.
When I resolved it too by copying api key from my console in fabric.io and pasting it in manifest appropriately,
then it showed following error after compiling.
The Crashlytics build ID is missing.
And this is the error which never ever goes even If I tried various solutions related to that. It just never goes.
But the thing to note is that all this extra things are not required when I added Crashlytics to a simple project NOT containing following dependencies and their usage in project.
Here are those dependencies
implementation project(':library')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
/* dagger dependency for DI*/
implementation "com.google.dagger:dagger:2.23.2"
annotationProcessor "com.google.dagger:dagger-compiler:2.23.2"
compileOnly 'javax.annotation:jsr250-api:1.0'
implementation 'javax.inject:javax.inject:1'
/*Retrofit lib*/
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
/*RxJava lib*/
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation "io.reactivex.rxjava2:rxjava:2.2.9"
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
/* LiveData lib*/
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation 'androidx.lifecycle:lifecycle-runtime:2.1.0'
annotationProcessor 'androidx.lifecycle:lifecycle-common-java8:2.1.0'
/* Crashlytics */
implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
/* Necessary library for handling permission callbacks easily */
implementation 'pub.devrel:easypermissions:3.0.0'
/* Better logging */
implementation 'com.jakewharton.timber:timber:4.7.1'
And also this is a project built by me and my mate and I don't know why he has added another project inside this one in the form of a module named "library" thats why you can see implementation project(':library')
line at the beginning. But I have tried removing it too and copying this project's files inside the project only instead of adding it as separate module, but that didn't change anything in the error which is occurring.
If any of you guys know a workaround or any solution to this strange behavior of Crashlytics in two different scenarios, do reply .
EDIT:
Here is the manifest file without key as requested
<?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="fibamlscan.app">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name=".App"
android:usesCleartextTraffic="true"
android:icon="#android:drawable/ic_menu_today"
android:supportsRtl="true"
android:label="#string/app_name"
android:theme="#style/AppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning"
tools:targetApi="m">
<activity android:name=".s2s_transfer.S2STransferScanner" />
<activity android:name=".s2s_transfer.S2STransferActivity" />
<activity android:name=".stock_transfer_received.StockTransferReceivedActivity" />
<activity android:name=".damaged_goods.DamagedGoodsActivity" />
<activity android:name=".dispatch.CreateNewDispatchActivity" />
<activity
android:name=".dispatch.DispatchOrder"
android:label="#string/title_activity_dispatch_order"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".menu.MenuActivity"
android:label="#string/title_activity_menu"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".ui.login.LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".grn.PreviewActivity" />
<activity
android:name=".grn.GrnOrder"
android:label="#string/title_activity_grn"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".dispatch.PreviewActivity" />
<activity android:name=".metro.dispatch.PreviewActivity" />
<activity android:name=".goodsreturn.CreateNewDispatchActivity" />
<activity android:name=".goodsreturn.PreviewActivity" />
<activity android:name=".goodsreturn.DispatchOrder" />
<activity android:name=".metro.dispatch.DispatchOrder" />
<activity android:name=".warehouseAudit.PreviewActivity" />
<activity android:name=".audit.PreviewActivity" />
<activity android:name=".damaged_goods.DamagedGoodsScanner" />
<activity android:name=".warehouseAudit.WarehouseSelectionActivity" />
<meta-data
android:name="com.google.firebase.ml.vision.DEPENDENCIES"
android:value="barcode" />
</application>
</manifest>
EDIT:
This is the app level build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "co.behtarinternal.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName "${rootProject.ext.versionName}"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
// signingConfig signingConfigs.debug
useProguard false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation project(':library')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
/* dagger dependency for DI*/
implementation "com.google.dagger:dagger:2.23.2"
annotationProcessor "com.google.dagger:dagger-compiler:2.23.2"
compileOnly 'javax.annotation:jsr250-api:1.0'
implementation 'javax.inject:javax.inject:1'
/*Retrofit lib*/
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
/*RxJava lib*/
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation "io.reactivex.rxjava2:rxjava:2.2.9"
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
/* LiveData lib*/
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation 'androidx.lifecycle:lifecycle-runtime:2.1.0'
annotationProcessor 'androidx.lifecycle:lifecycle-common-java8:2.1.0'
/* Crashlytics */
implementation 'com.google.firebase:firebase-core:17.2.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
/* Necessary library for handling permission callbacks easily */
implementation 'pub.devrel:easypermissions:3.0.0'
/* Better logging */
implementation 'com.jakewharton.timber:timber:4.7.1'
}
apply plugin: 'com.google.gms.google-services'

loginActivity is reopened after home key pressed in release mode

My problem is that if i open any activity in the app and then press the home key button .And then reopen the app the login activity is opened instead of opening the current activity the user actually in .
This happens only in release mode .
app manifest file
<?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.example.test">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application
android:name="com.example.TestApp"
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:networkSecurityConfig="#xml/network"
tools:node="merge">
<activity android:name=".pages.assitance.question.QuestionAnswerActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".pages.tripdetails.TripDetailActivity" android:screenOrientation="portrait"/>
<activity android:name=".pages.profile.EditProfileActivity" android:screenOrientation="portrait"/>
<activity android:parentActivityName=".pages.main.MainActivity" android:name=".pages.QrActivity" android:screenOrientation="portrait"/>
<activity android:name=".pages.profile.ProfileActivity" android:screenOrientation="portrait"/>
<activity android:name=".pages.main.MainActivity" android:screenOrientation="portrait"/>
<activity android:name=".pages.login.LoginActivity" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".core.location.TestService" />
<service
android:name=".TestService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
and gradle manifest file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.test"
minSdkVersion 21
targetSdkVersion 28
versionCode 2
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
// minifyEnabled true
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':assi')
implementation project(':location')
implementation project(':notification')
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'android.arch.lifecycle:extensions:1.1.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
//butterknife
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
//picasso
implementation 'com.squareup.picasso:picasso:2.5.2'
//lottie animation
implementation 'com.airbnb.android:lottie:3.0.0'
//qr
implementation 'me.dm7.barcodescanner:zxing:1.9'
//location
implementation 'com.google.android.gms:play-services-location:16.0.0'
// RxJava
implementation 'io.reactivex.rxjava2:rxjava:2.1.9'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
// Retrofit and OkHttp
// OkHttp interceptors for logging
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.0.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
//room
implementation 'androidx.room:room-runtime:2.0.0-beta01'
annotationProcessor 'androidx.room:room-compiler:2.0.0-beta01'
// use kapt for Kotlin
//phone number validation
implementation 'com.googlecode.libphonenumber:libphonenumber:8.2.0'
//socket.io
implementation('io.socket:socket.io-client:1.0.0') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
//library for rating
implementation 'com.github.ome450901:SimpleRatingBar:1.4.2'
//firebase
implementation 'com.google.firebase:firebase-core:16.0.8'
//crashlytics
releaseImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
//firebase push notification
implementation 'com.google.firebase:firebase-messaging:18.0.0'
}
repositories {
mavenCentral()
}
apply plugin: 'com.google.gms.google-services'
if i run the app from android studio in debug or release mode it works normally
it happens only when i generate a release apk
any ideas ?
If you want to open the login activity only once and when you will logged in and reopen the app you want to open the home activity then just save the state of the app or save the login status in the shared preferences which you will compare on the splash and than decide that where should you go home activity or login activity.
Do this when you will get success after calling login function on login activity:
SharedPreferences pref = this.getSharedPreferences ("Login",0);
Editor editor = pref.Editor();
editor.putBoolean("login",true)
editor.commit();
Do this in the splash screen code:
Boolean loggedIn = SplashScreen.this.getSharedPreferences("Login",0) .getBoolean
("login",false);
if(loggedIn) {
startActivity(new Intent(SplashScreen.this,HomeActivity.class));
finish();
} else {
startActivity(new Intent(SplashScreen.this,LoginActivity.class));
finish();
}

My Android Application is getting rejected from PlayStore

I am uploading my application in the Android PlayStore and it is getting rejected because of SMS permission in it, but in my Manifest.xml file, there is no SMS permission added.
After having a conversation with the Google team they said that there is permission available of SMS and I am unable to find it.
Below is the screenshot provided by the Google Team and it has SMS permission in there.
My Manifest file looks like this
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.msonline.android">
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application
android:name=".ApplicationClass"
android:allowBackup="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/MSOAppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning"
tools:replace="android:allowBackup,android:icon,android:label,android:theme">
//Other declarations of Activities
</application>
</manifest>
Any Help is appreciable thanks in Advance.
Edit #1
build.gradle
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
defaultConfig {
applicationId "package name"
minSdkVersion 16
targetSdkVersion 28
versionCode 31
versionName "4.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
debuggable false
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:recyclerview-v7:28.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true
}
implementation 'pub.devrel:easypermissions:1.3.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
implementation 'com.onesignal:OneSignal:3.10.3'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-config:16.4.1'
implementation "com.google.firebase:firebase-core:16.0.8"
implementation 'com.facebook.fresco:fresco:1.7.1'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation('com.payumoney.sdkui:plug-n-play:1.0.0') {
transitive = true;
exclude module: 'payumoney-sdk'
}
implementation 'com.payumoney.core:payumoney-sdk:7.1.0'
// implementation 'com.google.android.gms:play-services-ads:17.1.1'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation project(':libraryMobilePaymentSDKLive')
}
apply plugin: 'com.google.gms.google-services'
Manifest of Lib added
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.atom.library_mobilepaymentsdk"
android:versionCode="3"
android:versionName="3.3" >
<application
android:allowBackup="true"
android:icon="#drawable/process"
android:label="atom payment SDK"
android:theme="#android:style/Theme.Holo.Light" >
</application>
Third party libraries also contribute to your permission tree. In your case the below library that you are using is having RECEIVE_SMS declared in manifest.
com.payumoney.sdkui:plug-n-play:1.0.0
You can check the sdk manifest from sdk's git repo using below this link.
There is RECEIVE_SMS defined in manifest.
<uses-permission
android:name="android.permission.RECEIVE_SMS"
android:protectionLevel="signature" />
What you can try to do is to remove this permission, first declare in your manifest tools:node="remove" then add
<uses-permission android:name="android.permission.RECEIVE_SMS" tools:node="remove" />
The final merged manifest will not have RECEIVE_SMS
Surely you are using a third party library that add this permission.
What you can try to do is to remove this permission, first declare in your manifest tools:node="remove" then add
<uses-permission android:name="android.permission.RECEIVE_SMS" tools:node="remove" />
The final merged manifest will not have RECEIVE_SMS

google removed my android app" Issue: Violation of Usage of Android Advertising ID policy and section 4.8 of the Developer Distribution Agreement

I got an email that my android app is removed by google:
in that its mentioned that:
Alternatively, you may opt-out of this requirement by removing any requests for sensitive permissions or user data.
I have the following permissions in Android Manifest.
<uses-permission android:name="android.permission.INTERNET" /> <!-- is required for volley -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
and the following is my android build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "xxxxx.yyyyyy"
minSdkVersion 17
targetSdkVersion 26
versionCode 3
versionName "1.2"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.1'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.android.support:design:26.1.0'
compile 'com.borjabravo:readmoretextview:2.0.1'
compile 'com.android.support:cardview-v7:26.1.0'
}
apply plugin: 'com.google.gms.google-services'
Which are the permission or lib that are causing the privacy problem
Quoting Android Runtime Permissions
The Dangerous permissions are the permissions which give application access to the user’s private data or affect the system/other apps. If you list a dangerous permission in manifest then the user has to explicitly give permission to your application.
If you take a look at that list you can see that com.google.android.providers.gsf.permission.READ_GSERVICES is a dangerous permission, that causes the violation.
EDIT: If you have that permission because you use Google Maps, you can safely remove it as it is not required anymore.

My app compatible with 0 devices (Android)

My app is not visible on any mobile device. Installs with no problem from the APK file, works good, but for some reason, Google Play doesn't list it.
When I look at google play of the computer the error is: This app is not compatible with your device.
When I look at Google Play Console - device catalog, the compatible devices is 0.
Any suggestions for this?
The app's manifest:
<?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="br.com.tecmafandroid.projeto.tecmaf">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature
android:name="android.hardware.camera2"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_tecmaf"
android:roundIcon="#mipmap/ic_tecmaf_round"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
...
</application>
</manifest>
build.gradle(app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "br.com.XXXandroid.projeto.XXX"
minSdkVersion 15
targetSdkVersion 27
versionCode 2 subindo novas versões
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
//dependencias firebase
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.firebaseui:firebase-ui-storage:0.6.0'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.github.rtoshiro.mflibrary:mflibrary:1.0.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.github.jd-alexander:LikeButton:0.2.3'
}
apply plugin: 'com.google.gms.google-services'
<uses-feature
android:name="android.hardware.camera2"
android:required="true" />
It will be listed for device which only has Camera 2
In order to list for all devices,
make the android:required = "false" and handle for the devices which doesnt have Camera 2.

Categories

Resources