Skip to content

Commit aa5a0f3

Browse files
authored
remove-package-from-manifest (#1070)
1 parent 1ed3f67 commit aa5a0f3

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

lib/android/app/build.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,26 @@ String resolveFlavor() {
4545
}
4646
}
4747

48+
def supportsNamespace() {
49+
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
50+
def major = parsed[0].toInteger()
51+
def minor = parsed[1].toInteger()
52+
53+
// Namespace support was added in 7.3.0
54+
return (major == 7 && minor >= 3) || major >= 8
55+
}
4856

4957
android {
58+
if (supportsNamespace()) {
59+
namespace "com.wix.reactnativenotifications"
60+
61+
sourceSets {
62+
main {
63+
manifest.srcFile "src/main/AndroidManifestNew.xml"
64+
}
65+
}
66+
}
67+
5068
compileSdkVersion androidSdkVersion
5169
defaultConfig {
5270
minSdkVersion androidMinSdkVersion
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android">
4+
5+
<application>
6+
7+
<!--
8+
A proxy-service that gives the library an opportunity to do some work before launching/resuming the actual application task.
9+
-->
10+
<service android:name=".core.ProxyService"/>
11+
12+
<service
13+
android:name=".fcm.FcmInstanceIdListenerService"
14+
android:exported="true">
15+
<intent-filter>
16+
<action android:name="com.google.firebase.MESSAGING_EVENT" />
17+
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
18+
</intent-filter>
19+
</service>
20+
21+
<service
22+
android:name=".fcm.FcmInstanceIdRefreshHandlerService"
23+
android:exported="false"
24+
android:permission="android.permission.BIND_JOB_SERVICE" />
25+
</application>
26+
27+
</manifest>

0 commit comments

Comments
 (0)