/ / अनुमति अस्वीकार: इरादे शुरू करने के लिए <पैकेज नाम> की आवश्यकता होती है - एंड्रॉइड, अनुमतियां, रिमोट-एक्सेस, अनुमति-अस्वीकृत, ओपनवीपीएन

अनुमति अस्वीकार: प्रारंभिक इरादे की आवश्यकता है <पैकेज नाम> - एंड्रॉइड, अनुमतियां, रिमोट-एक्सेस, अनुमति-अस्वीकार, openvpn

मुझे AIDL के माध्यम से दूसरे ऐप से सेवा चलाने में समस्या है (मेरे पास ग्रहण में दोनों ऐप प्रोजेक्ट हैं)। हर बार जब मैं इंटरफ़ेस से तरीकों का उपयोग कर रहा हूँ जो मुझे मिलता है:

java.lang.SecurityException: Permission Denial: starting Intent
{cmp=de.blinkt.openvpn/.api.GrantPermissionsActivity } from ProcessRecord{42cfd9c0
22519:com.xxx/u0a10093} (pid=22519, uid=10093) requires de.blinkt.openvpn.REMOTE_API.

मैंने "हर जगह देखा और मुझे कोई जवाब नहीं मिला"। इसे कैसे जोड़ेंगे?

उत्तर:

जवाब के लिए 2 № 1

एपीआई का उपयोग करने के लिए आपको कॉल करने की आवश्यकता है:

/** This permission framework is used  to avoid confused deputy style attack to the VPN
* calling this will give null if the app is allowed to use the external API and an Intent
* that can be launched to request permissions otherwise */
Intent prepare (String packagename);

और आपको अपने मेनिफेस्ट में होना चाहिए:

<!-- Copy the <permission> block to your app when using the REMOTE API. Otherwise OpenVPN for
Android needs to be installed first -->
<permission
android:name="de.blinkt.openvpn.REMOTE_API"
android:description="@string/permission_description"
android:label="Control OpenVPN"
android:permissionGroup="android.permission-group.NETWORK"
android:protectionLevel="dangerous" />

<uses-permission android:name="de.blinkt.openvpn.REMOTE_API">

उस अनुमति से पहले टिप्पणी पर ध्यान दें ...