in my android application I want the user will be able to choose some location and to get this location back to the application code.
something like startActivityForResults.
Does it's possible?
I know that it is possible with all the google service sdk and all of this,
but I want to use only the content intent, like described here:
https://developers.google.com/maps/documentation/android-api/intents#overview
and here (in the maps section):
http://developer.android.com/guide/components/intents-common.html
thanks a lot.
There is no requirement for an Android device to have an app that does what you want. There is no standard Intent structure for this, either.
Related
I am working on a project to integrate the Google Assistant with an existing Android app. The requirements are simple. Assuming my app is named TestApp and I want it to just Create a meeting, I want to be able to say, "Hey Google, Create a meeting on TestApp".
The closest API I found that does what I need is the Voice Interactions. This is very similar to what I need done but it only allows preset voice triggers such as "call this person..." or "set alarm at...", but cannot do "create a task or something else..." like in my example. According to this link, custom voice actions aren't allowed.
So my question is, is it possible to directly interact with my app and have it do a very simple task?
Short Answer: No, not directly. But your Action can be made to prompt the user for permission to "deep-link" into an Android activity. To do that you need first to associate the Action and the Activity in the console. Sample code is here
https://actions-on-google.github.io/actions-on-google-nodejs/classes/conversation_helper.deeplink.html
Longer Answer: Before there were Actions on Google there were Google Now Actions. (Yeah I know it's confusing). With Google Now Actions the Google App on a phone can be made to launch an Android activity with an intent which carries search terms in the bundle of "string extras". Then your user would say something like
"OK, Google search for the meeting creator on TestApp". Then you would get the text "the meeting creator" as a query string extra in a specially crafted search intent which launches TestApp into its meeting-creating activity. Details are here:
https://www.seroundtable.com/google-now-actions-19436.html
Unlike Actions on Google, Google Now Actions forces your user to pose his request as a search.
I'm trying to develop an interactive "allspeech-based" application and I have found some troubles.
I would be able to do every task of my app without the touch input, only the voice one.
So, my idea was to use Google Assitant to open my app, and then execute tasks with Activities "allspeech-based". My only problem is open my app with a custom phrase like "Hello myApp".
I've noticed that Google only permit to define in Manifest in which developer can set predefined method like SEARCH_ACTION (I have to say "Serch cats in myAPP..."), ... and not custom action!
Then I had an idea: to resolve this I can define a new routine in my Google Assistant where Command is "Hello myApp" and action is "Open myApp", and it works!
But I don't want to force my users to add a new tourine in their Assistant, I want to do it from my app automatically at the first opening of my app (throught an Intent and a startActivity or something similar idk).
My question is: How can I do? Which Intent I have to invoke? With which extras? Is it possible?
Please answer, thank you.
There's no such intent which can directly create a new routine.
Hello my fellow coders,
I am trying to retrieve GeoCoordinates from an Android Google Maps SEND Intent (as dispatched when selecting to share a selected location) and even after searching around and trying various approaches for hours now I can't seem to get anywhere. However, all I seem to get from the Intent seems to be a text/plain content like this:
Franziskaner Wirtshaus & Biergarten - Trudering-Riem, München
https://some/shortened/maps/link
I tried (amongst others) several approaches from:
Get GeoCodes from Android Google Maps App (Not applicable since it opens a new activity)
How can I find the latitude and longitude from address? (Geocoder and Geocoding REST API from Google - no suitable results)
None of the above solutions yields any usable results.
Is there a reliable way to get GPS coordinates from something a user selected in Google Maps on Android at all?
Thanks in advance for your help,
Alex
I don't know if this app helps you. you can copy coordinates to clipboard or open it with other third party maps
cheers
I am trying to call the Maps app from within my application, fair enough I can start the Maps application but my titlebar disappears and I would like the maps to run within my app and not launch as a separate app:
MainActivity:
startActivity(new Intent(MainActivity.this, ActivityMap.class));
ActivityMap:
actionBar = getActionBar();
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.google.android.apps.maps");
startActivity(launchIntent);
You cannot run Another App inside your app. The best you can do start a Intent via startActivityForResult() and get the result back to your app via onActivityResult once the user does some action.
For example: you can start a Camera Intent and get the image as a bitmap to your app
http://developer.android.com/training/camera/photobasics.html
You can of course embed a Google map view inside your own application as a MapView or as a MapFragment.
See here for the Google Maps Android API. It involves a little bit of hassle but isn't very complicated in the end. There's quite good documentation with some example code to get you started. And there's plenty of discussion already on Stackoverflow about the topic.
First of all you'll need Play Services set up for your development environment and your application project:
https://developers.google.com/android/guides/setup
You'll need to acquire a (free) API key:
https://developers.google.com/maps/documentation/android/signup
And then you can choose between
MapView which is just a View that you place into your Activity or Fragment
MapFragment which is a complete Fragment to place into your Activity (the easier option)
I'm very close to having what I need for my facebook dialog, the post is working successfully, which has taken me a fair amount of time as i've struggled with the facebook sdk.
When I open the dialog to post a message to the feed ( or when I call authorise in a dialog ), it shows as shown here:
http://minus.com/mg6utFaHf
I'm looking for something more like this:
Any ideas why mind is showing so... ugly?
It's very square, in a webview, with the X in the top left.
Thanks, any help is much appreciated.
The new Facebook SDK should allow you to use the built in Facebook app to do such things via intent.
In alternative you could use the Intent ACTION_SEND to achieve what you want.
The new SDK of theirs implements a way of authorizing called Single Sign-On which searches the device for the presence of the Facebook app and sends an Intent to that app which will authorize for you. If the Facebook app is not found then it will fall back to the dialog method.
You'll still be stuck with square iOS-y like design for in app sharing, invite friends, etc. The only way I can think of getting around this is to use FQL but how to do that is beyond my knowledge.
http://minus.com/mg6utFaHf is just the standard facebook Feed dialog ... see https://developers.facebook.com/docs/reference/dialogs/feed/ ... just change www. to m. as for example https://m.facebook.com/dialog/feed?app_id=123050457758183&link=https://developers.facebook.com/docs/reference/dialogs/&picture=http://fbrell.com/f8.jpg&name=Facebook%20Dialogs&caption=Reference%20Documentation&description=Using%20Dialogs%20to%20interact%20with%20users.&redirect_uri=http://www.example.com/response
Said that if you want it different you have to implement UI and post data by your own by Graph api