Skip to content

Commit

Permalink
Android: Move source files from "notification" to root of src/android
Browse files Browse the repository at this point in the history
Most java files were stored in the subfolder "notification". It's clearer, when they are in the root of src/android
  • Loading branch information
GitToTheHub committed Dec 23, 2024
1 parent 6a9a27f commit 1dfd1da
Show file tree
Hide file tree
Showing 19 changed files with 102 additions and 102 deletions.
72 changes: 36 additions & 36 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
android:grantUriPermissions="true": Grant temporary access to files
-->
<provider
android:name="de.appplant.cordova.plugin.localnotification.notification.util.PluginFileProvider"
android:name="de.appplant.cordova.plugin.localnotification.util.PluginFileProvider"
android:authorities="${applicationId}.localnotifications.provider"
android:exported="false"
android:grantUriPermissions="true">
Expand All @@ -123,16 +123,16 @@

<!-- A notification will be triggered/shown -->
<receiver
android:name="de.appplant.cordova.plugin.localnotification.notification.receiver.TriggerReceiver"
android:name="de.appplant.cordova.plugin.localnotification.receiver.TriggerReceiver"
android:exported="false" />

<!-- Notification cleared by the user -->
<receiver
android:name="de.appplant.cordova.plugin.localnotification.notification.receiver.ClearReceiver"
android:name="de.appplant.cordova.plugin.localnotification.receiver.ClearReceiver"
android:exported="false" />

<receiver
android:name="de.appplant.cordova.plugin.localnotification.notification.receiver.RestoreReceiver"
android:name="de.appplant.cordova.plugin.localnotification.receiver.RestoreReceiver"
android:exported="false" >
<intent-filter>
<!--
Expand Down Expand Up @@ -187,68 +187,68 @@
target-dir="src/de/appplant/cordova/plugin/localnotification" />

<source-file
src="src/android/notification/receiver/ClearReceiver.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/receiver" />
src="src/android/receiver/ClearReceiver.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/receiver" />

<source-file
src="src/android/notification/receiver/RestoreReceiver.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/receiver" />
src="src/android/receiver/RestoreReceiver.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/receiver" />

<source-file
src="src/android/notification/receiver/TriggerReceiver.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/receiver" />
src="src/android/receiver/TriggerReceiver.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/receiver" />

<source-file
src="src/android/notification/action/Action.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/action" />
src="src/android/action/Action.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/action" />

<source-file
src="src/android/notification/action/ActionGroup.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/action" />
src="src/android/action/ActionGroup.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/action" />

<source-file
src="src/android/notification/trigger/DateTrigger.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/trigger" />
src="src/android/trigger/DateTrigger.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/trigger" />

<source-file
src="src/android/notification/trigger/IntervalTrigger.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/trigger" />
src="src/android/trigger/IntervalTrigger.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/trigger" />

<source-file
src="src/android/notification/trigger/MatchTrigger.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/trigger" />
src="src/android/trigger/MatchTrigger.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/trigger" />

<source-file
src="src/android/notification/util/PluginFileProvider.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/util" />
src="src/android/util/PluginFileProvider.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/util" />

<source-file
src="src/android/notification/util/AssetUtil.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/util" />
src="src/android/util/AssetUtil.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/util" />

<source-file
src="src/android/notification/util/CallbackContextUtil.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification/util" />
src="src/android/util/CallbackContextUtil.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/util" />

<source-file
src="src/android/notification/Builder.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification" />
src="src/android/Builder.java"
target-dir="src/de/appplant/cordova/plugin/localnotification" />

<source-file
src="src/android/notification/Manager.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification" />
src="src/android/Manager.java"
target-dir="src/de/appplant/cordova/plugin/localnotification" />

<source-file
src="src/android/notification/Notification.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification" />
src="src/android/Notification.java"
target-dir="src/de/appplant/cordova/plugin/localnotification" />

<source-file
src="src/android/notification/Options.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification" />
src="src/android/Options.java"
target-dir="src/de/appplant/cordova/plugin/localnotification" />

<source-file
src="src/android/notification/Request.java"
target-dir="src/de/appplant/cordova/plugin/localnotification/notification" />
src="src/android/Request.java"
target-dir="src/de/appplant/cordova/plugin/localnotification" />
</platform>

</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* limitations under the License.
*/

package de.appplant.cordova.plugin.localnotification.notification;
package de.appplant.cordova.plugin.localnotification;

import android.app.PendingIntent;
import android.content.Context;
Expand All @@ -39,12 +39,12 @@
import java.util.List;
import java.util.Random;

import de.appplant.cordova.plugin.localnotification.notification.action.Action;
import de.appplant.cordova.plugin.localnotification.notification.util.AssetUtil;
import de.appplant.cordova.plugin.localnotification.action.Action;
import de.appplant.cordova.plugin.localnotification.util.AssetUtil;

import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
import static de.appplant.cordova.plugin.localnotification.notification.Notification.EXTRA_UPDATE;
import static de.appplant.cordova.plugin.localnotification.notification.Options.LARGE_ICON_TYPE_CIRCLE;
import static de.appplant.cordova.plugin.localnotification.Notification.EXTRA_UPDATE;
import static de.appplant.cordova.plugin.localnotification.Options.LARGE_ICON_TYPE_CIRCLE;

/**
* Builder class for local notifications. Build fully configured local
Expand Down
10 changes: 5 additions & 5 deletions src/android/ClickHandlerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
import org.json.JSONObject;

import de.appplant.cordova.plugin.localnotification.LocalNotification;
import de.appplant.cordova.plugin.localnotification.notification.Manager;
import de.appplant.cordova.plugin.localnotification.notification.Notification;
import de.appplant.cordova.plugin.localnotification.notification.Options;
import de.appplant.cordova.plugin.localnotification.notification.Request;
import de.appplant.cordova.plugin.localnotification.notification.action.Action;
import de.appplant.cordova.plugin.localnotification.Manager;
import de.appplant.cordova.plugin.localnotification.Notification;
import de.appplant.cordova.plugin.localnotification.Options;
import de.appplant.cordova.plugin.localnotification.Request;
import de.appplant.cordova.plugin.localnotification.action.Action;

/**
* The receiver activity is triggered when a notification is clicked by a user.
Expand Down
20 changes: 10 additions & 10 deletions src/android/LocalNotification.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@
import java.util.Arrays;
import java.util.List;

import de.appplant.cordova.plugin.localnotification.notification.Manager;
import de.appplant.cordova.plugin.localnotification.notification.Notification;
import de.appplant.cordova.plugin.localnotification.notification.Options;
import de.appplant.cordova.plugin.localnotification.notification.Request;
import de.appplant.cordova.plugin.localnotification.notification.action.ActionGroup;
import de.appplant.cordova.plugin.localnotification.notification.util.AssetUtil;
import de.appplant.cordova.plugin.localnotification.notification.util.CallbackContextUtil;

import static de.appplant.cordova.plugin.localnotification.notification.Notification.Type.SCHEDULED;
import static de.appplant.cordova.plugin.localnotification.notification.Notification.Type.TRIGGERED;
import de.appplant.cordova.plugin.localnotification.Manager;
import de.appplant.cordova.plugin.localnotification.Notification;
import de.appplant.cordova.plugin.localnotification.Options;
import de.appplant.cordova.plugin.localnotification.Request;
import de.appplant.cordova.plugin.localnotification.action.ActionGroup;
import de.appplant.cordova.plugin.localnotification.util.AssetUtil;
import de.appplant.cordova.plugin.localnotification.util.CallbackContextUtil;

import static de.appplant.cordova.plugin.localnotification.Notification.Type.SCHEDULED;
import static de.appplant.cordova.plugin.localnotification.Notification.Type.TRIGGERED;

/**
* This plugin utilizes the Android AlarmManager in combination with local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

// codebeat:disable[TOO_MANY_FUNCTIONS]

package de.appplant.cordova.plugin.localnotification.notification;
package de.appplant.cordova.plugin.localnotification;

import android.annotation.SuppressLint;
import android.app.AlarmManager;
Expand All @@ -49,9 +49,9 @@
import static android.os.Build.VERSION_CODES.O;
import static android.os.Build.VERSION_CODES.P;
import static android.os.Build.VERSION_CODES.S;
import static de.appplant.cordova.plugin.localnotification.notification.Notification.PREF_KEY_ID;
import static de.appplant.cordova.plugin.localnotification.notification.Notification.Type.TRIGGERED;
import de.appplant.cordova.plugin.localnotification.notification.util.AssetUtil;
import static de.appplant.cordova.plugin.localnotification.Notification.PREF_KEY_ID;
import static de.appplant.cordova.plugin.localnotification.Notification.Type.TRIGGERED;
import de.appplant.cordova.plugin.localnotification.util.AssetUtil;

/**
* Central way to access all or single local notifications set by specific
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* limitations under the License.
*/

package de.appplant.cordova.plugin.localnotification.notification;
package de.appplant.cordova.plugin.localnotification;

import android.app.AlarmManager;
import android.app.PendingIntent;
Expand Down Expand Up @@ -50,7 +50,7 @@
import static android.app.PendingIntent.FLAG_CANCEL_CURRENT;
import static android.os.Build.VERSION.SDK_INT;

import de.appplant.cordova.plugin.localnotification.notification.receiver.TriggerReceiver;
import de.appplant.cordova.plugin.localnotification.receiver.TriggerReceiver;

/**
* Wrapper class around OS notification class. Handles basic operations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

// codebeat:disable[TOO_MANY_FUNCTIONS]

package de.appplant.cordova.plugin.localnotification.notification;
package de.appplant.cordova.plugin.localnotification;

import android.content.Context;
import android.graphics.Bitmap;
Expand All @@ -44,9 +44,9 @@
import java.util.Date;
import java.util.List;

import de.appplant.cordova.plugin.localnotification.notification.action.Action;
import de.appplant.cordova.plugin.localnotification.notification.action.ActionGroup;
import de.appplant.cordova.plugin.localnotification.notification.util.AssetUtil;
import de.appplant.cordova.plugin.localnotification.action.Action;
import de.appplant.cordova.plugin.localnotification.action.ActionGroup;
import de.appplant.cordova.plugin.localnotification.util.AssetUtil;

import static android.app.AlarmManager.RTC_WAKEUP;
import static androidx.core.app.NotificationCompat.DEFAULT_LIGHTS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @APPPLANT_LICENSE_HEADER_END@
*/

package de.appplant.cordova.plugin.localnotification.notification;
package de.appplant.cordova.plugin.localnotification;

import org.json.JSONObject;

Expand All @@ -30,12 +30,12 @@
import java.util.Date;
import java.util.List;

import de.appplant.cordova.plugin.localnotification.notification.trigger.DateTrigger;
import de.appplant.cordova.plugin.localnotification.notification.trigger.DateTrigger.Unit;
import de.appplant.cordova.plugin.localnotification.notification.trigger.IntervalTrigger;
import de.appplant.cordova.plugin.localnotification.notification.trigger.MatchTrigger;
import de.appplant.cordova.plugin.localnotification.trigger.DateTrigger;
import de.appplant.cordova.plugin.localnotification.trigger.DateTrigger.Unit;
import de.appplant.cordova.plugin.localnotification.trigger.IntervalTrigger;
import de.appplant.cordova.plugin.localnotification.trigger.MatchTrigger;

import static de.appplant.cordova.plugin.localnotification.notification.trigger.IntervalTrigger.Unit;
import static de.appplant.cordova.plugin.localnotification.trigger.IntervalTrigger.Unit;

/**
* An object you use to specify a notification’s content and the condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
* limitations under the License.
*/

package de.appplant.cordova.plugin.localnotification.notification.action;
package de.appplant.cordova.plugin.localnotification.action;

import android.content.Context;
import androidx.core.app.RemoteInput;

import org.json.JSONArray;
import org.json.JSONObject;

import de.appplant.cordova.plugin.localnotification.notification.util.AssetUtil;
import de.appplant.cordova.plugin.localnotification.util.AssetUtil;

/**
* Holds the icon and title components that would be used in a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* limitations under the License.
*/

package de.appplant.cordova.plugin.localnotification.notification.action;
package de.appplant.cordova.plugin.localnotification.action;

import android.content.Context;
import android.util.Log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
* limitations under the License.
*/

package de.appplant.cordova.plugin.localnotification.notification.receiver;
package de.appplant.cordova.plugin.localnotification.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import de.appplant.cordova.plugin.localnotification.LocalNotification;
import de.appplant.cordova.plugin.localnotification.notification.Manager;
import de.appplant.cordova.plugin.localnotification.notification.Notification;
import de.appplant.cordova.plugin.localnotification.notification.Request;
import de.appplant.cordova.plugin.localnotification.Manager;
import de.appplant.cordova.plugin.localnotification.Notification;
import de.appplant.cordova.plugin.localnotification.Request;

/**
* The clear intent receiver is triggered when the user clears a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @APPPLANT_LICENSE_HEADER_END@
*/

package de.appplant.cordova.plugin.localnotification.notification.receiver;
package de.appplant.cordova.plugin.localnotification.receiver;

import android.app.AlarmManager;
import android.content.BroadcastReceiver;
Expand All @@ -33,10 +33,10 @@
import java.util.List;

import de.appplant.cordova.plugin.localnotification.ClickHandlerActivity;
import de.appplant.cordova.plugin.localnotification.notification.Builder;
import de.appplant.cordova.plugin.localnotification.notification.Manager;
import de.appplant.cordova.plugin.localnotification.notification.Notification;
import de.appplant.cordova.plugin.localnotification.notification.Request;
import de.appplant.cordova.plugin.localnotification.Builder;
import de.appplant.cordova.plugin.localnotification.Manager;
import de.appplant.cordova.plugin.localnotification.Notification;
import de.appplant.cordova.plugin.localnotification.Request;

/**
* This class is triggered, when the system has cleared the alarms and notifications,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* limitations under the License.
*/

package de.appplant.cordova.plugin.localnotification.notification.receiver;
package de.appplant.cordova.plugin.localnotification.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
Expand All @@ -33,11 +33,11 @@

import de.appplant.cordova.plugin.localnotification.ClickHandlerActivity;
import de.appplant.cordova.plugin.localnotification.LocalNotification;
import de.appplant.cordova.plugin.localnotification.notification.Builder;
import de.appplant.cordova.plugin.localnotification.notification.Manager;
import de.appplant.cordova.plugin.localnotification.notification.Notification;
import de.appplant.cordova.plugin.localnotification.notification.Options;
import de.appplant.cordova.plugin.localnotification.notification.Request;
import de.appplant.cordova.plugin.localnotification.Builder;
import de.appplant.cordova.plugin.localnotification.Manager;
import de.appplant.cordova.plugin.localnotification.Notification;
import de.appplant.cordova.plugin.localnotification.Options;
import de.appplant.cordova.plugin.localnotification.Request;

/**
* The alarm receiver is triggered when a scheduled alarm is fired. This class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* limitations under the License.
*/

package de.appplant.cordova.plugin.localnotification.notification.trigger;
package de.appplant.cordova.plugin.localnotification.trigger;

import java.util.Calendar;
import java.util.Date;
Expand Down
Loading

0 comments on commit 1dfd1da

Please sign in to comment.