Force stripe checkout modal on mobile? - mobile

I'm building a web app with Stripe checkout. On desktop it loads a nice modal when you go to pay, but on mobile it brings the users off to a Stripe page, and then back. I want it to look like the user is never leaving our site.
Is there a way to force the modal to be loaded on mobile? I'm building the web app in ionic at the same time, so if I want to turn it in to an app I can. Ionic uses a WebView on the phone and that loads the modal fine, so there must be some setting that is allowing it?
Anyone have any ideas? Thanks.
edit If I 'request desktop site' on my mobile it loads the modal fine

As Stripe makes these determinations based on the User-Agent you could try changing the User-Agent of your webview to match that of a desktop browser, (I did a similar thing except I needed to force mobile behavior in the desktop).
It should be stated, that this is definitely not recommended by Stripe nor supported and could break at any time. They'd recommend you just build a custom form using Stripe.js
How i can set User Agent in Cordova App has how to set the User-Agent in iOS and Android.

Related

What is causing my web app to look zoomed in?

Scenario: I have a web app and when I am developing I am using Ubuntu Linux and viewing my web app in Firefox. The web app looks great. It is styled using tailwind-css all pages are set to the same max-w-6xl. When I dual boot back into windows(to watch movies), it I go to my web app(same device, same browser) it appears to be zoomed in, the navbar stretches all the way across the screen.
I would submit screenshots, but I don't won't the post to get removed for promoting!

Responsive Website both mobile and phone, mingle both Reactjs and React native

I want to the responsive web app on Mobile and Web page. I have built a website on React js. I have brought that website using a web view to React native and made it a mobile app. Now I need to direct my users depending upon the platform. If they are mobile users I need to direct them to React native app(live on the browser) and if they use the system they should be seeing the website I build. How can I do that? Is it possible? Suggest me a better Idea.
You can achieve this using your backend code by checking request user agent if you get mobile, you can redirect to some other url (Probably play store).
You can do the same via front end JS also (not advisable). You can use these methods to detect if the user is on mobile, based on that redirect it to play store.
Check if the navigator userAgent is mobile or not. If mobile add a links to your app or app store to download it.
if (/Mobi|Android/i.test(navigator.userAgent)) {
// if I'm here that mean I'm a phone
}

How can I request a desktop site from a Codename One Browser Component?

I'm designing an app which has an embedded page on a form, using a BrowserComponent. Unfortunately the maintainer of the website recently created a very unfriendly "mobile friendly" version of the page and the user experience is much better with the desktop site.
Is there some way to get the BrowserComponent to request the desktop site?
You need to change the user agent to match the one of a desktop browser see Codename One - BrowserComponent: custom user-agent

FB.init (of Facebook web app) doesn't seem to get called when running on mobile

I have a Facebook web app that runs on canvas. The canvas URL is configured as http://apps.facebook.com/myApp (example). This URL has an FB.init that helps me identify and login the user by getting his name and FB user id. This app runs fine on a PC or a laptop.
This page is very simple with some JavaScript but with routine HTML tags like <p>, <input>.
I configured the same URL as Mobile Site URL under Mobile Web. Since then I can now see the link for this app on my mobile device (an Android phone). But when I click on the link, the first page of the app opens in my mobile browser but it seems that FB.init can't run there. I can't get the user id and use name.
What is the reason and what is the solution, i.e., how to make the same app run on users' mobile phones?
Thanks.

iOS web app to call mobile safari share function?

This is a longshot, but is it possible via HTML/JavaScript e.g. For a standalone iOS web app to call the share function found in mobile safari?
E.g on a web page a user clicks a link that then calls for share to fb, twitter, email screen to pop up.
No. There is no access to that functionality from a webpage or a standalone web app. You can, of course, add FB/Twitter/etc sharing to your pages yourself.

Resources