Giter Site home page Giter Site logo

sdk's Introduction

Ticwear Developer SDK

为了方便第三方开发者迅速使用SDK来开发Ticwear应用,我们提供了以下联系方式来协助开发:
QQ群:114947882
微博:Ticwear
官网:http://developer.ticwear.com/
社区:http://ask.ticwear.com/

非Android Wear开发者

我们建议您采用如下步骤

Android Wear开发者

Android Wear应用目前分为国际版和**版,**版的应用需要使用裁剪版的SDK(在文件夹android-wear-lib中可以找到)。 关于如何开发一个**版的Android Wear应用,并将此应用移植到Ticwear平台,请参考Android Wear应用兼容文档:
http://developer.ticwear.com/doc/gms-compat

如果您想让您的应用同时兼容Android Wear(国际版或**版)和Ticwear,请采用如下步骤

  1. 添加Ticwear打包方式
  • 确保你的工程根目录的 build.gradle 文件中包含了 jcenter 代码库:

    repositories {
        jcenter()
    }
  • 在工程根目录的 build.gradle 中添加对 Ticwear 打包插件的依赖:

    dependencies {
        classpath 'com.ticwear.tools.build:gradle:1.1.0'
    }
  • 在 Mobile Module 的 build.gradle 中使用 Ticwear 打包插件:

    apply plugin: 'com.ticwear.application'
    // or
    apply plugin: 'ticwear'
  • 使用 release 方式打包

  • 更多应用打包详情,参考开发者文档中的打包应用

  1. 如果你使用了GMS通讯,需要替换成 Mobvoi Mobile Services:
  • 引入mobvoi-api.jar,同时保留google-play-services.jar

  • 将代码中的Google Mobile Services (GMS) API替换为仅包名不同的Mobvoi Mobile Services (MMS) API,GoogleApiClient替换为MobvoiApiClient。在AndroidManifest.xml里面把com.google.android.gms.wearable.BIND_LISTENER替换为com.mobvoi.android.wearable.BIND_LISTENER

  • 在App启动时调用MobvoiApiManager.getInstance().adaptService(context),该方法必须在任何可能的API调用操作前调用,它将会自动探测当前系统情况,选择底层是使用MMS或GMS。如果想自己决定使用哪种API,可以通过调用MobvoiApiManager.getInstance().loadService(context, group)来指定使用Ticwear或Android Wear的API,以取代上面的adaptService方法。如果这两个方法都没有被调用,API会变成仅Ticwear系统能使用的方式。

  • 在AndroidManifest.xml中注册GMS Wearable Listener Service的代理服务:

    <service android:name="com.mobvoi.android.wearable.WearableListenerServiceGoogleImpl">
      <intent-filter>
        <action android:name="com.google.android.gms.wearable.BIND_LISTENER" />
      </intent-filter>
    </service> 
  • 重新编译打包

  1. 更多兼容AW的详情,参考开发者文档中AW应用兼容

sdk's People

Contributors

mikelei avatar tankery avatar lijunkun1988 avatar fengleiji avatar

Watchers

 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.