Tüm Platformlar için Hızlı Uygulama Geliştirme --->    Kitabımız...      Delphi

Konuyu Paylaş : facebook gplus twitter

Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
Delphi Firemonkey Android İzin Kontrolü
#1



function HasPermission(const Permission: string): Boolean;

implementation

uses
 FMX.Helpers.Android,
 Androidapi.Helpers,
 Androidapi.JNI.JavaTypes,
 Androidapi.JNI.GraphicsContentViewText;

function HasPermission(const Permission: string): Boolean;
begin
 //  Linkleri Görebilmeniz İçin Giriş yap veya Üye Ol
{$IF RTLVersion >= 30}
 Result := TAndroidHelper.Context.checkCallingOrSelfPermission(
{$ELSE}
 Result := SharedActivityContext.checkCallingOrSelfPermission(
{$ENDIF}
   StringToJString(Permission)) =
   TJPackageManager.JavaClass.PERMISSION_GRANTED
end;



kullanımı :  HasPermission('android.permission.WRITE_SETTINGS')= true veya false 
Cevapla
#2
Merhaba,
Öncelikle paylaşımınız için teşekkür ederim.
İzin kontrolü için vermiş olduğunuz örnekte fonksiyonnda parametre olarak "android.permission.WRITE_SETTINGS" göndermişsiniz.
Diğer izinler için hangi String değerler gönderiliyor. Bu fonksiyona, gönderilecek sabit değerler kümesi de olsaydı daha iyi oldu.
Ayrıca gönderilen parametrenin harf duyarlılığı var mı?
WWW
Cevapla
#3
Hepsi olmasada %95 burda var hocam


bazılarıda burda

 : Linkleri Görebilmeniz İçin Giriş yap veya Üye Ol


android.permission.ACCESS_COARSE_LOCATION
   android.permission.ACCESS_CHECKING_PROPERTIES
   android.permission.ACCESS_FINE_LOCATION
   android.permission.ACCESS_SURFACE_FLINGER
   android.permission.ACCESS_NETWORK_STATE
   android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
   android.permission.ACCESS_MOCK_LOCATION
   android.permission.ACCESS_WIFI_STATE
   android.permission.ACCOUNT_MANAGER
   android.permission.ADD_VOICEMAIL
   android.permission.AUTHENTICATE_ACCOUNTS
   android.permission.BATTERY_STATS
   android.permission.BIND_ACCESSIBILITY_SERVICE
   android.permission.BIND_DEVICE_ADMIN
   android.permission.BIND_INPUT_METHOD
   android.permission.BIND_VPN_SERVICE
   android.permission.BIND_REMOTEVIEWS
   android.permission.BIND_TEXT_SERVICE
   android.permission.BIND_APPWIDGET
   android.permission.BLUETOOTH
   android.permission.BLUETOOTH_ADMIN
   android.permission.BRICK
   android.permission.BROADCAST_STICKY
   android.permission.BROADCAST_PACKAGE_REMOVED
   android.permission.BROADCAST_SMS
   android.permission.BROADCAST_WAP_PUSH
   android.permission.CALL_PHONE
   android.permission.CALL_PRIVILEGED
   android.permission.CAMERA
   android.permission.CHANGE_COMPONENT_ENABLED_STATE
   android.permission.CHANGE_CONFIGURATION
   android.permission.CHANGE_NETWORK_STATE
   android.permission.CHANGE_WIFI_STATE
   android.permission.CHANGE_WIFI_MULTICAST_STATE
   android.permission.CLEAR_APP_CACHE
   android.permission.CLEAR_APP_USER_DATA
   android.permission.CONTROL_LOCATION_UPDATES
   android.permission.DELETE_CACHE_FILES
   android.permission.DELETE_PACKAGES
   android.permission.DEVICE_POWER
   android.permission.DISABLE_KEYGUARD
   android.permission.DIAGNOSTIC
   android.permission.DUMP
   android.permission.EXPAND_STATUS_BAR
   android.permission.FACTORY_TEST
   android.permission.FLASHLIGHT
   android.permission.FORCE_BACK
   android.permission.GET_ACCOUNTS
   android.permission.GET_PACKAGE_SIZE
   android.permission.GET_TASKS
   android.permission.GLOBAL_SEARCH
   android.permission.HARDWARE_TEST
   android.permission.INJECT_EVENTS
   android.permission.INSTALL_LOCATION_PROVIDER
   android.permission.INSTALL_PACKAGES
   android.permission.INTERNAL_SYSTEM_WINDOW
   android.permission.INTERNET
   android.permission.KILL_BACKGROUND_PROCESSES
   android.permission.MANAGE_ACCOUNTS
   android.permission.MANAGE_APP_TOKENS
   android.permission.MASTER_CLEAR
   android.permission.MODIFY_AUDIO_SETTINGS
   android.permission.MODIFY_PHONE_STATE
   android.permission.MOUNT_FORMAT_FILESYSTEMS
   android.permission.MOUNT_UNMOUNT_FILESYSTEMS
   android.permission.NFC
   android.permission.PROCESS_OUTGOING_CALLS
   android.permission.READ_CALENDAR
   android.permission.READ_CALL_LOG
   android.permission.READ_CONTACTS
   android.permission.READ_EXTERNAL_STORAGE
   com.google.android.providers.gsf.permission.READ_GSERVICES
   android.permission.READ_FRAME_BUFFER
   android.permission.READ_HISTORY_BOOKMARKS
   android.permission.READ_LOGS
   android.permission.READ_PHONE_STATE
   android.permission.READ_PROFILE
   android.permission.READ_SMS
   android.permission.READ_SOCIAL_STREAM
   android.permission.READ_SYNC_SETTINGS
   android.permission.READ_SYNC_STATS
   android.permission.READ_USER_DICTIONARY
   android.permission.REBOOT
   android.permission.RECEIVE_BOOT_COMPLETED
   android.permission.RECEIVE_MMS
   android.permission.RECEIVE_SMS
   android.permission.RECEIVE_WAP_PUSH
   android.permission.RECORD_AUDIO
   android.permission.REORDER_TASKS
   android.permission.SEND_SMS
   android.permission.SET_ACTIVITY_WATCHER
   android.permission.SET_ALARM
   android.permission.SET_ALWAYS_FINISH
   android.permission.SET_ANIMATION_SCALE
   android.permission.SET_DEBUG_APP
   android.permission.SET_ORIENTATION
   android.permission.SET_POINTER_SPEED
   android.permission.SET_PROCESS_LIMIT
   android.permission.SET_TIME
   android.permission.SET_TIME_ZONE
   android.permission.SIGNAL_PERSISTENT_PROCESSES
   android.permission.STATUS_BAR
   android.permission.SUBSCRIBED_FEEDS_READ
   android.permission.SUBSCRIBED_FEEDS_WRITE
   android.permission.SYSTEM_ALERT_WINDOW
   android.permission.UPDATE_DEVICE_STATS
   android.permission.USE_CREDENTIALS
   android.permission.USE_SIP
   com.android.vending.BILLING
   android.permission.VIBRATE
   android.permission.WAKE_LOCK
   android.permission.WRITE_APN_SETTINGS
   android.permission.WRITE_CALENDAR
   android.permission.WRITE_CALL_LOG
   android.permission.WRITE_CONTACTS
   android.permission.WRITE_EXTERNAL_STORAGE
   android.permission.WRITE_GSERVICES
   android.permission.WRITE_HISTORY_BOOKMARKS
   android.permission.WRITE_PROFILE
   android.permission.WRITE_SECURE_SETTINGS
   android.permission.WRITE_SETTINGS
   android.permission.WRITE_SMS
   android.permission.WRITE_SOCIAL_STREAM
   android.permission.WRITE_SYNC_SETTINGS
   android.permission.WRITE_USER_DICTIONARY
Cevapla

Konuyu Paylaş : facebook gplus twitter



Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Delphi'de AES şifreleme (AES128, AES192, AES256) csunguray 1 23 32 dakika önce
Son Yorum: klavye
  Delphi Firemonkey Local İp Adresi Öğrenme esrehmaan 12 1.291 15-02-2018, Saat: 15:15
Son Yorum: elixir84
  Delphi'de Veritabanı İle Kullanıcı Ekleme hyperxman 0 67 08-02-2018, Saat: 01:18
Son Yorum: hyperxman
  Delphi IDE'sine Eklenti Yapmak - 2 SimaWB 23 589 08-01-2018, Saat: 14:09
Son Yorum: witalihakko
  Delphi'de Indy SMTP ile e-mail gönderme. (GMail, Yandex, Yahoo vb.) csunguray 3 169 27-12-2017, Saat: 12:43
Son Yorum: hi_selamlar



Konuyu Okuyanlar: 1 Ziyaretçi