Gear Fit. Samsung cup SDK doesn't works after reboot

175 Views Asked by At

I'm trying to add gear fit support to my software.

Basically when a well known event occurs I try to create a dialog on gear showing some data.

Well everything works as expected when I run my software after a brand new installation,and it continues to work well until phone reboot. After reboot the dialog on gear fit doesn't appear anymore.

Test was executed on note2 and note 3 running Android 4 and Android 5. Both with the same results.

When everything works logcat show something like.

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

while after reboot the behaviour is different

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

Has anyone experienced this behavior ?

Thanks for any suggestions.

Neod

1

There are 1 best solutions below

0
On

Well DIY and solve. For who cares.. Problem was located in manifest file. Basically the intent filter definition was located in the wrong place. During the first installation a cupservice function put the application in a list of "authorized applications. This allow the program to works after the first installation. When a reboot occurs, ScupService scan your application in order to find the "authorized" one. Intent Filter definition in wrong position means not allowed.... and this is the reason why my program was not able to drive gear fit anymore.

I hope this could help someone else.

Neod