Skip to content

Commit

Permalink
v1.0.24
Browse files Browse the repository at this point in the history
  • Loading branch information
wseemannroku committed Feb 27, 2022
1 parent 2ba743c commit a648a0a
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 27 deletions.
12 changes: 7 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'

android {
signingConfigs {
Expand All @@ -16,8 +17,8 @@ android {
applicationId "wseemann.media.romote"
minSdkVersion 21
targetSdkVersion 31
versionCode 23
versionName "1.0.23"
versionCode 24
versionName "1.0.24"
}
buildTypes {
getByName("release") {
Expand All @@ -37,10 +38,11 @@ android {

dependencies {
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'org.jdom:jdom2:2.0.6'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
Expand Down
Binary file removed app/release/RoMote-1.0.23.apk
Binary file not shown.
Binary file added app/release/RoMote-1.0.24.apk
Binary file not shown.
10 changes: 9 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden"/>

<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="@style/AppTheme"/>

<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:theme="@style/AppTheme"/>

<receiver android:name="wseemann.media.romote.widget.RokuAppWidgetProvider"
android:label="@string/title_romote_widget"
android:exported="true">
Expand All @@ -117,4 +125,4 @@

</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.util.Log;
Expand All @@ -13,6 +12,7 @@

import androidx.appcompat.widget.Toolbar;

import com.google.android.gms.oss.licenses.OssLicensesMenuActivity;
import com.jaku.core.JakuRequest;
import com.jaku.core.KeypressKeyValues;
import com.jaku.request.KeypressRequest;
Expand Down Expand Up @@ -60,23 +60,24 @@ public void onClick(View v) {
}

findPreference("find_remote").setOnPreferenceClickListener(
new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
performKeypress(KeypressKeyValues.FIND_REMOTE);
return true;
}
preference -> {
performKeypress(KeypressKeyValues.FIND_REMOTE);
return true;
});

findPreference("open_source_licenses").setOnPreferenceClickListener(
preference -> {
// When the user selects an option to see the licenses:
startActivity(new Intent(SettingsActivity.this, OssLicensesMenuActivity.class));
return true;
});

findPreference("donate").setOnPreferenceClickListener(
new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(Constants.PAYPAL_DONATION_LINK));
startActivity(intent);
return true;
}
preference -> {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(Constants.PAYPAL_DONATION_LINK));
startActivity(intent);
return true;
});
}

Expand Down Expand Up @@ -104,7 +105,7 @@ private boolean deviceSupportsFindRemote() {
Device device = PreferenceUtils.getConnectedDevice(this);

if (device.getSupportsFindRemote() != null) {
return Boolean.valueOf(device.getSupportsFindRemote());
return Boolean.parseBoolean(device.getSupportsFindRemote());
}
} catch(Exception ex) {
ex.printStackTrace();
Expand Down Expand Up @@ -144,4 +145,4 @@ public void onCreate(Bundle savedInstanceState) {
addPreferencesFromResource(R.xml.preferences);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static Notification buildNotification(
context,
((int) System.currentTimeMillis()),
new Intent(context,MainActivity.class),
PendingIntent.FLAG_UPDATE_CURRENT
PendingIntent.FLAG_IMMUTABLE
);

Notification.MediaStyle style = new Notification.MediaStyle();
Expand Down Expand Up @@ -82,7 +82,7 @@ public static Notification buildNotification(
private static Notification.Action GenerateActionCompat(Context context, int icon, String title, int requestCode, KeypressKeyValues keypressKeyValue) {
Intent intent = new Intent(context, CommandService.class);
intent.putExtra("keypress", keypressKeyValue);
PendingIntent pendingIntent = PendingIntent.getService(context, requestCode, intent, 0);
PendingIntent pendingIntent = PendingIntent.getService(context, requestCode, intent, PendingIntent.FLAG_IMMUTABLE);

return new Notification.Action.Builder(icon, title, pendingIntent).build();
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
<string name="find_remote_title_preference"> Find Remote</string>
<string name="find_remote_summary_preference">Locate a missing remote</string>

<string name="open_source_licenses_title_preference">Open Source Licenses</string>

<string name="donate_title_preference"> Donate</string>
<string name="donate_summary_preference">Support RoMote development</string>

Expand Down
7 changes: 6 additions & 1 deletion app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
android:summary="@string/find_remote_summary_preference">
</Preference>

<Preference
android:key="open_source_licenses"
android:title="@string/open_source_licenses_title_preference">
</Preference>

<Preference
android:key="donate"
android:title="@string/donate_title_preference"
Expand All @@ -36,4 +41,4 @@

</PreferenceCategory>

</PreferenceScreen>
</PreferenceScreen>
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.41'
ext.kotlin_version = '1.6.10'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit a648a0a

Please sign in to comment.