Intent i = new Intent(UserReceiver.ACTION);
i.putExtra(UserReceiver.EXTRA_TITLE, "Some title");
i.putExtra(UserReceiver.EXTRA_DESCRIPTION, "This is my test message.");
public class UserTest extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Button b = new Button(this);
b.setText("Send message");
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(UserReceiver.ACTION);
i.putExtra(UserReceiver.EXTRA_TITLE, "Some title");
i.putExtra(UserReceiver.EXTRA_DESCRIPTION, "This is my test message.");
sendBroadcast(i);
}
});
setContentView(b);
}
}
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_MAIN,"UserReceiver.ACTION")
Intent1.SetComponent("org.damazio.notifier")
intent1.PutExtra("UserReceiver.EXTRA_TITLE", "Some title")
intent1.putExtra("UserReceiver.EXTRA_DESCRIPTION", "This is my test message.")
Dim p As Phone
p.SendBroadcastIntent(Intent1)
UserReceiver.ACTION and the others are variables (constants). You need to find the actual string values and use those instead. The string values should be available in the code.