How to launch google map navigation with multi stop through my android app - google-maps-android-api-2

I want to launch google map navigation with two destinations,example my last destination is 'x' and while i'm going for that in middle i want to go to place 'y',so i want to show navigation from my current place to 'y' place and finally 'x' place,so how would i do in my app any suggestions please.

Here how you can do it.
Uri gmmIntentUri = Uri.parse("google.navigation:q=Taronga+Zoo,+Sydney+Australia");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);
For more please visit:
https://developers.google.com/maps/documentation/android-api/intents

Related

Driving Navigation using google maps in flutter

I am using google maps in my flutter app, I have done drawn paths from one point to another using flutter_polyline_points, Now I want to get turn by turn navigation as mentioned in this attached picture, is this possible in flutter, or how I will achieve this
This is Google Map Turn by Turn Navigation View. You can launch it using Android Intent Plus lib
AndroidIntent mapIntent = AndroidIntent(
action:'action_view',
package: 'com.google.android.apps.maps',
data: 'google.navigation:q=$yourDestinationLat,$yourDestinationLng'
);
mapIntent.launch();
Read more at this link

How to simulate the very first start of an app in Xcode 6

I need to test some behaviors of the iOS 8 at the very first start of my app. Is it possible to simulate this in Xcode 6? If yes, then how?
Deleting the app will do it but note that certain pieces of information will be cached for a while like your permissions settings (notification, calendar, etc.). You can go to settings.app and reset settings to clear those out if that matters in your use case.
If you mean the FIRST start of the app, then what I did to achive this is, on start (viewDidLoad) check in the NSUserDefaults for example ,if the value "hasAlreadyStarted" exists (NSUserDefaults.objectForKey(..) ), if not, then its the first start of the app, and then i would set the value to true, so when you close the app, and open again, the value will exist.
Dareon I'm not sure what exactly you want to achieve. In Xcode 6 yes you can simulate your app from start. If you want to test behaviours I think you are looking for instruments. Right Click on the Xcode icon in your dock select option and choose instruments. You can add several instruments your phone or emulator support like connectivity or gps or memory to see exactly the behaviour of your app. Hope that helps
Well if by very start of the app cycle you mean before the app loads, there is a way.
In your ViewController call the ViewWillLoad function:
class ViewController
{
override func viewWillAppear(animated: Bool)
{
// your code
}
}
This event will be called before the view loads or appears.
Hope it helps :)
As Shanti K said in the comment, if you delete your application from the simulator and then run it again, you will be simulating the first run. To delete the application from the simulator, you mimic the same behavior on a device.
Click and hold on the icon, until they start shaking. Click the close X next to your application, and verify that you want to delete it if it asks. Then Shift + Command + H to simulate hitting the home button.

How to hide the application during the runtime?

How to hide the application during the runtime. During the run time when i click the button , i need to perform the action application will close and then hide the application in phone. How to achieve this, even jailbroken iOS is not a problem. How to do.
Thanks in Advance.
add these line to you plist but it will hide your app forever on frist run
SBAppTags
hidden

Is title of 'My Map View' automatically used in mapKit?

When coding an app I found for a tutorial on using the MapKit facility on iphone, when running the app simulator, I find the title of the app called 'My Map View'.
I did a search on the words and it came up with nothing in the code workspace. Is this because the title is automatically shown as this from the Mapkit framework? Can I change it? How would I get to the code piece?
Also, I had a look at the nib file, and because the app has been fully programatically coded in the map, there is no nav bars etc. Everything has been hardcoded in, which doesn't help me at this point.
Okay, I found that if I go into the 'MainWindow.xib' and double click on navigation controller option, the Root View Controller nib pops up which has what i am looking for - the title bar!
Cheers

Reinitializing iPhone app when it relaunches

I am building an iPhone app. Currently when I close the app and relaunch it, it relaunches on the last viewed view. Instead I want to be able to reinitialize the app, and present the view that's most appropriate for the application's state (based on what's in the database).
How can I do that?
You have two options. You can follow Petesh's suggestion to make your app always terminate, or you can implement -applicationWillEnterForeground in your app delegate and reset things there.
I presume it's iOS4 - your app is not being terminated in this case, it is merely being suspended.
You need to follow the instructions here: http://maniacdev.com/2010/07/screw-multi-tasking-how-to-make-your-ios-4-apps-exit-for-real/ which will terminate the app when the user presses the home button.
You need to add the appropriate 'correct view' logic to your application's start-up code once you've done this.
For the purposes of expediency, I'm adding the instructions here:
Open your info.plist file
Add The Key UIApplicationExitsOnSuspend or Select Application does not run in background
Set the new key to YES or Fill in the tick box