[TIMOB-7984] Android: Support setting permissions in generated permissions by module
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-03-15T15:59:00.000+0000 |
| Affected Version/s | Release 2.0.0 |
| Fix Version/s | Release 2.0.0, Sprint 2012-06 |
| Components | Android |
| Labels | module_geolocation, qe-port |
| Reporter | Marshall Culpepper |
| Assignee | Opie Cyrus |
| Created | 2012-03-13T19:50:17.000+0000 |
| Updated | 2012-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
A better test case for confirming this issue is Opie's orignal test case from TIMOB-7565
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)