Our team has always been a loyal user of Pushpush. Recently, PushPush launched a new product, “Image · User Portrait”, which just fits our business needs very well, so we also tried it. Overall, the results are good, and this article will show you how to quickly integrate an Android SDK from scratch.

Log in to the account and create an application to obtain the APPID

1, access [pushed developer center] (https://dev.getui.com/dev/#/login), click the register now: (you can enter the www.getui.com push from a website, click on the top right corner “developer center”.) Of course, if you already have a Twitter account, just sign in.

2. Fill in and register your account according to your personal situation

3, return to push [a developer center] (https://dev.getui.com/dev/#/login) to use the last step registered good account login, after entering the developer platform panel, select the menu bar on the left, as users, portrait:

4. After entering the image · User portrait panel, select the new application in the upper right corner to add a new application:

5. Fill in the relevant information of the application, check Android, and click Submit new Application:

6. After the application is successfully added, the page automatically returns to the application list. To find the new app, click Apply Configuration:

7. Information such as APP ID can be seen under the configuration information. Copy and save the information, and the APP ID will be used in the subsequent integration:

Configure something like an SDK

The Android SDK provides mainstream Gradle integration, which is easy to operate and can be done in a few lines of code.

In the top-level build.gradle file named after the project name, add the following Maven library addresses:

2. Configure dependencies

Reference a library like the SDK dependencies in the app/build.gradle file, as shown in the figure



In order to get BroadcastReceiver broadcast after the SDK starts, we need to manually write an extension of BroadcastReceiver and configure the Receiver in androidmanifest.xml:

DefaultConfig in app/build.gradle Add the Manifestplaceholder under Android. DefaultConfig.



Your channel is where you publish.


Androidmanifest.xml; androidmanifest.xml; androidmanifest.xml

To initialize the SDK

I. It is recommended to call the SDK initialization code from the original startup entry (onCreate of application) as follows:

2. Receives giUID in Receiver and obtains user portrait by GIUID:

The above is my integration of a push user portrait products (like) of the whole process, I hope to help you! If you have any other questions, please feel free to share them in the comments section.