【问题标题】:Gear Fit. Samsung cup SDK doesn't works after reboot齿轮配合。三星杯 SDK 重启后无法使用
【发布时间】:2015-06-20 10:17:57
【问题描述】:

我正在尝试在我的软件中添加齿轮配合支持。

基本上,当一个众所周知的事件发生时,我会尝试在齿轮上创建一个对话框来显示一些数据。

当我在全新安装后运行我的软件时,一切都按预期运行,并且它继续运行良好,直到手机重新启动。 重新启动后,齿轮配合对话框不再出现。

测试是在运行 Android 4 和 Android 5 的 note2 和 note 3 上执行的。两者的结果相同。

当一切正常时,logcat 会显示类似的内容。

04-14 18:25:17.570: I/ScupDialog(17663): New Dialog (100)
04-14 18:25:17.590: W/ContextImpl(17663): Implicit intents with startService are not safe: Intent { act=com.samsung.android.sdk.cup.ScupService } android.content.ContextWrapper.bindService:559 com.samsung.android.sdk.cup.ScupServiceCommunicator.connect:-1 com.samsung.android.sdk.cup.ScupDialog.construction:-1 
04-14 18:25:17.600: D/VibratorService(754): Turning vibrator off - ImmVibe.
04-14 18:25:17.600: V/VibratorService(754): vibrateMagnitude - package: com.villa.android.orari3, ms: 2000, token: null, magnitude: 2000
04-14 18:25:17.620: I/ScupService(1391): setCallback from com.villa.android.orari3
04-14 18:25:17.620: D/ScupService(1391): found app id = 3
04-14 18:25:17.620: D/ScupService(1391): isConnected.. 
04-14 18:25:17.630: I/ScupDialog(17663): Add dialog (100)
04-14 18:25:17.640: I/ScupService(1391): sendCommand()
04-14 18:25:17.640: D/ScupService(1391): command type : COMMAND_DATA

重启后行为不同

04-14 18:19:08.221: I/ScupDialog(10822): New Dialog (101)
04-14 18:19:08.231: W/ContextImpl(10822): Implicit intents with startService are not safe: Intent { act=com.samsung.android.sdk.cup.ScupService } android.content.ContextWrapper.bindService:559 com.samsung.android.sdk.cup.ScupServiceCommunicator.connect:-1 com.samsung.android.sdk.cup.ScupDialog.construction:-1 
04-14 18:19:08.241: I/ScupDialog(10822): Add dialog (101)
04-14 18:19:08.251: I/ScupService(1391): sendCommand()
04-14 18:19:08.261: E/ScupService(1391): Fail to find client info. 
04-14 18:19:08.261: E/ScupService(1391): Package name : com.villa.android.orari3
04-14 18:19:08.261: D/VibratorService(754): Turning vibrator off - ImmVibe.
04-14 18:19:08.271: V/VibratorService(754): vibrateMagnitude - package: com.villa.android.orari3, ms: 2000, token: null, magnitude: 2000

有没有人经历过这种行为?

感谢您的任何建议。

【问题讨论】:

    标签: android samsung-gear-fit


    【解决方案1】:

    好吧,自己动手解决。 谁在乎.. 问题位于清单文件中。 基本上,意图过滤器定义位于错误的位置。 在第一次安装期间,cupservice 功能将应用程序放入“授权应用程序”列表中。 这允许程序在第一次安装后工作。 重新启动时,ScupService 会扫描您的应用程序以找到“授权”的应用程序。 Intent Filter 定义在错误的位置意味着不允许......这就是我的程序无法再驱动齿轮配合的原因。

    我希望这可以帮助其他人。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-08
      • 1970-01-01
      • 2018-03-08
      • 1970-01-01
      • 2014-04-11
      • 2016-05-31
      • 2015-06-15
      相关资源
      最近更新 更多