Advertisement
Guest User

berrysync

a guest
Jun 22nd, 2011
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. int[] apps = CodeModuleManager.getModuleHandles();
  2. ApplicationDescriptor[] ad;
  3. ApplicationDescriptor holder;
  4. String[] args = {"google.com"};
  5. for(int i = 0, len = apps.length; i < len; i ++){
  6.     ad = CodeModuleManager.getApplicationDescriptors(apps[i]);
  7.     if(ad != null){
  8.         for(int j = 0, adlen = ad.length; j < adlen; j++){
  9.             if(ad[j].getName().equals("Opera Mini")){
  10.                 holder = new ApplicationDescriptor(ad[j], args);
  11.                 try {
  12.                     ApplicationManager.getApplicationManager().runApplication(holder);
  13.                     break;    //Needed
  14.                 } catch (ApplicationManagerException failedToOpen) {}
  15.             }
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement