Skip to content

Commit

Permalink
init commit2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryz committed Dec 3, 2019
1 parent 572e5e1 commit 4da6aec
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 19 deletions.
14 changes: 13 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,36 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 28


defaultConfig {
applicationId "com.zjr.recorder"
applicationId "com.zjr.app"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation project(path: ':lib_recorder')

}
10 changes: 2 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zjr.recorder">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
package="com.zjr.app">

<application
android:allowBackup="true"
Expand All @@ -14,8 +9,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".RecordActivity"
android:windowSoftInputMode="stateHidden">
<activity android:name=".RecordActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/zjr/app/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.zjr.app;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.zjr.recorder;
package com.zjr.app;

import android.app.Activity;
import android.content.pm.PackageManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.zjr.recorder;
package com.zjr.app;

import android.Manifest;
import android.os.Bundle;
Expand All @@ -9,6 +9,8 @@
import android.widget.Spinner;
import android.widget.TextView;

import com.zjr.recorder.FileFormat;
import com.zjr.recorder.Recorder;
import com.zjr.recorder.audiotrack.AudioTrackManager;
import com.zjr.recorder.listener.OnRecordListener;
import com.zjr.recorder.listener.OnVolumeListener;
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">recorder</string>
<string name="app_name">audiorecorder</string>
</resources>
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ buildscript {
jcenter()

}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'

classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 2 additions & 0 deletions lib_recorder/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.jeryz'

android {
compileSdkVersion 28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public void start() {
startRecordThread();
} else {
Log.e(TAG, "state uninitialized");
setState(OnRecordListener.STATE_ERROR, "uninitialized");
}

String c = channelConfig == AudioFormat.CHANNEL_IN_STEREO ? "stereo" : "mono";
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app', ':lib_recorder'
include ':lib_recorder', ':app'

0 comments on commit 4da6aec

Please sign in to comment.