Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/231.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何制作<;使用权限android:name=";android.permission.GET“u任务”/&燃气轮机;在三星设备公司工作?_Android_Xml_Android Manifest_Manifest_Samsung Mobile - Fatal编程技术网

如何制作<;使用权限android:name=";android.permission.GET“u任务”/&燃气轮机;在三星设备公司工作?

如何制作<;使用权限android:name=";android.permission.GET“u任务”/&燃气轮机;在三星设备公司工作?,android,xml,android-manifest,manifest,samsung-mobile,Android,Xml,Android Manifest,Manifest,Samsung Mobile,我正在开发一个应用程序锁应用程序。 该应用程序是完整的初始使用非常基本的功能。 我在AVD[Android4.3]中试用过,效果非常好。另外,我的带有通用安卓4.0.4的备份设备也可以与应用程序配合使用。 但让我倒霉的是,我的应用程序不会运行在我的三星galaxy S Duos上,Android 4.0.4和三星galaxy tab 3 T311 编辑:我的问题是如何在三星设备中获取运行任务信息,以便我的应用程序可以检查是否已启动锁定的应用程序,如果是,则会出现锁定屏幕询问密码 如果HTC和LG

我正在开发一个应用程序锁应用程序。 该应用程序是完整的初始使用非常基本的功能。 我在AVD[Android4.3]中试用过,效果非常好。另外,我的带有通用安卓4.0.4的备份设备也可以与应用程序配合使用。 但让我倒霉的是,我的应用程序不会运行在我的三星galaxy S Duos上,Android 4.0.4和三星galaxy tab 3 T311

编辑:我的问题是如何在三星设备中获取运行任务信息,以便我的应用程序可以检查是否已启动锁定的应用程序,如果是,则会出现锁定屏幕询问密码

如果HTC和LG等其他品牌也需要任何此类额外许可或方法,请告知程序

这是我的舱单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="ic.lunar.applocker"
  android:versionCode="1"
  android:versionName="1.0">

<uses-sdk 
    android:minSdkVersion="7"
    android:targetSdkVersion="18" />

<uses-permission 
    android:name="android.permission.GET_TASKS">
</uses-permission>
<uses-permission 
    android:name="android.permission.READ_LOGS">
</uses-permission>
<uses-permission 
    android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

<application 
    android:icon="@drawable/launcher_icon" 
    android:label="@string/app_name" 
    android:name="ic.lunar.applocker.AppLockerApplication"
    android:allowBackup="true" >

    <activity android:name="ic.lunar.applocker.AppLockerActivity"
              android:label="@string/app_name"
              android:launchMode="singleInstance"
              android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity 
        android:name="ic.lunar.applocker.AppLockerPreferenceActivity" 
        android:label="@string/appLockerPreferenceActivityName" 
        android:screenOrientation="portrait">
    </activity>
    <activity 
        android:name="ic.lunar.applocker.ApplicationListActivity" 
        android:label="@string/appLockerPreferenceActivityName">
    </activity>
    <service 
        android:name="ic.lunar.applocker.DetectorService">

    </service>
    <activity 
        android:name="ic.lunar.applocker.LockScreenActivity" 
        android:noHistory="true" 
        android:launchMode="singleInstance" 
        android:excludeFromRecents="true" 
        android:screenOrientation="portrait"/>

    <receiver 
        android:name="ic.lunar.applocker.StartupServiceReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
            <action android:name="android.intent.action.USER_PRESENT"/>
        </intent-filter>
    </receiver>
</application>
</manifest>

不建议使用您可能正在使用的API。您必须接受这种缺陷,因为API并不是设计为可以工作的。引用API文件:“注意:此方法仅用于调试和显示任务管理用户界面。这决不能用于应用程序中的核心逻辑,例如根据此处找到的信息决定不同的行为。此类用途不受支持,将来可能会中断。例如,如果多个应用程序可以同时积极运行,则出于控制流的目的对此处数据的含义所作的假设将是不正确的。”


除此之外,我一直在使用相同的API,我发现它并不总是有效。

Thanxxx供您回答。但应该有一个有效的解决方案。为什么这在通用Android设备或AOSP(您可能会称之为AOSP)中有效,但在三星的Touchwiz UX用户界面上却不起作用?嗯……我不能肯定地说,但三星做了各种调整以“增强”的名义加入AOSP!