snapshot of current location of map in android - android

I am trying to develop an app that can take a snapshot of current location from Google map and send an email (All this by click of a button)
I would like to do this in the background.
Is this possible?
I was trying out:
http://goo.gl/krFqXu
But the above code supports FragmentActivity, I am developing the app extending an activity.
Is it possible to use the same code in extending an activity? if so how? I am getting error in the following place:
myMap = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map_pass_home_call)).getMap();

If your question is only "How to not use Support lib", you can do this:
myMap = ((MapFragment)geFragmentManager().findFragmentById(R.id.map_pass_home_call)).getMap();
The support library helps you to support devices with an old version of the API. It seems you don't need that, so every sample code you found on the web that is using the "support" library always have a simpler equivalent in most recent version of the API.

Related

Turn-by-turn navigation for trucks problem with STARTER plan from HERE

I would like to implement Turn-by-turn navigation for trucks function for my android mobileAPP.
As a test, I tried to make work the following code example containing :
https://github.com/heremaps/here-android-sdk-examples/tree/master/turn-by-turn-navigation
I subscribed to the starter plan from HERE and downloaded the associated SDK package.
When I try to make it run, it says that we are missing the following package : com.here.android.mpa.guidance.NavigationManager, especially guidance.
When I look at the package, I notice that the libs folder doesn't contain anything (please refer to the image) content of the package
Can anyone please help me sort the issue out ?
Best regards
All truck features and also all TbT navigation features are only available in the Premium package. See the differences of Starter and Premium on the Mobile SDK main page, there's a comparison table of the features: https://developer.here.com/develop/mobile-sdks

How do I render a map activity on android studio

I'm very, very new to Android and am currently trying to develop an app dealing with location. I want to start off on a map activity but after the first few times of rendering it correctly, it started giving me unrendered frangments and a rendering error. Pls Help.
Use the MapActivity provided by google in android studios.
Also make sure you have entered correct API key.
You can use this default activity on Android Studio.
Then, make sure you have an API key from google. Here's the link:
https://developers.google.com/maps/documentation/android-api/signup
After that:
Note: Always make sure that you are connected to the internet for the maps to render. Hope this helps!

How do I add a Google Maps fragment to an existing tabbed project?

I have successfully got Google maps working in Android Studio in an independent application. I also have a Sliding Tabs application working. Both are from scratch. But, How do I add a Maps fragment to an existing sliding tabs application? I have tried adding a "New > Google > Google Maps Activity" to the Java section along with the other code, which appears to load the libraries and code, but results in problems with the Build/Run configurations?? "Importing" modules don't appear to help, but I am probably doing something wrong. I am happy to set things up manually if I need to, but I don't know how to get all the libraries loaded to make Maps work in an existing application.
Cheers,
Chris
A little bit code would be helpful.
Create a MyMapFragment that extends MapFragment or SupportMapFragment.
Then modify your MainActivity to load that fragment when clicking on the map-tab.
Also make sure you added the PlayServices correctly and you inserted a working maps API key in your manifest.

Android: How can i change the Build Target of one class

I have a project with Build Target Android 2.1 and i want to use Google map in it.
I know that to use the Google map i should create a project with Built Target Google APIs.
I want to extend MapActivity in one class not for all the project.
How can i do it?
I have one question: Google Map is a option in your app. or permanent feature?
In the first case I think you can encaplusate you code for Google Map in external jar.
In the second case I should change to GoogleApi(Android 2.1)

Geolocalization via Titanium

Hi I'm developing an app that needs the most accurate GPS localization. Using the method that uses "kitchen sink" to show all Titanium's possibilities it gives me the network geolocation, can I have the device detection?
PS: The project is actually developed for Android, but will be soon ported to iPhone.
So, to clarify, you're basing your code off of this example? And the issue is that you are getting network-based geolocation, instead of GPS-based geolocation?
Have you tried replacing the preferredProvider with Geolocation.PROVIDER_GPS, instead of the string "gps"? As in:
Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS;
If you are using TiStudio instead of TiDeveloper you can use the sample project GPS to start with. It's bundled in the download so just fire it up and use that code as a working copy to learn from. It's android ready as well :-)

Categories

Resources