如何使用自定义的屏幕,而不是默认的开始屏幕的Andr​​oid? [英] How to use customized screen instead of default start screen in Android?

查看:129
本文介绍了如何使用自定义的屏幕,而不是默认的开始屏幕的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出的企业应用程序,该用户应该能够只使用那些应用,我提供了他。我的想法是压倒一切的只有那些我提供给用户的应用程序的默认启动画面与我的自定义布局与应用程序图标。我将禁用回家,菜单返回以及搜索按键,在屏幕开始。即使用户presses home键,他应该被重定向到我的自定义屏幕,其中包含的图标。

I 'am making an enterprise app, the user should be able to use only those applications which i provide him. My idea is overriding the default start screen with my custom layout with the app icons, of only those apps which i provide to the user. I will disable home, menu back and search buttons in the starting screen. Even if the user presses home button he should be redirected to my custom screen which contains icons.

我看到已没有生根的设备来实现这样的应用程序。 这里的链接,该应用程序。

I have seen an application which has achieved this without rooting the device. Here is the link for that app.

我只是想知道我应该如何发送启动屏幕为背景和我的自定义布局到前台。

I just want to know how should i send the starting screen into background and my custom layout into foreground.

推荐答案

您的应用程序似乎是一个自定义启动(但restrictives权限)。 所以,你可以定义为一个启动您的应用程序,要做到这一点,你可以在清单补充一点:

Your app seems like a custom launcher (but with restrictives permissions). So you can define your app as a launcher, to do that you can add this in the manifest :

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter android:priority="1">
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.HOME" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>

然后,你必须要实现的方法,回到真正的启动。

Then you have to implements a method to get back to the real launcher.

这篇关于如何使用自定义的屏幕,而不是默认的开始屏幕的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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