Show blank google maps in codename one - java

I'm building a codename one mobile application and i need to fetch a blank google maps on which i can place icons showing my own coordinates (not places i can fetch through the google places api). How can i do that ? Since i don't want to fetch anything other than a blank map, i wonder if i need a webservice for that. I have read that instantiating the MapContainer would show me a blank google map but i am stil getting a osm map (on both the emulator and a real Android 4.4 device). I have already done all the procedures required to get a key and all the steps of the maps demo work fine for me. Now what i need to know is how to be able to get a blank map.
Thank you advance for the answers.

You get OSM on the device as a fallback when initializing the native map failed. Make sure you followed the integration instructions as explained here.
You can debug the issue on an Android device by connecting the device with a cable and launching the DDMS tool from the Android command line SDK. In 90% of the cases this means your SHA1 is different from the one defined in the maps API and this will be printed when you try to open the map.
On the simulator OSM is shown unless you provided the Google maps provider in the constructor.

Related

How to make the default markers interactable using google api in android studio

Ok so im using the google api to make a map and I noticed that google gives you the markers they already have for restaurants and other businesses but you cannot click on them. I was wondering if there was a way to make these markers interactable.
I have tried looking into it on the internet but noone seems to go into this.

Android Wear Google Maps

I just started using Java, seems pretty straight forward. When I make a gps app with google maps on an android device there's no issue. However, I tried to incorporate an android wear device (Currently running on a simulator). My dismiss overlay pops up after a long click, but the map comes up blank. I'm getting the map and it's not null so I know it's there. I'm thinking I need to use the handheld location listeners but I'n not exactly sure how to point them towards each other. If someone could point me in the right direction I would appreciate it.
-WD
You need to have the google maps api key setup on your android app. You then need to make sure that the package name in the android manifest files are the same. This is the part that hung me up for a while. Once you do that, you should see the map render.

'Authentication is required. You must sign into your Google account' when testing IAB

I have been developing a simple game for android and I have run into a number of issues while using in app billing. To perform IAB, I use the utility classes provided in the TrivialDriveExample here. I have copied and modified accordingly the code in the MainActivity class provided in this example to use IAB. I have also followed the documents on the android developer page describing how to set up IAB on the developer console.
However, when trying to test the purchase the product in the app using the following code, I get the error described in the title of the question.
helper.launchPurchaseFlow(game.getActivity(), sku, RC_REQUEST, getPurchaseListener(game));
(where helper is an instance of the IabHelper class provided in the google code link above and RC_REQUEST is a constant set to 10001 as shown in the MainActivity in the trivial drive example, and where sku is the sku of the product - as seen in the developer console). Here, getPurchaseListener returns an instance of an IabHelper.OnIabPurchaseFinishedListener (provided in the util package of the example code).
What I am certain of:
The sku is correct and exactly the same as the one provided on the developer console.
The APK that has been uploaded to the developer console as alpha is identical to the one installed on the device (and is signed with my developer key not the debug key).
My account and all used testing accounts are in both the google group registered for alpha testing and the list of accounts that receive the LICENSED response from the developer console.
Every object used in the code != null
I can test Google Play game services on my app (achievements & leaderboards).
It is to do with the app I am developing as IAB works for other apps (tested with Clash of Clans and Infectanator).
What I have tried:
Removing my developer google account from my device, leaving only a test account (+waiting overnight without my developer account installed on my device and then testing it in the morning with my test account).
Clearing all google play data and caches.
Restarting my device/reinstalling the application.
I also get another error when trying to use android's test purchases (using the sku 'android.test.purchase'). I get this:
Error while retrieving information from server [DF-DFERH-01]
As mention above, I have cleared google play data, removed my account and added it again, restarted my device and reinstalled the app. Again, this happens only on my app currently in development and not in any other apps with IAB.
EDIT
Just to note, I have looked through other people's questions regarding this error and tried the solutions provided to no avail.
The application with IAB integrated has to be Published for Play Store to enable the billing for it, it won't work so long as it's in Draft -- documentation seems to not be very clear about this.
So, make sure you actually publish the app (don't worry, if you've only got the alpha and/or beta version, it won't be listed in Play Store for simple mortals) and, as usual, allow some time for Play Store to absorb it.
Same answer here

Google MAP V2 - Map Not Showing On Real Phone

I've implemented Google Maps v2 on my emulator, it works fine and displays but I need to test this on an android phone however the map just displays with a blank white screen with zoom buttons. I'm using the debug API key, i don't want to generate a release key just yet, can I still test my maps on a real phone with a debug API key?
If not where can I find the *.keystroke file required to enable me to generate a release key?
I don't have the whole answer but I know you can get the api key on this website :
Visit the APIs Console at https://code.google.com/apis/console and log in with your Google Account.
Click the api&auth link from the left-hand menu.
Activate the Google Maps API v2 service.
Click the credential link from the left-hand menu.
You'll then find on the right panel the API key
Based on your comment that you compile the app then copy it over I believe this might be the answer.
First remove the app from the phone.
Next plug the phone into the computer via the USB cable (make sure the computer recognizes the phone)
(assuming you are using eclipse)
right click on the project, select run as android application.
From the list select your device, and it should upload the app to your phone using the debugging key with out the need of a production key for the map api
If Map Working on Emulator then it should be work on real Device . There should be no problem with console. Just check for Google Play Service. I think in map white screen with grids are shown. If map shows on Emulator using debug key then it also shows on real Device.

ways to implement desktop application with maps

i need to implement a desktop application (possibly with Java Swing) in which i can implement maps (not only Google maps but also other services) in two ways: online and offline. Online means the application calls API services by internet, while offline means that i have maps services saved locally and i can request for them also without an internet connection..
Specifically, my application has to draw a polygon on the map (with the API) and do some computations on the background..
Given this, what services can i use to implement at least one way (online or offline) or both? Thanks so much
Initially, google maps only allowed online use of it's API. Any attempt to save maps for use offline was an offence.
I know that the current google maps app (Android / IOS) supports storing maps offline but I don't think this is open to third parties such as yourself. As with everything google, they want your data so they won't let you use the maps offline since they can't see how it's being used.
I've seen many offline mapping applications based on open street map. These maps are open source and free to use as you please (online / offline).

Categories

Resources