roughike / flutter_facebook_login

A Flutter plugin for allowing users to authenticate with native Android & iOS Facebook login SDKs.
BSD 2-Clause "Simplified" License
403 stars 331 forks source link

Inactivity, disconnecting from the service. #149

Closed AlthafAslam closed 5 years ago

AlthafAslam commented 5 years ago

This is what my debug Console is showing:

V/FA (22976): Recording user engagement, ms: 82583 V/FA (22976): Connecting to remote service W/ActivityThread(22976): handleWindowVisibility: no activity for token android.os.BinderProxy@3b0f83e V/FA (22976): Activity paused, time: 2134228315 V/FA (22976): onActivityCreated D/FA (22976): Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=82583, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-1794852243979232141}] V/FA (22976): Connection attempt already in progress D/FA (22976): Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=MainActivity, firebase_previous_id(_pi)=-1794852243979232141, firebase_screen_class(_sc)=FacebookActivity, firebase_screen_id(_si)=-1794852243979232139}] V/FA (22976): Connection attempt already in progress V/FA (22976): Connection attempt already in progress V/FA (22976): Activity resumed, time: 2134228455 D/FA (22976): Connected to remote service V/FA (22976): Processing queued up service tasks: 4 I/Timeline(22976): Timeline: Activity_launch_request time:1450044339 intent:Intent { cmp=com.facebook.katana/.ProxyAuth (has extras) } V/FA (22976): Recording user engagement, ms: 1943 V/FA (22976): Activity paused, time: 2134230397 D/FA (22976): Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=1943, firebase_screen_class(_sc)=FacebookActivity, firebase_screen_id(_si)=-1794852243979232139}] D/FA (22976): Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=FacebookActivity, firebase_previous_id(_pi)=-1794852243979232139, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-1794852243979232141}] V/FA (22976): Activity resumed, time: 2134231947 V/FA (22976): Inactivity, disconnecting from the service I/Timeline(22976): Timeline: Activity_launch_request time:1450056524 intent:Intent { act=NATIVE_WITH_FALLBACK cmp=com.untangle.futurista/com.facebook.FacebookActivity (has extras) } V/FA (22976): Recording user engagement, ms: 10617 V/FA (22976): Connecting to remote service W/ActivityThread(22976): handleWindowVisibility: no activity for token android.os.BinderProxy@ab611b0 V/FA (22976): Activity paused, time: 2134242564 V/FA (22976): onActivityCreated D/FA (22976): Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=10617, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-1794852243979232141}] V/FA (22976): Connection attempt already in progress D/FA (22976): Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=MainActivity, firebase_previous_id(_pi)=-1794852243979232141, firebase_screen_class(_sc)=FacebookActivity, firebase_screen_id(_si)=-1794852243979232138}] V/FA (22976): Connection attempt already in progress V/FA (22976): Connection attempt already in progress V/FA (22976): Activity resumed, time: 2134242622 D/FA (22976): Connected to remote service V/FA (22976): Processing queued up service tasks: 4 I/Timeline(22976): Timeline: Activity_launch_request time:1450058159 intent:Intent { cmp=com.facebook.katana/.ProxyAuth (has extras) } V/FA (22976): Recording user engagement, ms: 1594 V/FA (22976): Activity paused, time: 2134244216 D/FA (22976): Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=1594, firebase_screen_class(_sc)=FacebookActivity, firebase_screen_id(_si)=-1794852243979232138}] D/FA (22976): Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=FacebookActivity, firebase_previous_id(_pi)=-1794852243979232138, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-1794852243979232141}] V/FA (22976): Activity resumed, time: 2134246889 V/FA (22976): Inactivity, disconnecting from the service

**The App shows the pop-up. and When I click on Continue with My Facebook account, It gets disconnecting from the service.

Below is my code for Facebook sign-up:**

`facebookAuth({bool isSignUp}) async { final FacebookLoginResult result = await facebookSignIn.logInWithReadPermissions(['email']);

switch (result.status) {
  case FacebookLoginStatus.loggedIn:
    final FacebookAccessToken accessToken = result.accessToken;
    FbGraphResponse graphResponse = await ObjectFactory()
        .repository
        .facebookGraph(accessToken: accessToken.token);

    if (accessToken != null) {
      if (isSignUp) {
        socialSignUp(
            provider: "facebook",
            email: graphResponse.email,
            token: accessToken.userId,
            firstName: graphResponse.firstName,
            lastName: graphResponse.lastName);
      } else {
        socialLogin(
            provider: "facebook",
            email: graphResponse.email,
            token: accessToken.userId);
      }
    }
    break;
  case FacebookLoginStatus.cancelledByUser:
    isSignUp
        ? _socialSignUp.sink
        .addError(FacebookLoginStatus.cancelledByUser.toString())
        : _login.sink
        .addError(FacebookLoginStatus.cancelledByUser.toString());
    break;
  case FacebookLoginStatus.error:
    isSignUp
        ? _socialSignUp.sink
        .addError(FacebookLoginStatus.cancelledByUser.toString())
        : _login.sink
        .addError(FacebookLoginStatus.cancelledByUser.toString());

    break;
}

}`