0

I want to know from my android app, if there is a Samsung Gear configured by the user that can be connected or not.

For the moment I use this code, which is a lesser evil: if the user has the samsung manager installed, I guessed he also have a samsung Gear:

 PackageManager pm = context.getPackageManager();
    try {
        pm.getPackageInfo("com.samsung.android.gearmodule", PackageManager.GET_ACTIVITIES);
        return true;
    }
    catch (PackageManager.NameNotFoundException e) {
        return false;
    }
Benoit
  • 1,922
  • 16
  • 25

1 Answers1

0

http://img-developer.samsung.com/onlinedocs/sms/accessory/index.html There is nice docs related to SAP protocol.

http://developer.samsung.com/api-reference/list.do - there are few resources that might help you. Check "accessory" items. Sample apps are useful

Konrad
  • 260
  • 1
  • 11
  • SAP start a connection to exchange data. But the client must answer, that means the Gear must be on, and the associated Widget must answer to requests. I can't find a function that only tell us if the user have connected a Gear. – Benoit Nov 25 '14 at 15:45