Android的意图BOOT_COMPLETED决不会在三星SM-T230奇巧4.4.2平板电脑推出 [英] Android intent BOOT_COMPLETED is never launched on Samsung SM-T230 Kitkat 4.4.2 tablet

查看:296
本文介绍了Android的意图BOOT_COMPLETED决不会在三星SM-T230奇巧4.4.2平板电脑推出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个HOME( android.intent.category.HOME )类型的应用程序,只要第一个推出launchs另一个应用程序。到现在为止,我一直在使用onResume()上的活动片段,这是伟大的工作(即与其他Android版本其他平板电脑),直到我试图在一个SM-T230(Galaxy Tab的4 7无线),其中有奇巧4.4.2。

I'm creating a HOME (android.intent.category.HOME) typed application which launchs another app as soon as the first one is launched. Up until now I've been using onResume() on the activity fragment, which was working great (meaning on other tablets with other Android version) until I tried it on an SM-T230 (Galaxy Tab 4 7" Wifi) which has Kitkat 4.4.2.

我不知道为什么,但与平板电脑BOOT_COMPLETED的意图是永远不会被解雇。我试过很多推出不同的应用程序,并与他们每一个人发生同样的事情。上述意图是永远不会启动。只有在pressing回反复让回到主场类型的应用程序被启动(必须反复做,因为应用程序在启动onResume)每次(第二个应用程序)。如果是从来没有被系统,WiFi服务,圈养等等不起作用。

I don't know why but with that tablet the "BOOT_COMPLETED" intent is never fired. I've tried launching many different apps and with every single one of them happens the same thing. The aforementioned intent is never launched. Only after pressing back repeatedly and getting back to the HOME typed app it is launched (it must be done repeatedly since the app launches every time in onResume() the second app). If it is never launched by the system, the wifi service, tethering and many more will not function.

有趣的是,如果我省略推出第二应用程序,目的是解雇。

Interestingly if I omit the launch of the second app, the intent is fired.

我想在试图尽快启动应用程序的HOME应用片段变成可见的,但我不知道是如何做到这一点。是否有人对如何做到这一点任何想法?

I'm thinking on trying to launch the app as soon as the HOME app fragment becomes visible but I have no idea as of how to do it. Does someone has any idea on how to do that?

此外,如果你遇到了我想读您的意见同样的问题。

Also if you have encountered the same problem I would like to read your comments.

推荐答案

的问题是,第二个应用程序是之前推出第一款Android片段可见。为了解决这个问题,我添加了一个非常小的计时器超时之后。

The problem was that the second app was launched before the first android fragment is visible. To solve this problem I added a very small timer that launches the second app after it times out.

@Override
public void onResume() {
    super.onResume();
    ...
    getView().postDelayed(scheduleLaunch, 2000);
}

private Runnable scheduleLaunch = new Runnable() {
    @Override
    public void run() {
        if (isAdded()) {
            launchMainApp();
        }
    }
};

这篇关于Android的意图BOOT_COMPLETED决不会在三星SM-T230奇巧4.4.2平板电脑推出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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