Giter VIP home page Giter VIP logo

hhdoctorsdk_demo_android's Introduction

和缓视频医生Android SDK对接文档 3.5.0.07281745(快速接入版本)

和缓视频医生SDK音箱版本接入文档

和缓视频医生SDK电视版本接入文档

一、引入SDK

在project的build.gradle文件中加入如下配置,由于SDK是做成了私有库所以必须加入此配置

repositories {
    
    maven {
        credentials {
            username 'hh-public'
            password 'OFGB5wX0'
        }
        url 'http://develop.hh-medic.com/repository/maven-public'
    }
}

在app moudule的build.gradle文件中引用和缓视频医生SDK,如下:

implementation 'com.hhmedic.android.sdk:hh_trtc:3.5.0.07281745'

二、 初始化SDK

HHSDKOptions options = new HHSDKOptions(sdkProductId); //productId由和缓分配的产品Id
options.dev = true; //修改这个参数来切换测试环境和正式环境,当设置为true的时候是测试环境,设置为false为生产环境
HHDoctor.init(getApplicationContext(), options);

三、登录登出


//登录
String userToken = "这个参数是服务器和和缓服务器对接后得到的用户userToken";
HHDoctor.login(this, userToken, new HHLoginListener() {
            @Override
            public void onSuccess() {
               //这里处理登录后的逻辑
            }

            @Override
            public void onError(String s) {
               //处理登录失败后的逻辑,一般不会发生
            }
        });
        
//登出
HHDoctor.logOut(this); //this指的是上下文Context

四、跳转首页(必须登录后)

HHDoctor.message(this); //this指的是上下文Context

如果需要支持O2O购药,跳转首页的同时上传经纬度,方法如下:

 Location.sendLocation(context, longitude, latitude);

以上方法参数说明:context是上下文, longitude和latitude分别是经纬度

五、Demo及详细文档

Demo https://github.com/HHMedic/HHDoctorSDK_demo_Android/tree/trtc

详细接入文档 https://github.com/HHMedic/HHDoctorSDK_demo_Android/blob/trtc/Document.md

TRTC版本接入图像旋转问题及解决方案整理 https://github.com/HHMedic/HHDoctorSDK_demo_Android/blob/trtc/Rotation.md

注意如果需要对APP瘦身一定保留引用和缓视频SDK后出现的pic_error_78219.png这张图片,这张图片有特殊用途,删除会造成SDK不可用。

hhdoctorsdk_demo_android's People

Contributors

hhmedic avatar mingmingsuper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.