1 Create an Account to obtain an API Key
Visit and create your free account.
You'll be redirected to the dashboard. Copy your API key from the navigation bar.
2 Import Pushlink in your Android Project
Option #1: Gradle
Copy ...
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
...
Copy //project/app/build.gradle
dependencies {
implementation 'com.pushlink:pushlink-android:5.6.0'
...
}
Option #2: Maven
Copy <repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.pushlink</groupId>
<artifactId>pushlink-android</artifactId>
<version>5.6.0</version>
</dependency>
Option #3: Download JAR File
3 Set up permissions in your AndroidManifest.xml
Copy <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application android:name=".PushlinkSetup" ... >
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<provider
android:name="com.pushlink.android.FileProvider"
android:authorities="your.package.name" <--- change it ---
android:exported="true" />
</application>
4 Call PushLink.start()
in the Main UI Thread
Copy public class PushlinkSetup extends android.app.Application {
@Override
public void onCreate() {
super.onCreate();
String yourDeviceID = Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID);
PushLink.start(this, R.mipmap.ic_launcher, "yourApiKey", yourDeviceID);
}
}
Don't call the start method inside an ordinary Activity
Call this inside the class that extends android.app.Application
precisely, as shown above.
5 Build the APK and upload it to Pushlink
You can find the Upload APK button in the menu bar at the Pushlink dashboard.
Don't forget, or your installation will fail:
1 - Upload a fully signed release APK to Pushlink.
3 - Give your app installation and notification permissions.
6 Enroll your devices (Install & run)
First installation options:
Option #1: From the terminal
A tech person usually performs this before sending the device to the field.
Copy curl -o yourApp.apk 'https://www.pushlink.com/download?package=some.package.name&api_key=yourApiKey'
adb install yourApp.apk
Option #2: From the device itself
Download the APK from QRCode and install it.
Final words
That's it. Now, every time you upload a new app version to Pushlink and make that the current version, all the devices using your application will receive and apply the update.
Look at all the documentation to understand how Pushlink can help you.