Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 22 additions & 101 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,101 +1,22 @@
# cdr9020_qtr
<!--
[CDR9020_QTR_v1.0.0]
1.Rear Camera、External Camera同時錄影並儲存至外接SD Card
2.Speaker播音樂(與錄影功能同時撥放)
3.可讀取VideoRecordConfig.ini 設定測試時間(每一單位10分鐘)
4.可寫入VideoRecordLog.ini 記錄Log資訊及影片測試結果
5.可設定影像尺寸 1080p or 720p(鏡頭解析度最高為720p)
6.可設定影像FPS 27.5 or 16 // 可設定之FPS為27.5, 24, 20, 16, 12
7.SD Card空間小於3.5G自動移除影片
8.VideoRecordConfig.ini 解析失敗或檔案不存在時重置檔案
9.VideoRecordLog.ini 不存在時重置檔案
[v1.1.0]
1.add setProp, getProp.
2.move function to Utils.class.
[v1.1.1]
1.fix some error.
2.add auto change camera device with config.ini.
[v1.2.0]
1.optimize user experience on takerecord function.
2.fix reset framerate change error.
3.add framerate switch options.
4.the framerate switch will update on camera preview.
5.show loadingView on framerate switch.
[v1.2.1]
1.fix deletefile and checkfile error.
[v1.2.2]
1.disable setprop function for the default devices.
[v1.2.3]
1.fix the problem with takeRecord change CameraDevice will crash error.
*you can change CameraDevice on application running.
[v1.3.0]
1.add Setting Dialog, Log Dialog.
2.add setprop item in Config.ini. (if you used the new-9020 system.img)
3.fix error.
*you can change CameraDevice and Review log with DialogView.
[v1.3.1]
1.optimizing The UX/UI.
2.add libs/debug.keystore.
[v1.3.2]
1.fix dialog can not dismiss problem.
2.fix record can used dialog change camera problem.
[v1.3.3]
1.update default config file, total_test_minute = 999.
2.fix error.
[v1.3.4]
1.update default config file, app version at config file.
2.fix error with setUpMediaRecorder 1080p.
3.edit log layout to show complete message.
[v1.3.5]
1.fix manually stop record crash bug.
2.unblock setProp, inner and external option.
3.Update Config message.
4.fix inner and external will crash error, application is not closed.
5.fix cancel and restart will crash error, application is not closed.
[v1.4.0]
1.add Battery Listener.
2.add Reset Activity.
3.application will reset on camera error.
3.show battery in Log message.
[v1.4.1]
1.show reset in Log message.
2.fix no SD card crash, camera not access crash, config not match crash.
3.auto select the last line of log message.
[v1.5.0]
1.add record timer, record status.
2.unblock playMusic, LogList, LogDialog.
3.record Time from 10min change to 1min.
4.save log & config on /storage/emulated/0/DCIM/
5.copy log to sd card when record finish or stop.
6.videoBitRate is 20Mbps.
[v1.6.0]
1.SystemProperties default is 1.
2.videoBitRate is 10Mbps.
3.saveLog is running in the background.
4.Create singleRecording Handler.
5.fix mediaRecorder no release error.
6.disable mHomeBtnReceiver, BroadcastReceiver
7.fix click cancel button doesn't save @cancel in log message error.
8.test the record on 30min will restartActivity function.
[v1.7.0]
1.Enable mHomeBtnReceiver.
2.videoBitRate is 6Mbps.
3.fix System properties can't be resolved error.
[v1.7.1]
1.fix stopRecord bug.
[v1.7.2]
1.fix Camera Access error function was not reset problem.
2.fix application has stopped problem.
3.try to restart application when (startRecord, stopRecord, MediaRecorder, setCaptureRequest, takePreview) error.
[v1.7.3]
1.fix saveLogService, copyFileService, checkSdCardService shutdown error.
2.fix stopRecord time out error.
3.try to restart application when (CameraDevice.StateCallback) error.
4.find getFrameRate 0 error on delete file time out.
5.fix reset camera not recording error.
6.fix run number not continue error.
7.add checkSdCard background service.
[v1.7.5]
1.fix apk restart for bt connect/disconnect.
-->
BurnInTest_QTR
=================
This sample is Camera2 recording and wifi,bt test:

* [Camera2](https://developer.android.com/reference/android/hardware/camera2/package-summary.html)
* [Fragment](https://developer.android.com/reference/android/app/Fragment.html)
* [RestartApp](https://qiita.com/Shiozawa/items/85f078ed57aed46f6b69.html)

Libraries Used
--------------
* [Foundation][0] - Components for core system capabilities, Kotlin extensions and support for
multidex and automated testing.
* [AppCompat][1] - Degrade gracefully on older versions of Android.
* [UI][2] - Details on why and how to use UI Components in your apps - together or separate
* [Fragment][3] - A basic unit of composable UI.
* [Layout][4] - Lay out widgets using different algorithms.

[0]: https://developer.android.com/jetpack/components
[1]: https://developer.android.com/topic/libraries/support-library/packages#v7-appcompat
[2]: https://developer.android.com/guide/topics/ui
[3]: https://developer.android.com/guide/components/fragments
[4]: https://developer.android.com/guide/topics/ui/declaring-layout
25 changes: 14 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ android {
keyPassword 'android'
}
}
compileSdkVersion 28
compileSdkVersion 30
defaultConfig {
applicationId "com.askey.record"
minSdkVersion 27
applicationId "com.d160.bit"
minSdkVersion 23
//noinspection OldTargetApi
targetSdkVersion 27
versionCode 2
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
signingConfig signingConfigs.debug
}
buildTypes {
Expand All @@ -26,6 +26,8 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '28.0.3'
Expand All @@ -43,14 +45,15 @@ dependencies {
compileOnly files('libs/layoutlib.jar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleDependency,GradleCompatible
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//noinspection GradleDependency,GradleCompatible
implementation 'com.android.support.constraint:constraint-layout-solver:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout-solver:1.1.3'
//noinspection GradleDependency,GradleCompatible
implementation 'com.android.support:design:27.1.0'
implementation 'com.google.android.material:material:1.0.0'
//noinspection GradleDependency,GradleCompatible
implementation 'com.android.support:support-v4:27.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
//noinspection GradleDependency,GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
//noinspection GradleDependency
testImplementation 'junit:junit:4.13-rc-1'
}
25 changes: 13 additions & 12 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.askey.record"
package="com.d160.bit"
android:sharedUserId="android.uid.system"
tools:ignore="ProtectedPermissions">


<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />

<application
android:allowBackup="true"
android:exported="true"
android:icon="@android:drawable/ic_menu_camera"
android:icon="@drawable/ic_video"
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
<activity
android:name=".VideoRecordActivity"
android:screenOrientation="sensorLandscape"
android:name=".CameraActivity"
android:configChanges="orientation|keyboardHidden|screenSize|keyboard"
android:screenOrientation="sensorLandscape"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -36,14 +40,11 @@
</activity>

<activity
android:name=".restartActivity"
android:name=".RestartActivity"
android:excludeFromRecents="true"
android:exported="false"
android:launchMode="singleInstance"
android:process=":restart_process"
android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
<service android:name=".copyFileService"/>
<service android:name=".saveLogService"/>
<service android:name=".checkSdCardService"/>
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
</application>
</manifest>
53 changes: 0 additions & 53 deletions app/src/main/java/com/askey/record/Configini.java

This file was deleted.

Loading