Question about mobile app scheme deep linking - android

I have the Medium app install on my iPhone.
When doing a search on Google Chrome app, when I clicks on a medium.com link in the search results, it open my Medium app.
How can this happen? How can Google Chrome can interpret https://medium.com to medium://?

So the feature in particular you are referring to is Universal Links and requires both server side and client side modifications.
On the server side / website you need to add an AASA (Apple App Site Association) file. This file is simply a JSON file that contains the specific applinks urls for the corresponding app identifier. A sample is shown below.
{
"applinks": {
"apps": [],
"details": [{
"appID": "ABCDEBBQ.com.medium.ios",
"paths": ["*"]
}]
}
}
If you note the paths key in the JSON above you will see that there is a star or wildcard symbol. This simply means open any URL on my websites’ domain. For example www.medium.com/topposts will open in the medium iOS app. It should be noted that you can explicitly define your paths to either include or exclude.
On the client side (Xcode) you’ve gotta setup the associated domains capability inside of your application and specify the applinks service for your domain in this case www.medium.com
Lastly you’ve gotta add the capability to your application identifier inside of the developer portal.
After all of this configuration is completed you should now have a ‘link’ between your website and application.
Apple handles all of this logic internally in iOS and since it’s closed source I cannot give you the exact implementation details but the just of it is that when you visit the domain (medium.com) on your iOS device it downloads the AASA file from the webserver (the AASA file must be hosted on a secure server and can only be downloaded over HTTPS) and the operating system then checks whether there is a corresponding application on the device that matches the appId specified in the AASA file. If both the paths and appIds match it then launches the medium iOS application on the phone.
That’s how it works. I hope that I’ve articulated it well enough.

Related

How to open the Huawei AppGallery store with Cordova?

How do I open the Huawei AppGallery that points to a specific app directly?
I know that is possibile to do it natively in Android, but I need to do it with plain Javascript for a Cordova application
You can refer to the following:
The typical link format of the application details page on Huawei AppGallery is: https://appgallery.cloud.huawei.com/appDetail?pkgName=**packagename**&channelId=**channelid**&referrer=**referrer**&detailType=0&calltype=AGDLINK
Parameter description:
Packagename: required, the package name to be popularized and applied, such as com.huawei.gamebox ..
Channelid: It is recommended to fill in. To improve the channel identification degree of data analysis, it is recommended to fill in the designated identification number for each channel. If it is not filled in, the system will automatically read the package name of the source media, but the package name cannot be obtained by jumping through the webpage or offline QR code.
Referrer: not required; if not, it will be blank by default. This parameter refers to the secondary channel number. When links are posted on multiple pages (scenes) of the same media, the specific location effect of the media can be identified by the secondary channel number.
DetailType=0&calltype=AGDLINK: basic parameter, which cannot be deleted.
for example: https://appgallery.cloud.huawei.com/appDetail?pkgName=com.huawei.gamebox&channelId=ceshi&referrer=01&detailType=0&calltype=AGDLINK
I think the shortest and easiest one would be running this simple link:
https://appgallery.cloud.huawei.com/ag/n/app/<YOUR_APP_ID>
No need Packagename, Channelid and stuffs like that and no need to config anything and the rest will handled by Huawei automatically.
How to get YOUR_APP_ID?
Go to Huawei App Gallery
Search for your app (e.g. WeChat)
Copy the ID in the end of the link (e.g. https://appgallery.huawei.com/#/app/C5683)
In this case the APP_ID for WeChat would be C5683
So the Huawei app link for WeChat would be https://appgallery.cloud.huawei.com/ag/n/app/C5683
Hope this helps! Enjoy~

Statement List Generator and Tester rejects its own generated content

So, basically I'm at step 1 of implementing App Links, I stumbled upon this tool:
https://developers.google.com/digital-asset-links/tools/generator
I give it my domain name, my package name, and I copy paste my App package fingerprint from the play store console. it generate an assetlinks.json file for me, I put it as required at https://my-domain/.well-known/assetlinks.json I test downloads, it works, then I ask this tool to test it, it says
No app deep linking permission found for package_name at my_domain.
my logs indicate that GoogleAssociationService came and took the file (200 status response and the correct number of bytes).
So basically I put the good values, it generates it, and then fetch it and tells me it's wrong, what am I missing ? how can he not be happy with what he generated itself ?
When we came across this issue we have also investigated logs of our proxy and have seen that the "assetlinks.json" file had been successfully downloaded.
In our case, the problem was with Content-Type. In our case, it was the "application/octet-stream" type. According to the documentation, Content-Type should have the type "application/json". We have changed the content type and everything started working as expected.
Check the requirements using the link above and verify that all of them are met by crossing off all potential reasons one by one.
Update 2022-10-30: The provided link is not available anymore. I have used a cached version to fetch the information below:
You must publish your JSON verification file at the following
location:
https://domain.name/.well-known/assetlinks.json
Be sure of the following:
The assetlinks.json file is served with content-type application/json.
The assetlinks.json file must be accessible over an HTTPS connection,
regardless of whether your app's intent filters declare HTTPS as the
data scheme.
The assetlinks.json file must be accessible without any
redirects (no 301 or 302 redirects).
If your app links support
multiple host domains, then you must publish the assetlinks.json file
on each domain. See Supporting app linking for multiple hosts.
Do not
publish your app with dev/test URLs in the manifest file that may not
be accessible to the public (such as any that are accessible only with
a VPN). A work-around in such cases is to configure build variants to
generate a different manifest file for dev builds.

Install / run (not: download) APK file directly from website

I've seen this answer, but -- as it claims -- link starts download of .apk file, while I'm looking for any way to run it, if it is installed, directly from the web.
I found this example and TestFlight's webpage. There's a link Already Installed? Launch the App -- a simple <a> tag with href set to testflightapp://com.testflightapp.androidapp?scheme=http&host=testflightapp.com&path=m/builds.
However, it seems, that this kind of href / protocol is supported only by installed Test Flight application and not available in general in Android system.
Am I right, that my own application -- the one, that I want to run via link from website -- must itself register and handle private protocol, as in this example.
Yes, your app must have an intent-filter that responds to a particular (preferably non-standard) URI.
In the above case, the intent-filter is for testflightapp:// scheme URIs.

Android Facebook SDK - part of the post remains not shown

I'm using phonegap-build / FacebookConnect
Everything works correctly but when I put some post using Android app on the Facebook wall, most of the text remains not shown. There is not even "see more" link at the end of the part of the post. At the half of the second sentence of "description" everything breaks.
The JS function that I'm using for this Android app:
function facebookWallPost() {
console.log('Debug 1');
var params = {
method: 'feed',
name: 'Facebook Dialogs',
link: 'https://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite (TCP/IP) to serve billions of users worldwide. It is a network of networks that consists of millions of private, public, academic, business, and government networks, of local to global scope, that are linked by a broad array of electronic, wireless and optical networking technologies. The Internet carries an extensive range of information resources and services, such as the inter-linked hypertext documents of the World Wide Web (WWW) and the infrastructure to support email.'
};
console.log(params);
FB.ui(params, function(obj) { console.log(obj);});
}
The whole script and an example can be seen here ...
Do I need to change data structure and post params as JSON?
Thanks in advance. I appreciate any help...

Finding a list of all the android apps on the market

is there a way of getting access to the details of each one programatically?
There is an open source project called Android Market API which allows you to do the following:
You can browse market with any carrier or locale you want.
Search for apps using keywords or package name.
Retrieve an app info using an app ID.
Retrieve comments using an app ID.
Get PNG screenshots and icon
It is located here: http://code.google.com/p/android-market-api/
Hope this helps you out. =)
As a workaround, you can use appbrain api. It has RSS feeds for lists of apps with description of each one.
Link is in here:
http://www.appbrain.com/info/api
Unfortunately there is still no official API for Google Play Store (previously known as Android Market) to access Android apps' meta-data (or any other stats).
As mentioned in other answers, you could develop your own web crawler, parse the HTML page and extract the app meta-data you need (e.g. title, descriptions, price, etc). This topic has been covered in this other question.
Another option is to use an open-source library based on ProtoBuf to fetch meta-data about an app, here the link to the project: https://code.google.com/archive/p/android-market-api.
This library fetches app meta-data from Google Play on behalf of a valid Google account, but you still need a crawler to "find" which apps are available and schedule their meta-data retrieval. This other open-source project can help you with that: https://code.google.com/archive/p/android-marketplace-crawler.
If you don't want to implement all that by yourself, you could use a third-party service to access Android apps meta-data through a JSON-based API. For instance, 42matters.com (the company I work for) offers an API for both Android and iOS to retrieve apps' meta-data, here more details:
https://42matters.com/app-market-data
In order to get the Title, Icon, Description, Downloads for an app you can use the "lookup" endpoint as documented here:
https://42matters.com/docs/app-market-data/android/apps/lookup
This is an example of the JSON response for the "Angry Birds Space Premium" app:
{
"package_name": "com.rovio.angrybirdsspace.premium",
"title": "Angry Birds Space Premium",
"description": "Play over 300 interstellar levels across 10 planets...",
"short_desc": "The #1 mobile game of all time blasts off into space!",
"rating": 4.3046236038208,
"category": "Arcade",
"cat_key": "GAME_ARCADE",
"cat_keys": [
"GAME_ARCADE",
"GAME",
"FAMILY_EDUCATION",
"FAMILY"
],
"price": "$1.15",
"downloads": "1,000,000 - 5,000,000",
"version": "2.2.1",
"content_rating": "Everyone",
"promo_video": "https://www.youtube.com/embed/g6AL9YqRHaI?ps=play&vq=large&rel=0&autohide=1&showinfo=0&autoplay=1",
"market_update": "2015-07-03T00:00:00+00:00",
"screenshots": [
"https://lh3.googleusercontent.com/ZmuBQzIy1G74coPrQ1R7fCeKdJmjTdpJhNrIHBOaFyM0N2EYdUPwZaQjnQUtiUDGmac=h310",
"https://lh3.googleusercontent.com/Xg2Aq70ZH0SnNhtSKH7xg9jCfisWgmmq3C7xQbx6YMhTVAIRqlRJeH8GYtjxapb_qR4=h310",
"https://lh3.googleusercontent.com/T4o5-2_UP82sj4fSSegbjrGmslNHlfvtEYuZacXMSOC55-7eyiKySw05lNF1QQGO2FeU=h310",
"https://lh3.googleusercontent.com/f2ennaLdivFu5cQQaVPKsRcWxB8FS5T4Bkoy3l0iPW9-GDDnTVRhvR5kz6l4m8FL1c8=h310",
"https://lh3.googleusercontent.com/H-9M03_-O9Df1nHr2-rUdjtk2aeBY3bAxnqSX3m2zh_aV8-K1t0qU1DxLXnK0GrDAw=h310"
],
"created": "2012-03-22T08:24:00+00:00",
"developer": "Rovio Entertainment Ltd.",
"number_ratings": 20812,
"price_currency": "$",
"icon": "https://lh3.ggpht.com/aQaIEGrmba1ENSEgUtArdm3yhJUug7BRWlu_WaspoJusZyHv1rjlWtYqe_qRjE_Kmh1E=w300",
"icon_72": "https://lh3.ggpht.com/aQaIEGrmba1ENSEgUtArdm3yhJUug7BRWlu_WaspoJusZyHv1rjlWtYqe_qRjE_Kmh1E=w72",
"market_url": "https://play.google.com/store/apps/details?id=com.rovio.angrybirdsspace.premium&referrer=utm_source%3D42matters.com%26utm_medium%3Dapi"
}
Alternatively, we also have a DATA FEED DUMP to access all mobile app data at once: https://42matters.com/docs/app-market-data/file-dump/android-app-details (on this page you can also find a free sample of data for your tests).
I hope this helps, otherwise feel free to get in touch with me. I know this topic quite well and can point you in the right direction.
Regards,
Andrea
You could build a website crawler and crawl the various android app stores and get all the data for the apps.
Not all apps are on the Google Android Market. There are other Android stores like:
Appbrain
Applanet
AndAppStore
AppstoreHQ
etc...
Not all App Stores have APIs so the best way to do it is by crawling their website.

Categories

Resources