Send the data to one app to another app using intent and broadcast - Part 2
Previous post I explain about the sharing the data using broadcast. This post about to share the data using the intents. By using Intent In First Application Intent intent = new Intent(); intent.setClassName("com.sample.app", "com.sample.app.MainActivity"); intent.putExtra("EXTRA_ORDERID", "#4FGT784"); intent.putExtra("EXTRA_ORDERNOTES", "No warranty for this product"); intent.putExtra("EXTRA_ORDERAMOUNT", "270"); PackageManager packageManager = getPackageManager(); List<ResolveInfo> activities = packageManager.queryIntentActivities(intent, 0); boolean isIntentSafe = activities.size() > 0; if (isIntentSafe) { startActivity(intent); } else { Toast.makeText(MainActivity.this, "Application not installed", Toast.LENGTH_LONG).show(); } In Second Application Bundle vals = getIntent().getExtras(); if (vals != null) { String orderId = vals.getS...