Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Can't get Maps Module to work on Android

$
0
0

Hi, been going a bit crazy trying to get the map module to work properly. Instead i just get a blank map and some confusing errors.

I'm testing on my personal device (S5). I found my SHA1 hash using my own keystore (android.keystore). That is the same keystore I have listed in the run configuration when building for my device.

My tiapp.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
    <deployment-targets>
        <target device="tizen">false</target>
        <target device="mobileweb">false</target>
        <target device="iphone">true</target>
        <target device="ipad">true</target>
        <target device="android">true</target>
        <target device="blackberry">false</target>
    </deployment-targets>
    <sdk-version>3.3.0.GA</sdk-version>
    <id>com.aspquared.tvfoodmaps</id>
    <name>Scratch</name>
    <version>1.0</version>
    <publisher>fsa317</publisher>
    <url>http://</url>
    <description>not specified</description>
    <copyright>2012 by fsa317</copyright>
    <icon>appicon.png</icon>
    <persistent-wifi>false</persistent-wifi>
    <prerendered-icon>false</prerendered-icon>
    <statusbar-style>default</statusbar-style>
    <statusbar-hidden>false</statusbar-hidden>
    <fullscreen>false</fullscreen>
    <navbar-hidden>false</navbar-hidden>
    <analytics>true</analytics>
    <guid>136a990b-818e-43b6-88ad-b23e15c80ccc</guid>
    <iphone>
        <orientations device="iphone">
            <orientation>Ti.UI.PORTRAIT</orientation>
        </orientations>
        <orientations device="ipad">
            <orientation>Ti.UI.PORTRAIT</orientation>
            <orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>
            <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
            <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
        </orientations>
    </iphone>
    <android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest>
            <!-- Allows the API to download data from Google Map servers -->
            <uses-permission android:name="android.permission.INTERNET"/>
            <!-- Allows the API to cache data -->
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
            <!-- Use GPS for device location -->
            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
            <!-- Use Wi-Fi or mobile connection for device location -->
            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
            <!-- Allows the API to access Google web-based services -->
            <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
            <!-- Specify OpenGL ES 2.0 as a requirement -->
            <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
            <!-- Replace com.domain.appid with your application ID -->
            <uses-permission android:name="com.apsquared.tvfoodmaps.permission.MAPS_RECEIVE"/>
            <permission
                android:name="com.apsquared.tvfoodmaps.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
            <application>
                <!-- Replace "PASTE YOUR GOOGLE MAPS API KEY HERE" with the Google API key you obtained -->
                <meta-data
                    android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyB0d7Pc5hHeY5cDU3Q923x1oITqOH7Wj5A"/>
            </application>
        </manifest>
    </android>
    <modules>
        <!-- Add this line to your modules section -->
        <module platform="android">ti.map</module>
    </modules>
    <ios>
        <plist>
            <dict>
                <key>UIStatusBarStyle</key>
                <string>UIStatusBarStyleLightContent</string>
            </dict>
        </plist>
    </ios>
</ti:app>
However when I try to display the map I get:


                       

Viewing all articles
Browse latest Browse all 7655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>