I have created an app with GCM notifications and moved it to live it was working well for quite some time, 2, 3 months then suddenly stopped receiving notifications. Gone the code but not able to understand what went wrong and where should I fix.
Here is my manifest.xml
<activity android:name="com.ind.MainActivity"/>
<activity android:name="com.ind.ChaptersActivity"/>
<activity android:name="com.ind.SectionsListActivity"/>
<activity android:name="com.ind.SectionDetailActivity"/>
<activity android:name="com.ind.RuleDetailsActivity"/>
<activity android:name="com.ind.PartsListActivity"/>
<activity android:name="com.ind.PartsDetailActivity"/>
<activity android:label="#string/title_activity_web_dev" android:name="com.ind.Circulars"/>
<activity android:name="com.ind.CircularsDetailsActivity"/>
<activity android:label="#string/title_activity_web_design" android:name="com.ind.Notifications"/>
<activity android:label="#string/title_activity_web_maintain" android:name="com.ind.PressNotes"/>
<activity android:name="com.ind.UpdateDetailsActivity"/>
<activity android:name="com.ind.NotificationDetailsActivity"/>
<activity android:name="com.ind.UpdatesActivity"/>
<activity android:name="com.ind.Comparision"/>
<activity android:name="com.ind.ComparisionActivity"/>
<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.ind"/>
</intent-filter>
</receiver>
<service android:name=".GCMIntentService"/>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version"/>
</application>
Please let me know is there is something wrong.
From Database I could see that devices are registering properly, and all see the same thing from logs even.
You should be sure that you correctly proccesses these things:
NotRegistered is error code from GCM server. Getting this code you should immediately remove regId from your database
cannonical_ids is a signal that you should replace regId with new one
You must request new regId from GCM while updating your client app
Also if you have all regIds in your database, you can try to send test push to them and check what is respone from GCM. You can use my dev push server for these purposes.
Related
Above is my image pls see this exact error
React native: Build failed with Android exported needs to be explicitly specified for element
Pls help I try to fix this last few days , below is my gradle.build file what is issue and how to fix it?
<activity
android:exported="true"
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
tools:node="merge"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data
android:host="rzp.io"
android:scheme="io.rzp" />
</intent-filter>
</activity >
React native: Build failed with Android exported needs to be explicitly specified for element
So i clearly want the login activity to pop up first instead of the main one!!??
<application
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/Theme.Eventr">
<activity
android:name=".Login"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
The order of elements in the manifest doesn't matter, and the build tools don't make assumptions about which activity is your main one. You explicitly specify that yourself, with that intent-filter you see under .MainActivity - that tells the system to make that activity available to the system launcher. You also need the exported="true" attribute.
So if you want .Login as your main activity, move that intent filter into the other activity's tag, and export it. Or you could just switch the names around
My problem is I have Twilio and Firebase cloud messaging React-Native library use the same MESSAGING_EVENT action in my AndroidManifest.xml file. When my apps is running will only randomly run one service.
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="com.hoxfon.react.RNTwilioVoice.fcm.VoiceFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
I want the apps can run both services in AndroidManifest.xml not only run one instead.
I created a react native app using react-native init. Did not change a single line of code. (Note: react-native version is 0.55.4)
I generated a singed release APK by following steps given in the official docs.
I tried to upload this APK to Google Play console.
I got the following error:
Your APK or Android App Bundle is using permissions that require a privacy policy: (android.permission.READ_PHONE_STATE)
This is an unexpected behaviour right? Why will a vanilla app require this permission? How can I solve this issue?
Edit 1
My Android manifest is the default one created by react-native init.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.praveenavtestproject">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
Edit 2
My app doesn't need any permission to work. It just displays 3 lines of text from a historical literature. It is just for information purpose. In Play Store Console, under Store listing tab, at the bottom, there is a Privacy Policy section. It says If you wish to provide a privacy policy URL for this application, please enter it below. Also, please check out our User Data policy to avoid common violations.
I am not providing a privacy policy URL. My app is not supposed to be accessing any user data or phone state. Does React Native access it by default? Can that be the reason for this issue?
Edit 3
Looks like this issue is already being looked at by React Native team.
I have followed http://www.vogella.de/articles/AndroidLocationAPI/article.html
to implement the GPS Apps ( Google Maps)
I have installed Google API 8 , installed the Console and type geo fix, register the google MAP API Key.
But I don't why my application has been stopped unexpectedly
Here is my manifest.xml
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".ShowMap" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
</application>
You have add a library to the manifest file.
<uses-library android:required="true"
android:name="com.google.android.maps"></uses-library>
Add this line as application child in your manifest file. Then you might not get the error.
Hope this works.