Skip to content

Commit

Permalink
Merge pull request #22 from ben-xD/android-push-tool-deno
Browse files Browse the repository at this point in the history
feat(tools): add android tool for sending push notifications using Node
  • Loading branch information
ben-xD committed Jul 28, 2023
2 parents d168f3b + 8006e80 commit 8de95ec
Show file tree
Hide file tree
Showing 7 changed files with 2,109 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.env
11 changes: 11 additions & 0 deletions tools/android/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Android tools for push notifications

## Setup
- Install Node
- Install pnpm: `npm install --global pnpm`
- Install dependencies: `pnpm install`

## Usage
- Create a env file: `cp example.env .env`
- Update `.env` file with your credentials. This file is git ignored won't be committed to the repo.
- Run script: run `pnpm start`
3 changes: 3 additions & 0 deletions tools/android/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Taken from the application (either manually out of the stdout of Push example app, your own app or programatically sent to your servers).
FCM_REGISTRATION_TOKEN=
GOOGLE_APPLICATION_CREDENTIALS=/Users/zen/.android/example-app-firebase-adminsdk-123-abc.json
22 changes: 22 additions & 0 deletions tools/android/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "push-tool-android",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "tsx send_android.ts"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"dotenv": "^16.3.1",
"firebase-admin": "^11.10.1",
"tsx": "^3.12.7",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/node": "^20.4.5",
"typescript": "^5.1.6"
}
}
Loading

0 comments on commit 8de95ec

Please sign in to comment.