Skip to content

Instantly share code, notes, and snippets.

@acidjazz
Created February 14, 2013 04:23
Show Gist options
  • Save acidjazz/4950592 to your computer and use it in GitHub Desktop.
Save acidjazz/4950592 to your computer and use it in GitHub Desktop.
package com.rosetta.sms_sxsw;
import org.apache.cordova.DroidGap;
import android.os.Bundle;
import android.util.Log;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class receiver extends BroadcastReceiver {
private Object dg;
@Override
public void onReceive(Context context, Intent intent) {
Bundle extras = intent.getExtras();
String referrerString = extras.getString("referrer");
Log.w("TEST", "Referrer is: " + referrerString);
((com.rosetta.sms_sxsw.receiver.dg) this.dg).sendBack(referrerString);
}
public class dg extends DroidGap {
public void sendBack(String string) {
super.loadUrl("javascript:alert(\"" + string + "\";");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment