嗨,我想从我的应用程序禁用(删除)这些权限 [英] Hi I want to disable (delete) these permissions from my app

查看:92
本文介绍了嗨,我想从我的应用程序禁用(删除)这些权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< blockquote class =   quote>< ; div class =   op> Quote:< / div>嗨我要禁用(删除)我的应用程序的这些权限

< uses-permission android:name = android .permission.ACCESS_NETWORK_STATE />
< uses-permission android:name = android.permission.INTERNET /> ;
< uses-permission android:name = android.permission.WRITE_EXTERNAL_STORAGE /> ;
< uses-permission android:name = android.permission.READ_EXTERNAL_STORAGE /> ;
< uses-permission android:name = android.permission.WAKE_LOCK /> ;
并禁用相机和拍照
taht我的应用程序中用户权限的源代码
i我正在使用android studio

这是什么来源< span class =code-keyword> new ??
谢谢你b
$ b 我尝试了什么:

< pre>您好我要禁用(删除)我的这些权限app

< uses-permission android:name = android.permission.ACCESS_NETWORK_STATE />
< uses-permission android:name = android.permission.INTERNET /> ;
< uses-permission android:name = android.permission.WRITE_EXTERNAL_STORAGE /> ;
< uses-permission android:name = android.permission.READ_EXTERNAL_STORAGE /> ;
< uses-permission android:name = android.permission.WAKE_LOCK /> ;
并禁用相机和拍照
taht我的应用程序中用户权限的源代码
i我正在使用android studio

这是什么来源< span class =code-keyword> new ??
谢谢你
<?xml版本= 1.0 encoding = < span class =code-string> utf-8?>
< manifest xmlns:android = http://schemas.android.com/apk/res/ android
package = com.bpositive
android :versionCode = 2
android:versionName = 1.0.3>

< uses-sdk
android:minSdkVersion = 15
android:targetSdkVersion = 25 />

< uses-permission android:name = android.permission.ACCESS_NETWORK_STATE />
< uses-permission android:name = android.permission.INTERNET /> ;
< uses-permission android:name = android.permission.ACCESS_FINE_LOCATION /> ;
< uses-permission android:name = android.permission.ACCESS_COARSE_LOCATION /> ;
< uses-permission android:name = android.permission.WRITE_EXTERNAL_STORAGE /> ;
< uses-permission android:name = android.permission.READ_EXTERNAL_STORAGE /> ;
< uses-permission android:name = android.permission.WAKE_LOCK /> ;

< uses-feature
android:name = android.hardware。相机
android:required = true />
< uses-feature android:name = android.hardware.camera.autofocus />

< uses-permission android:name = android.permission.CAMERA />
< uses-permission android:name = android.permission.VIBRATE /> ; <! - 所需权限 GCM - >
< uses-permission android:name = com.google.android.c2dm.permission.RECEIVE />

< uses-feature
android:glEsVersion = 0x00020000
android:required = true />

< permission
android:name = com.bpositive.permission。 C2D_MESSAGE
android:protectionLevel = 签名 />

< uses-permission android:name = com.bpositive.permission.C2D_MESSAGE />

< application
android:name = sample.bpositive.sparkleappz。 app.BPlus
android:allowBackup = true
android:icon = @ mipmap / ic_launcher
android:label = @ string / app_name
android:supportsRtl = true
android:theme = @ style / AppTheme>
< activity
android:name = sample.bpositive.sparkleappz.activities.SplashActivity
android:screenOrientation = portrait
android:windowSoftInputMode = stateHidden>
< intent-filter>
< action android:name = android.intent.action.VIEW /> ;

< category android:name = android.intent.category.DEFAULT />
< category android:name = android.intent.category.BROWSABLE /> ;

< data
android:host = sparkleappz.com /
android:scheme = http />
< data
android:host = sparkleappz.com /
android:scheme = https />
< / intent-filter>
< intent-filter>
< action android:name = android.intent.action.MAIN /> ;

< category android:name = android.intent.category.LAUNCHER />
< / intent-filter>
< / activity>
< activity
android:name = sample.bpositive.sparkleappz.activities.MainActivity
android:screenOrientation = portrait
android:theme = @ style / AppTheme
android:windowSoftInputMode = stateHidden>
< / activity>
< activity
android:name = sample.bpositive.sparkleappz.activities.ResetPasswordActivity
android:screenOrientation = portrait
android:theme = @ style / AppTheme
android:windowSoftInputMode = stateHidden>
< / activity>
< activity
android:name = sample.bpositive.sparkleappz.activities.DonateActivity
android:screenOrientation = portrait
android:theme = @ style / AppTheme
android:windowSoftInputMode = stateHidden>
< / activity>
<! -
基于Google地图的API的API密钥被定义为字符串资源。
(参见文件 res / values / google_maps_api.xml)。
请注意,API密钥链接到用于签署APK的加密密钥。
您需要一个不同的API密钥 每个加密密钥,包括用于
签署APK for 发​​布。
您可以在src / debug /和src / release /中为
调试和发布目标定义键。
- >
< meta-data
android:name = com.google.android.geo。 API_KEY
android:value = @ string / google_maps_key /> ;

< service android:name = sample.bpositive.sparkleappz.MyFirebaseMessagingService>
< intent-filter>
< action android:name = com.google.firebase.MESSAGING_EVENT /> ;
< / intent-filter>
< / service>
< service android:name = sample.bpositive.sparkleappz.MyFirebaseInstanceIDService>
< intent-filter>
< action android:name = com.google.firebase.INSTANCE_ID_EVENT /> ;
< / intent-filter>
< / service>

< activity
android:name = com.theartofdev.edmodo。 cropper.CropImageActivity
android:theme = @ style / Theme.AppCompat.Light。 DarkActionBar /> <! - 包括AdActivity和InAppPurchaseActivity configChanges和主题。 - >
< activity
android:name = com.google.android.gms.ads。 AdActivity
android:configChanges = keyboard | keyboardHidden | orientation | screenLayout | uiMode | screenSize | smallestScreenSize
android:theme = @ android:style / Theme.Translucent />
< activity
android:name = com.google.android.gms.ads。 purchase.InAppPurchaseActivity
android:theme = @ style / Theme.IAPTheme />
< activity
android:name = com.google.android.gms.appinvite。 PreviewActivity
android:exported = true
android :theme = @ style / Theme.AppInvite.Preview>
< intent-filter>
< action android:name = com.google.android.gms.appinvite.ACTION_PREVIEW />

< category android:name = android.intent.category.DEFAULT />
< / intent-filter>
< / activity>
< activity
android:name = com.google.android.gms.common。 api.GoogleApiActivity
android:exported = false
android:theme = @ android:style / Theme.Translucent.NoTitleBar />
<! -
FirebaseMessagingService在运行时执行安全检查,
不需要 显式权限,尽管export = true
- >
< service
android:name = com.google.firebase.messaging.FirebaseMessagingService
android:exported = true>
< intent-filter android:priority = - 500>
< action android:name = com.google.firebase.MESSAGING_EVENT /> ;
< / intent-filter>
< / service>

< receiver
android:name = com.google.android。 gms.measurement.AppMeasurementReceiver
android:enabled = true
android:exported = false>
< / receiver>
< receiver
android:name = com.google.android.gms.measurement。 AppMeasurementInstallReferrerReceiver
android:enabled = true
android :permission = android.permission.INSTALL_PACKAGES>
< intent-filter>
< action android:name = com.android.vending.INSTALL_REFERRER /> ;
< / intent-filter>
< / receiver>

< service
android:name = com.google.android。 gms.measurement.AppMeasurementService
android:enabled = true
android:exported = false />

< receiver
android:name = com.google.firebase。 iid.FirebaseInstanceIdReceiver
android:exported = true
android:permission = com.google.android.c2dm.permission.SEND>
< intent-filter>
< action android:name = com.google.android.c2dm.intent.RECEIVE />
< action android:name = com.google.android.c2dm.intent.REGISTRATION />

< category android:name = com.bpositive /> ;
< / intent-filter>
< / receiver>
<! -
应用程序用于启动自己的导出服务
的内部(未导出)接收器,没有被欺骗的风险。
- >
< receiver
android:name = com.google.firebase.iid.FirebaseInstanceIdInternalReceiver
android:exported = false />
<! -
FirebaseInstanceIdService在运行时执行安全检查,
不需要 显式权限,尽管export = true
- >
< service
android:name = com.google.firebase.iid.FirebaseInstanceIdService
android:exported = true>
< intent-filter android:priority = - 500>
< action android:name = com.google.firebase.INSTANCE_ID_EVENT /> ;
< / intent-filter>
< / service>

< provider
android:name = com.google.firebase。 provider.FirebaseInitProvider
android:authorities = com.bpositive.firebaseinitprovider
android:exported = false
android:initOrder = 100 />

< meta-data
android:name = com.google。 android.gms.version
android:value = @ integer / google_play_services_version />
< / application>

< / manifest>

解决方案

使用系统权限| Android开发者 [ ^ ]

<blockquote class="quote"><div class="op">Quote:</div>Hi i want to disable (delete) these permissions from my app

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
	and disable using camera and taking photos
	taht the source code of users permissions in my app
	i am using android studio

that is the source how will be the new ??
thank u

What I have tried:

<pre>Hi i want to disable (delete) these permissions from my app

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
	and disable using camera and taking photos
	taht the source code of users permissions in my app
	i am using android studio

that is the source how will be the new ??
thank u 
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.bpositive"
    android:versionCode="2"
    android:versionName="1.0.3" >

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="25" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <uses-feature
        android:name="android.hardware.camera"
        android:required="true" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" /> <!-- Permissions required for GCM -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <permission
        android:name="com.bpositive.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.bpositive.permission.C2D_MESSAGE" />

    <application
        android:name="sample.bpositive.sparkleappz.app.BPlus"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <activity
            android:name="sample.bpositive.sparkleappz.activities.SplashActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="sparkleappz.com/"
                    android:scheme="http" />
                <data
                    android:host="sparkleappz.com/"
                    android:scheme="https" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="sample.bpositive.sparkleappz.activities.MainActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="stateHidden" >
        </activity>
        <activity
            android:name="sample.bpositive.sparkleappz.activities.ResetPasswordActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="stateHidden" >
        </activity>
        <activity
            android:name="sample.bpositive.sparkleappz.activities.DonateActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="stateHidden" >
        </activity>
        <!--
             The API key for Google Maps-based APIs is defined as a string resource.
             (See the file "res/values/google_maps_api.xml").
             Note that the API key is linked to the encryption key used to sign the APK.
             You need a different API key for each encryption key, including the release key that is used to
             sign the APK for publishing.
             You can define the keys for the debug and release targets in src/debug/ and src/release/.
        -->
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

        <service android:name="sample.bpositive.sparkleappz.MyFirebaseMessagingService" >
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <service android:name="sample.bpositive.sparkleappz.MyFirebaseInstanceIDService" >
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

        <activity
            android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
            android:theme="@style/Theme.AppCompat.Light.DarkActionBar" /> <!-- Include the AdActivity and InAppPurchaseActivity configChanges and themes. -->
        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
            android:theme="@style/Theme.IAPTheme" />
        <activity
            android:name="com.google.android.gms.appinvite.PreviewActivity"
            android:exported="true"
            android:theme="@style/Theme.AppInvite.Preview" >
            <intent-filter>
                <action android:name="com.google.android.gms.appinvite.ACTION_PREVIEW" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.google.android.gms.common.api.GoogleApiActivity"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <!--
 FirebaseMessagingService performs security checks at runtime,
             no need for explicit permissions despite exported="true"
        -->
        <service
            android:name="com.google.firebase.messaging.FirebaseMessagingService"
            android:exported="true" >
            <intent-filter android:priority="-500" >
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
            android:enabled="true"
            android:exported="false" >
        </receiver>
        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
            android:enabled="true"
            android:permission="android.permission.INSTALL_PACKAGES" >
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.google.android.gms.measurement.AppMeasurementService"
            android:enabled="true"
            android:exported="false" />

        <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

                <category android:name="com.bpositive" />
            </intent-filter>
        </receiver>
        <!--
 Internal (not exported) receiver used by the app to start its own exported services
             without risk of being spoofed.
        -->
        <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
            android:exported="false" />
        <!--
 FirebaseInstanceIdService performs security checks at runtime,
             no need for explicit permissions despite exported="true"
        -->
        <service
            android:name="com.google.firebase.iid.FirebaseInstanceIdService"
            android:exported="true" >
            <intent-filter android:priority="-500" >
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

        <provider
            android:name="com.google.firebase.provider.FirebaseInitProvider"
            android:authorities="com.bpositive.firebaseinitprovider"
            android:exported="false"
            android:initOrder="100" />

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    </application>

</manifest>

解决方案

Working with System Permissions | Android Developers[^]


这篇关于嗨,我想从我的应用程序禁用(删除)这些权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆