如何在Android的启动应用程序? [英] how to create startup application in android?

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

问题描述

我是新来的机器人。我需要创建一个自动启动应用程序。该应用程序将控制文件(如果我们打开的库(或)邮件附件的图像文件,在那个时候我们的应用程序给用户一个警告对话框)。请指导如何创建一个自动启动应用程序来控制Android模拟器的所有文件格式。

I am new to android. I need to create an auto startup application. That application will control the files( if we open a image file from Gallery (or) mail attachments, on that time our application give a alert dialog to the user). Please guide to how to create an auto startup application to control all the file format in the android emulator.

推荐答案

您应该使用权限 android.permission.RECEIVE_BOOT_COMPLETED 和注册的BroadcastReceiver android.intent.action.BOOT_COMPLETED

You should use the permission android.permission.RECEIVE_BOOT_COMPLETED and register a BroadcastReceiver for android.intent.action.BOOT_COMPLETED.

更新: 我无法找到一个来源,但我是pretty的肯定,前一个应用程序能够接收 android.intent.action.BOOT_COMPLETED 它至少应该有启动一次,因为它的安装。

Update: I can't find a source, but I'm pretty sure, before an app is able to receive android.intent.action.BOOT_COMPLETED it should at least have been started once since it's installation.

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

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