Simple implementation of PushPole SDK using Android studio and Java.
You can see other samples:
git clone https://github.com/push-pole/android-studio-sample.git
dependencies {
implementation 'com.pushpole.android:pushsdk:1.7.1' // Or compile for lower gradles
}
Go to PushPole 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="com.pushpole.sdk.token"
android:value="PUSHPOLE_76583046756" />
The value PUSHPOLE_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.
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.
PushPole.initialize(context, true);
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. PushPole needs minimum android api=15 and google-play-service version >= 3 to run.
For detailed documentations visit https://docs.push-pole.com/docs/android-studio/
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.
If you have any problem, send us an issue.