用户工具

站点工具


Getui Plugins

Getui plugin is a push plugin developed by Cobub Razor which is based on Getui.

It integrates the function of Getui and the tag function of Cobub Razor, and makes you push messages more conveniently,quickly and accurately. The Open Getui platform has helped enterprises’ App push messages through low_cost Internet, provide a sound, efficient and stable service system which has solved the problem of message exchange between Internet cloud and Mobile client.

Steps of integration:

Before integrating the Getui plugin,please make sure that the related table has been created in your database.Go here to download the related SQL file and import it into your database(Note:Please modify the table prefix ‘razor_’ to the prefix which is the same with your tables prefix in your database before importing ).

1.Ensure that Cobub Razor and Cobub User Center have been binded together successfully. If not binding, please come here.

2.Activate the Getui App and obtain an authorization code in Cobub Razor. If you need to use the push function, Cobub Razor system will provide an appKey according to the app(Android only) when you have activated an app.

3.Integration of Getui SDK Note:You must download the SDK from the Cobub site,rather than Getui website and register a Getui account,or you will can not use the push function of Getui in CobubRazor system.

Steps of integration:

3.1 Download SDK. Please click here to download the SDK.

3.2.Add the SDK.jar of Cobub Razor and GexinSdk.jar to the libs directory of your project.

3.3.Right-click your project and select Build Path→Configure build path…—> Java Build Path—>Libraries—>Add External JARs.. —>select Libs directory of the current project, select the SDK.jar and GexinSdk.jar, then click on OK.

3.4.Configure AndroidManifest.xml.

  • Add permissions
  • Add declarations

Note:PACKAGENAME should be replace by the package name of your project. UMS_APPKEY,appid,appkey and appsecret are obtained from Cobub razor.

  • Add following content(red part) in the entrance Activity of the App.

3.5. Initialization of SDK Import MessageManager in Main Activity of your application, as following:

import com.igexin.slavesdk.MessageManager;

Then initialize the SDK in the initialization phase of your application:

MessageManager.getInstance().initialize(this.getApplicationContext());

This method can be called only in Activity or Service. Generally,you can call it in the OnCreate() method of Activity. To prevent accidents from causing initialization failed, it is suggested that the application calls this interface one time when starting for every time.

3.6. Copy app_download_notification.xml and notification.xml to res/layout/ of your project,or it will not support the function of download and the custom notification icon.

MsgReceiver.java is used to get the content,as following:

package com.test;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.igexin.sdk.Consts;
public class MsgReceiver extends BroadcastReceiver {
@Override
    public void onReceive(Context context, Intent intent) {
        Bundle bundle = intent.getExtras();
        switch (bundle.getInt(Consts.CMD_ACTION)) {
            case Consts.GET_MSG_DATA:
                // get the data of Touchuan(payload)
                byte[] payload = bundle.getByteArray("payload");
                if (payload != null) {
                    String data = new String(payload);
                    Log.d("GexinSdkDemo", "Got Payload:" + data);
                    // TODO:receive and deal with the data of Touchuan(payload)
                }
                break;
            default:
                break;
        }
    }
}

4.Use the push sevice of Getui Open the home page of Getui in Cobub Razor,all apps of Android of current system will be displayed in here. There are two operations after each application named ‘push’ and ‘Touchuan push’,which you can choose according to your own message type. After entering the detail page of push,you can choose some tags or none(push to all) according to your requirements.

5.View Getui reports Open the home page of Getui Reports,you can view the details of push report. Note:The system only supports 30 days query. You can choose the time period at the top right-hand corner. The home page of report displays all activated apps, click on “View Report” can view the detailed push report of the app.

6.Account and Statistics Getui Plug-in counts once a month,system will count the number of online users of last month of all apps. Push Plug-in charge is according to the number of online during the month,have nothing to do with the number of push. Ensure that the push service operates successfully,please go to your personal account in Cobub User Center and pre recharge your account.

7.FAQs

What’s the Touchuan Push? Touchuan message is pushed to client by the push server through SDK,how to deal with this message is handled by the users themselves.(Note:The message content does not support the escape character) How the client receive the Touchuan message, please see 《Integration Guide Of Getui》 Ensure that the push service operates successfully,please go to your personal account in Cobub User Center and pre recharge your account.

How to get the Package Name? Application ID(Package Name),which often begin with “com”. Method one: Install and open Detection tools of package name

Method two:

  • 1.Open your phone application.
  • 2.Click on “Setting” → “Applications” → “Manage Applications” → “Running”,find your application.
  • 3.You can see the application ID in “Process”.(Package Name)
en/razor/plugins/getui.txt · 最后更改: 2017/07/14 11:18 (外部编辑)