Mobile detection code - android

Is is possible to have a code in a web link that detects what mobile platform a user is on eg iPhone/iPad, Andriod, Blackberry etc...
I'm trying to solve a problem at the app company I work at where whenever we do a tweet we include a call to action - a bitly link with the app download link. However because the app is on the Apple app store, Google Play store and Blackberry store we have to do 3 different bitly links to different app stores.
What I want to create is code to detect what platform a user is on and build that into a shortened url. So when we do a tweet, we just do one link and it automatically directs the user to the appropriate app store depending on what device they are using.
Does this exist already? If not how can it be created? Please give me some insights/ideas as to how this could be achieved
Thanks

I think taht you are looking for it http://detectmobilebrowsers.com/ is an open source library to detect the mobile os and more information.

You can detect the which device user is on by using
var userAgent = navigator.userAgent.toLowerCase();

Related

Detecting the OS version then recommended to user to install application

I have an android mobile application for the product. I want to display a recommendation message when user open website in android device. Recommendation message should be like For better experience install the mobile application. In that message will provide one link which will open Application if already installed or otherwise redirect on the Play store link.
Actually, I don't have any idea and I don't know where to start. Can you please help me.
Edited:
I have uploaded reference image, In Below image, you can see the highlighted area.
I think that this is possible by reading the User Agent
https://developer.chrome.com/multidevice/user-agent#chrome_for_android_user_agent
If you are parsing user agent strings using regular expressions, the
following can be used to check against Chrome on Android phones and
tablets:
Phone pattern: 'Android' + 'Chrome/[.0-9]* Mobile'
Tablet pattern:
'Android' + 'Chrome/[.0-9]* (?!Mobile)'

Get referring url for Android or iOS installation

We have several landing pages that link to Google Play and iOS App Store. I would love to know the landing page that a person came from within the app code. I have searched around and can't find any clear answer. Lots of gray area.
I just want to access the landing page URL in Java or Swift.
I realize iOS and Android are two separate beasts. But does anyone know how I could achieve this?
You will need to use Firebase Dynamic Links this helps you create various links using various alternatives as shown in this quote from the official Firebase source:
You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app.
Then your app can access the link in code using Java or Swift and the link will work even if the user has your app already in their phone and you can set a logic to handle that too and the links are also automatically direct the user to AppStore or PlayStore depending on which device is used.
Dont worry about whether the link will work for both Android and iOS and you can use the api to access the link as this quote says.
With Dynamic Links, your users get the best available experience for the platform they open your link on. If a user opens a Dynamic Link on iOS or Android, they can be taken directly to the linked content in your native app. If a user opens the same Dynamic Link in a desktop browser, they can be taken to the equivalent content on your website.
In addition, Dynamic Links work across app installs: if a user opens a Dynamic Link on iOS or Android and doesn't have your app installed, the user can be prompted to install it; then, after installation, your app starts and can access the link.
You can get more information on dynamic links here and check if it will solve your problem.

How to prompt user to download app when visiting product page?

Recently I was browsing a website from my iPhone and it prompted me to download their app at the top of the browser.
We are also having same kind of app in iTunes and wants our users to see the notification same as theirs. Attaching a screen-shot.
Anybody suggest how is this achieved?Through some script or plugins.
Help us to integrate this.
When the user visits your webpage, you can check the browser & OS of device requesting the webpage. Depending upon this information, you can write the script to navigate user to your app download link. Check How to detect my browser version and operating system using JavaScript? for reference.
The right way to do it is using Smart App Banners, Safari builds the banner
in it's UI, is not part of the web page.
Just as Michael Tarimo says in the comments of the accepted answer.

Creating web links that will open a website, iOS, Android or Win8 app depending on device

Does anyone have any suggestions for the best way to create a web link that, depending on the device the user is browsing with will direct them to a website (for laptop/desktops), the App Store (for iOS devices), the Play Store (for Android devices) or the Win8 store, with a default to the website if device type is unknown?
At the moment, the best option seems to be to direct users to a website exclusively, with smart banners that will show a link to the App Store on relevant devices using the following code in the site header:
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
But this is inelegant and can be missed by site visitors plus the additional step leads to a high dropoff. Any suggestions or thoughts would be appreciated!
Rather delayed reply but here goes:
Detect which OS is being used using Javascript code. Link
Change the hyperlink based on whether it is an iPhone Android or Windows.
If its iPhone use this, if its Android use this and for Windows use this
Hope that helped!

Which is the best way to install ios and android app without appstore and market?

I want to allow for visitors of some exhibition install and test my app that doesn't listed in app store and android market at this moment. And of course I don't know any id of visitor devices.
Is it possible and which is the easiest way to do that?
For Android you could put your app in a Dropbox folder of yours. Then using an app like ZXing barcode scanner share that link as a QR code in an email to yourself. Extract the .png image from the email (maybe enlarge it) and print it out again. Attach the QR code to the welcome poster at the exhibition and invite visitors to scan it with their Android phone (assuming they have a barcode scanner app on their phone - if not suggest they download a free one from Google Play). They can then install the app easily, as scanning the code will download it.
Transfer the .apk file(for android) to the user's phone through bluetooth so that people can install your app
check hockeyApp http://www.hockeyapp.net/
You upload your app on it, and register "testers",
they receive a mail with a link to download the app(for iPhone you need to provision the phones).
After the installation it sends back crash reports with the type of the device and the OS version. I think it's a great tool for what you need.
It has a free version.
Currently only for iOS but have a look at TestFlight

Categories

Resources