Skip to content

Commit 5789d10

Browse files
committed
feat: add push notifications for web and android
1 parent 80c1a41 commit 5789d10

27 files changed

+1898
-86
lines changed
Lines changed: 65 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,65 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3-
<application
4-
android:allowBackup="true"
5-
android:icon="@mipmap/ic_launcher"
6-
android:label="@string/app_name"
7-
android:roundIcon="@mipmap/ic_launcher_round"
8-
android:supportsRtl="true"
9-
android:theme="@style/AppTheme">
10-
<activity
11-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
12-
android:name=".MainActivity"
13-
android:label="@string/title_activity_main"
14-
android:theme="@style/AppTheme.NoActionBarLaunch"
15-
android:launchMode="singleTask"
16-
android:exported="true">
17-
<intent-filter>
18-
<action android:name="android.intent.action.MAIN" />
19-
<category android:name="android.intent.category.LAUNCHER" />
20-
</intent-filter>
21-
</activity>
22-
23-
<provider
24-
android:name="androidx.core.content.FileProvider"
25-
android:authorities="${applicationId}.fileprovider"
26-
android:exported="false"
27-
android:grantUriPermissions="true">
28-
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
29-
</provider>
30-
</application>
31-
32-
<!-- Permissions -->
33-
34-
<uses-permission android:name="android.permission.INTERNET" />
35-
<uses-permission android:name="android.permission.CAMERA" />
36-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
37-
</manifest>
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<application
4+
android:allowBackup="true"
5+
android:icon="@mipmap/ic_launcher"
6+
android:label="@string/app_name"
7+
android:roundIcon="@mipmap/ic_launcher_round"
8+
android:supportsRtl="true"
9+
android:theme="@style/AppTheme">
10+
<activity
11+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
12+
android:name=".MainActivity"
13+
android:label="@string/title_activity_main"
14+
android:theme="@style/AppTheme.NoActionBarLaunch"
15+
android:launchMode="singleTask"
16+
android:exported="true">
17+
<intent-filter>
18+
<action android:name="android.intent.action.MAIN" />
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
22+
<!-- Deep links for Adamant -->
23+
<intent-filter android:autoVerify="true">
24+
<action android:name="android.intent.action.VIEW" />
25+
<category android:name="android.intent.category.DEFAULT" />
26+
<category android:name="android.intent.category.BROWSABLE" />
27+
<data android:scheme="adamant" />
28+
</intent-filter>
29+
<intent-filter android:autoVerify="true">
30+
<action android:name="android.intent.action.VIEW" />
31+
<category android:name="android.intent.category.DEFAULT" />
32+
<category android:name="android.intent.category.BROWSABLE" />
33+
<data android:scheme="adm" />
34+
</intent-filter>
35+
</activity>
36+
37+
<provider
38+
android:name="androidx.core.content.FileProvider"
39+
android:authorities="${applicationId}.fileprovider"
40+
android:exported="false"
41+
android:grantUriPermissions="true">
42+
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
43+
</provider>
44+
45+
<!-- Firebase Messaging Service for Push Notifications -->
46+
<service
47+
android:name="com.capacitorjs.plugins.pushnotifications.MessagingService"
48+
android:exported="false">
49+
<intent-filter>
50+
<action android:name="com.google.firebase.MESSAGING_EVENT" />
51+
</intent-filter>
52+
</service>
53+
54+
</application>
55+
56+
<!-- Permissions -->
57+
<uses-permission android:name="android.permission.INTERNET" />
58+
<uses-permission android:name="android.permission.CAMERA" />
59+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
60+
<!-- Push Notifications -->
61+
<uses-permission android:name="android.permission.WAKE_LOCK" />
62+
<uses-permission android:name="android.permission.VIBRATE" />
63+
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
64+
65+
</manifest>

0 commit comments

Comments
 (0)