我想使用 J2ME 在移动设备后台运行应用程序,而无需在移动设备中使用任何 GUI?
我正在开发一个网络应用程序,我想在没有任何 GUI 的情况下在后台运行 J2ME MIDP 应用程序,因此构建该应用程序的任何方式都是这样的。
I am developing the network application in which I want to run my J2ME MIDP application in background without any GUI so that is any way to construct the application is such manner.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试将
当前显示设置为空。因此屏幕上不会运行任何表单或警报。但是您的代码将在后台运行。
try this
set your current Display to null. so there will not be any form or alert running on the screen. But however your code will be running in the background.
只需在任何事件上添加一行代码即可,例如单击按钮
Display.getDisplay (this).setCurrent (null);
并通过
Display.getDisplay ( this).setCurrent(mycanvas);
it easy just have a code of line on any event for example in the click of button
Display.getDisplay (this).setCurrent (null);
and return back the control via
Display.getDisplay (this).setCurrent (mycanvas);
是的,这段代码工作得很好,
这就像,让一个按钮可以在单击它后调用隐藏函数,或者你在构造函数中调用这个隐藏函数,这样它就会在应用程序启动时隐藏自己,你可以在
appStart 中保留 unHide 语句吗()
因此,如果您按 Tab 键打开该程序,它将再次取消隐藏应用程序。注意:您说您正在使用网络应用程序,但是当移动屏幕关闭时,某些移动设备会关闭互联网连接。请检查这个。如果您找到任何解决方案,最好在这里分享。
Yes this code works Good,
This is will work like, make a button can after clicking it call hide Function, or you call this hide function in constructor so it will hide itself when app start, can you keep unHide statement in
appStart()
so if you Tab the program then it will unHide app again.NOTE: you said you are working on Network app, but some mobile will turn off the Internet Connection, when the Mobile screen Turn Off. please check this. and If you found any solution It will be Good to share here.