I am trying to write an app that hooks into the "navigation to" functionality of Google Now but I am unable to figure out exactly how it works. I suspect it's using "Intent.ACTION_VIEW" and then passing it some special URL but I haven't been able to find any documentation on that. Thanks in advance for the help.
You probably want to look into implicit intents.
Specifically for GPS navigation, you have a detailed explanation right here:
https://developers.google.com/maps/documentation/android-api/intents#display_a_map
if you want to do something more specific, just ask :)
That "special URL" you are referring to is a URI (so the schema is geo, as opposed to a URL where the schema is usually http).
P.S. here's some material about implicit intents :
https://developer.android.com/guide/components/intents-filters.html
and if you are in the process of learning the android framework, then I recommend Udacity's free course "developing Android Apps"- Google engineers explaining Android. That will save you a lot of time for sure!
Related
I would like to open this directly from my program, is it possbile?
I checked this, but cannot found relevant information
https://developers.google.com/maps/documentation/android-api/intents
If it is impossible, is there any alternative way?
You can't do that from your activity.
In the image above you can see a dialog that catches the voice of the user, this is because Google Maps calling an intent ACTION_RECOGNIZE_SPEECH, and you can't start an intent and after calling Maps.
Here is the only documentation that I found on the internet for that question. The Adding Voice Capabilities. Just remember that these voice actions are task-based and are built into the Wear platform. So you need to use Android wear for that, see Maps API on Android wear.
Just read the two documentation to understand more. Also take note, that do not violate any terms of service on the Google Maps. Here is one example question for that.
So far, I have not used this voice capablities, so I'm not sure if it will really help you, but I think I give you a small idea with it. Goodluck and Happy coding :)
I'm currently trying to learn how to write custom services and have them start up at boot, all in the Android Source code.
Could anyone point me to the right references (books, online articles, etc) that discuss this specific topic and as well as understanding AOSP/Android operating system in general?
To learn how to write a custom Service you can look at the docs here.
You'll want to learn about Activities and their Lifecycle in the docs here
And you'll want to learn about the Application fundamentals in the docs here
Once you have an idea of how everything works fundamentally, there are tons of tutorials on the internet that will show you how to code specific things. A simple Google search will find you all of that.
Hope this helps!
Hello I'm developing an app and I need the package name of the predetermined app android notes. The application that comes with android. The ''Notes'' App.
Thanks in advance.
There is no standard Android "notes" app.
Probably what you have to try is an implicit intent, and hope that actually there is one or more apps in the device that can handle it.
Take a look at the intents, and intent filters reference.
Also, take a look at openintents.org, a website that, as they say:
...collect, design, and implement open intents and interfaces to make
Android mobile applications work more closely together. We provide
samples and free applications to demonstrate their usage.
I found lots of books on android which give basic concept on android Example (calling Activity, Intent, service, broadcast receivers etc). But I want to know brief description on all these concept. in os level or in api level how does it work. Also how connection with wifi or 3g works in api level.
I want to know brief understanding on android. Can anyone suggest any tutorial or book to get detail understanding on android.
Thanks
Start with the Android Developer's Guide. http://developer.android.com/guide/index.html
I would recommend to buy a book. For me Professional Android 2 Application Development was really good. But probably now there is better (up to date) alternative.
Anyway I find reading books much easier starter than separate tutorials and articles.
If you want a really detailed view, just look at the source code.
I'm interested in incorporating the Android UI pattern called "Quick Action". Basically, it's a context menu that doesn't cover up the data that is being acted on. I'd like to implement this but I cannot find some sample code or an API to help me out.
Note this UI pattern is discussed in the YouTube video, http://www.youtube.com/watch?v=M1ZBjlCRfz0#t=15m20s.
Does anyone have an implementation of this or know what Google's standard is for adding this to an application?
Till the official Twitter app is open sourced by Google, you may want to take a look at this implementation:
http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
Really easy to use and works great.
Interesting Question. Android uses this pattern in their Contacts-App. You can get the source using git:
git clone git://android.git.kernel.org/platform/packages/apps/Contacts.git
I did this and quickly grepped it, but I didn't get a conclusive result. I think that's done in "Contacts/src/com/android/contacts/ui/QuickContactWindow.java", but I am not completely sure.
I you google for QuickContact android, there are a lot of images that show exactly the kind of menu that you want, so it seems likely that it is indeed called QuickContact in that context.
Looking at the Documentation, I don't see any inherited classes that you could use to do this for something other than contacts.
So, a few starting points, but no solution from me ;-)
This open source project has the same look and feel for the quick actions popup as the twitter app:
http://github.com/ruqqq/WorldHeritageSite/tree/master/src/sg/ruqqq/WHSFinder
It helps to download the whole project because you need a number of drawables, images, and other resources from that project.
The main demo class is called WHSListActivity.java. The other classes you need is QuickActionWindow.java, and QuickActionItem.java.
After that, it's really easy and works great. I use it for my apps.