标签: oppo

如果在断点处停止超过几秒,Android Studio 将在调试期间终止应用程序

我有一台运行 Android 11 的 Oppo A53。当我在初始活动(登录页面)中设置断点时,一旦命中断点,应用程序将在不活动五秒后终止。在模拟设备或我的其他测试设备(同样运行 Android 11 的 Samsung Tab A)上不会出现此问题。此外,一旦应用程序启动另一个 Activity,我就可以无限期地停留在新 Activity 的断点上。

以下是应用程序清单的一部分,显示了登录活动的定义:

    <activity
        android:name=".LoginActivity"
        android:theme="@style/SplashTheme"
        android:screenOrientation="locked"
        android:exported="true">
       <intent-filter>
           <action android:name="android.intent.action.MAIN" />
           <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
    </activity>
Run Code Online (Sandbox Code Playgroud)

这是 logcat 中的相关行:

2022-02-09 16:12:38.811 11786-11786/com.uomini.meecha D/OplusInputMethodUtil: init DEBUG to false, update DEBUG_IME to false
2022-02-09 16:12:39.381 11786-12103/com.uomini.meecha V/FA: Connection attempt already in progress
2022-02-09 16:12:44.018 11786-11800/com.uomini.meecha I/m.uomini.meech: Thread[2,tid=11800,WaitingInMainSignalCatcherLoop,Thread*=0xb4000079bc426000,peer=0x12ec0000,"Signal Catcher"]: reacting to signal 3
2022-02-09 16:12:44.018 11786-11800/com.uomini.meecha I/m.uomini.meech: 
2022-02-09 16:12:44.190 11786-11800/com.uomini.meecha I/m.uomini.meech: Wrote stack traces to tombstoned
Run Code Online (Sandbox Code Playgroud)

我的其他应用程序上也发生同样的情况,所以我不认为这是应用程序问题,特别是因为它只发生在 Oppo 上。

debugging android termination oppo

9
推荐指数
1
解决办法
776
查看次数

如果用户拒绝在Oppo棒棒糖版本中使用permision,如何再次询问OPPO中的权限?

我在Oppo mobile - Lollipop版本面临问题.我需要在我的应用中写入联系人权限.但在oppo棒棒糖中,它要求oppo自己的安全许可.如果我拒绝该权限而不是应用程序在打开该屏幕时崩溃.所以我想知道如何在Oppo Lollipop版本中查看此权限.在另一台设备和所有操作系统它工作正常但我在OPPO棒棒糖版本面临问题.

如果我们打开安全权限On就会发生这种情况.如果我们将其关闭而不是它将起作用.我想以编程方式请求权限,而不是进入设置

security android oppo

7
推荐指数
1
解决办法
669
查看次数

后台服务从最近删除应用程序时停止

当从最近的oppo和vivo手机中移除我的应用程序时,后台服务停止,并且广播接收器在这种情况下也不起作用.

android background-service broadcastreceiver android-broadcast oppo

6
推荐指数
1
解决办法
2362
查看次数

拒绝权限OPPO_COMPONENT_SAFE

我的应用程序中有服务,该服务需要在设备OPPO的后台运行。我读过某个地方,我们需要在应用程序的设置中启用自动启动功能,以保持服务运行,但是我在权限上存在问题。

java.lang.SecurityException:权限拒绝:从ProcessRecord {904a19d 12604:elite.driver.adsmove.com.settingpermission / u0a214}(pid = 12604,uid = 10214)需要oppo.permission.OPPO_COMPONENT_SAFE

当我尝试这样做时

if (Build.MANUFACTURER.equals("OPPO")) {
    Intent[] AUTO_START_OPPO = {
        new Intent().setComponent(new ComponentName("com.coloros.safe", "com.coloros.safe.permission.startup.StartupAppListActivity")),
        new Intent().setComponent(new ComponentName("com.coloros.safe", "com.coloros.safe.permission.startupapp.StartupAppListActivity")),
        new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.startupapp.StartupAppListActivity")),
        new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.startup.StartupAppListActivity"))
    };

    for (Intent intent : AUTO_START_OPPO) {
        if (getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null) {
            try {
                startActivity(intent);
                break;
            } catch (Exception e) {
                Log.d(TAG, "OPPO - Exception: "+  e.toString());
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

我也尝试添加权限并请求它,但失败了

<!--for OPPO-->
<uses-permission android:name="oppo.permission.OPPO_COMPONENT_SAFE" />
Run Code Online (Sandbox Code Playgroud)

期待有经验的人提供帮助,谢谢!

java permissions android exception oppo

5
推荐指数
1
解决办法
1296
查看次数

权限拒绝 -&gt; 需要 oppo.permission.OPPO_COMPONENT_SAFE 但它已经在 AndroidManifest.xml 上

我无法在 oppo 设备中打开意图。我已经在清单上放置了所需的权限,<uses-permission android:name="oppo.permission.OPPO_COMPONENT_SAFE"/>但从来没有工作......总是显示相同的错误:

java.lang.SecurityException: Permission Denial: starting Intent { cmp=com.coloros.safecenter/.startupapp.StartupAppListActivity mCallingUid=10222 } from ProcessRecord{6f75382 3122:com.test.myapp.debug/u0a222} (pid=3122, uid=10222) requires oppo.permission.OPPO_COMPONENT_SAFE

Run Code Online (Sandbox Code Playgroud)

我已经尝试了所有这些意图:

new Intent().setComponent(new ComponentName("com.oppo.safe", "com.oppo.safe.permission.startup.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startup.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startupapp.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startupmanager.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safe", "com.coloros.safe.permission.startup.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safe", "com.coloros.safe.permission.startupapp.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safe", "com.coloros.safe.permission.startupmanager.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startsettings")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startupapp.startupmanager")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startupmanager.startupActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startup.startupapp.startupmanager")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.startupapp.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.StartupAppListActivity")),
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.privacypermissionsentry.PermissionTopActivity.Startupmanager")),
new …
Run Code Online (Sandbox Code Playgroud)

android android-manifest android-permissions android-securityexception oppo

5
推荐指数
0
解决办法
493
查看次数

在中国手机中向上滑动时应用后台服务停止

我一直在寻找有关中国手机(Oppo、华为、小米、Vivo 等)在向上滑动(关闭)应用程序时,后台服务停止运行时出现此问题的答案。

大多数解决方案是:

  1. 包含 START_STICKY 并使用 AlarmManager 启动服务。
  2. 以编程方式将用户引导至自动启动管理器以按用户启用应用程序。
  3. 手动从省电模式中排除我的应用程序或将我的应用程序包含为受保护的应用程序。

我的问题是像 Whatsapp 这样的应用程序如何仍然接收消息或通知甚至向上滑动?此外,1.和2.中提到的解决方案如果手机重新启动就不起作用,但是Whatsapp仍然可以接收消息?我已经测试过三星设备,即使应用程序被向上滑动,它们在运行后台服务时也没有问题。有没有人在中国手机上遇到同样的问题?

java android background-service oppo huawei-mobile-services

4
推荐指数
2
解决办法
2233
查看次数