禁用Android主键行业应用主键、行业、Android

2023-09-05 03:30:09 作者:麝香味

我在写这将被用于交通协管员通过我使用的程序的形式来注册罪行的行业应用。

该应用程序使用的WebView所以它只是一个容器外部网页。我们不希望我们的用户退出应用程序,所以我们必须禁用所有按钮。我成功地禁用它们除了HOME键。

我读到这个话题有些线程,但我没有任何解决办法呢。我们的想法是,我能够使应用程序中的默认主页的应用程序,所以如果用户presses home键就启动我的应用程序并不会退出。我怎样才能实现这个目标?如果我们一定要能够篡改机器人本身(当我们安装的应用程序),但如果有一些解决方案,通过配置这将是AP preciated。

解决方案   

的想法是,我能够使应用程序的默认主页应用程序,因此如果用户presses home键就启动我的应用程序并不会退出。我怎样才能实现这个目标?

有一个在你的Andr​​oid SDK的样本家庭的应用。镜像的清单项,特别是把首页类活动的<意向滤光器>

第一次,呃,交通督导员在安装您的应用程序后,水龙头的家,一个选择器会出现运行哪家的应用程序。检查复选框,挖掘你的应用程序,然后将意味着HOME按钮直到永远运行你的应用程序。

除了创建一个自定义主页的应用程序,但是,没有办法拦截HOME键,除非通过固件修改。

I'm writing an industry application which will be used by traffic wardens to register offences through my program using forms.

The app is using a webview so it is just a container for an external webpage. We don't want our users to exit the application so we have to disable all buttons. I succeeded in disabling them except for the home button.

网页版的Android Messages应该长啥样 来这里看看

I read some threads about this topic, but I don't have any solutions yet. The idea is that I am able to make the app the default home app so if the user presses the home button it launches my app and does not exit. How can I accomplish that? If we must we are able to tamper with android itself (when we install the app), but if there is some solution through configuration it would be appreciated.

解决方案

The idea is that I am able to make the app the default home app so if the user presses the home button it launches my app and does not exit. How can I accomplish that?

There is a sample Home application in your Android SDK. Mirror its manifest entry, notably putting the HOME category in the activity's <intent-filter>.

The first time the, er, traffic warden taps HOME after installing your app, a chooser will appear for which home app to run. Checking the checkbox and tapping your app will then mean the HOME button will run your app forevermore.

Beyond creating a custom home app, though, there is no way to intercept the HOME button except through firmware modifications.