mercoledì 13 marzo 2013

Non è possibile visualizzare le mappe dopo la pubblicazione su Google Play - Can't see maps after publishing App on Google Play

HABEMUS MBC!

 PILLOLE DI PROGRAMMAZIONE -  INFORMATICA - TECNOLOGIA - TRUCCHI DEL MESTIERE & CO!
-
PROGRAMMING TRICKS - INFOMATICS- TECHNOLOGY- TRICKS OF THE TRADE & CO!

Benvenuti + Non è possibile visualizzare le mappe dopo la pubblicazione su Google Play
-
Welcome + Can't see maps after publishing App on Google Play

Ciao a tutti ragazzi, con questo post dichiaro ufficialmente aperto il mio blog. Proprio oggi che hanno eletto il Papa io decido di ritagliarmi il mio spazio di notorietà sul web.
Megalomane? Megalomane, esatto.
Ad ogni modo, di tanto in tanto posterò la soluzione a dei problemi informatici che mi hanno fatto impazzire, o a qualche tecnica di scommessa, comunque tenterò di scrivere sempre qualcosa di utile, ovviamente sia in italiano che in inglese e, per quanto riguarda la traduzione, nei limiti della mia ignoranza.
Ma con una differenza rispetto a questo post: l'ordine sarà invertito.
Ciò mi serve ad ottenere più visibilità e, comunque, se siete programmatori credetemi: almeno saperlo leggere vi servirà come l'aria, quindi prima vi abituate e meglio è!

Per cominciare una chicca per i programmatori Android che si stanno affacciando alle mappe di google. In particolare alle Google MAPS API V2, che rivoluzionano e semplificano notevolmente il lavoro di noi poveri smanettoni.

Vi sarà capitato, subito dopo aver pubblicato la vostra app su Google Play, di non riuscire a visualizzare la mappa.
Ciò accade per il seguente motivo.
Nelle istruzioni che Google offre a noi developer, e in tantissimi forum e tutorial, viene suggerito di inserire, nella schermata 1.1

1.1 Configurare Android Key per API Project

un identificatore che unisce la vostra chiave SHA1 e il nome del package della vostra app.
Questa funzione serve per consentire alle sole applicazioni indicate nel campo di testo di ricevere le mappe. Se da un lato può essere utile, alle volte può provocare il problema di cui sopra.
Quindi, se avete questo problema, togliete l'id univoco che avete inserito dal campo dell'immagine 1.1! In questo modo tutte le app che utilizzeranno quella chiave potranno usufruire delle mappe, senza filtro alcuno.

Ma come MBC, ho fatto come dici, ma non funziona ancora?
In questo caso, escludendo errori di setting del progetto (che potete risolvere seguendo il tutorial di Lars Vogel, che personalmente consiglio caldamente), avete probabilmente adattato un progetto che utilizzava le vecchie API V1 alle API V2 (come ho fatto io per la mia App SCOLACIUM).

In questo caso vi informo di due cose:

  1. Se alla data del 03/03/2013 avete richiesto una chiave per le GMaps API V1, allora potete utilizzare ancora quell'app;
  2. Se non siete così fortunati, e avete realizzato con tanto sudore un'app con le API V1 ma NON AVETE RICHIESTO LA CHIAVE PRIMA DI QUELLA DATA, dovrete riprogrammare il vostro progetto con le nuove API (non è una cosa impossibile né difficile, ma ci vuole un po' di tempo per via di qualche passaggio "non canonico". Comunque tranquilli: tra qualche giorno pubblicherò un breve tutorial a riguardo).

Ciò perché Google ha terminato il supporto alle API V1 il 03/03/2013, e quindi non offre più chiavi per le mappe di questa versione. Però continuerà a supportare le chiavi delle app già assegnate fino a quella data.

Bene, per oggi è tutto.
Spero di avervi restituito un po' di sonno con il vostro progetto GMaps. Se così non fosse, spero di poterlo fare con il tutorial a venire.

Buona serata.
HABEMUS MBC!
_________________________________________________________________________________

Hi everyone, with this post i officially declare open my blog! Just today that new Pope was elected, I've decided to cut out my web-fame-space.
Megalomaniac? Megalomaniac, "right right right".

By the way, sometimes I'll post the solution for some programming problems drive me crazy, or for some betting tecnique... However I'll try to write always something useful, obviously both Italian and English and, regarding the translation, within the limits of my ignorance.
But with a difference to this post: the order will be inverted, first English than Italian.
I need this for obtaining a greater visibility and, however, if you're programmer or computer science engineer believe me: being able to read English will be compulsory for you, so that the faster you get used to the better is!

To begin a tip for those Android programmers that are approaching to google Maps. In particular to the Google MAPS API V2, that revolutionize and significantly simplify our poor geek-work.

So you're reading this post. For this reason, I suppose after publishing your app on Google Play you're not being able to view the map.
This occurs for the following reason.
In the tutorials Google offers us developers, and in many other forums, it's suggested to include into your API CONSOLE an identifier that combines your key SHA1 and the package name of your app, see the screenshot 1.1


1.1 Configure Android Key for API Project
This function is used to allow only applications specified in the text field to receive the maps.
If, by one side, it can be useful, from the other can sometimes cause the problem previously mentioned.
So, if you've this problem, remove the unique id that you have entered into the textfield of image 1.1!
In this way, every app that use that key will be able to obtain maps, without any filter!


But how is it possible, MBC, I've done as you say, but still doesn't work?
In this case, excluding  errors about setting your project (you can solve following this Lars Vogel's tutorial, I personally strongly suggest it), you've probably adapted a project that used the old API V1 to API V2 (like I've done for my app SCOLACIUM).

So i inform you about two things:

  1.  If at the date 2013/03/03 you've requested an GMaps API V1 key, so you can use and release your app yet;
  2. If you're not so lucky, and you've realized with much sweat an app with API V1 but YOU DON'T HAVE REQUESTED THE KEY  BEFORE THAT DATE, you have to reprogramming your project with the new API (it's not something impossible or difficult, but it takes a little time because of some "non-canonical"  passage. By the way stay up: in a few days I'll publish a short tutorial about it).

This is because Google has ended support for V1 API on 03/03/2013, and so it offers no more keys for this version of API maps. However, Google will support the keys for the already assigned app to that date.

Well, that's all, folks!
I hope you've returned a little sleep with your GMaps project. If not, I hope to do with the tutorial to come.

Good evening.
HABEMUS MBC!





Nessun commento:

Posta un commento