Facebook invitation popup impossibly slow and unstable

216 views
Skip to first unread message

Tomasz Wilczynski

unread,
Mar 28, 2014, 9:59:02 AM3/28/14
to apportabl...@googlegroups.com
Hi,

I am able to send invitations by FBConnect popups. However it requires huge patience because it is very very slow.
In fact, it jams my game for 10 seconds just loading the popup. Sometimes even when it's dismissed my touches aren't working for 10-20 seconds.

Oh, and yes, it crashes quite often but I haven't been able to determine exactly why.

I realize that Bridging such big framework is very challenging, but is there anything you can do to speed it up?

Thanks
Tom

PS. I am using Apportable 1.1.06.1 on Android 4.2 1GB RAM tablet (so it's not the device lagging)

Glenna Buford

unread,
Mar 28, 2014, 1:20:12 PM3/28/14
to Tomasz Wilczynski, apportable-discuss
Hi Tomasz,

Are you using the ApportableFacebookSDK? If so, is the popup a webview? Can you share an example of the iOS code that shows the slow and unstable Android dialog?

Cheers,
Glenna


--
You received this message because you are subscribed to the Google Groups "Apportable discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tomasz Wilczynski

unread,
Mar 28, 2014, 1:52:42 PM3/28/14
to apportabl...@googlegroups.com
Hi Glenna,
Yes I am using ApportableFacebookSDK. I'm not sure about the web view... it displays on semi dark overlay with round 'x' on the left.

I remember something in the logs saying that webview shouldn't be called(?) in main thread or something like that. But that is not 100% connected and I'm off the office right now.

I will prepare the project first thing Monday.
Thanks

Tomasz Wilczynski

unread,
Mar 31, 2014, 7:04:44 AM3/31/14
to apportabl...@googlegroups.com
Hi Glenna,
I am working on the sample project for you. In the meantime, I am attaching the log from apportable when invitation dialog becomes very slow and after a few seconds the app crashes.

What I found interesting:
java.lang.Throwable: Warning: A WebView method was called on thread 'MainThread'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.

Also:
InputDispatcher: Application is not responding: Window{41b651c0 com.bulkypix.jewelgalaxy/com.apportable.activity.VerdeActivity paused=false}.  It has been 5002.8ms since event, 5002.6ms since wait started.  Reason: Waiting because the touched window has not finished processing the input events that were previously delivered to it.


I will prepare the demo soon.
Tom
logs.txt

Glenna Buford

unread,
Mar 31, 2014, 12:09:04 PM3/31/14
to Tomasz Wilczynski, apportable-discuss
Okay, based on the web view error, I can tell that whatever you are calling on the Obj-c side is being backed by an Android Webview, which...is problematic and slow.

Can you just let me know the FB call you are making that shows the view on iOS. I may have a work around for you.

Cheers,
Glenna


--

Tomasz Wilczynski

unread,
Mar 31, 2014, 12:39:59 PM3/31/14
to apportabl...@googlegroups.com, Tomasz Wilczynski
Here it is:
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                message, @"message",
                title, @"title",
                userId, @"to",
                type, @"data",
                nil];
[self.facebook dialog:@"apprequests" andParams:params andDelegate:self];
   
whereas self.facebook is [[Facebook alloc] initWithAppId:FBSession.activeSession.appID andDelegate:nil];

Tom
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-discuss+unsub...@googlegroups.com.

Tomasz Wilczynski

unread,
Apr 1, 2014, 11:02:53 AM4/1/14
to apportabl...@googlegroups.com, Tomasz Wilczynski, Glenna Buford
Hi Glenna, can you give me this work around please? :)
Tom

Tomasz Wilczynski

unread,
Apr 2, 2014, 5:57:56 PM4/2/14
to apportabl...@googlegroups.com
Shameless bump.

Glenna Buford

unread,
Apr 3, 2014, 7:29:56 PM4/3/14
to Tomasz Wilczynski, apportable-discuss
Hi Tomasz,

As a quick workaround, I'll provide you with a private API that you can use that will utilize parts of the Facebook Android SDK. Please note that this _is_ a private API, and thus may not be supported in future versions of the platform. I will note, however, that it is stable right now.

#ifdef APPORTABLE
typedef void (^SLFacebookRequestHandler)(BOOL success, NSDictionary *parameters, NSError *error);
@interface ACAccountType (Internal)
- (void)_request:(NSString *)message title:(NSString *)title data:(NSString *)data users:(NSString *)users identifier:(NSString *)identifier handler:(SLFacebookRequestHandler)handler;
@end
#endif

#ifdef APPORTABLE
    ACAccountStore *store = [[ACAccountStore alloc] init];
    ACAccountType *type = [store accountTypeWithAccountTypeIdentifier:@"com.apple.facebook"];
    [type _request:message title:title data:type users:to identifier:FBSession.activeSession.appID handler:^(BOOL success, NSDictionary *resultDict, NSError *error) {
        if (success)
        {
            //
        }
        else
        {

        }
    }];
#else
#endif

Please let me know if this works for you.

Cheers,
Glenna


On Wed, Apr 2, 2014 at 2:57 PM, Tomasz Wilczynski <wilc...@gmail.com> wrote:
Shameless bump.

--
You received this message because you are subscribed to the Google Groups "Apportable discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-disc...@googlegroups.com.

Tomasz Wilczynski

unread,
Apr 4, 2014, 6:49:31 AM4/4/14
to apportabl...@googlegroups.com, Tomasz Wilczynski

Glenna:

This is working very well! Ten times faster than the web view :)

Is there a way to honor frictionless requests with this dialog? I am not getting the checkbox 'don't show this popup again'

Tom
Shameless bump.
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-discuss+unsub...@googlegroups.com.

Glenna Buford

unread,
Apr 4, 2014, 5:08:06 PM4/4/14
to Tomasz Wilczynski, apportabl...@googlegroups.com
We don't currently support frictionless in that requests call, but stay tuned for changes!

Glenna
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-disc...@googlegroups.com.

Tomasz Wilczynski

unread,
Apr 9, 2014, 12:35:45 PM4/9/14
to apportabl...@googlegroups.com, Tomasz Wilczynski
Hi Glenna,

Is it possible to force login by popup? Perhaps by some private api call?
I am getting problems when logging through native Facebook app on release builds.

Thanks
Tom
Shameless bump.
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Glenna Buford

unread,
Apr 9, 2014, 6:30:31 PM4/9/14
to Tomasz Wilczynski, apportable-discuss
This method on FBSession always shows me the login UI

+ (BOOL)openActiveSessionWithReadPermissions:(NSArray *)readPermissions
                                allowLoginUI:(BOOL)allowLoginUI
                           completionHandler:(FBSessionStateHandler)handler;

Is that the method you are using?

Cheers,
Glenna



To unsubscribe from this group and stop receiving emails from it, send an email to apportable-disc...@googlegroups.com.

Tomasz Wilczynski

unread,
Apr 17, 2014, 9:30:48 AM4/17/14
to apportabl...@googlegroups.com, Tomasz Wilczynski
Glenna,

Should this private api call work without Facebook app?
If not, is there a way to detect if Facebook is installed?

Thanks

Tomasz Wilczynski

unread,
Apr 22, 2014, 7:53:56 AM4/22/14
to apportabl...@googlegroups.com
Bump. Any way to use this workaround without Facebook app installed?

And is there a way to detect If FB app is present?

Tom

Mike Peterson

unread,
Apr 23, 2014, 3:55:34 PM4/23/14
to apportabl...@googlegroups.com
I also use this workaround and it's great. But I do confirm that without Facebook app the popup immediately closes after opening. Any idea how to fix this?

Tomasz Wilczynski

unread,
Apr 24, 2014, 11:12:20 AM4/24/14
to apportabl...@googlegroups.com
How are you logging into Facebook?
I noticed that this method doesn't work if you ask for read & write permission at once.

Other than that, I don't think it's relevant if you have a Facebook app.

Tom
Reply all
Reply to author
Forward
0 new messages