Getting Started
Get up and running with Pushlink in 6 small steps
Pushlink is currently working for all Android versions. Tested up to the Android 11.

1 Create an Account to obtain an API Key

Visit https://www.pushlink.com/signup.xhtml 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

1
//project/build.gradle
2
allprojects {
3
repositories {
4
google()
5
jcenter()
6
maven { url "https://jitpack.io" }
7
}
8
}
Copied!
1
//project/app/build.gradle
2
dependencies {
3
implementation 'com.pushlink:pushlink-android:5.5.3'
4
}
Copied!

Option #2: Maven

1
<repositories>
2
<repository>
3
<id>jitpack.io</id>
4
<url>https://jitpack.io</url>
5
</repository>
6
</repositories>
7
8
<dependency>
9
<groupId>com.pushlink</groupId>
10
<artifactId>pushlink-android</artifactId>
11
<version>5.5.3</version>
12
</dependency>
Copied!

Option #3: Download JAR File

3 Set up permissions in your AndroidManifest.xml

1
<uses-permission android:name="android.permission.INTERNET" />
2
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
3
<application android:name=".PushlinkSetup" ... >
4
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
5
<provider
6
android:name="com.pushlink.android.FileProvider"
7
android:authorities="your.package.name" <--- change it ---
8
android:exported="true" />
9
</application>
Copied!
The use of org.apache.http.legacy is required in Android 9 (API 28) or higher

4 Call PushLink.start() in the Main UI Thread

1
public class PushlinkSetup extends android.app.Application {
2
@Override
3
public void onCreate() {
4
super.onCreate();
5
String yourDeviceID = Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID);
6
PushLink.start(this, R.mipmap.ic_launcher, "yourApiKey", yourDeviceID);
7
//you can use R.drawable.icon for older sdks
8
}
9
}
Copied!
Avoiding headaches
Don't call the start method inside an ordinary Activity. Call this as higher as possible inside the class that extends android.app.Application exactly as shown above. This is the right place to call things that must survive for the whole application lifetime. Also, this is going to be called again if your application was restarted by the android system or anything else.
It's up to you to identify the device
Make sure you've read the Android Device ID Guide.

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 - Don't forget to upload to Pushlink a full signed release APK. It's a common mistake uploading development/debug APKs. Also, remember to checkV2 (Full APK Signature)in the Android Studio release wizard (Android 11 requirement).
2 - Don't forget to increment theandroid:versionCode
3 - Don't forget to adapt your app to the newer Android versions.

6 Enroll your devices (Just install & run)

First installation options:

Option #1: From the terminal

This use to be performed by a tech person before sending the device to the field.
1
curl -o yourApp.apk 'https://www.pushlink.com/download?package=some.package.name&api_key=yourApiKey'
2
adb install yourApp.apk
Copied!
You can also generate a hashed download link in the dashboard to hide your credentials.

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 apk version to Pushlink and make that the current version, all the devices using your application will receive and apply the update.
Take a look at the whole docs to get an idea of how Pushlink can help you with.
Last modified 2mo ago