Manage pages displayed in Progressive Web Apps ( PWA ) - progressive-web-apps

I am new to PWA and was just going through some readups. We have public website and in the website we provide login for users to manage their account. By going with PWA, I understand that users can save the website on the mobile homepage as an icon. My question is that , when user click on my PWA icon , can we load the login page for the users so that they can only manage account with PWA instead of loading entire website.

The Web App Manifest allows you to control how your app appears and how it's launched. You can specify home screen icons, the page to load when the app is launched, screen orientation, and even whether or not to show the browser chrome.
The web app manifest is a simple JSON file that gives you, the developer, the ability to control how your app appears to the user in areas where they would expect to see apps (for example, a mobile device's home screen), direct what the user can launch, and define its appearance at launch.
You can define how your app is launched, add a query string parameter to the start_url that indicates how it was launched.
"start_url": "/?utm_source=homescreen"
Hope this helps!

Yes you can, within your web app manifest file you can set a JSON property called "start_url".
There's further information here https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/#set_a_start_url

Related

when the dynamic link is opened from browser(especially in safari) it is always redirecting to the app store even though app is installed in iOS

My URL is same as below, i will get this link to my mail from sendgrid and in iOS when i tap on this it always loads the browser first (safari most of the case) and opens in app preview page even though app is installed.
URL:<a clicktracking="off" href="https://{project_name}.page.link/?link=https://{project_name}.page.link/users/email_check/{{ $email_token }}&apn=com.{project_name}.app&isi={applestoreid}&ibi=com.{project_name}.app&efr=1">https://{project_name}.page.link/?link=https://{project_name}.page.link/users/email_check/{{ $email_token }}&apn=com.{project_name}.app&isi={applestoreid}&ibi=com.{project_name}.app&efr=1</a>
When you access a dynamic link in a browser. It will intentionally not go to your app because the actions indicate that your intent is to open a web page.
If you have your custom domain from Firebase ie: [your custom domain].app.goo.gl, send it into your link like so:
https://[your custom code].app.goo.gl/
And then tap that link. Does it open the app, or does it go to Safari? If it goes to Safari, it means that you haven't configured your iOS app for universal links yet, which is needed to support opening your custom domain url directly in the app. In Xcode, go to the Capabilities tab, and ensure that you've added the universal link domain as described in Apple's docs.
If you tapped the site address on the far top-right on iOS, it disables universal linking on that iOS app, until you long-tap and ask to open in the app again.
Second, you can't type in universal links into Safari's address bar and navigate to the app. Safari, by design, will open that URL in the browser. The easiest, most reliable way to test whether universal links are working is to put a universal link into the app, and tap the link from there.

How does Facebook handle tablets?

I'm developing a Facebook app that has a responsive layout. Sometimes my app has to generate a link for the user. Whenever possible, the links will send the user to a Page Tab (when the user is on a desktop) and other times it will link directly to the app (when the user is on a mobile phone).
What is the default behavior for Facebook on tablets? Does it show the mobile site or the desktop site?
Should I use the mobile or desktop version of my app on tablets?
Update: In response to BBog's question in the comments:
My app prefers the desktop version because it includes a Like-gate. If the user experience is good for a tablet to view the app in a page tab (which is only available on www.facebook.com ie non-mobile), then that is preferred because the like button will be displayed at the top of the page, above the app's iframe. In contrast, the mobile version of the app requires that the user click a link that takes them to the (mobile) facebook page which they must like to un-gate the app. It adds an extra step for the user and requires that they navigate away from the app for a moment. Users might be discouraged by this extra step and decide not to enter the gate.
For Android tablets - Honestly, it depends on how you want Facebook to handle it. If you look at the android native app linking wiki - https://developers.facebook.com/docs/mobile/android/deep_linking/, Facebook provides you the option to choose the user experience. The facebook native android app itself treats tablets like mobile phones. It would be ideal if your app is compatible with tablets, and then you can enable deep-linking which will let the user view the content inside of your app.
For iOS, it's handled from within the iOS bundle id.
Unable to find a concrete answer, I ended up detected the user's referral on the first page access. Then if www.facebook.com is in the url, I go to desktop. Otherwise I go to mobile..
if ($detect->isTablet()) {
session_start();
if (!isset($_SESSION["tabletAsMobile"]))
$_SESSION["tabletAsMobile"] = (stripos($_SERVER["HTTP_REFERER"], 'www.facebook.com')===true):'0':'1';
}
$useMobileLinks = ($detect->isMobile() || ($detect->isTablet() && $_SESSION["tabletAsMobile"]));
}

Persisting cookie for iPhone UIwebview mobile web app

I'm using MVC4 forms auth. My mobile web app runs in full screen UIwebview on iphone. I have a home screen icon for my mobile web app. The app needs to launch external links. Those launch in Safari, which works fine. However returning to the mobile web app by clicking again on the home screen icon, seems to have logged the user out. Ideally I want the user to remain logged into the web app after viewing the external links in Safari. Maybe the cookie got deleted? Can I persist the cookie?
FormsAuthentication.SetAuthCookie(username, createPersistentCookie: true);
This fixes the log out issue

How to go to my new Facebook App

I'm testing out writing mobile web app that connects to Facebook.
I follow this guide here and created a app on facebook, and uploaded the code to my own server.
https://developers.facebook.com/docs/guides/mobile/web/
But then, I got to the point where it tells me to search for my own app in facebook.com. My app won't show up, and I found out they won't until you have some users and then it'll be indexed.
So how do I get to my app?
Thanks
You might have your app settings (on the advanced screen: https://developers.facebook.com/apps/APPID/advanced) set to either sandbox mode enabled or Social discover disabled.

Return to app from safari

In my application, I redirect the user to the safari browser when he/she taps on a button, which in turn closes the application and opens the safari browser. There is no problem in that. It works fine. The thing is when the user quits the safari browser, I want to redirect the user back to the application, not the home screen. Any idea please...
If you control the website that you are redirecting them to, then you can place a link on the site using custom URL which I describe in more details below. But if it's a site you don't control, you can have the user surf within your app using the UIWebView.
For an iOS app, you can create custom URL schemes that your app register with the system. Then on the web page you would create a link using that custom URL. That is how Apple launches the telephone.app or the mail.app from mobile safari.
For example: Let say your app is call BigBadApp. You custom URL would be: bigbadapp:// Now, you could create a link to your app would be: Launch BigBadApp You can pass any kind of information back to your app using the custom URL and your app will handle that information in the app delegate. For iOS 4.2 and later: application:openURL:sourceApplication:annotation:. The name of old delegate on earlier version of iOS is application:handleOpenURL:
For more information see check Apple Implementing Custom URL Schemes.
Also iOS developer:tips has a tutorial on Launching Your Own Application via a Custom URL Scheme.
You can't. When you redirect someone out of your application the only way to get back is using the task switcher or opening your application from the home screen again.
If you want to keep the user in your application you could open the web pages in a webview within your application
use UIwebViewController . that represent web link within app . so that your app wont be in back ground and add back button in navigation bar on click back button navigate to back screen . i guess it would be better
i would launch an in app browser...
this is a good uiviewcontroller subclass that has most of the browser functions already implemented. its very easy to use.
https://github.com/samvermette/SVWebViewController