Skip to content

Commit

Permalink
Support for Sony Alpha 7 III (ILCE-7M3)
Browse files Browse the repository at this point in the history
- added automatic detection of camera and API urls
- add device name to connection screen
- added dependency injection with Dagger
- refactored connection state machine
- refactored SimpleStreamSurfaceView
- refactored AdjustmentsFragment
- removed Volley
- added Glide for image loading
- converted project to Kotlin
- migrate to AndroidX

fixes #1
  • Loading branch information
hameno committed Oct 21, 2018
1 parent 0f3e8f0 commit 6a1fd21
Show file tree
Hide file tree
Showing 96 changed files with 5,609 additions and 5,497 deletions.
70 changes: 51 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,74 @@
# built application files
### Android template
# Built application files
*.apk
*.ap_
app/release

# files for the dex VM
# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# generated files
# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

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

# Eclipse project files
#.classpath
#.project

# Proguard folder generated by Eclipse
proguard/

# Intellij/Android Studio project files
# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
*.ipr
*.iws
.idea/
.gradle
.idea/caches
.idea/libraries
.idea/dictionaries
.idea/compiler.xml
.idea/encodings.xml
.idea/gradle.xml
.idea/misc.xml
.idea/modules.xml
.idea/runConfigurations.xml
.idea/vcs.xml
.idea/workspace.xml

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

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

# Google Services (e.g. APIs or Firebase)
google-services.json

# Exclude OS X folder attributes
.DS_Store
# Freeline
freeline.py
freeline/
freeline_project_description.json

# Exclude Dist Keys
*.key
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

#NDK
obj/
### Project
docs/*.pdf
docs/CameraRemoteAPIbeta_SDK_2.40
29 changes: 29 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,357 changes: 1,357 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
85 changes: 73 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,91 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion projectCompileSdkVersion
buildToolsVersion projectBuildToolsVersion

defaultConfig {
applicationId "com.thibaudperso.sonycamera"
minSdkVersion 16
targetSdkVersion 27
minSdkVersion projectMinSdkVersion
targetSdkVersion projectTargetSdkVersion

multiDexEnabled true

versionCode 40
versionName "4.0.0"

vectorDrawables.useSupportLibrary = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
testOptions {
unitTests {
includeAndroidResources = true
all { ignoreFailures = true }
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
}
}
}
useLibrary 'org.apache.http.legacy'

}

dependencies {
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:design:27.0.2'
testImplementation "junit:junit:$junitVersion"
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation "org.assertj:assertj-core:$assertjVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"

// Android Support
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation "com.google.android.material:material:$appCompatVersion"
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation "androidx.core:core-ktx:$coreKtxVersion"
implementation "androidx.fragment:fragment-ktx:$coreKtxVersion"

// Dagger
implementation "com.google.dagger:dagger-android:$daggerVersion"
implementation "com.google.dagger:dagger-android-support:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
implementation "com.github.bumptech.glide:glide:$glideVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"

// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"

// Logging
implementation "de.psdev.slf4j-android-logger:slf4j-android-logger:$slf4jAndroidLoggerVersion"
implementation "io.github.microutils:kotlin-logging:$kotlinLoggingVersion"

// Moshi
implementation "com.squareup.moshi:moshi:$moshiVersion"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion"

// OkHttp
implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttpVersion"
implementation "com.squareup.okio:okio:$okioVersion"

// Retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-moshi:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"

// RxJava
implementation "io.reactivex.rxjava2:rxjava:$rxjavaVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxandroidVersion"
implementation "io.reactivex.rxjava2:rxkotlin:$rxkotlinVersion"
implementation "com.jakewharton.rx2:replaying-share-kotlin:$rxreplayingshareVersion"

// SSDP Client
implementation "io.resourcepool:ssdp-client:$ssdpclientVersion"
}
42 changes: 0 additions & 42 deletions app/google-services.json

This file was deleted.

6 changes: 6 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

-keepclassmembernames class kotlinx.** {
volatile <fields>;
}
61 changes: 24 additions & 37 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,74 +1,61 @@
<?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.thibaudperso.sonycamera"
android:versionCode="22"
android:versionName="3.0.5">
package="com.thibaudperso.sonycamera">

<uses-sdk tools:overrideLibrary=" com.google.android.gms.ads,
com.google.android.gms.ads.impl,
com.google.android.gms.clearcut,
com.google.android.gms.base,
com.google.android.gms.gass,
com.google.android.gms.safetynet,
com.google.android.gms.tasks,
com.google.android.gms"/>

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.NFC"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
android:name=".timelapse.TimelapseApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:fullBackupContent="@xml/backup_descriptor">
<activity
android:name=".timelapse.ui.connection.ConnectionActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="github.com"
android:pathPrefix="/ThibaudM/timelapse-sony"
android:scheme="https"/>
android:scheme="https" />
</intent-filter>
</activity>

<activity android:name=".timelapse.ui.settings.SettingsActivity"/>
<activity android:name=".timelapse.ui.adjustments.AdjustmentsActivity"/>
<activity android:name=".timelapse.ui.settings.SettingsActivity" />
<activity android:name=".timelapse.ui.adjustments.AdjustmentsActivity" />
<activity
android:name=".timelapse.ui.processing.ProcessingActivity"
android:launchMode="singleInstance"/>
android:launchMode="singleInstance" />

<service
android:name=".timelapse.service.IntervalometerService"
android:exported="false"/>
android:exported="false" />

<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="com.thibaudperso.sonycamera.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
>
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"/>
android:resource="@xml/file_paths" />
</provider>

</application>
Expand Down
Loading

0 comments on commit 6a1fd21

Please sign in to comment.