Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19933

Android: Required uses-permission are not always added to AndroidManifest

    Details

    • Type: Bug
    • Status: Open
    • Priority: None
    • Resolution: Unresolved
    • Affects Version/s: Release 5.1.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
      None

      Description

      We automatically add the required <uses-permission> elements to AndroidManifest.xml when certain Titanium APIs are used. The new permission request methods need to be added to that list, but it seems it can be simplified/improved in other ways as well:

      • Instead of testing for different Calendar.* methods we should just test for the calendar (and android.calendar namespace. Why would you want to use anything in the namespace without the required permissions? If there is a good reason not to then Calendar.hasCalendarPermissions and Calendar.requestCalendarPermissions need to be added.
      • Instead of testing for different Contacts.* methods we should just test for the contacts namespace for both read and write permissions. Right now, if you don't use Contacts.removePerson or Contacts.removePerson using Contacts.Group.removePerson or any set method will probably fail. If there is a good reason no to then all these remove/set methods need to be added as well as the new Contacts.hasContactsPermissions and requestContactsPermissions.
      • Media.hasCameraPermissions and Media.requestCameraPermissions must be added.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fokkezb Fokke Zandbergen
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20648
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code