Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8561] Android: add permissions for map when map module is used

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-07-09T03:41:00.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 Core
ComponentsAndroid
Labelscore, module_map, qe-testadded
ReporterOpie Cyrus
AssigneeBill Dawson
Created2012-04-05T20:01:58.000+0000
Updated2014-09-09T21:10:12.000+0000

Description

When Ti.Map module is used, permissions are not automatically inserted into the generated manifest.

Comments

  1. Bill Dawson 2012-06-11

    Fail Case / Test Case

    * Create a new android app in Titanium Studio. * Add this to the tiapp.xml:
       <property name="ti.android.google.map.api.key.development">0ZnKXkWA2dIAu2EM-OV4ZD2lJY3sEWE5TSgjJNg</property>
       
    * Make this the app.js:
       Titanium.UI.setBackgroundColor('#000');
       var win = Titanium.UI.createWindow({  
           title:'Test',
           backgroundColor:'#000',
       	exitOnClose: true
       });
       
       win.add(Ti.Map.createView({
       	userLocation:true
       }));
       
       win.open();
       
    * Run the app _on device_ so that location services will actually work. But don't package for production, unless you want to change that tiapp.xml entry above to point to your own Google Maps API key. * In the fail case, when the app opens and the map appears, you won't see your location marked anywhere on the world map, although userLocation: true was set as a creation argument for the View. Also in logcat you'll see these warnings:
       W/Maps.MyLocationOverlay( 1322): Couldn't get provider gps: Provider gps requires ACCESS_FINE_LOCATION permission
       W/Maps.MyLocationOverlay( 1322): Couldn't get provider network: Provider network requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission
       
    * When testing the fix, you *should* see your location on the world map, and you should *not* see those warnings in logcat.
  2. Bill Dawson 2012-06-11

    Pull request ready https://github.com/appcelerator/titanium_mobile/pull/2370
  3. Tamila Smolich 2012-06-23

    Closing as fixed. Verified with: Titanium Studio, build: 2.1.0.201206221045 Titanium SDK: 2.1.0.v20120622174154 Device: Samsung Galaxy tab (3.2)
  4. Anshu Mittal 2012-07-09

    Reopening to update labels

JSON Source