I have an app that displays news stories for a publication. If a user opens a story on their phone in IE, I would like to offer an option to open it in the newsreader app instead. Is it possible to hook into IE somehow to do this? Or perhaps display a link on the website that the phone knows how to translate into an app?
Unfortunately it is not possible to hook your application to IE. The OS only provides this functionality to some special apps (ie. YouTube). Launching apps from IE is not possible.
You can use a WebBrowser control for doing this.
Since you're displaying news stories I'm assuming your app is going to download these from some website. To do this you can create a WebClient and use the DownloadStringAsync method to fetch the story. In the DownloadStringCompleted event handler load the web page using WebClient.NavigateToString.
Related
Say I build a super mobile friendly web application that I want in the Play Store for Android users to be able to download.
Could I use Xamarin to:
Wrap the entire mobile app as a single WebView
Register for mobile push notifications
Essentially shortlining an MVP of an android app by using an existing web app? If so, is there any well-known process or documentation that demonstrates this?
Probably the best approach for you would be using Xamarin Forms with one or more pages containing only web views.
I don't love Xamarin Forms because usually for me Xamarin Android+iOS gives a better result in similar time, but your app would be so simple that doesn't make sense to do it with Xamarin Android.
Make sure that your web app will show only what makes sense to be shown in your app, otherwise you risk to see double header/footer, useless buttons... but if the website is yours adding a few parameters to change a bit the UI won't be a problem I guess.
Have a look at this example:
https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithWebview
Another approach is the use of Razor to build your pages in html directly inside your app, but if I understood well it's not what you need:
https://developer.xamarin.com/guides/cross-platform/advanced/razor_html_templates/
Although it is technically possible to do this as the previous answer has suggested. I would recommended firstly reviewing, the relevant stores guidelines on submissions. Apple for example will not allow a submission to their store of any application that simply mirrors the functionality of a website. I suspect Google's would likely be the same.
However that said, to answer your question, Xamarin.Forms would be appropriate for a simple application like the one you are suggesting. Or if you prefer to build to a specific OS, then in iOS with Xamarin you would use the Safari View Controller that was added in it's xcode 8.1 release. Android uses something similar as does windows.
EDIT:
You can use the Web View control in Xamarins Andorid native PCL project to encapsulate your mobile friendly website within an application here is the documentation:
Xamarin Android Developer link to Android Web View
As for push notifications, yes this is perfectly possible using Xamarin.Android. and varies on implementation depending on what you want to use as the back end to handle them, I.E. Azure's notification hub etc.
I have an application with web interface. Unfortunately, it has all disadvantages of being a web page:
It doesn't have a standalone window, so users cannot manage it via the taskbar.
Users see the address line with something like 'http://localhost:8080' that is not a good idea for home users.
If users click on a tray icon, there is no way to activate the tab in a browser, which contain the application interface.
So, it would be nice to have a wrapper application with a browser within.
In case of IE I know it's possible to create a window with Trident ActiveX component. But what if it's Windows XP with IE6 but installed latest Chrome? I'd like to prefer Chrome since it supports a lot more features which the user will never see.
So, is there a way to wrap a page into Chrome/Firefox and make it look like a standalone application, if one of them is presented in the user's system? (The application shouldn't install anything large, so Chromium build is not an option).
P.S. I'm not interested in supporting other platforms than Windows.
Regards,
Take a look at Chrome Apps.
I hope helps you.
I'm building an app, and I was curious if there's a way to open the app when you're on the website through the iOS Safari extension. So, if I'm on a post I'd tap the app icon in the share sheet and I'd pass that to the app to load the post in the app.
I know the Bing app can translate the current website and inject directly into the DOM, so I was wondering what custom logic you can implement.
There's really no way to open the app from this kind of extension. Extensions can't access [UIApplication sharedApplication], so they can't call openURL:. There's an openURL:completionHandler: method on NSExtensionContext, but it only works in "today" extensions. Share extensions can display a fully custom UI and can save data that's available to their containing app, but they can't actually open that app.
Basically when i do open in functionality in other apps basically it
will show tow options 1. open-in 2. extensions. But i am seeing some
of the apps not showing the other apps action extension feature. I do
not know how they are hiding it?. Or they doing something else to do
not show the other apps extensions other than iOS defaults action
extensions?.
Example:
YES: Mailbox, Dropbox, Box etc. - these app was able to show the other
apps action extension
NO: Evernote, Acompli, Zoho Docs - - these app does not shows the
other apps action extension.
Any idea? why evernote and Zoho not showing the other apps action extension feature?. Is there something they need to do on their side or i need to do on my side to make it show?.
Any help that might be really appreciated.
screenshots attached.
Action and Share extensions have an activation rule, which is stored as NSExtensionActivationRule in their Info.plist. These extensions only appear if the host app is sharing data that matches the activation rule. For example, if an app shares images and the extension can only handle text, the extension will not be displayed as an option in that app.
I need to launch my WP7 application from the phone's browser and pass some arguments. For example, the following url would be a link on an html page. Clicking the link would start my application. iPhone and Android both have these capabilites by the name of 'url schemes'.
appName://my.arguments.here
How can I accomplish this on WP7?
Thanks!
Unfortunately there is currently no support for "url schemes" or custom URL handlers that will allow you to handle these requests from within your application.
It is possible to integrate with the search application, which can provide deep linking into your application. It also appears that YouTube has some kind of way of doing it, as the mobile version of their site will jump to the app for playback of videos.
You should use the protocol activation feature of Windows Store apps - see http://msdn.microsoft.com/en-us/library/windows/apps/hh452686.aspx