Giter VIP home page Giter VIP logo

sdk's Introduction

Ticwear Developer SDK

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

非Android Wear开发者

我们建议您采用如下步骤

Android Wear开发者

您可以很快将自己的应用移植到Ticwear平台,请参考Android Wear项目迁移文档:
http://developer.ticwear.com/doc/gms-compat

如果您想让您的应用同时兼容Android Wear和Ticwear,请采用如下步骤

  • 引入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中找到Google指定Wear子App位置的配置(可能是自动生成的),如:

    <meta-data android:name="com.google.android.wearable.beta.app"
               android:resource="@xml/wearable_app_desc"/>

    在该行后加入一行配置用来为Ticwear指定子App位置,如:

    <meta-data android:name="com.mobvoi.ticwear.app"
               android:resource="@xml/wearable_app_desc"/>
  • 在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> 
  • 重新编译打包

sdk's People

Contributors

mikelei 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.