Created
February 14, 2013 04:23
-
-
Save acidjazz/4950592 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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