Skip to content

Instantly share code, notes, and snippets.

View janithajc's full-sized avatar

Janitha Samarasinghe janithajc

  • SEB Embedded
  • Stockholm, Sweden
View GitHub Profile
@janithajc
janithajc / Manifest.xml
Last active December 21, 2015 06:31
Part of an Android Manifest which is used to register a Broadcast Receiver statically.
...
<receiver
android:name=".MyReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="org.wso2.CUSTOM_INTENT" />
</intent-filter>
</receiver>
...
@janithajc
janithajc / MyReceiver.java
Created December 21, 2015 05:44
This is a simple receiver which gets the string which was passed through the intent with the key "event" and makes a toast message.
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;
public class MyReceiver extends BroadcastReceiver {
public MyReceiver() {
}
@Override