Monday 15 August 2011

android - Google fit samples not working -


I am getting mad, please help me .. I'm following the tutorial page, but without success,

  • I have added API to Android Studio
  • I have enabled the API,
  • I've got SHA1 with debug debug keystore
  • I have created a new client ID and I have created a new key in the credential section.
  • Compile and upload on the phone
  • But nothing seems to work.

    I get this stupid error: Connection Results {statusCode = unknown status code 5005, resolution = zero}

    Stupid and complex developer console ..

    Please Help me

    Today it works probably was the wrong packing name.

    Resolve

    Just rename the package. API Client

      Private Wide BuildFiltClient () {fitness client = new GoogleApiClient.Builder (reference) .adp (fitness. AIHTTIAPI) .adpi (fitness. Addens_API) adScope (new scope (Scopes.FITNESS_BODY_READ_WRITE )). ADScope (New area (Scopes.FITNESS_ACTIVITY_READ_WRITE)) .addScope (New area (Scopes.FITNESS_LOCATION_READ_WRITE)) .addScope (New area (Scopes.FITNESS_NUTRITION_READ_WRITE)) .addConnectionCallbacks (new GoogleApiClient.ConnectionCallbacks () {@ Connect (bundle bundle) public Override Zero {Reference Wrapper.getInstance (Reference) .setApiClient (Fitnessclient); (O NClientConnectListener Reference) .onclientConnected (); Logs. E ("Google Fit", "Connect"); } @ Override on Public Empty Connection Connection (int i) {}}). AddOnConnectionFailedListener (new GoogleApiClient.OnConnectionFailedListener) (// Whenever the API Client fails to connect. @Public Zero on Connection (Connection Results Result) {if (! (Resolutions) {GooglePlayServicesUtil.getErrorDialog ( Result .getErrorCode (), Reference, 0). Show (); Return;} If (! AuthInprogress) {try {authInprogress = true}; initially reference (reference, KeyConstant.REQUEST_OAUTH);} hold (IntentSender.SendIntentException E) {}}}}). Build (); }  

    No comments:

    Post a Comment