Android 手机作为专用设备
我们想使用Android手机进行专用应用程序。有人可以建议我们如何才能实现这一目标吗?
以下是要求:
手机启动时,应启动我们的应用程序,因此用户无法启动任何其他应用程序。该应用程序将是一个一维条形码读取器。
只要手机启动并运行,应用程序就应该处于活动状态,用户根本无法关闭应用程序。
感谢您的帮助。
问候,
曼尼什
We want to use Android mobile for dedicated application. Can somebody suggest how can we make it happen.
Here are the requirement:
The phone when started, should launch our application., so the user cannot launch any other application. The application will be a 1D barcode reader.
The application should be live as long as the phone is up and running, user cannot close the application at all.
Thanks for your help.
Regards,
Manish
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Android 启动完成后会发送广播意图:
如果您侦听此意图,则可以启动一项服务,进而启动您的 Activity。
在 Activity 中,您必须处理显式关闭 Activity 的用户交互,例如主页按钮、后退按钮和相机按钮按下。
将您的活动设置为全屏还应该防止用户使用通知栏与通知进行交互,例如来自市场应用程序的可以关闭您的活动的通知。
最后,您的 Activity 可能会因各种无法捕获的原因被系统终止:在这些情况下,首先启动您的 Activity 的服务会派上用场,因为它可以定期监视应用程序的一般状态并根据需要重新启动组件。
Android after boot is complete sends a bradcast intent:
if you listen for this intent, you can launch a service that in turn launch your activity.
In the Activity you have to take care of the user's interactions that explicitly close the activity, like home button, back button and camera button press.
Setting your activity to be full-screen also should prevent the user to use the notification bar to interact with notification like those from market-app that can close your activity.
Finally, your activity can be killed by the system by various and uncatchable reasons: in those cases, the service that first launched your Activity comes in handy, as it can periodically monitor the general state of the application and relaunch components as needed.
查看适合您的用例的新 Android Enterprise 解决方案。
https://developers.google.com/android/work/overview
有详细记录。您可以使用
Android 管理 API 来配置设备并将策略应用到设备,这些策略将使用 Android 的设备策略控制器 (DPC) 应用到设备,或者
使用 Google Play EMM API 并开发您的自定义 DPC
这取决于确实取决于您的用例,但第一个解决方案集应该满足您的目的
Check out the new Android Enterprise solutions for your use case.
https://developers.google.com/android/work/overview
Its well documented. You can either use
Android Management API to provision the devices and apply policies to the device which will be applied to the device using Android's Device Policy Controller (DPC) or,
Use Google Play EMM API and develop your custom DPC
It depends upon your use-case really, but the first solution set should serve your purpose
恐怕这个问题没有单一的答案,但你需要在多个方面开展工作。
其中之一是阻止用户运行其他应用程序:为此,Android Market 上出售的一些应用程序可以将您选择的其他应用程序置于密码后面。
您需要将其与自动启动结合起来,但我还不知道该怎么做。
I'm afraid there's no single answer to this, but you need to work on multiple fronts.
One of these fronts is preventing user from running other applications: for this there are applications sold on Android Market that can put other apps of your choosing behind passcode.
You need to combine this with automatic launch, but I don't yet know how to do that.