Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26040] onActivityResult dont called

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsHyperloop
Labelsn/a
ReporterYanko Valera
AssigneeGary Mathews
Created2018-02-06T17:30:58.000+0000
Updated2018-05-15T09:13:25.000+0000

Description

I'm launching Google Fit permissions window but once the user has accepted there's no way know the result, onActivityResult is never called. Here is my code
   var windowActivity = new Activity(activity);

    windowActivity.onActivityResult = function(requestCode, resultCode, intent) {
        console.log("result: " + requestCode);
    };

    if (!GoogleSignIn.hasPermissions(GoogleSignIn.getLastSignedInAccount(windowActivity), fitnessOptions)) {
        GoogleSignIn.requestPermissions(
            windowActivity,
            REQUEST_OAUTH_REQUEST_CODE,
            GoogleSignIn.getLastSignedInAccount(windowActivity),
            fitnessOptions
        );
    } else {
        //google fit ready to access
    }
No error happens, it's just being ignored Environment: SDK7.0.1, Hyperloop 3.0.1/3.0.2. Google Play Fitness API 11.8.0. Testing in Google Nexus 5X running Android 8.1.0 let me know if you need more details

Attachments

FileDateSize
googlefittest.zip2018-02-07T21:34:22.000+00005183082

Comments

  1. Sharif AbuDarda 2018-02-06

    Hello, Please provide a full reproducible code/sample project that we can use to reproduce the issue. Thanks.
  2. Yanko Valera 2018-02-07

  3. Sharif AbuDarda 2018-02-07

    Hello, Please attach the sample code here and details steps to follow for successful reproduction. Also, your environment details are missing. Please provide. Thanks.
  4. Yanko Valera 2018-02-07

    Environment details are in description: Environment: SDK7.0.1, Hyperloop 3.0.1/3.0.2. Google Play Fitness API 11.8.0. Testing in Google Nexus 5X running Android 8.1.0 let me know if you need more details Code attached, to reproduce just run the app, it'll show the google auth window, and returning should trigger the onActivityResult for the Activity but it's not working.

JSON Source