Beispiel #1
0
  /**
   * Create about alert.
   *
   * @author Irving Bunton
   * @version 1.0
   */
  public static final Alert getAbout(MIDlet midlet) {
    final Alert about =
        new Alert(
            ResourceProviderME.get("alert.about.title"),
            ResourceProviderME.get(
                "alert.about",
                midlet.getAppProperty("MIDlet-Version")
                    + "-"
                    + midlet.getAppProperty("Program-Version")),
            null,
            AlertType.INFO);
    about.setTimeout(Alert.FOREVER);

    return about;
  }
 private static final void MoreGame_DoOpen(MIDlet midlet) {
   try {
     midlet.platformRequest(url_moreGame);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Beispiel #3
0
  @Override
  protected void onResume() {
    super.onResume();

    if (this.midlet == null) {
      /*Thread thread = new Thread() {
      public void run(){
      	while( defaultView.getWidth() == 0 )
      	{
      		try
      		{
      			Thread.sleep( 500 );
      			System.out.println( "W:"+defaultView.getWidth()+",H:"+defaultView.getHeight()+",MW:"+defaultView.getMeasuredWidth()+",MH:"+defaultView.getMeasuredHeight() );
      		}catch( Exception ex )
      		{
      			ex.printStackTrace();
      		}
      	}*/
      MIDlet midlet = Common.createMIDlet(MainActivity.this, bootMode);
      MainActivity.this.midlet = midlet;
      try {
        if (midlet != null) {
          midlet.doStartApp();
        }
      } catch (Exception ex) {
        ex.printStackTrace();
      }
      /*}
      };
      thread.start();*/
    } else {
      try {
        this.midlet.doStartApp();
      } catch (Exception ex) {
        ex.printStackTrace();
        throw new RuntimeException("couldn't start MIDlet");
      }
    }
  }