-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
2,342 additions
and
2,342 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/build | ||
*.iml | ||
.idea | ||
/.gradle | ||
/build | ||
*.iml | ||
.idea | ||
/.gradle |
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 |
---|---|---|
@@ -1,56 +1,56 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 24 | ||
buildToolsVersion '26.0.2' | ||
|
||
defaultConfig { | ||
applicationId "com.gxf.liveplay" | ||
minSdkVersion 17 | ||
targetSdkVersion 22 | ||
versionCode 9 | ||
versionName "1.9" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
lintOptions { | ||
checkReleaseBuilds false | ||
// Or, if you prefer, you can continue to checkforerrorsinrelease builds, | ||
// but continue the build even whenerrorsarefound: | ||
abortOnError false | ||
} | ||
sourceSets { | ||
main { | ||
jniLibs.srcDir 'libs' | ||
} | ||
|
||
// Move the tests to tests/java, tests/res, etc... | ||
instrumentTest.setRoot('tests') | ||
|
||
// Move the build types to build-types/<type> | ||
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... | ||
// This moves them out of them default location under src/<type>/... which would | ||
// conflict with src/ being used by the main source set. | ||
// Adding new build types or product flavors should be accompanied | ||
// by a similar customization. | ||
debug.setRoot('build-types/debug') | ||
release.setRoot('build-types/release') | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
compile project(':Ijkplayer') | ||
|
||
compile 'com.android.support:appcompat-v7:23.4.0' | ||
compile 'com.android.support:design:23.1.1' | ||
compile 'com.android.support:cardview-v7:23.1.1' | ||
compile 'com.alibaba:fastjson:1.1.62.android' | ||
compile 'com.squareup.okhttp3:okhttp:3.8.1' | ||
compile 'com.android.support.constraint:constraint-layout:1.0.2' | ||
testCompile 'junit:junit:4.12' | ||
} | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 24 | ||
buildToolsVersion '26.0.2' | ||
|
||
defaultConfig { | ||
applicationId "com.gxf.liveplay" | ||
minSdkVersion 17 | ||
targetSdkVersion 22 | ||
versionCode 9 | ||
versionName "1.9" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
lintOptions { | ||
checkReleaseBuilds false | ||
// Or, if you prefer, you can continue to checkforerrorsinrelease builds, | ||
// but continue the build even whenerrorsarefound: | ||
abortOnError false | ||
} | ||
sourceSets { | ||
main { | ||
jniLibs.srcDir 'libs' | ||
} | ||
|
||
// Move the tests to tests/java, tests/res, etc... | ||
instrumentTest.setRoot('tests') | ||
|
||
// Move the build types to build-types/<type> | ||
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... | ||
// This moves them out of them default location under src/<type>/... which would | ||
// conflict with src/ being used by the main source set. | ||
// Adding new build types or product flavors should be accompanied | ||
// by a similar customization. | ||
debug.setRoot('build-types/debug') | ||
release.setRoot('build-types/release') | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
compile project(':Ijkplayer') | ||
|
||
compile 'com.android.support:appcompat-v7:23.4.0' | ||
compile 'com.android.support:design:23.1.1' | ||
compile 'com.android.support:cardview-v7:23.1.1' | ||
compile 'com.alibaba:fastjson:1.1.62.android' | ||
compile 'com.squareup.okhttp3:okhttp:3.8.1' | ||
compile 'com.android.support.constraint:constraint-layout:1.0.2' | ||
testCompile 'junit:junit:4.12' | ||
} |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in D:\Studio SDK/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in D:\Studio SDK/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
# Add any project specific keep options here: | ||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} |
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 |
---|---|---|
@@ -1,55 +1,55 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.gxf.liveplay"> | ||
|
||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
|
||
<!-- To auto-complete the email text field in the login form with the user's emails --> | ||
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | ||
<uses-permission android:name="android.permission.READ_PROFILE" /> | ||
<uses-permission android:name="android.permission.READ_CONTACTS" /> | ||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 如果需要精确定位的话请加上此权限 --> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".LiveActivityRel" /> | ||
<activity android:name=".LoginActivity" /> | ||
<!-- 开机广播接受者 --> | ||
<receiver android:name=".BootBroadcastReceiver"> | ||
<intent-filter> | ||
|
||
<!-- 注册开机广播地址 --> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</receiver> | ||
|
||
<activity | ||
android:name=".ServiceSettings" | ||
android:label="@string/title_activity_service_settings" | ||
android:theme="@style/AppTheme.NoActionBar"></activity> | ||
</application> | ||
|
||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.gxf.liveplay"> | ||
|
||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
|
||
<!-- To auto-complete the email text field in the login form with the user's emails --> | ||
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | ||
<uses-permission android:name="android.permission.READ_PROFILE" /> | ||
<uses-permission android:name="android.permission.READ_CONTACTS" /> | ||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 如果需要精确定位的话请加上此权限 --> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".LiveActivityRel" /> | ||
<activity android:name=".LoginActivity" /> | ||
<!-- 开机广播接受者 --> | ||
<receiver android:name=".BootBroadcastReceiver"> | ||
<intent-filter> | ||
|
||
<!-- 注册开机广播地址 --> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</receiver> | ||
|
||
<activity | ||
android:name=".ServiceSettings" | ||
android:label="@string/title_activity_service_settings" | ||
android:theme="@style/AppTheme.NoActionBar"></activity> | ||
</application> | ||
|
||
</manifest> |
46 changes: 23 additions & 23 deletions
46
TvPlayer/src/main/java/com/gxf/liveplay/BootBroadcastReceiver.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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
package com.gxf.liveplay; | ||
|
||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.util.Log; | ||
|
||
/** | ||
* @Description 功能描述: 该类用来实现该app开机自动运行 | ||
*/ | ||
public class BootBroadcastReceiver extends BroadcastReceiver { | ||
|
||
@Override | ||
public void onReceive(Context context, Intent intent) { | ||
|
||
Log.d("XRGPS", "BootReceiver.onReceive: " + intent.getAction()); | ||
//MainActivity就是开机显示的界面 | ||
Intent mBootIntent = new Intent(context, MainActivity.class); | ||
//下面这句话必须加上才能开机自动运行app的界面 | ||
mBootIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | ||
context.startActivity(mBootIntent); | ||
} | ||
package com.gxf.liveplay; | ||
|
||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.util.Log; | ||
|
||
/** | ||
* @Description 功能描述: 该类用来实现该app开机自动运行 | ||
*/ | ||
public class BootBroadcastReceiver extends BroadcastReceiver { | ||
|
||
@Override | ||
public void onReceive(Context context, Intent intent) { | ||
|
||
Log.d("XRGPS", "BootReceiver.onReceive: " + intent.getAction()); | ||
//MainActivity就是开机显示的界面 | ||
Intent mBootIntent = new Intent(context, MainActivity.class); | ||
//下面这句话必须加上才能开机自动运行app的界面 | ||
mBootIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | ||
context.startActivity(mBootIntent); | ||
} | ||
} |
Oops, something went wrong.