Forum Academy Marketplace Showcase Pricing Features

Android login issue

I know the file (though the other element will be a first).

Will see it i can figure this out.

Im suprised that @natedogg hasnt ran into this yet.

Hi Richard -

I’m facing this exact issue with Android right now. Can you guide me where I need to make the edit you’re referring to?

My app shows up on Android but just like you’ve explained when a user logs in, it just sits on the login or sign up screen.

Thanks in advance for your help

1 Like

A screenshot for @spotyourlocal and I would be amazing to show us what you’ve done to get past this final hurdle.

Hi Spotyourlocal,

What are you using to build the Android apk - Phonegap, Cordova or Android Studio?

Hi Justin,

I’m not on my PC at the moment but will try tonight. I guess you’re using Android Studio to build the apk?

1 Like

Yes, Android Studio.

I’ve got the file opened up, and I think i’ve found the docs online about this “mixedContentMode” but where/how do I install/configure it or add it to this file?

I’m using Android Studio - apk

So, this is where I ran into problems. Your code @JustinC is long, and since I’m not a javascript expert (in fact, I haven’t a clue about it) I can’t tell you exactly where the code will work. You’d have to adapt the below bit of code for your webview, and maybe put it after the “view.loadUrl” line. That said, I’m pretty sure it’ll just break the build completely, because that’s what happened to me nearly every time I tried to add something new! In the end I simplified my code right down to the basics and it worked, and I didn’t seem to lose any functionality, but then again I don’t use a lot of Bubble plugins. Try the below bit of code anyway and see what happens:

// Allows mixed requests in Cordova’s WebView client
WebView webView = (WebView)appView.getEngine().getView();
WebSettings settings = webView.getSettings();
if (Build.VERSION.SDK_INT >= 21) {
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}

@natedogg can you please chime in on this?

Why isn’t this working for us?

Hey @JustinC,

As I mentioned in our private message, I’m still looking into this for you.

My best guess is that there is a discrepancy in the code somewhere, or that there’s something wrong with the build created via Android Studio. As I showed you, the Android file that I built and sent you had no issues with login whatsoever.

I’m still looking through the files that you sent me. When I can identify what the discrepancy is, I’ll be sure to let you know.

In the meantime, if you can PM me the live URL for the Bubble page, that would be helpful.

2 Likes

Hey guys,

Not sure if i can be much help. But suspecting that there are a few things that could be causing this:

  1. Application specific serverside (For example lack of configured SSL/HTTPS)
  2. CORS limitations that does not allow certain cross domain XmlHttpRequest`s.
  3. Any crosswalk cordova or android build using a newer chromium base for webviews would fail on many features that requires a valid SSL connection.

Ideas:
A. You could add a localstorage/forage component to save/mirror the cookies, as a fallback.
B. did you set access origins in cordova?

C. https://crosswalk-project.org/jira/browse/XWALK-4643
D. https://github.com/apache/cordova-plugin-inappbrowser/pull/122
E. http://justbuildsomething.com/cordova-and-express-session/
F. http://stackoverflow.com/questions/15349237/handling-cookies-in-phonegap-cordova (some localstorage ideas here)

This was a very rough writeup, hope you draw some benefit from it.

1 Like

After doing some more digging and helping a couple of people with their Android login issues, we identified the problem. The main cause of any login issues with Android native apps built on Bubble is the “Remember the email” option for signup/login workflows.

If you remove that option, login should work just fine.

2 Likes

I am having a similar issue just getting a web app to work on android. None of the pages are native pages and I am not doing anything with the “Remember the email” option right now. What do I need to do to make this work on android? It doesn’t work regardless of whether the “remember email” option is selected at login.

How did you solve this? Facing this issue right now :frowning: