You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: markdown/plugin/notifications-v2/index.markdown
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ application =
109
109
110
110
Additionally, if you want to use Google <nobr>[Firebase](https://firebase.google.com) Cloud Messaging (FCM)</nobr> for push notifications, follow these steps:
111
111
112
-
1. Copy `GoogleService-Info.plist`, provided in the Firebase console, to your Corona project's root directory alongside `main.lua`.
112
+
1. Copy `GoogleService-Info.plist`, provided in the Firebase console, to your CORONA_CORE_PRODUCT project's root directory alongside `main.lua`.
113
113
114
114
2. Add the following entries to the <nobr>`iphone`→`plist`</nobr> table of `build.settings`:
115
115
@@ -135,7 +135,7 @@ settings =
135
135
136
136
If your app is for Android, you must follow these additional steps to ensure that Firebase notifications function properly:
137
137
138
-
1. Copy <nobr>`google-services.json`</nobr>, provided in the Firebase console, to your Corona project's root directory alongside `main.lua`.
138
+
1. Copy <nobr>`google-services.json`</nobr>, provided in the Firebase console, to your CORONA_CORE_PRODUCT project's root directory alongside `main.lua`.
139
139
140
140
2. Add an additional `useGoogleServicesJson` entry into the `android` table of `build.settings`. When added, the build server will read the settings from the JSON file and integrate them into your app during the build phase.
141
141
@@ -168,15 +168,15 @@ If you're using CORONA_NATIVE_PRODUCT for iOS, you'll need to add a reference to
168
168
169
169
When developing natively for Android, Google wants all icons in the project's `res` directory. This is important because Google's Android build process generates code, creating a `R.java` file containing unique integer IDs to every resource that your project and its libraries contain. The IDs are needed to access these resources, including the notification icons.
170
170
171
-
When developing with CORONA_NATIVE_PRODUCT, you must override Corona's notification icon resources as follows:
171
+
When developing with CORONA_NATIVE_PRODUCT, you must override notification icon resources as follows:
172
172
173
173
1. First, you should become familiar with how Android handles resources by reading Google's official [documentation](http://developer.android.com/guide/topics/resources/overview.html).
174
174
175
-
2. Inspect the Corona library's resource directory (`./Native/Corona/android/lib/Corona/res/`). In this directory, every `drawable` directory contains a file named `corona_statusbar_icon_default.png`. This is the image file to override. Note that this action should be an "override" and __not__ a replacement — you should __not__ modify the contents of the Corona library directory!
175
+
2. Inspect the CORONA_CORE_PRODUCT library's resource directory (`./Native/Corona/android/lib/Corona/res/`). In this directory, every `drawable` directory contains a file named `corona_statusbar_icon_default.png`. This is the image file to override. Note that this action should be an "override" and __not__ a replacement — you should __not__ modify the contents of the CORONA_CORE_PRODUCT library directory!
176
176
177
177
3. To override these notification image files with your own, you need to set up the Android project with the same `drawable` directories under your `res` directory. Add each `IconNotification*.png` icon to its respective `drawable` directory by resolution and version <nobr>(see [here][guide.events.appNotification#android-icons])</nobr>. You also __must__ rename these files to `corona_statusbar_icon_default.png`.
178
178
179
-
4. Make a small change to the `copyCoronaResources` task of <nobr>`build.gradle` (`Module: app`)</nobr> to ignore the notification icons provided in the Corona library project. Do this by replacing the <nobr>`from fileTree(...)`</nobr> line with the following:
179
+
4. Make a small change to the `copyCoronaResources` task of <nobr>`build.gradle` (`Module: app`)</nobr> to ignore the notification icons provided in the CORONA_CORE_PRODUCT library project. Do this by replacing the <nobr>`from fileTree(...)`</nobr> line with the following:
Copy file name to clipboardExpand all lines: markdown/plugin/notifications-v2/scheduleNotification.markdown
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Scheduling a notification upon application suspend can cause the application to
25
25
26
26
### Android
27
27
28
-
Unlike iOS, local notifications on Android are managed by the application and not by the operating system. This means that all scheduled notifications and status bar notifications will be cleared when the application process terminates. However, pressing the __Back__ key to exit the application window will not terminate the application process — this only destroys the application window which runs your project's Lua scripts and it will receive the `"applicationExit"`[system][api.event.system.type] event just before being destroyed. Thus, the application process will continue to run in the background — this is standard Android application behavior which allows its notifications to remain available. If the application process gets fully terminated, Corona will automatically restore all pending notifications when the application restarts.
28
+
Unlike iOS, local notifications on Android are managed by the application and not by the operating system. This means that all scheduled notifications and status bar notifications will be cleared when the application process terminates. However, pressing the __Back__ key to exit the application window will not terminate the application process — this only destroys the application window which runs your project's Lua scripts and it will receive the `"applicationExit"`[system][api.event.system.type] event just before being destroyed. Thus, the application process will continue to run in the background — this is standard Android application behavior which allows its notifications to remain available. If the application process gets fully terminated, CORONA_CORE_PRODUCT will automatically restore all pending notifications when the application restarts.
29
29
30
30
This said, calling [os.exit()][api.library.os.exit] will terminate the application process and __clear__ all notifications. If you need to close just the application window, call [native.requestExit()][api.library.native.requestExit] which only exits the application window and keeps the application process alive, thus keeping your notifications alive.
0 commit comments