Pushlink
  • Welcome to Pushlink Docs
  • Getting Started
  • Concerned about security?
  • Update Strategies
  • Android Device Id Guide
  • Metadata
  • Exception Notification
  • Pushlink APIs
  • Integrations
  • Android changes
  • Network problems?
  • Downgrade an APK?
  • Changelog
  • FAQ
Powered by GitBook
On this page
  • 1 Create an Account to obtain an API Key
  • 2 Import Pushlink in your Android Project
  • Option #1: Gradle
  • Option #2: Maven
  • Option #3: Download JAR File
  • 3 Set up permissions in your AndroidManifest.xml
  • 4 Call PushLink.start() in the Main UI Thread
  • 5 Build the APK and upload it to Pushlink
  • 6 Enroll your devices (Install & run)
  • Option #1: From the terminal
  • Option #2: From the device itself
  • Final words

Getting Started

Get up and running with Pushlink in 6 small steps

PreviousWelcome to Pushlink DocsNextConcerned about security?

Last updated 9 months ago

Pushlink is currently working for all Android versions. Tested up to the Android 14 - API 33. See the to check compatibility.

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

...
  repositories {
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
  }
...
//project/app/build.gradle
dependencies {
  implementation 'com.pushlink:pushlink-android:5.6.0'
  ...
}

Option #2: Maven

<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

<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

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.

It's up to you to identify the device

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.

curl -o yourApp.apk 'https://www.pushlink.com/download?package=some.package.name&api_key=yourApiKey'
adb install yourApp.apk

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 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.

Make sure you've read the .

2 - Increment the

4 - Adapt your app to the

changelog
https://www.pushlink.com/signup.xhtml
Download pushlink-android-5.6.0.jar
[s3 mirror]
Android Device ID Guide
versionCode
newer Android versions