Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add push notifications #163

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1c6e544
feat: add push notifications
reneaaron Oct 22, 2024
1184ab3
fix: lint errors
reneaaron Oct 31, 2024
7a42fde
fix: local notifications
reneaaron Oct 31, 2024
41b4299
fix: decrypt content
reneaaron Nov 6, 2024
a572e10
chore: improve notifications support
im-adithya Nov 11, 2024
184548a
feat: add notification service extension
im-adithya Nov 11, 2024
f4bf55d
feat: add messaging service for android notifications
im-adithya Nov 12, 2024
ba47b38
chore: changes
im-adithya Nov 12, 2024
814959e
chore: add message service config plugin
im-adithya Nov 12, 2024
979dfb2
chore: use our own modified package
im-adithya Nov 12, 2024
4957141
chore: import shared preferences only in android
im-adithya Nov 13, 2024
9b4a596
chore: add google services json to env
im-adithya Nov 13, 2024
6a5ccc4
chore: further changes
im-adithya Nov 14, 2024
c84bb84
fix: handle linking hook
im-adithya Nov 14, 2024
572c59a
chore: more changes
im-adithya Nov 14, 2024
0db8b05
chore: add notification handling
im-adithya Nov 15, 2024
5080ea3
chore: use transaction in deep link
im-adithya Nov 15, 2024
b9103c4
chore: add notification icon in android
im-adithya Nov 15, 2024
45908cd
chore: pass wallet id to transaction screen
im-adithya Nov 20, 2024
3f74bcc
chore: set wallet in use effect
im-adithya Nov 20, 2024
9c9c5c7
chore: remove processing from uibackgroundmode
im-adithya Nov 21, 2024
c59e919
Merge branch 'master' into task-notifications
im-adithya Jan 8, 2025
50654c2
Merge pull request #188 from getAlby/task-notifications
im-adithya Jan 9, 2025
e937d2c
chore: rename wallet info library
im-adithya Jan 9, 2025
408b6ec
chore: remove duplication
im-adithya Jan 9, 2025
8ee413e
chore: remove splash from app config
im-adithya Jan 9, 2025
8e089d1
chore: check if notifications are enabled while editing and removing …
im-adithya Jan 9, 2025
06be6ba
chore: check if wallet has notifications capability before registering
im-adithya Jan 9, 2025
ba56cf3
chore: also check for notifications capability
im-adithya Jan 9, 2025
b390f06
chore: allow payment sent notifications
im-adithya Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ yarn-error.*
# typescript
*.tsbuildinfo

android
ios
android

google-services.json
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

1. Update version in

- `app.json`
- `app.config.js`
- `package.json`

2. Create a git tag and push it (a new draft release will be created)
Expand Down
106 changes: 106 additions & 0 deletions app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import withMessagingServicePlugin from "./plugins/withMessageServicePlugin";

export default ({ config }) => {
return {
...config,
name: "Alby Go",
slug: "alby-mobile",
version: "1.8.1",
scheme: ["lightning", "bitcoin", "alby", "nostr+walletconnect"],
orientation: "portrait",
icon: "./assets/icon.png",
userInterfaceStyle: "automatic",
newArchEnabled: true,
assetBundlePatterns: ["**/*"],
plugins: [
[
withMessagingServicePlugin,
{
androidFMSFilePath: "./assets/MessagingService.kt",
},
],
[
"expo-notification-service-extension-plugin",
{
mode: "production",
iosNSEFilePath: "./assets/NotificationService.m",
},
],
[
"expo-splash-screen",
{
backgroundColor: "#0B0930",
image: "./assets/icon.png",
imageWidth: "150",
},
],
[
"expo-local-authentication",
{
faceIDPermission: "Allow Alby Go to use Face ID.",
},
],
[
"expo-camera",
{
cameraPermission:
"Allow Alby Go to use the camera to scan wallet connection and payment QR codes",
recordAudioAndroid: false,
},
],
[
"expo-font",
{
fonts: [
"./assets/fonts/OpenRunde-Regular.otf",
"./assets/fonts/OpenRunde-Medium.otf",
"./assets/fonts/OpenRunde-Semibold.otf",
"./assets/fonts/OpenRunde-Bold.otf",
],
},
],
[
"expo-notifications",
{
icon: "./assets/notification.png",
},
],
"expo-router",
"expo-secure-store",
],
ios: {
supportsTablet: true,
bundleIdentifier: "com.getalby.mobile",
config: {
usesNonExemptEncryption: false,
},
infoPlist: {
LSMinimumSystemVersion: "12.0",
UIBackgroundModes: ["remote-notification"],
},
userInterfaceStyle: "automatic",
},
android: {
package: "com.getalby.mobile",
icon: "./assets/icon.png",
adaptiveIcon: {
foregroundImage: "./assets/adaptive-icon.png",
backgroundImage: "./assets/adaptive-icon-bg.png",
monochromeImage: "./assets/monochromatic.png",
},
permissions: [
"android.permission.CAMERA",
"android.permission.USE_BIOMETRIC",
"android.permission.USE_FINGERPRINT",
],
userInterfaceStyle: "automatic",
googleServicesFile: process.env.GOOGLE_SERVICES_JSON,
},
extra: {
eas: {
projectId: "294965ec-3a67-4994-8794-5cc1117ef155",
},
},
owner: "roland_alby",
};
};
81 changes: 0 additions & 81 deletions app.json

This file was deleted.

5 changes: 5 additions & 0 deletions app/(app)/settings/notifications.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Notifications } from "../../../pages/settings/Notifications";

export default function Page() {
return <Notifications />;
}
43 changes: 23 additions & 20 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { SafeAreaView } from "react-native-safe-area-context";
import Toast from "react-native-toast-message";
import { SWRConfig } from "swr";
import { toastConfig } from "~/components/ToastConfig";
import { NotificationProvider } from "~/context/Notification";
import { UserInactivityProvider } from "~/context/UserInactivity";
import "~/global.css";
import { useInfo } from "~/hooks/useInfo";
Expand Down Expand Up @@ -98,26 +99,28 @@ export default function RootLayout() {

return (
<SWRConfig value={swrConfiguration}>
<ThemeProvider value={isDarkColorScheme ? DARK_THEME : LIGHT_THEME}>
<StatusBar style={isDarkColorScheme ? "light" : "dark"} />
<SafeAreaView
className="w-full h-full bg-background"
edges={["left", "right", "bottom"]}
>
<UserInactivityProvider>
<SessionProvider>
<Slot />
</SessionProvider>
</UserInactivityProvider>
<Toast
config={toastConfig}
position="bottom"
bottomOffset={140}
topOffset={140}
/>
<PortalHost />
</SafeAreaView>
</ThemeProvider>
<NotificationProvider>
<ThemeProvider value={isDarkColorScheme ? DARK_THEME : LIGHT_THEME}>
<StatusBar style={isDarkColorScheme ? "light" : "dark"} />
<SafeAreaView
className="w-full h-full bg-background"
edges={["left", "right", "bottom"]}
>
<UserInactivityProvider>
<SessionProvider>
<Slot />
</SessionProvider>
</UserInactivityProvider>
<Toast
config={toastConfig}
position="bottom"
bottomOffset={140}
topOffset={140}
/>
<PortalHost />
</SafeAreaView>
</ThemeProvider>
</NotificationProvider>
</SWRConfig>
);
}
Expand Down
Loading
Loading