diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
deleted file mode 100644
index d7d8aac..0000000
--- a/.idea/assetWizardSettings.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
deleted file mode 100644
index d9ee0bf..0000000
Binary files a/.idea/caches/build_file_checksums.ser and /dev/null differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index 30aa626..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 99202cc..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 3d8ecea..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index 8970495..c1665d2 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,7 @@ Features
- Customizable primary and accent colors
- Supports ARM and x86 devices
- Supports SDK 21+ (Lollipop 5.0)
+- Intentservice to start tasks via third party apps!
TODO
------------
@@ -46,6 +47,21 @@ Grab the [latest version](https://github.com/kaczmarkiewiczp/rcloneExplorer/rele
- For x86 devices download RcloneExplorer-x86.apk
- Ultimately, RcloneExplorer.apk will work with both ARM and x86 devices.
+
+
+Intentservice
+-------------
+This app includes the ability to launch an intent! Create a task to sync to a remote, and copy it's id (via the treedot-menu)
+The intent needs the following:
+
+| Intent | Content | |
+| :------------- | :-------------: | -------------: |
+| packageName | ca.pkay.rcloneexplorer | |
+| className | ca.pkay.rcloneexplorer.Services.TaskStartService | |
+| Action | START_TASK | |
+| Integer Extra | task | idOfTask |
+
+
Credits/Libraries
-----------------
- [Android Support Libraries](https://developer.android.com/topic/libraries/support-library)
diff --git a/app/src/main/java/ca/pkay/rcloneexplorer/MainActivity.java b/app/src/main/java/ca/pkay/rcloneexplorer/MainActivity.java
index c2a48b1..b140cd4 100644
--- a/app/src/main/java/ca/pkay/rcloneexplorer/MainActivity.java
+++ b/app/src/main/java/ca/pkay/rcloneexplorer/MainActivity.java
@@ -4,6 +4,7 @@
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityManager;
+import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@@ -36,8 +37,6 @@
import android.view.View;
import android.widget.Toast;
-import com.crashlytics.android.Crashlytics;
-import com.google.firebase.messaging.FirebaseMessaging;
import java.io.File;
import java.io.IOException;
@@ -53,7 +52,6 @@
import ca.pkay.rcloneexplorer.Items.RemoteItem;
import ca.pkay.rcloneexplorer.Settings.SettingsActivity;
import es.dmoral.toasty.Toasty;
-import io.fabric.sdk.android.Fabric;
public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener,
@@ -97,7 +95,6 @@ protected void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
boolean enableCrashReports = sharedPreferences.getBoolean(getString(R.string.pref_key_crash_reports), false);
if (enableCrashReports) {
- Fabric.with(this, new Crashlytics());
}
applyTheme();
@@ -130,7 +127,6 @@ public void onClick(View v) {
boolean appUpdates = sharedPreferences.getBoolean(getString(R.string.pref_key_app_updates), false);
if (appUpdates) {
- FirebaseMessaging.getInstance().subscribeToTopic(getString(R.string.firebase_msg_app_updates_topic));
}
Intent intent = getIntent();
diff --git a/app/src/main/java/ca/pkay/rcloneexplorer/Services/FirebaseIdService.java b/app/src/main/java/ca/pkay/rcloneexplorer/Services/FirebaseIdService.java
index be81be7..55e5342 100644
--- a/app/src/main/java/ca/pkay/rcloneexplorer/Services/FirebaseIdService.java
+++ b/app/src/main/java/ca/pkay/rcloneexplorer/Services/FirebaseIdService.java
@@ -1,6 +1,5 @@
package ca.pkay.rcloneexplorer.Services;
-import com.google.firebase.iid.FirebaseInstanceIdService;
-public class FirebaseIdService extends FirebaseInstanceIdService {
+public class FirebaseIdService {
}
diff --git a/app/src/main/java/ca/pkay/rcloneexplorer/Services/FirebaseMessagingService.java b/app/src/main/java/ca/pkay/rcloneexplorer/Services/FirebaseMessagingService.java
index 58eb144..638ad8e 100644
--- a/app/src/main/java/ca/pkay/rcloneexplorer/Services/FirebaseMessagingService.java
+++ b/app/src/main/java/ca/pkay/rcloneexplorer/Services/FirebaseMessagingService.java
@@ -10,34 +10,15 @@
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
-import com.google.firebase.messaging.RemoteMessage;
import ca.pkay.rcloneexplorer.R;
-public class FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService {
+public class FirebaseMessagingService {
private final String CHANNEL_ID = "ca.pkay.rcexplorer.app_updates";
private final String CHANNEL_NAME = "App updates";
- @Override
- public void onMessageReceived(RemoteMessage remoteMessage) {
- super.onMessageReceived(remoteMessage);
- setNotificationChannel();
- Uri uri = Uri.parse(getString(R.string.app_latest_release_url));
- Intent intent = new Intent(Intent.ACTION_VIEW, uri);
- PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
-
- NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
- .setSmallIcon(R.drawable.ic_notification)
- .setContentTitle(getString(R.string.app_update_notification_title))
- .setPriority(NotificationCompat.PRIORITY_LOW)
- .setContentIntent(pendingIntent)
- .setAutoCancel(true);
-
- NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
- notificationManager.notify(33, builder.build());
- }
private void setNotificationChannel() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@@ -46,10 +27,7 @@ private void setNotificationChannel() {
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_LOW);
channel.setDescription("App updates notification");
// Register the channel with the system
- NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
- if (notificationManager != null) {
- notificationManager.createNotificationChannel(channel);
- }
+
}
}
}
diff --git a/app/src/main/java/ca/pkay/rcloneexplorer/Settings/NotificationsSettingsFragment.java b/app/src/main/java/ca/pkay/rcloneexplorer/Settings/NotificationsSettingsFragment.java
index 09ef9d8..5f1d201 100644
--- a/app/src/main/java/ca/pkay/rcloneexplorer/Settings/NotificationsSettingsFragment.java
+++ b/app/src/main/java/ca/pkay/rcloneexplorer/Settings/NotificationsSettingsFragment.java
@@ -15,7 +15,6 @@
import android.widget.Switch;
import android.widget.Toast;
-import com.google.firebase.messaging.FirebaseMessaging;
import ca.pkay.rcloneexplorer.R;
import es.dmoral.toasty.Toasty;
@@ -151,10 +150,8 @@ private void onNotificationsClicked() {
private void onAppUpdatesClicked(boolean isChecked) {
if (isChecked) {
- FirebaseMessaging.getInstance().subscribeToTopic(getString(R.string.firebase_msg_app_updates_topic));
betaAppUpdatesElement.setVisibility(View.VISIBLE);
} else {
- FirebaseMessaging.getInstance().unsubscribeFromTopic(getString(R.string.firebase_msg_app_updates_topic));
betaAppUpdatesSwitch.setChecked(false);
betaAppUpdatesElement.setVisibility(View.GONE);
}
@@ -166,11 +163,6 @@ private void onAppUpdatesClicked(boolean isChecked) {
}
private void onBetaAppUpdatesClicked(boolean isChecked) {
- if (isChecked) {
- FirebaseMessaging.getInstance().subscribeToTopic(getString(R.string.firebase_msg_beta_app_updates_topic));
- } else {
- FirebaseMessaging.getInstance().unsubscribeFromTopic(getString(R.string.firebase_msg_beta_app_updates_topic));
- }
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = sharedPreferences.edit();
diff --git a/build.gradle b/build.gradle
index c446050..ffa38c8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,8 +10,6 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
- classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
- classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong