Android Open Source - VideoExtand Main Activity






From Project

Back to project page VideoExtand.

License

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.

Java Source Code

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;
  }

}




Java Source Code List

com.example.androidtest.MainActivity.java
com.yuninfo.videoextand.BaseActivity.java
com.yuninfo.videoextand.Config.java
com.yuninfo.videoextand.ReadCardActivity.java
com.yuninfo.videoextand.SendCardActivity.java
com.yuninfo.videoextand.bean.CommonReq.java
com.yuninfo.videoextand.bean.ReadVideoResp.java
com.yuninfo.videoextand.bean.SendVideoResp.java
com.yuninfo.videoextand.bean.UploadReq.java
com.yuninfo.videoextand.bean.UploadResp.java
com.yuninfo.videoextand.player.VideoPlayerActivity.java
com.yuninfo.videoextand.recorder.RecorderActivity.java
com.yuninfo.videoextand.uploader.ProgressListener.java
com.yuninfo.videoextand.uploader.ProgressMultipartEntity.java
com.yuninfo.videoextand.uploader.ProgressOutputStream.java
com.yuninfo.videoextand.uploader.UploadHandler.java
com.yuninfo.videoextand.uploader.UploadThread.java
com.yuninfo.videoextand.utils.BeanRefUtil.java
com.yuninfo.videoextand.utils.DateUtil.java
com.yuninfo.videoextand.utils.FileUtil.java
com.yuninfo.videoextand.utils.HttpUtil.java
com.yuninfo.videoextand.utils.LogUtil.java
com.yuninfo.videoextand.utils.StringUtil.java
com.yuninfo.videoextand.widget.CustomPopupWindow.java
com.yuninfo.videoextand.widget.TitleBar.java
com.yuninfo.videoextand.widget.dialog.MenuDialog.java