Android的如何在开机时启动活动 [英] Android how to start activity on Boot-up

查看:153
本文介绍了Android的如何在开机时启动活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我来形容你,我想:我想建立一个主应用程序,并设置它,以便当电话接通电源后,它会立即进入主应用程序。用户可以永远退出这个程序(这将被用于类似的家长控制),而他只能从内推出它的其他应用程序。

Let me describe you what I want: I want to build a "master app" and set it so that when the phone is powered up, it immediately goes into the master app. The user can never exit this app (this will be used for something like parental control), and he can only launch other apps from within it.

基本上它会像一个自定义桌面。

Basically it will be like a "custom desktop".

我必须强调,重要的是,这个应用程序永远不会退出。只要手机开始时,这是唯一的环境,用户可以访问

I must stress out, it is important that this app never exits. As long as the phone is started, this is the only environment that the user has access to.

现在经过我解释什么,我需要,我需要你的帮助,告诉我什么我期待的。这是某种形式的默认启动我不断听到的?或者,这是怎么叫什么?
我该怎么办呢?

Now after I explained what I need, I will need your help to tell me what am I looking for. Is this some kind of "default launcher" that I keep hearing about? Or how is this called? How can I do it?

感谢

推荐答案

这加入到清单。

<receiver
            android:name=".Bootupclass"
            android:enabled="true"
            android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >

</receiver>

Bootupclass

Bootupclass

public class Bootupclass extends BroadcastReceiver{

    @Override
    public void onReceive(Context context, Intent intent) {
        //write intent here 
    }

}

这篇关于Android的如何在开机时启动活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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