Skip to content

jschaves/Android-mobile-app-of-your-website-with-push-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Mobile App of Your Website With Push Notifications

Create an Android mobile app of your website with push notifications with Firebase and OneSignal

Requirements for creating a web application with push notifications

Step 1. Create A Firebase Project If you already have an FCM project, skip to Step 2.

imagen

Step 2. Getting Your Firebase Cloud Messaging Token And Sender ID Click the gear icon in the top left and select Project settings.

imagen

Select the Cloud Messaging tab. Save the Server key and Sender ID.

imagen

Step 3. Login https://onesignal.com/ Configure Your OneSignal App's Android Platform Settings In the OneSignal dashboard, select your app, then go to: Settings > Platforms > Google Android

imagen

Paste your Firebase Server Key and Firebase Sender ID into the fields and click Next all the way to Save.

imagen

Then Click Native Android then save

imagen

Step 4. copy your App ID

imagen

Download to your computer https://github.com/jschaves/Android-mobile-app-of-your-website-with-push-notifications.git

Paste App ID it in /app/src/main/java/change/name/app/MainApplication.java Line 7 and package change.name.app by your package name in line 1

imagen

Step 5. rename your package, replace change/name with your actual package name, for example if your "package other.name2.app" would have to change the "cahge/name" folders to an "other/name2"

imagen

change your id app line 13 /app/build.gradle

imagen

change the name of your package line 1 and the name of your web in Line 24 /app/src/main/java/change/name/app/MainActivity.java

package change.name.app by your package name YOUR.HOSTNAME for example google.com

imagen

change the name of your package line 1 and the name of your web in Line 16 /app/src/main/java/change/name/app/MyWebViewClient.java

package change.name.app by your package name YOUR.HOSTNAME for example google.com

imagen

rename your package line 3 and line 19 /app/src/main/AndroidManifest.xml package change.name.app by your package name

imagen

Step 6. open the project with Android Studio and compile the APK

imagen

About

Create an Android mobile app of your website with push notifications with firebase and onesignal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published