Back to project page VideoExtand.
The source code is released under:
Apache License
If you think the Android project VideoExtand listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.androidtest; /*from w w w . ja v a 2s .com*/ import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.widget.Toast; import com.yuninfo.videoextand.Config; import com.yuninfo.videoextand.ReadCardActivity; import com.yuninfo.videoextand.SendCardActivity; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); findViewById(R.id.btn1).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this, SendCardActivity.class); //?????????????????com.yuninfo.videoextand.SendCardActivity.java intent.putExtra("yuninfo_appId", "test"); intent.putExtra("yuninfo_appSecret", "test"); intent.putExtra("yuninfo_userId", "1000058662"); //??????id // intent.putExtra("yuninfo_remainCoin", "1000058662"); //???????????????????????????????????????????????????????????? startActivity(intent); } }); findViewById(R.id.btn2).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this, ReadCardActivity.class);//?????????????????com.yuninfo.videoextand.ReadCardActivity.java intent.putExtra("yuninfo_appId", "test"); intent.putExtra("yuninfo_appSecret", "test"); intent.putExtra("yuninfo_msgId", "2958"); intent.putExtra("yuninfo_userId", "1000058662"); //???id // intent.putExtra("yuninfo_url", "http://t.cn/8kkeB8O"); intent.putExtra("yuninfo_url", "http://t.cn/8FhGQ0u,http://t.cn/8FhGQOG"); intent.putExtra("yuninfo_msg", "??????????"); //?????? intent.putExtra("yuninfo_state", false); startActivityForResult(intent, 100); } }); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode == 100) { if(resultCode == RESULT_OK && data != null) { if(data.hasExtra(Config.YUNINFO_RESULT_DATA) && data.getBooleanExtra(Config.YUNINFO_RESULT_DATA, false)) { Toast.makeText(this, "??????????????", Toast.LENGTH_LONG).show(); } else { Toast.makeText(this, "????????????", Toast.LENGTH_LONG).show(); } } else { Toast.makeText(this, "????????????", Toast.LENGTH_LONG).show(); } } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }