android-permissions

What permissions do I need to download files?

拜拜、爱过 提交于 2019-12-05 17:12:09
I am trying to download a file using the DownloadManager class. public void downloadFile(View view) { String urlString = "your_url_here"; try { // Get file name from the url String fileName = urlString.substring(urlString.lastIndexOf("/") + 1); // Create Download Request object DownloadManager.Request request = new DownloadManager.Request(Uri.parse((urlString))); // Display download progress and status message in notification bar request.setNotificationVisibility(Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); // Set description to display in notification request.setDescription("Download " +

Firebase additional permissions. Is user asked for acceptance

六月ゝ 毕业季﹏ 提交于 2019-12-05 16:45:03
I'm currently working on integrating Firebase Analytics into my android app. The problem that I'm encountering is that Firebase adds some new permissions. These permissions are permission.WAKE_LOCK com.google.android.c2dm.permission.RECEIVE My question is: What happens when the user wants to (automatically) update my app in pre Marshmallow versions? Is he asked for permission or not, because it is a normal permission? In post Marshmallow the documentation is quite clear. It simply doesn't ask the user at all, because it is a normal permission ( https://developer.android.com/guide/topics

Android app Only For Phones

Deadly 提交于 2019-12-05 15:13:53
Is it possible to create Android app which can be downloaded from google play only by phone not tablet? The answer for this always brings up the question of what you define as a "tablet". Do you include things like the Galaxy Note? It's still technically a phone but it's kind of on the borderline. My question would be what conditions make you want to restrict it? If you simply want to require that it be able to make calls, you can add a feature tag to your manifest: <uses-feature android:name="android.hardware.telephony"/> Which will require the device to have the dialer and a data network

android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@c745883 - permission denied

早过忘川 提交于 2019-12-05 13:57:49
问题 Here's my stack trace: 01-30 15:11:41.037 13010-13010/project.app E/AndroidRuntime: FATAL EXCEPTION: main Process: project.app, PID: 13010 android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@c745883 -- permission denied for window type 2003 at android.view.ViewRootImpl.setView(ViewRootImpl.java:789) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93) at android

Which permission do we need at runtime in android 6.0

落爺英雄遲暮 提交于 2019-12-05 13:52:04
I have an android code which can work well on Android 5.0 version. My AndroidManifest.xml is <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.WAKE_LOCK" /> However, my

Permission for reading/writing to the root folder in Android

我的未来我决定 提交于 2019-12-05 13:47:31
Are there any permissions I can/must declare in my app, if I want the app to be able to scan the whole "/" folder (say to search for all .txt files e.g. recursively)? I am getting just null so far (when calling File.listFiles ) no matter what permissions I try. I guess I am missing something. Unless you root your device, it is impossible to do any operations on the root directory on a non-rooted device because a third party app will run as a normal user and won't have the root permissions. However, according to https://developer.android.com/reference/android/Manifest.permission , android

avc: denied { read } for name=“/” dev=“rootfs” ino=1 scontext=u:r:untrusted_app

别说谁变了你拦得住时间么 提交于 2019-12-05 12:36:22
I was not able to find here solution to read/write problem on Android File manager application I am trying to create. When running on real device, I am not able to delete a file from SD card. Could anyone guide me, what am I doing wrong and how to fix the permissions? I have added read/write permissions to AndroidManifest.xml <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> but anyway, I am getting this error message: avc: denied { read } for name="/" dev="rootfs" ino=1 scontext=u:r:untrusted_app for dependencies I am using: compile 'org.apache.directory.studio:org

Devices without “Apps using Usage Data” or android.settings.USAGE_ACCESS_SETTINGS intent

此生再无相见时 提交于 2019-12-05 12:01:39
Background: Android 5 introduced a new UsageStats API that can be used to query time spent with different apps. This API is used in several apps for detecting the current foreground app (as discussed in several questions, like this ), but: This API requires the permission android.permission.PACKAGE_USAGE_STATS, which is a system-level permission and will not be granted to third-party apps. However, declaring the permission implies intention to use the API and the user of the device can grant permission through the Settings application. As the permission is not presented to the user, apps send

Instant Apps Camera Intent

拈花ヽ惹草 提交于 2019-12-05 11:38:18
I developed and Instant App which one I would like to take a picture with the camera. Everything work if I launch the Installed App . But with Instant App , I get the following error : java.lang.SecurityException: Not allowed to start activity Intent { act=android.media.action.IMAGE_CAPTURE launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } Here my code : AndroidManifest.xml <uses-permission android:name="android.permission.CAMERA" /> Activity : private static int CAMERA_REQUEST = 1234; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)

How to hide bottom system bar in android tablet

≯℡__Kan透↙ 提交于 2019-12-05 11:11:17
I am developing an application for tablet only, where the requirement is to run the app on the full screen of the tablet. For this I have used following code in my main activity: getWindow().requestFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); This code snippet only removes the title bar and action bar. But in tablets, there is a bottom system bar (having home and back button). I also want to remove or hide this system bar too. I have searched but there is only following solution: There is no API