Skip to content

Instantly share code, notes, and snippets.

@acidjazz
Created February 14, 2013 02:13
Show Gist options
  • Save acidjazz/4950136 to your computer and use it in GitHub Desktop.
Save acidjazz/4950136 to your computer and use it in GitHub Desktop.
public class receiver extends BroadcastReceiver {
private DroidGap dClass;
@Override
public void onReceive(Context context, Intent intent) {
Bundle extras = intent.getExtras();
String referrerString = extras.getString("referrer");
Log.w("TEST", "Referrer is: " + referrerString);
dClass = new DroidGap(this);
dClass.loadUrl("javascript:alert(\"" + referrerString + "\");");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment