Skip to content
This is a sample application powered by Pushe.co push notification which is build with Android Studio.
Java
Branch: master
Clone or download
Latest commit 48d00a6 Aug 13, 2019

README.md

Pushe for Android native

Simple implementation of Pushe SDK using Android studio and Java.

You can see other samples:

Run the example

  • Install git if you don't have it.
  • Run: git clone https://github.com/pusheco/android-studio-sample.git
  • Open it with Android studio and run it on your device.

Installation on your project

dependencies {
   implementation 'co.ronash.android:pushe-base:1.6.3' // Or compile for lower gradles
}

AndroidManifest.xml

Go to Pushe console and get the manifest content and add it to your project AndroidManifest.xml

The manifest will be a tag like this:

<meta-data android:name="co.ronash.pushe.token"
            android:value="PUSHE_76583046756" />

The value PUSHE_76583046756 is for demo panel. Replace it with your own token.

And if you need location-based features, add Location permission to the manifest as well.

Add the codes

In your Application or activity class, add this to onCreate() method:

Context context = this.getApplicationContext(); // This is optional. The `initialize` needs a context. Provide it from anywhere you want.
Pushe.initialize(context, true);

More features

All features are added to the sample. You can check them out.

Now run and install your app on a device or emulator that has google-play-service installed. Pushe needs minimum android api=15 and google-play-service version >= 3 to run.

More Info

For detailed documentations visit https://pushe.co/docs/android-studio/

Contribution

Feel free to add anything you think is suitable to be in this sample.
It does not follow any specific code style. So just read the code a little bit and send a pull request at anytime. We'll be happy :D.

Support

Email:

If you have any problem, please contact us using this email, we will get back to you right away: support [at] pushe.co

You can’t perform that action at this time.