Hi guys i have an application which need to be run on blackberry device on start up. But i want the the device shouldn't only work for my app. User shouldn't be able to run other apps on the device. Can we do such things.
For running the application on start up i have used the following code.
public class SampleApplication extends UiApplication {
private Thread _th开发者_如何学JAVAread;
public static void main(String[] args) {
SampleApplication App = new SampleApplication();
App.enterEventDispatcher();
}
public SampleApplication() {
_thread = new Thread(new checkRequest());
_thread.start();
}
public class checkRequest extends Thread {{
public void run() {
// Creates an instance of the system’s application manager.
ApplicationManager myApp =
ApplicationManager.getApplicationManager();
while(myApp.inStartup()) {
try {
_thread.sleep(2000);
} catch(Exception e) {
// Catch Exception
}
}
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
pushScreen(new MyMainScreen());
}
});
UiApplication.getUiApplication().requestForeground();
}
}
final class MyMainScreen extends MainScreen {
public MyMainScreen() {
super();
BasicEditField field1 = new BasicEditField("Test:","");
add(field1);
}
}
}
Now i am stuck with only limiting my device to use only my app. Is is possible to do in blackberry?
If anything like this were possible, I'm sure that it would have to be controlled by an IT Policy in the BES. A single, standalone application should not be able to simply take control of the device -- think of the security implications.
精彩评论