Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature swap file #42

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
137 changes: 134 additions & 3 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,135 @@
/build
/release
# Fabric plugin

# Created by https://www.gitignore.io/api/androidstudio
# Edit at https://www.gitignore.io/?templates=androidstudio

### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.

# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle
.gradle/
build/

# Signing files
.signing/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
captures/
.navigation/
*.ipr
*~
*.swp

# Android Patch
gen-external-apklibs

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# NDK
obj/

# IntelliJ IDEA
*.iml
*.iws
/out/

# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/assetWizardSettings.xml

# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar

# End of https://www.gitignore.io/api/androidstudio
16 changes: 15 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'

repositories {
maven { url 'https://maven.fabric.io/public' }
}

apply plugin: 'io.fabric'

android {
Expand Down Expand Up @@ -72,7 +86,7 @@ dependencies {
})

// tracking
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
implementation('com.crashlytics.sdk.android:crashlytics:2.9.8@aar') {
transitive = true
}
}
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<meta-data
android:name="io.fabric.ApiKey"
android:value="c93ec26e30f5cde18b8277039df85d8ce712685e" />
<activity
android:name=".activities.MainActivity"
android:label="@string/app_name">
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/by/naxa/soundrecorder/DBHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public long addRecording(String recordingName, String filePath, long length) {
return rowId;
}

public void renameItem(RecordingItem item, String recordingName, String filePath) {
public void renameItem(RecordingItem item, String recordingName, String filePath,int position) {
SQLiteDatabase db = getWritableDatabase();
ContentValues cv = new ContentValues();
cv.put(DBHelperItem.COLUMN_NAME_RECORDING_NAME, recordingName);
Expand All @@ -124,7 +124,7 @@ public void renameItem(RecordingItem item, String recordingName, String filePath
DBHelperItem._ID + "=" + item.getId(), null);

if (mOnDatabaseChangedListener != null) {
mOnDatabaseChangedListener.onDatabaseEntryRenamed();
mOnDatabaseChangedListener.onDatabaseEntryRenamed(position);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void onCreate() {
.kits(new Crashlytics.Builder().core(core).build())
.debuggable(true)
.build();
Fabric.with(fabric);
Fabric.with(this, new Crashlytics());
}

}
Loading