Get Google Play Store Apps HTML Dynamic Badge - android

Suppose I want to write some article on a web-site and publish a link to the discussed Android application (which is available on Google Play).
Is there a standard way to create "badge" for this application, which shows app's name, icon, descriptions, rating, download/install count? Something like this:
or this:
or this:
I found Google Play Badge Generator, but this "Badge Generator" does not do anything special, it is just a dummy static image. Other than that I could not find anything.

I don't think there's an official way to do this (as you have already mentioned the Badge Generator). Anyway you can use one of the many Play Store API wrapper on github to extract the desidered information and build your own fancy badge.
E.g.:
PHP+Curl: https://github.com/thetutlage/Google-Play-Store-API#itemInfo
JS: https://github.com/basiclines/GooglePlay-JSAPI
This one generates simple and clear output like this: http://googleplay-jsapi.herokuapp.com/app/com.meetsapp
many more in various languages..

There´s a fully embedable html widget http://playboard.me/android/widgets/apps you can use out of the box.
You can customize look and feel as they´ve got class per item so you can hide or remove things with css or javascript. Even the "widget by..." has a class pb-wd-footeryou can set to be hidden and leave the widget clean.

You can try this.
https://github.com/facundoolano/google-play-scraper
{
appId: "com.dxco.pandavszombies",
title: "Panda vs Zombie: Elvis rage",
url: "https://play.google.com/store/apps/details?id=com.dxco.pandavszombies&hl=en",
icon: "https://lh6.ggpht.com/5mI27oolnooL__S3ns9qAf_6TsFNExMtUAwTKz6prWCxEmVkmZZZwe3lI-ZLbMawEJh3=w300",
minInstalls: 10000,
maxInstalls: 50000,
score: 4.9,
reviews: 2312,
description: "Everyone in town has gone zombie.",
descriptionHTML: "Everyone in town has gone <b>zombie</b>.",
developer: "DxCo Games",
genre: "Action",
price: "0",
free: true
}
Fetch data using ajax jsonp and create html UI to include in your page. Hope you should be good to go.

I wanted almost the same thing for my project's GitHub page. I wanted the different versions my app has on F-Droid, GitHub release and on Playstore.
I found a cool badge generator http://shields.io/ that can also get data from an endpoint.
I forked google-play-scraper and added the shields.io endpoint requirements. See my
heroku branch for the changes needed.
It's free and a mouse click away to deploy to https://heroku.com from GitHub. After the deploy I have my badge.
Here is how it looks (static image)
You can also check out the google-play-api repo, it's also using google-play-scraper and the RESTful API is already implemented. You would only need to set up how you want to show the information.

Related

Clickable response such as a button in Dialgflow

I have been developing a chatbot for my android app using dialogflow and its working perfectly. But now I've a requirement to get a clickable response from my chabot. For example, let's say that the app user is asking for a specific location. I want Dialogflow chatbot to return a button or a link as the response so that the user could click on that and be redirected to the google maps.
I have went through a lot of tutorials, blogs and docs yet I've not been able to find a satisfying answer. If you could help me with a code example as well, that would be really appreciated.
Thank you in advance
If you are using Dialogflow to integrate with your own system (as opposed to something like Facebook Messenger, Actions on Google, or other bot platforms) using the Detect Intent API, then you can include any data you want in the payload object of your webhook response. This is passed back to you in the response to your Detect Intent call in the response body in the queryResult.webhookPayload object.
You can include in here any information you wish, and render it however you'd like.
Inside the Intent section in Dialogflow, click on "Google Assistant" in Responses.
Select "Link Out Suggestion" which is used for giving a clickable link.
In case if you just want the button without link then you can use "Suggestion Chips".
On the UI code you will need to parse it and render it as clickable button.
See screenshots below from dialogflow:
For more details, refer to https://www.kommunicate.io/blog/rich-message-button-response-dialogflow-chatbot/
You may have to use Google Maps URLs for this purpose. These provide a Universal Cross-platform solution.
Follow these steps:
Based on user Responses, encode a Map URL as shown in examples here https://developers.google.com/maps/documentation/urls/guide
For example, consider the URL from the guide above
https://www.google.com/maps/search/?api=1&query=47.5951518,-122.3316393&query_place_id=ChIJKxjxuaNqkFQR3CK6O1HNNqY
Then use
Buttons in Basic Card as follows
app.intent('demo', (conv, params) => {
// Create a basic card with the URL
conv.ask(new BasicCard({
text: `This is a basic card with Map Response.`,
subtitle: 'This is a subtitle',
title: 'Title: Open Map',
buttons: new Button({
title: 'Open Map as per URL',
url: 'https://www.google.com/maps/search/?api=1&query=47.5951518,-122.3316393&query_place_id=ChIJKxjxuaNqkFQR3CK6O1HNNqY',
})
}));
}
You can also use other Responses (such as linkOutSuggestion ) as described here:
https://developers.google.com/actions/assistant/responses
Hope that helps!

How to add support for google home app to my smart bulb?

We have built a smart bulb which we want to control using the Google Assistant as well(apart from our Android and iOS apps). I searched for this and figured out that we need to implement Google Weave protocol on our bulbs for it to be controllable via Google Assistant.
What I don't understand is how can I add this to Home app so that users can add it as smart bulb to Home app and control via Google Assistant?
You can make the link between home and your system via api.ai
The key concepts are here. This site creates JSON files which are loaded into the Google Actions API. Once approved you have a keyword or phrase which when said into Google home opens interactions with your system via webhooks.
For anyone facing the same problem, found my answer here: https://developers.google.com/actions/smarthome/
At the time I posted my question, this page either did not exist or I did not find it.
This page points to sample implementation for smart home device. Here is the link to github repo: https://github.com/actions-on-google/actionssdk-smart-home-nodejs It also has detailed instructions on how to run the code.
To summarize, we need provide following actions.json(which points to our server which fulfills 3 intents SYNC, QUERY and EXECUTE) file as our Action Package.
{
"actions": [{
"name": "actions.devices",
"deviceControl": {
},
"fulfillment": {
"conversationName": "automation"
}
}],
"conversations": {
"automation" :
{
"name": "automation",
"url": "https://<our server which provides fulfillment for SYNC, QUERY and EXECURE intents>"
}
}
}

Customizing source code of wso2 appm and wso2 emm

I want to customizing the source code of Wso2 appm/emm. Therefore I want to know what can we customize and upto what extent, where will I get the code to make changes(from github or with in the product). And also please tell what all I have to do to execute this changed code.
Therefore I want to know what can we customise and upto what extent,
App manager
The given link[1] provides some customisations that can be done.
Additionally, you can customise the app subscription model to add a
custom model such as paid subscriptions.
There is no doc available on UI white labeling, but you should be
able to customise the UI as well by editing the Jaggery apps of store
and publisher.
EMM
Lets say you need to plugin in a new device type that is not
supported OOB, like blackberry. You can write a plugin your self and
implement this functionality.[2]
You can customise the UI[3]
Customise the Email template[4]
White/Customise the Android agent[6]
White label iOS agent[7]
Event reporting[8]
In both products you can customise the management console[5]
where will I get the code to make changes(from github or with in the
product). And also please tell what all I have to do to execute this
changed code.
EMM
Repos to build according to build order,
https://wso2.github.io/github-repositories.html
App manager
Repos to build according to build order,
https://github.com/wso2/carbon-appmgt
https://github.com/wso2/product-app-manager
Prior to working on any code related changes, if you are planing on doing so, I highly recommend you to understand the architecture of the products[9][10]. More information about building WSO2 products is available here[11]
[1].https://docs.wso2.com/display/APPM110/Extending+App+Manager
[2]. https://docs.wso2.com/display/IoTS100/Writing+Your+Own+Device+Connector
[3]. https://docs.wso2.com/display/EMM210/Customizing+the+UI+and+Documentation
[4]. https://docs.wso2.com/display/EMM210/Customizing+Email+Templates+for+Tenants
[5]. https://docs.wso2.com/display/EMM210/Customizing+the+Management+Console
[6]. https://docs.wso2.com/display/EMM210/Customizing+the+Android+APK+File
[7]. https://docs.wso2.com/display/EMM210/White+Labeling+WSO2+EMM+iOS+Agent
[8]. https://docs.wso2.com/display/EMM210/Reporting+Critical+Events+via+Alerts
[9]. https://docs.wso2.com/display/EMM210/Architecture
[10]. https://docs.wso2.com/display/APPM100/Architecture
[11]. https://wso2.github.io/using-maven.html

How do you change a Meteor app to use the OAuth redirect flow?

I just added accounts-google to my Meteor app, and answered that I wanted the default OAuth flow, popup. I don't know why this is the 'default', it is broken on iOS8, and inside WebViews, and many other places (see discussion ->here).
Anyway, I have houston, and dont see any relevant collections, and I'm not sure where the config gets stored, or how to change it. Many thanks..
Aha, first do meteor add service-configuration to get the relevant smart package, then you can include this code at will
ServiceConfiguration.configurations.update(
{service: 'google'},
{$set: {loginStyle: 'redirect'}}
)

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