Skip to content

Commit

Permalink
Overhaul of app.
Browse files Browse the repository at this point in the history
- Add frame rate dimmer
- Material You
- Bugfix in setup
- Fix issue #20
- Fix issue #24
  • Loading branch information
developerfromjokela committed Jun 5, 2023
1 parent eca6f0b commit ea10b23
Show file tree
Hide file tree
Showing 50 changed files with 414 additions and 197 deletions.
5 changes: 2 additions & 3 deletions .idea/gradle.xml

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

2 changes: 1 addition & 1 deletion .idea/misc.xml

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

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

45 changes: 25 additions & 20 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@
* Licensed with MIT
*/

apply plugin: 'com.android.application'
plugins {
// Or "com.android.library"
id("com.android.application")
}

def versionMajor = 1
def versionMinor = 0
def versionPatch = 1
def versionBuild = 98 // 0-50=Alpha / 51-98=RC / 90-99=stable
def versionMinor = 1
def versionPatch = 0
def versionBuild = 54 // 0-50=Alpha / 51-98=RC / 90-99=stable
android {
compileSdkVersion 30
compileSdkVersion 33
defaultConfig {
applicationId "com.developerfromjokela.motioneyeclient"
minSdkVersion 15
targetSdkVersion 30
targetSdkVersion 33
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
versionCode versionMajor * 10000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild

if (versionBuild > 89) {
Expand All @@ -42,25 +46,26 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.7.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.7.2'
implementation 'com.squareup.okhttp3:okhttp:4.8.1'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.5.0'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
implementation 'org.jsoup:jsoup:1.15.3'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.preference:preference:1.2.0'
implementation 'com.github.MikeOrtiz:TouchImageView:1.4.1'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.multidex:multidex:2.0.1'
//implementation 'com.github.niqdev:mjpeg-view:1.6.0'
}
7 changes: 7 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
android:name=".MotionEyeClient"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
Expand All @@ -31,26 +32,32 @@
<activity
android:name=".ui.activities.MovieView"
android:label="@string/title_activity_movie_view"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ui.activities.DeviceSettings"
android:label="@string/title_activity_device_settings"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ui.activities.FullCameraViewer"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/AppTheme.NoActionBar"
android:exported="false"
android:label="@string/title_activity_full_camera_viewer" />
<activity
android:name=".ui.activities.CameraViewer"
android:label="@string/title_activity_camera_viewer"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ui.setup.activities.SetupStartScreen"
android:label="@string/title_activity_setup_start_screen"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ui.activities.MainActivity"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.developerfromjokela.motioneyeclient;

import android.app.Application;

import com.google.android.material.color.DynamicColors;

public class MotionEyeClient extends Application {

@Override
public void onCreate() {
super.onCreate();
DynamicColors.applyToActivitiesIfAvailable(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public interface ApiInterface {

@FormUrlEncoded
@POST()
Call<okhttp3.ResponseBody> login(@Url String url, @Field("username") String username, @Field("password") String password, @Field("login") String login);
Call<okhttp3.ResponseBody> login(@Url String url, @Field("username") String username, @Field("password") String password);

@POST()
Call<okhttp3.ResponseBody> changeMainConfig(@Url String url, @Body RequestBody body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class CameraImageFrame {
private CameraImageError error = null;
private List<Long> times = new ArrayList<>();

private long refreshDivider = 0;


public CameraImageFrame(Camera camera, Device device, Bitmap bitmap, boolean initialLoadDone) {
this.camera = camera;
Expand All @@ -40,6 +42,14 @@ public CameraImageError getError() {
return error;
}

public long getRefreshDivider() {
return refreshDivider;
}

public void setRefreshDivider(long refreshDivider) {
this.refreshDivider = refreshDivider;
}

public void setError(CameraImageError error) {
this.error = error;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
import android.util.TypedValue;
import android.view.View;

import org.jsoup.helper.StringUtil;

import static android.app.DownloadManager.Request.NETWORK_MOBILE;
import static android.app.DownloadManager.Request.NETWORK_WIFI;

import org.jsoup.internal.StringUtil;

public class Utils {

public static final boolean DEBUG = true;
public static int imageRefreshInterval = 15;
public static int framerateFactor = 1;
public static double framerateFactor = 1;
public static int fpsLen = 4;
public static class GridSpacingItemDecoration extends RecyclerView.ItemDecoration {

Expand Down
Loading

0 comments on commit ea10b23

Please sign in to comment.