Interface PermissionAware

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit init(Activity activity) As this is meant to be a delegate part of activity - it needs activity to call methods on.
      abstract Unit openPermissionSettings() Open system UI - permission settings for current application.
      abstract Unit activateCameraPermission() Will ask for permission OR show rationale - if permission was already turned down.
      abstract Unit tryAskCameraPermission() Will only ask for permission if it is a first time app asking - no rationale will be shown.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • init

         abstract Unit init(Activity activity)

        As this is meant to be a delegate part of activity - it needs activity to call methods on.

        Call (this as PermissionAware).init(this) in onCreate.

      • activateCameraPermission

         abstract Unit activateCameraPermission()

        Will ask for permission OR show rationale - if permission was already turned down.

      • tryAskCameraPermission

         abstract Unit tryAskCameraPermission()

        Will only ask for permission if it is a first time app asking - no rationale will be shown.