Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7984] Android: Support setting permissions in generated permissions by module

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-15T15:59:00.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsAndroid
Labelsmodule_geolocation, qe-port
ReporterMarshall Culpepper
AssigneeOpie Cyrus
Created2012-03-13T19:50:17.000+0000
Updated2012-03-19T14:25:11.000+0000

Description

When an app only uses Ti.Geolocation.addEventListener, the proper Geolocation permissions aren't correctly added to the AndroidManifest.xml, causing a permissions error when the application tries to add a location event listener. It looks like the list of APIs that enable these permissions is simply missing this method: https://github.com/appcelerator/titanium_mobile/blob/master/support/android/builder.py#L728 Sample app:
Titanium.Geolocation.addEventListener("location", function listener(e) {
  Titanium.Geolocation.removeEventListener("location", listener);
});
* Updated this ticket to cover a general change to build script to allow for setting permissions based on module usage in general rather than relying on specific methods

Comments

  1. Marshall Culpepper 2012-03-19

    A better test case for confirming this issue is Opie's orignal test case from TIMOB-7565
  2. Wilson Luu 2012-03-19

    Closing bug. Verified you can launch code from TIMOB-7565 without setting any permissions in tiapp.xml on: SDK build: 2.0.0.v20120319003254 Runtime: v8, rhino Titanium Studio, build: 2.0.0.201203182248 Device: LG Slate (3.1)

JSON Source