I am working on a background application in which I need to get some device events of normal device functionality. Regarding which I need to get the URL which a user hit in device default browser.
Means if a user use blackberry device default browser to open a url, I want to retrieve that url programmetically in my application running in background.
Is this possible, please let me know with your suggestions.
There is no BlackBerry API to get the URL opened in the browser, nor is there one to access browser history.
You can add an ApplicationMenuItem to the browser application. When the user clicks on it your application is passed the URL of the current page.
Related
I'd like to launch Whatsapp from my Flutter app for a specific contact on the user's device. I'm able to do that successfully using url launcher as described in many questions on the subject (like this one this one).
The way it works, it opens an in-app web browser, which then prompts the user to open Whatsapp. On iOS, it then prompts the user with a dialog "Open this page in WhatsApp?"
Is there a way to always allow that? So that the user doesn't have to hit that each time they want to connect to someone on Whatsapp from my app?
Use the LaunchMode enum which is used to state the desired mode to launch a URL.
Future<bool> launchUrl(
Uri url,
{LaunchMode mode = LaunchMode.externalApplication}
);
LaunchMode.externalApplication is supported on all platforms. On iOS, this should be used in cases where sharing the cookies of the user's browser is important, such as SSO flows, since Safari View Controller does not share the browser's context.
Facebook's mobile app used to know how to open the url http://facebook.com/<id_of_thing> and it used to open that up to a specific photo in the app. What we discovered last week (11/6/15) was that the app still listens for that url pattern, but it doesn’t know how to open up to a specific photo (it opens up to the blank page.) If we send the full url of the photo to the user, something like http://facebook.com/<pageid>/<album_id>_<photo_id>, the Facebook app doesn’t listen for that url pattern. So it opens up in a browser instead. How do I get a link sent to a user via text message or email to open up in the Facebook app on a mobile device?
Is there a way to not have this happen? I don't want to take my users to the safari browser before getting redirected to the App Store.
Right now if I send out an email link, it hits my server (for click tracking purposes), and then our server will redirect the to the app store. The problem is that this methodology will cause safari to pop open momentarily.
Is there a way to design it such that the user will not have safari opened and we can still track the click?
You need to do it in two different steps. First send a NSURLRequest to your server using NSURLConnection and separately open the AppStore URL.
Alternatively or in addition use the iTunes Referral Program for tracking.
if I want to design an iPhone app to do this monitoring, is it possible? such as open the app and input web address, the app can call safari's function to request and render the webpage, so that i can monitor the page load event in the app. How can I achieve that?
or
create an app that monitors the time taken to load a web page by any browser on iPhone. let suppose i have button in my app on clicking the button my app will start monitoring the other apps, now if i start safari(or any browser) and try to open web page, than the time taken to load web page must be calculated by my app. is it possible to do??
My url scheme looks like "foo://".
This works great when I type into the browser.
The application requires I send this link in an e-mail and the e-mail opens from there. How can I configure the url scheme to be recognized as a link? I tried doing http://foo:// but of course my browser caught that.
One solution is to ping my server http://foo.com/redirect_to_app. If there is a way to do this with the app only I would like to know.
If you put the URL as foo:// in the email body, then that is all you need to do. Of course it requires that the user reads the email using the Mail app on their iOS device and the user must have your app installed on their iOS device as well.
Your foo:// URL will mean nothing if the email is read on a non-iOS device or computer or if the user doesn't have your app installed.
This all assumes that your goal is for one user of your app to send an email to another user of your app and tapping on the link in the email will launch your app on the receiver's iOS device.
There is a way. You need to create a webpage and create redirect code(url scheme) to your app.
Check this out... Check if URL scheme is supported in javascript