-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Main: invote code via referrer attempt.
- Loading branch information
1 parent
36d0dba
commit 0857092
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
android/android.main/src/main/java/sneer/android/ReferrerReceiver.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package sneer.android; | ||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.util.Log; | ||
import android.widget.Toast; | ||
import sneer.android.ui.AcceptInviteActivity; | ||
|
||
import static sneer.android.ui.AcceptInviteActivity.REFERRER_CODE; | ||
|
||
public class ReferrerReceiver extends BroadcastReceiver { | ||
|
||
@Override | ||
public void onReceive(Context context, Intent intent) { | ||
|
||
Bundle extras = intent.getExtras(); | ||
String referrerString = extras.getString("referrer"); | ||
|
||
Log.d(getClass().getName(), "Referrer is: " + referrerString); | ||
Toast.makeText(context, "REFERRER: " + referrerString, Toast.LENGTH_LONG).show(); | ||
|
||
Intent accept = new Intent(context, AcceptInviteActivity.class); | ||
accept.putExtra(REFERRER_CODE, referrerString); | ||
context.startActivity(accept); | ||
} | ||
} |
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