Create custom google now cards - android

Google provides a variety of 'cards' for Google Now (http://www.google.com/landing/now/). Is it possible to create your own cards? The system looks pretty modular, but I haven't found any documentation or instructions to do so. (I believe you need to supply the content of the card, and some way of signaling when it is supposed to be shown. There is probably just some interface that you have to implement.)
If there is no documented solution, a hackish/undocumented way would be ok, too. I'm mostly curious how it works.
Edit: Specifically, does somebody have knowledge about the internals of Google Now, e.g. by decompiling the .apk? What I've seen suggests it is pretty modular, and it should be fairly easy to drop another class into the .apk, or to maybe inject code using Cydia Substrate. I know that there is (as of Nov. 2013) no official way to add new cards.

There is currently no way to do that. Google makes its own cards and custom application cannot register any cards. But I hope it will be possible in future.

Actually Google announced last week that developers can now develop custom Google Now cards:
http://www.google.com/landing/now/integrations.html
However, a developer guide seems not available yet.
Edit:
On the end of the page they point out that:
We'll let you know when we are able to onboard more partners

There is a work-around that will soon allow you to place cards in Google Now's stream at a particular time or a particular location: Use Google Keep (https://drive.google.com/keep/)
You can create a new card at Google Keep with a time based or location based reminder, depending on which the relevant card will show up in Google Now.
Since Google Keep is now in Drive, the API is expected to be available soon (keep a lookout for it at http://discovery-check.appspot.com/ )

There is not way to do this by your own at the moment. If you really want to do it you can fill in this form: https://services.google.com/fb/forms/nowintegrations/. You can ask Google if they want to cooperate to create a Google Now card.

Note quite an answer, as it is still not possible to create Google Now cards, but you can now hook into the Google Now search function (basically Android's Siri) and provide custom search results. For example you can say "show me the lyrics to..." and it opens a lyrics app.
Here is a link to the project which is based on the Xposed framework.
Just guessing from my impression of the Google Search apk (which includes all the Google Now functionality and even the home screen on KitKat), it should be possible to use a similar technique to inject cards into the app - however since the app is huge and very complicated, it will be a lot of work. I'd keep my eyes open on the xda-developers forums, wouldn't be surprized if someone there solves this in the future.

It appears that there is developer documentation on how to push google now info via email, eg. flight details, restaurant reservations etc.
https://developers.google.com/schemas/now/cards
I have yet to dig into this, but may update this answer if I discover anything significant.

Related

How to create an Auto Clicker app which can click on other apps?

I have seen so many apps that provide auto tapping feature. But they don't provide some specific customization so I decided to create a one. I have seen many tutorials that offers auto tapping, but they are supposed to be used in the same app. But I want to create an auto tapping app that can click on other app's View. I am an intermediate java developer but new to Android studio, so I don't know much about Android APIs. Is there any class or package which can provide this feature. For more clearance, I want to do auto tap, when the color at the specific location on screen, (213, 120) for instance, becomes green.
Thanks in advance!
I am not an expert on the subject, I have experience as a BackEnd developer, I am new to the Android world, just like you I am interested in building an app to automate some farming mechanics in Android games with specific behaviors, so I investigated on the subject and the solution you are looking for is the AccessibilityService API, from Android 8.0 (API level 26) it includes several functionalities to make touches without the need for Root, I leave you links with examples of some open source repos that can guide you.
https://developer.android.com/guide/topics/ui/accessibility/service#continued-gestures (Doc)
https://github.com/nestorm001/AutoClicker (Old and abandoned project, but has the functionality of touches)
https://github.com/pylapp/SmoothClicker (A more mature App but need root, it can be helpful to guide you in how to build the UI)
For the detection in the change of the pixel I still do not have a concrete answer, I keep looking, maybe obtaining a dump of the screen every X time and validate the pixels on that is the way but it is still uncertain if it is the way to go.
Something like How to record screen and take screenshots, using Android API?.
I know that you can get a bitmap dump of the screen if you have the activity, but it's not the case, however some class in the following package may be helpful https://developer.android.com/reference/kotlin/android/graphics/package-summary.
I'm currently working in my own implementation, when I have something to show I will gladly share it.

How to use google drive api in my android application?

I want to upload my application data to google drive.So I have to integrate Google Drive into my application, but I can't find any proper solution or source code for do that thing. So please if any one have full code of how to use Google Drive into android application than please help me.
First, a bit of critique. If you ask a question this way ('show me the magic trick'), it will get promptly down-voted, purged. It only shows you did not do your homework.
The other possibility is that you are starting and being totally lost (been there). If this is the case, let me give you a direction:
Study the 2 APIs available to Android, the REST Api and the GDAA. They do essentially the same thing, the selection very much depends on your app's needs.
Make decision which one to use. Pay special attention to the fact the GDAA supports only FILE scope, limiting the files/folder your app can see. Weight advantages/ disadvantages.
Study / play with the demo code for the API you selected. The links are in the docs you already studied (point 1 above). In case the official Google did not meet your needs, you may also look at the basic CRUD implementations of the 2 APIs here(REST) and here(GDAA)
As you'll see, you are weeks away from getting anywhere. And don't count on anybody here to do the work for you.
Good Luck

How to do a Google Image Search in an android app

I'm developing an Android app that will do a Google Image Search and return the images to the user in a list. I've looked around on StackOverflow and have run into some problems. First off, I'm a total newbie programmer with only 4 months' worth of programming experience, so I appreciate you guys being patient with me.
I looked through Google Image Search API and I know it's being depreciated and will get shut down someday. Because of this, I don't want to use it. After extensive research on the topic, I don't want to use Bing or another image search service, and I don't want to do a "reverse image search. I just want to use a simple image search via string. I've used this app (https://github.com/tonytamsf/Android-Image-Search) to look at the code, but in all honesty, it's just not helping and it's confusing me more on how to exactly search for an image on Google. Plus, the app won't compile in Eclipse :(
I've also looked around at Google Developer APIs, and I'm not sure if I need to turn on an API key for myself? Still, a bit confused about that. I thought I needed to do a custom search engine, but just by looking at that, I don't think it's exactly what I'm looking for.
Can anyone point me to some resources for this? I would really appreciate it. Thank you!
Just a heads up, but what you're asking is pretty challenging and it sounds like you're just getting started. Here's what I can suggest though:
To get that demo code working in eclipse, I had to right-click the project, click properties, click Android, then check the box for the version of android installed. (I had android 19 installed, and the code was expecting 16, so it was giving up. Tell it to use what you have, which probably is 19). This worked for me after using the git plugin in eclipse to import the project. If you are importing a different way, you may have different issues. * Using git and importing the project is a good skill to have, so if that's unfamiliar territory, take the time to look at that.
Ok, that's the end of what I am sure of. The rest is an educated guess, but I'm sure others can correct me.
Next, if tinkering with that project isn't enough, getting real google image search working will take several skills, especially since the old API is gone. In total you'll need to know:
Java
Android programming
google cloud services
google custom search API
REST
some other libraries to glue the custom search to your app
It's a big chunk there. Currently, it seems the only way to use google's image search is to run a google app engine (you basically set up an online account for google to run a server for you. It does computation and sends messages back and forth for you. You only get a little bit for free each day and then if you want more you have to pay. This is one-way Google earns money. It's not something they let you run on your own computer anymore.). Then you make your android app talk to that server using your new login ID, and the server will take the search term and send back the answers to your android app.
You can get the app engine running and use it in chrome without dealing with android to save yourself time, then add the android part later in the future. Good luck!

Flash card app user performance with Google Analytics?

We are building an app (iOS and Android). The core of the app will be a flash card interface where the user will see a question and then will need to give an appropriate answer. They have a timer and will be shown hints as time goes on.
We want to understand the following on a per question basis (there are potentially 100s of questions):
Which questions took longer to recall correctly (with and without hints)?
Which questions had the most errors (with and without hints)?
Which questions were skipped the most (with and without hints)?
What were the most common (wrong) answers for a question?
Of course, we are also going to be collecting number of installs, usage, churn, etc., but I figure that is pretty well covered by GA.
Also, we will be storing different information about the user themselves so they can track their progress. This is meant to help us understand how to tweak the flash card data later on so that it is better for the students.
It feels like we could potentially use goals within GA (end goal is to get the right answer), but I am not as familiar with them.
Would this be goals within Google Analytics? Or is Google Analytics not a good use for this type of thing? Is there something else we could use to collect/analyze this information or should we build it ourselves?
Google Analityc suppor custom variables. You can save custom data.
First I would just track every card event as unique pageView (card1234) with it's data.
You can also track events with data for every card.
Goal is more for tracking your app behaviour in general. Example:
Goal 1
for tracking wring answers - Make a goal with more that 100 wrong answer (for session or in general for day) - in this way you can track that your app has difficult question
Gola 2
Quick answer - Make goal with Event or pageView for card that has small duration (5 second for example). In this way you can check behaviour of whole app.
There are many other good analytics
Localitic
KiSSmetric payed one
Mixpanel - very good for tracking information about users and making segmentation reports
https://mixpanel.com/notifications/
County -Haven't try this one so can't say anything
Here you can find many others
Im currently using Flurry analytics it, more easy to integrate and simple to use.
http://www.flurry.com/flurry-analytics.html
http://www.google.com/analytics/ this is GA official web-page.
Edit: Documentation for developers: https://developers.google.com/analytics/

Image Recognition for Android/iPhone

I'm looking at developing an app that could benefit from having a image recognition system. I've seen this sort of thing in iPhone and Android apps. Take a picture of a book and the app takes you to Amazon where you can find that book. I'm not looking for general image recognition, but more the ability to pick a single image out of a library of about 10k images.
Any ideas of what services are available for this sort of thing?
Google Goggles does something similar to Amazon Remembers. It uses OCR if text can be identified and they want to use it with the similar image search from Google Images. I think they generate some kind of hash for an image with the feature that if the images are similar the images are similar to.
My best guess would be try to start with the character recognition and do a text search for the title of your card. This means your user has to make a very clear image maybe even in a specific position. But for a first application this would be great already. As somebody playing magic I would buy the tool for trading and cataloging my cards.
Actually, while short of getting an actual Amazon employee to tell you there is no way to confirm this, I am fairly certain that the Amazon Remembers feature you refer to is actually the work of crowd sourcing- using lots of people combing through data to make it appear like a computer is doing it. I think they may actually be using there own Mechanical Turk system.
Edit: Also, I found this SO question that might interest you. It is specifically for playing cards, but some of the answers (such as the machine learning example) can be modified to be more helpful for what you want to do with magic cards.

Categories

Resources