FIX: Disable autoinit of notifications prior to user autorizaiton

This commit is contained in:
Marcos Rodriguez Velez 2024-08-25 14:21:45 -04:00
parent e2e77a6744
commit 21f3c12b39
5 changed files with 15 additions and 1 deletions

View File

@ -83,6 +83,8 @@ android {
versionName "7.0.3"
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
firebaseMessagingAutoInitEnabled false
firebaseAnalyticsCollectionEnabled false
}
lintOptions {

View File

@ -52,6 +52,12 @@
<meta-data
android:name="com.dieam.reactnativepushnotification.notification_color"
android:resource="@color/white" />
<meta-data
android:name="firebase_messaging_auto_init_enabled"
android:value="false" />
<meta-data
android:name="firebase_analytics_collection_enabled"
android:value="false" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />

View File

@ -68,6 +68,8 @@ subprojects {
defaultConfig {
minSdkVersion 24
}
firebaseMessagingAutoInitEnabled false
firebaseAnalyticsCollectionEnabled false
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {

View File

@ -109,7 +109,7 @@ function Notifications(props) {
* - if you are not using remote notification or do not have Firebase installed, use this:
* requestPermissions: Platform.OS === 'ios'
*/
requestPermissions: true,
requestPermissions: Platform.OS === 'ios',
});
}
});

View File

@ -384,5 +384,9 @@
<key>apiKey</key>
<string>17ba9059f676f1cc4f45d98182388b01</string>
</dict>
<key>FIREBASE_ANALYTICS_COLLECTION_ENABLED</key>
<false/>
<key>FIREBASE_MESSAGING_AUTO_INIT_ENABLED</key>
<false/>
</dict>
</plist>