Created
March 7, 2017 08:32
-
-
Save xxnjdlys/a8f869fa6e4d86efbb05f5b3c6af5b3d to your computer and use it in GitHub Desktop.
This file contains hidden or 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.example.sadieyu.myapplication; | |
import android.content.Intent; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.widget.TextView; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
TextView tv = (TextView) findViewById(R.id.sample_text); | |
tv.setText(stringFromJNI()); | |
getDetailIntent(); | |
} | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
} | |
public native String stringFromJNI(); | |
// Used to load the 'native-lib' library on application startup. | |
static { | |
System.loadLibrary("native-lib"); | |
} | |
public void getDetailIntent() { | |
Intent intent = new Intent("com.cantv.launcher.action.program.detail"); | |
intent.putExtra("programSeriesId", "120527"); | |
intent.putExtra("pageid", "1"); | |
String result = intent.toUri(0); | |
Log.v("SADIEYU", "Video : " + result); | |
try { | |
startActivity(intent); | |
} catch (Exception ignore) { | |
} | |
} | |
public void getLiveIntent() { | |
Intent intent = new Intent("com.cantv.action.Live_PLAYER"); | |
intent.putExtra("channelGroupId", "9999"); | |
intent.putExtra("channelId", "1"); | |
intent.putExtra("channelName", "电影频道"); | |
String result = intent.toUri(0); | |
Log.v("SADIEYU", "Live : " + result); | |
try { | |
startActivity(intent); | |
} catch (Exception ignore) { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment