forked from simonmartyr/MxPushNotifications
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#847563: Update latest versions of widget, demo project, and test pro…
…ject
- Loading branch information
1 parent
c6d3055
commit 1cc89e0
Showing
20 changed files
with
146 additions
and
8,904 deletions.
There are no files selected for viewing
Binary file not shown.
71 changes: 71 additions & 0 deletions
71
demo/javasource/pushnotifications/actions/SendMessageToUser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// This file was generated by Mendix Modeler. | ||
// | ||
// WARNING: Only the following code will be retained when actions are regenerated: | ||
// - the import list | ||
// - the code between BEGIN USER CODE and END USER CODE | ||
// - the code between BEGIN EXTRA CODE and END EXTRA CODE | ||
// Other code you write will be lost the next time you deploy the project. | ||
// Special characters, e.g., é, ö, à, etc. are supported in comments. | ||
|
||
package pushnotifications.actions; | ||
|
||
import com.mendix.systemwideinterfaces.core.IContext; | ||
import com.mendix.webui.CustomJavaAction; | ||
import com.mendix.systemwideinterfaces.core.IMendixObject; | ||
import static pushnotifications.proxies.microflows.Microflows.createAndSendMessageToUser; | ||
|
||
/** | ||
* Java action to send a message directly to all devices of a user | ||
* Parameters: | ||
* Device: Android or iOS | ||
* MessageText: the contents of the message | ||
* Title: The title of the message | ||
* Badge: a number that appears on the app icon (iOS) | ||
* LaunchImage: file name of the launch image (iOS) | ||
* Sound: name of system sound to play (iOS) | ||
* | ||
*/ | ||
public class SendMessageToUser extends CustomJavaAction<Boolean> | ||
{ | ||
private IMendixObject __UserParameter1; | ||
private system.proxies.User UserParameter1; | ||
private String MessageText; | ||
private String Title; | ||
private Long Badge; | ||
private String LaunchImage; | ||
private String Sound; | ||
|
||
public SendMessageToUser(IContext context, IMendixObject UserParameter1, String MessageText, String Title, Long Badge, String LaunchImage, String Sound) | ||
{ | ||
super(context); | ||
this.__UserParameter1 = UserParameter1; | ||
this.MessageText = MessageText; | ||
this.Title = Title; | ||
this.Badge = Badge; | ||
this.LaunchImage = LaunchImage; | ||
this.Sound = Sound; | ||
} | ||
|
||
@Override | ||
public Boolean executeAction() throws Exception | ||
{ | ||
this.UserParameter1 = __UserParameter1 == null ? null : system.proxies.User.initialize(getContext(), __UserParameter1); | ||
|
||
// BEGIN USER CODE | ||
createAndSendMessageToUser(getContext(), UserParameter1, MessageText, Title, Badge, LaunchImage, Sound); | ||
return true; | ||
// END USER CODE | ||
} | ||
|
||
/** | ||
* Returns a string representation of this action | ||
*/ | ||
@Override | ||
public String toString() | ||
{ | ||
return "SendMessageToUser"; | ||
} | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.