Integrated third-party components--seven fish customer service

Source: Internet
Author: User

background
Recently do mall app, which need to use the function of customer service consulting, immediately to look at the Internet to see what support SDK, ring letter, Cloud, NetEase seven fish and so on, look at these several SDK documents, found that NetEase is the most friendly, and the client's UI is the most beautiful and comfortable, so it was selected. The boss said the price is not to be considered.

Development Guide
Address: http://qiyukf.com/newdoc/html/Android_SDK_Guide.html
If you do not understand as far as possible to see the document can be resolved, is not understand can consult seven fish technology customer service staff, very good attitude.

The pit I met
First, the integration, open the Customer service window, select pictures can not be displayed;
The reason is that seven of the fish read the picture using Asynctask to read the picture, and I app home wheel map function also used asynctask, resulting in seven fish Asynctask blocked, unable to read the picture, so the rotation of the asynctask using a timer to solve the problem. Asynctask can only perform short tasks, and lengthy time-consuming tasks can block other tasks that use Asynctask.

Second, the integration, there are new information, Android version will show a notification, click can not enter the customer service page
This part of the seven-fish SDK for developers to more flexible operation of the page, and did not provide the appropriate API, which requires our own ways to achieve.
1. My MyApplication code is as follows, you can see the new addition of a setserviceentranceactivity method, this is to implement the current page of the app, click on the notification can also enter the page

public class MyApplication extends application {private Statusbarnotificationconfig mstatusbarnotificationconfig;

        public void OnCreate () {super.oncreate ();
        Mstatusbarnotificationconfig=new Statusbarnotificationconfig ();

        Mstatusbarnotificationconfig.notificationentrance= Homeactivity.class; if (Unicorn.init (this, Config.qy_app_key, Options (), New Uilimageloader ()) {Logutil.showlog ("Init Qiyu SDK S Uccess! ");}
        else {logutil.showlog ("Init Qiyu SDK error!"); } if (Inmainprocess (this)) {imageloader.getinstance (). Init (imageloaderconfiguration.createdefault (th
        is));
        }else {logutil.showlog ("not inmainprocess");
    }//If the return value is NULL, all default parameters are used.
        Private Ysfoptions options () {ysfoptions options = new Ysfoptions ();
        Options.statusbarnotificationconfig = Mstatusbarnotificationconfig; Options.statusbarnotificationconfig.vibrate=falSe
        Options.savepowerconfig = new Savepowerconfig ();
    return options;
        public static Boolean inmainprocess (context context) {String PackageName = Context.getpackagename ();
        String ProcessName = systemutil.getprocessname (context);
    Return Packagename.equals (ProcessName); /** * Set Click notification message to enter the page * @param activity/public void setserviceentranceactivity (Class ?
    Extends activity> activity) {mstatusbarnotificationconfig.notificationentrance=activity; }

}

Then you add the following code to your base baseactivity OnCreate ():

((MyApplication) getapplication ()). Setserviceentranceactivity (GetClass ());

2. Realize the function of opening the Customer Service window after clicking Notification;
In the base baseactivity of OnCreate () add:

Seven Fish customer service
parseintent ();

In the base baseactivity replication:

    @Override
    protected void onnewintent (Intent Intent) {
        setintent (Intent);
        Parseintent ();
    }

    /**
     * Seven fish need
     /
    private void Parseintent () {
        Intent Intent = Getintent ();
            To avoid opening the Customer service window
            setintent (New Intent ()) when resuming from the stack;
    

Don't understand the suggestion to ask.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.