Skip to content

Instantly share code, notes, and snippets.

@ahmedyehya92
Created January 7, 2018 10:03
Show Gist options
  • Select an option

  • Save ahmedyehya92/987cd56a8e640d45c1ef3373e4226bbf to your computer and use it in GitHub Desktop.

Select an option

Save ahmedyehya92/987cd56a8e640d45c1ef3373e4226bbf to your computer and use it in GitHub Desktop.
#102 constructing the Intent to broadcast
ublic static final String NEW_LIFEFORM_DETECTED =
“com.paad.action.NEW_LIFEFORM”;
Intent intent = new Intent(LifeformDetectedReceiver.NEW_LIFEFORM);
intent.putExtra(LifeformDetectedReceiver.EXTRA_LIFEFORM_NAME,
detectedLifeform);
intent.putExtra(LifeformDetectedReceiver.EXTRA_LONGITUDE,
currentLongitude);
intent.putExtra(LifeformDetectedReceiver.EXTRA_LATITUDE,
currentLatitude);
sendBroadcast(intent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment