コード例 #1
0
ファイル: ServalDTests.java プロジェクト: rom1v/serval-dna
 public static void repeat(String[] args) {
   int repeat = Integer.decode(args[0]);
   ServalD servald = new ServalD();
   for (int i = 0; i != repeat; ++i) {
     servald.command(Arrays.copyOfRange(args, 1, args.length));
     System.out.print(servald.status);
     for (String s : servald.outv) {
       System.out.print(":");
       System.out.print(s);
     }
     System.out.println("");
   }
 }
コード例 #2
0
ファイル: Main.java プロジェクト: nitinarv/batphone
 @Override
 public void onClick(View view) {
   switch (view.getId()) {
     case R.id.btncall:
       startActivity(new Intent(Intent.ACTION_DIAL));
       break;
     case R.id.messageLabel:
       if (!ServalD.isRhizomeEnabled()) {
         app.displayToastMessage("Messaging cannot function without an sdcard");
         return;
       }
       startActivity(
           new Intent(
               getApplicationContext(),
               org.servalproject.messages.MessagesListActivity.class));
       break;
     case R.id.mapsLabel:
       openMaps();
       break;
     case R.id.contactsLabel:
       startActivity(
           new Intent(getApplicationContext(), org.servalproject.ui.ContactsActivity.class));
       break;
     case R.id.settingsLabel:
       startActivity(
           new Intent(
               getApplicationContext(), org.servalproject.ui.SettingsScreenActivity.class));
       break;
     case R.id.sharingLabel:
       startActivity(new Intent(getApplicationContext(), RhizomeMain.class));
       break;
     case R.id.helpLabel:
       Intent intent = new Intent(getApplicationContext(), HtmlHelp.class);
       intent.putExtra("page", "helpindex.html");
       startActivity(intent);
       break;
     case R.id.servalLabel:
       startActivity(new Intent(getApplicationContext(), ShareUsActivity.class));
       break;
     case R.id.powerLabel:
       startActivity(new Intent(getApplicationContext(), Networks.class));
       break;
   }
 }