Blame view
android/PromoterDemo/src/com/example/promoterdemo/MainActivity.java
1.09 KB
|
d1683fe9a
|
1 |
package com.example.promoterdemo; |
|
636deb8ba
|
2 3 |
import com.gumptech.promoter.Entrance; |
|
5c63a6443
|
4 |
import android.app.Activity; |
|
d1683fe9a
|
5 |
import android.os.Bundle; |
|
79b86efd3
|
6 |
import android.util.Log; |
|
d1683fe9a
|
7 8 |
import android.view.View; import android.view.View.OnClickListener; |
|
636deb8ba
|
9 10 |
import android.widget.Button; import android.widget.EditText; |
|
d1683fe9a
|
11 |
import android.widget.TextView; |
|
636deb8ba
|
12 |
|
|
d1683fe9a
|
13 |
public class MainActivity extends Activity implements OnClickListener {
|
|
636deb8ba
|
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
EditText etUid;
String appId = "10022";
String serverID = "";
String roleId = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView info = (TextView) findViewById(R.id.app_info);
etUid = (EditText) findViewById(R.id.uid);
Button goin = (Button) findViewById(R.id.goin);
goin.setOnClickListener(this);
info.setText("appId=" + appId + "
serverId=" + serverID + "
roleId=" + roleId + "
sdk version:" + Entrance.getVersion());
}
|
|
d1683fe9a
|
32 33 34 |
@Override
public void onClick(View v) {
|
|
636deb8ba
|
35 36 37 |
String uid = etUid.getText().toString(); Entrance.enableDebug(true); Entrance.DoPromoter(uid, appId, serverID, roleId, this); |
|
d1683fe9a
|
38 39 |
} } |