Ejemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.xuetang);

    sharedPrefrences = getSharedPreferences("user", MODE_PRIVATE);
    cradnumber = sharedPrefrences.getString("cradnumber", "");

    initView();

    intent = getIntent();
    if (intent != null) {

      bundle = intent.getBundleExtra(BGActivity.BG_BUNDLE);
      bg_value = bundle.getFloat(BG, 00.0f);
      addr = bundle.getString(BT_ADDR);
      xuetang.setText("" + bg_value);
      Log.e(TAG, "===== BG_value:" + bg_value + "   BT Addr:  " + addr);
    }

    // 假设值
    xuetang.setText("11.0");

    startService(new Intent(BGActivity.this, ScreenService.class));
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_edit_bookmark);
    ButterKnife.bind(this);

    Intent intent = getIntent();
    int pos = intent.getIntExtra(INTENT_BOOKMARK, 0);

    Bundle bundle = intent.getBundleExtra(INTENT_BUNDLE_ITEM);
    Item item = (Item) bundle.getSerializable(BUNDLE_ITEM);

    System.out.println(pos);

    setupCardView(item);

    int translationThreshold = 50;
    scrollView.setOverScrollListener(
        (yDistance, isReleased) -> {
          if (Math.abs(yDistance) > translationThreshold)
            if (isReleased) {
              onBackPressed();
              return true;
            }
          return false;
        });
  }
Ejemplo n.º 3
0
  @Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    Thread.setDefaultUncaughtExceptionHandler(
        new org.geometerplus.zlibrary.ui.android.library.UncaughtExceptionHandler(this));

    final Intent intent = getIntent();
    if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
      final Bundle data = intent.getBundleExtra(SearchManager.APP_DATA);
      if (data != null) {
        final NetworkLibrary library = NetworkLibrary.Instance();
        final NetworkTree.Key key =
            (NetworkTree.Key) data.getSerializable(NetworkLibraryActivity.TREE_KEY_KEY);
        final NetworkTree tree = library.getTreeByKey(key);
        if (tree instanceof SearchCatalogTree) {
          final SearchCatalogTree searchTree = (SearchCatalogTree) tree;
          final String pattern = intent.getStringExtra(SearchManager.QUERY);
          final MimeType mime = searchTree.getMimeType();
          if (MimeType.APP_ATOM_XML.weakEquals(mime)) {
            searchTree.startItemsLoader(new QuietNetworkContext(), pattern);
          } else if (MimeType.TEXT_HTML.weakEquals(mime)) {
            Util.openInBrowser(this, searchTree.getUrl(pattern));
          }
        }
      }
    }
    finish();
  }
Ejemplo n.º 4
0
  public void onResume() {
    super.onResume();
    Log.d(TAG, "onResume()");

    Intent startingIntent = this.getIntent();
    selectedImage = startingIntent.getStringExtra("selected");
    Log.d(TAG, "selectedImage: " + selectedImage);
    oriTitle = startingIntent.getStringExtra("oriTitle");
    croppedTitle = startingIntent.getStringExtra("croppedTitle");
    annotated = startingIntent.getBooleanExtra("annotated", false);
    timestamps = startingIntent.getBundleExtra("timestamps");
    imageType = startingIntent.getStringExtra("img_type");
    Log.d(TAG, "annotated: " + annotated);
    Log.d(TAG, "nTs: " + timestamps.getLong("tsNot") + ", ts: " + timestamps.getLong("ts"));
    if (annotated) {
      this.bubbleTexts = startingIntent.getStringArrayListExtra("texts");
      this.bubbleTypes = startingIntent.getIntegerArrayListExtra("types");
      Log.d(TAG, "bubbleTexts: " + bubbleTexts.size());
      imageType = "annotated";
    }

    if (yourSelectedImage != null)
      if (yourSelectedImage.isRecycled()) yourSelectedImage.prepareToDraw();
    if (imageWithBubbles != null)
      if (imageWithBubbles.isRecycled()) imageWithBubbles.prepareToDraw();

    new WorkerTask().execute(Uri.parse(selectedImage));
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_editor);
    ButterKnife.bind(this);

    setSupportActionBar(editorToolbar);
    editorToolbar.setNavigationIcon(R.mipmap.ic_back);
    editorToolbar.setTitleTextColor(getResources().getColor(R.color.white));
    editorToolbar.setNavigationOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            finish();
          }
        });

    Intent intent = getIntent();
    List<Editor> list = new ArrayList<Editor>();
    Bundle bundle = new Bundle();
    bundle = intent.getBundleExtra("EditorList");
    list = bundle.getParcelableArrayList("EditorList");
    EditorListFragment editorListFragment = new EditorListFragment();
    editorListFragment.setData(list);
    getSupportFragmentManager()
        .beginTransaction()
        .replace(R.id.editor_fragment_container, editorListFragment)
        .commit();
  }
Ejemplo n.º 6
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
   if (requestCode == DeviceConfigActivity.ResultReqestCode) {
     if (resultCode == 0) {
       if (intent != null) {
         Bundle data = intent.getBundleExtra("result");
         final BeaconDevice device = data.getParcelable("BeaconDevice");
         Log.i(TAG, "===onActivityResult=== status=" + device.getDeviceStatus());
         if (device.getDeviceStatus() == 129) {
           mBluetoothAdapter.disable();
           try {
             Thread.sleep(2500);
           } catch (InterruptedException e) {
             e.printStackTrace();
           }
           mBluetoothAdapter.enable();
         }
         runOnUiThread(
             new Runnable() {
               @Override
               public void run() {
                 Log.i(TAG, "locking list for onActivityResult");
                 lock_list();
                 Log.i(TAG, "list locked for onActivityResult");
                 mDevices.updateDevice(device);
                 mDevices.notifyDataSetChanged();
                 toolbar.setTitle("Total " + mDevices.getCount() + " Devices");
                 unlock_list();
                 Log.i(TAG, "unlocked list for onActivityResult");
               }
             });
       }
     }
   }
 }
 public static GInAppPurchaseManagerInfoParcel a(Intent intent) {
   try {
     intent =
         intent.getBundleExtra(
             "com.google.android.gms.ads.internal.purchase.InAppPurchaseManagerInfo");
     intent.setClassLoader(
         com
             / google
             / android
             / gms
             / ads
             / internal
             / purchase
             / GInAppPurchaseManagerInfoParcel.getClassLoader());
     intent =
         (GInAppPurchaseManagerInfoParcel)
             intent.getParcelable(
                 "com.google.android.gms.ads.internal.purchase.InAppPurchaseManagerInfo");
   }
   // Misplaced declaration of an exception variable
   catch (Intent intent) {
     return null;
   }
   return intent;
 }
  // LIFECYCLE CALLBACKS
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    context = this;
    dialog = new ProgressDialog(context);
    Log.d(TAG, "SearchWikiActivity created...");

    Log.d(TAG, "unloading search variables...");
    Intent intent = getIntent();
    final Bundle app_data = intent.getBundleExtra(SearchManager.APP_DATA);
    if (app_data != null) {
      wiki_filepath = app_data.getString("wiki_filepath");
      Log.d(TAG, "wiki_filepath: " + wiki_filepath);
    } else {
      Log.w(TAG, "app_data is null!"); // FIXME Handle problems like wiki_file being null (exiquio)
    }
    if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
      query = intent.getStringExtra(SearchManager.QUERY);
      Log.d(TAG, "query: " + query);
      Log.d(TAG, "search variables unloaded!");
    }

    Log.d(TAG, "starting SearchWikiTask...");
    SearchWikiTask task = new SearchWikiTask();
    task.execute(query);
    Log.d(TAG, "SearchWikiTask should have reported complete!");
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sp_signature_screen);

    Intent intent = getIntent();
    extraBundle = intent.getBundleExtra("databundle");
    totaldue = extraBundle.getString("totaldue");
    // Toast.makeText(SignatureScreen.this, "Total Due :" + totaldue, Toast.LENGTH_SHORT).show();

    Toast.makeText(
            SignatureScreen.this,
            "Order id "
                + extraBundle.getString("order_id")
                + " email "
                + extraBundle.getString("email_id")
                + "discount : "
                + extraBundle.getString("discount")
                + "Total Due : "
                + extraBundle.getString("totaldue"),
            Toast.LENGTH_SHORT)
        .show();

    et_sign = (EditText) findViewById(R.id.et_signature);

    bt_checkout = (Button) findViewById(R.id.bt_checkout);
    bt_checkout.setOnClickListener(
        new View.OnClickListener() {

          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            if (et_sign.getText().toString().trim().equals("")) {
              AlertDialog.Builder alertDialog = new AlertDialog.Builder(SignatureScreen.this);
              alertDialog.setTitle("Oops..!");
              alertDialog.setMessage("Please Sign first");
              alertDialog.setIcon(R.drawable.error);
              alertDialog.setPositiveButton(
                  "OK",
                  new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                      // User pressed YES button. Write Logic Here
                    }
                  });

              alertDialog.show();
            } else {

              Bundle bundle = new Bundle();
              bundle.putString("totaldue", totaldue);
              bundle.putString("signature", et_sign.getText().toString());
              Intent myIntent =
                  new Intent(SignatureScreen.this, SinglePayerCardSnapshotScreen.class);
              myIntent.putExtras(bundle);
              startActivity(myIntent);
            }
          }
        });
  }
Ejemplo n.º 10
0
  public static Bundle getBridgeArgumentsFromIntent(Intent intent) {
    int version = getProtocolVersionFromIntent(intent);
    if (!isVersionCompatibleWithBucketedIntent(version)) {
      return null;
    }

    return intent.getBundleExtra(EXTRA_PROTOCOL_BRIDGE_ARGS);
  }
 public void newIntent(Intent intent) {
   if (intent.hasExtra("notification")) {
     Bundle bundle = intent.getBundleExtra("notification");
     bundle.putBoolean("foreground", false);
     intent.putExtra("notification", bundle);
     notifyNotification(bundle);
   }
 }
Ejemplo n.º 12
0
 @Test
 public void testBundleExtra() throws Exception {
   Intent intent = new Intent();
   Bundle bundle = new Bundle();
   bundle.putInt("bar", 5);
   assertSame(intent, intent.putExtra("foo", bundle));
   assertEquals(5, intent.getBundleExtra("foo").getInt("bar"));
 }
Ejemplo n.º 13
0
 @Override
 public void onReceive(Context context, Intent intent) {
   Bundle extras = intent.getBundleExtra("AccountManagerBundle");
   if (extras != null) {
     Intent authIntent = (Intent) extras.get(AccountManager.KEY_INTENT);
     if (authIntent != null) {
       mPendingAuth = true;
       startActivity(authIntent);
     }
   }
 }
Ejemplo n.º 14
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_detail);
   TAG = this.getClass().getName();
   imageView = (ImageView) findViewById(R.id.imageView);
   Intent intent = getIntent();
   Bundle bundle = intent.getBundleExtra("bundle");
   Bitmap bitmap = bundle.getParcelable("img");
   Log.d(TAG, "bitmap : " + bitmap);
   imageView.setImageBitmap(bitmap);
 }
Ejemplo n.º 15
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   switch (resultCode) {
     case RESULT_OK:
       Bundle bundle = data.getBundleExtra("PostData");
       if (bundle != null) {
         String msgAc2 = bundle.getString("calendarText");
         Toast.makeText(this, msgAc2, Toast.LENGTH_LONG).show();
       }
   }
 }
Ejemplo n.º 16
0
 private void initData() {
   Intent intent = getIntent();
   Bundle b = intent.getBundleExtra("bundle");
   bookInfo = b.getParcelable("bookinfo");
   loginUser = StatusService.getInstance().getUser();
   if (loginUser.getUsername().equals(bookInfo.getOwner())) {
     isOwner = true;
   } else {
     isOwner = false;
   }
   mContext = this;
 }
Ejemplo n.º 17
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_maps);
    setUpMapIfNeeded();

    // get intent from mainActivity
    Intent intent = this.getIntent();
    Bundle args = intent.getBundleExtra("INFO");
    convertIntentBundleToUse(args);
    setStoreLocation();
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   setContentView(R.layout.activity_shop_detailsqiandao);
   Intent intent = getIntent();
   Bundle bund = intent.getBundleExtra("value");
   info = (ShopInfo) bund.getSerializable("ShopInfo");
   mFaceValue = this.getResources().getStringArray(R.array.default_smiley_texts);
   createView();
   initView();
   initModel();
 }
Ejemplo n.º 19
0
    // internal use
    private static Bundle retrieveOrCreatePassThroughBundle(Intent requestQueryIntent) {

      Bundle passThroughBundle;

      if (requestQueryIntent.hasExtra(EXTRA_REQUEST_QUERY_PASS_THROUGH_DATA))
        passThroughBundle =
            requestQueryIntent.getBundleExtra(EXTRA_REQUEST_QUERY_PASS_THROUGH_DATA);
      else {
        passThroughBundle = new Bundle();
        requestQueryIntent.putExtra(EXTRA_REQUEST_QUERY_PASS_THROUGH_DATA, passThroughBundle);
      }

      return passThroughBundle;
    }
Ejemplo n.º 20
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.drawer_layout);
    drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    toolbar = (Toolbar) findViewById(R.id.app_bar);
    nondrawer = (LinearLayout) findViewById(R.id.nondrawer);
    setSupportActionBar(toolbar);
    toolbar.setTitleTextColor(getResources().getColor(android.R.color.white));
    getSupportActionBar().setTitle("Feeds");
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    // toolbar.animate().setDuration(500).setInterpolator(new
    // DecelerateInterpolator()).translationYBy(-100).start();
    Intent i = getIntent();
    getSupportActionBar()
        .setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.feedcolor)));
    NavigationDrawerFragment navigationDrawerFragment =
        (NavigationDrawerFragment)
            getSupportFragmentManager().findFragmentById(R.id.drawer_fragment);
    if (i.hasExtra("fbBundle")) {
      navigationDrawerFragment.setUp(drawerLayout, toolbar, this, i.getBundleExtra("fbBundle"));
    } else if (i.hasExtra("gpBundle")) {
      navigationDrawerFragment.setUp(drawerLayout, toolbar, this, i.getBundleExtra("gpBundle"));
    } else {
      navigationDrawerFragment.setUp(drawerLayout, toolbar, this);
    }
    // FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    // fab.attachToRecyclerView(recList);//done attachment
    // -----------------------------------------------------

    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    Fragment feeds = new FeedsActivity(this);
    ft.replace(R.id.fragment_holder, feeds);
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
    ft.addToBackStack(null);
    ft.commit();
  }
Ejemplo n.º 21
0
  private void setupFromIntent(Intent intent) {
    if (DBG) Log.d(TAG, "setupFromIntent(" + intent.toUri(0) + ")");
    String corpusName = getCorpusNameFromUri(intent.getData());
    String query = intent.getStringExtra(SearchManager.QUERY);
    Bundle appSearchData = intent.getBundleExtra(SearchManager.APP_DATA);
    boolean selectAll = intent.getBooleanExtra(SearchManager.EXTRA_SELECT_QUERY, false);

    setCorpus(corpusName);
    setQuery(query, selectAll);
    mAppSearchData = appSearchData;

    if (startedIntoCorpusSelectionDialog()) {
      mSearchActivityView.showCorpusSelectionDialog();
    }
  }
  @Override
  public Map<String, Object> getConstants() {
    final Map<String, Object> constants = new HashMap<>();

    Intent intent = mActivity.getIntent();

    Bundle bundle = intent.getBundleExtra("notification");
    if (bundle != null) {
      bundle.putBoolean("foreground", false);
      String bundleString = convertJSON(bundle);
      constants.put("initialNotification", bundleString);
    }

    return constants;
  }
Ejemplo n.º 23
0
  @Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    Intent intent = getIntent();
    contact =
        (ContactInfo) intent.getBundleExtra(Intents.Encode.DATA).getSerializable("ContactInfo");
    if (intent != null) {
      String action = intent.getAction();
      if (action.equals(Intents.Encode.ACTION) || action.equals(Intent.ACTION_SEND)) {
        setContentView(R.layout.encode);
        return;
      }
    }
    finish();
  }
  @Override
  protected void onHandleIntent(Intent intent) {
    if (intent != null) {
      String senderEmail = getSenderEmail(intent.getStringExtra(MessagingFragment.SENDER_ID_ARG));
      Bundle data = intent.getBundleExtra(MessagingFragment.MESSAGE_ARG);
      String id = Integer.toString(sMessageId.incrementAndGet());
      Log.d(TAG, "Sending gcm message:" + senderEmail + ":" + data + ":" + id);

      try {
        GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
        gcm.send(senderEmail, id, data);
        Log.d(TAG, "Sent!");
      } catch (IOException e) {
        Log.e(TAG, "Failed to send GCM Message.", e);
      }
    }
  }
Ejemplo n.º 25
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_detail);

    Intent intent = getIntent();
    if (intent != null && intent.hasExtra(MovieItem.EXTRA_MOVIE)) {
      MovieItem movie = new MovieItem(intent.getBundleExtra(MovieItem.EXTRA_MOVIE));
      ((TextView) findViewById(R.id.movie_title)).setText(movie.title);
      ((TextView) findViewById(R.id.movie_rating)).setText(movie.getRating());
      ((TextView) findViewById(R.id.movie_overview)).setText(movie.overview);
      ((TextView) findViewById(R.id.movie_release_date)).setText(movie.release_date);

      Uri posterUri = movie.buildPosterUri(getString(R.string.api_poster_default_size));
      Picasso.with(this).load(posterUri).into((ImageView) findViewById(R.id.movie_poster));
    }
  }
Ejemplo n.º 26
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.onlineimg);

    // »ñµÃÍøÂçͼƬ·¾¶
    Intent intent = getIntent();
    path = intent.getStringExtra("path");
    // »ñµÃÁÙʱbitmap
    bundle = intent.getBundleExtra("bundle");
    bitmapByte = bundle.getByteArray("bitmap");
    bmp = BitmapUtils.byteArrayToBitmap(bitmapByte);

    iv = (ImageView) findViewById(R.id.online_imageview);
    iv.setImageBitmap(bmp);
  }
Ejemplo n.º 27
0
  @Override
  protected void onNewIntent(Intent intent) {
    Intent oldIntent = this.getIntent();
    setIntent(intent);

    if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
      String query = intent.getStringExtra(SearchManager.QUERY);
      Bundle searchBundle = intent.getBundleExtra(SearchManager.APP_DATA);
      Searcher.SearchType type = Searcher.SearchType.values()[searchBundle.getInt("search_type")];
      String strProgressMessage = "Loading....";
      strProgressMessage = getString(R.string.searchProgressMessage);
      this.showDialog(0);
      new SearchTask(this, type).execute(query);
    }

    // Set our intent back once the search display is done
    setIntent(oldIntent);
  }
Ejemplo n.º 28
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_check_now);

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle =
        new ActionBarDrawerToggle(
            this, drawer, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(this);

    Intent intent = getIntent();
    datalist = new ArrayList<String>();
    bundleData = intent.getBundleExtra("DATA");

    datalist = bundleData.getStringArrayList("DATA_LIST");

    Date date = new Date();
    SimpleDateFormat dateformat =
        new SimpleDateFormat("yyyy-MM-dd a hh:mm:ss", java.util.Locale.getDefault());
    endTime = dateformat.format(date);

    code_num = (TextView) findViewById(R.id.code_num);
    count = (TextView) findViewById(R.id.count);
    start_btn = (Button) findViewById(R.id.start_btn);

    arrayList = new ArrayList<String>();

    id = datalist.get(0);
    position = datalist.get(5);

    codenum = datalist.get(2); // 앞 엑티비티에서 인증번호 값 받아오기
    code_num.setText("" + codenum); // TextView에 인증번호 띄우기

    classNo = datalist.get(4);
    timer = datalist.get(1); // 앞 엑티비티에서 타이머 값 받아오기
    // count.setText(timer);
    count.setText(timer + "분");
    start_btn.setOnClickListener(this);
  }
Ejemplo n.º 29
0
  @Override
  public void onInformaCamStart(Intent intent) {
    int code =
        intent
            .getBundleExtra(org.witness.informacam.utils.Constants.Codes.Keys.SERVICE)
            .getInt(org.witness.informacam.app.utils.Constants.Codes.Extras.MESSAGE_CODE);
    // Log.d(LOG, "STARTING INFORMACAM ON IWITNESS (routeCode = " + code + ")");

    switch (code) {
      case org.witness.informacam.utils.Constants.Codes.Messages.Wizard.INIT:
        ArrayList<String> wizardFragments = new ArrayList<String>();
        wizardFragments.add(OriginalImagePreference.class.getName());

        route = new Intent(this, org.witness.informacam.app.WizardActivity.class);

        route.putStringArrayListExtra(Codes.Extras.WIZARD_SUPPLEMENT, wizardFragments);
        ILanguageMap languageMap = new ILanguageMap();

        for (int l = 0; l < getResources().getStringArray(R.array.languages_).length; l++) {
          languageMap.add(
              getResources().getStringArray(R.array.locales)[l],
              getResources().getStringArray(R.array.languages_)[l]);
        }

        route.putExtra(Codes.Extras.SET_LOCALES, languageMap);
        route.putExtra(Codes.Extras.LOCALE_PREF_KEY, Preferences.Keys.LANGUAGE);
        routeCode = Wizard.ROUTE_CODE;
        break;
      case org.witness.informacam.utils.Constants.Codes.Messages.Login.DO_LOGIN:
        route = new Intent(this, LoginActivity.class);
        routeCode = Login.ROUTE_CODE;
        break;
      case org.witness.informacam.utils.Constants.Codes.Messages.Home.INIT:
        route = new Intent(this, HomeActivity.class);
        if (prefStealthIcon) route.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

        routeCode = Home.ROUTE_CODE;
        break;
    }

    routeByIntent();
  }
Ejemplo n.º 30
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.read_main);
    Intent callerIntent = getIntent();
    Bundle packageFromCaller = callerIntent.getBundleExtra("MyPackage");
    a = packageFromCaller.getInt("soa");
    b = packageFromCaller.getString("sob");
    Toast.makeText(this, a + " " + b, Toast.LENGTH_LONG).show();
    txt1 = (TextView) findViewById(R.id.heading);
    txt2 = (TextView) findViewById(R.id.textView2);
    txt1.setText(b);
    runOnUiThread(
        new Runnable() {

          @Override
          public void run() {
            new CallLogin().execute("http://10.0.2.2/vietstories/read.php");
          }
        });
  }