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.
Merge pull request #31 from mendix/improve-usability
#720386 and #720633: Improve developer-visible interface of module
- Loading branch information
Showing
40 changed files
with
692 additions
and
439 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file renamed
BIN
+1.66 MB
test/PushNotfications.mpr → test/PushNotifications.mpr
100644 → 100755
Binary file not shown.
Empty file modified
0
test/javasource/pushnotifications/actions/PollFeedbackService.java
100644 → 100755
Empty file.
71 changes: 71 additions & 0 deletions
71
test/javasource/pushnotifications/actions/QueueMessage.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 static pushnotifications.proxies.microflows.Microflows.createAndQueueMessage; | ||
import com.mendix.systemwideinterfaces.core.IMendixObject; | ||
|
||
/** | ||
* Replaces microflow 'SendMessageQueued'. | ||
* Parameters: | ||
* Device: Android, iOS or Windows | ||
* 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 QueueMessage extends CustomJavaAction<Boolean> | ||
{ | ||
private IMendixObject __DeviceParameter1; | ||
private pushnotifications.proxies.Device DeviceParameter1; | ||
private String MessageText; | ||
private String Title; | ||
private Long Badge; | ||
private String LaunchImage; | ||
private String Sound; | ||
|
||
public QueueMessage(IContext context, IMendixObject DeviceParameter1, String MessageText, String Title, Long Badge, String LaunchImage, String Sound) | ||
{ | ||
super(context); | ||
this.__DeviceParameter1 = DeviceParameter1; | ||
this.MessageText = MessageText; | ||
this.Title = Title; | ||
this.Badge = Badge; | ||
this.LaunchImage = LaunchImage; | ||
this.Sound = Sound; | ||
} | ||
|
||
@Override | ||
public Boolean executeAction() throws Exception | ||
{ | ||
this.DeviceParameter1 = __DeviceParameter1 == null ? null : pushnotifications.proxies.Device.initialize(getContext(), __DeviceParameter1); | ||
|
||
// BEGIN USER CODE | ||
createAndQueueMessage(getContext(), DeviceParameter1, MessageText, Title, Badge, LaunchImage, Sound); | ||
return true; | ||
// END USER CODE | ||
} | ||
|
||
/** | ||
* Returns a string representation of this action | ||
*/ | ||
@Override | ||
public String toString() | ||
{ | ||
return "QueueMessage"; | ||
} | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
} |
Empty file.
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
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
71 changes: 71 additions & 0 deletions
71
test/javasource/pushnotifications/actions/SendMessage.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.createAndSendMessage; | ||
|
||
/** | ||
* Java action to use instead of microflow 'SendMessageImmediately' | ||
* Parameters: | ||
* Device: Android, iOS or Windows | ||
* 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 SendMessage extends CustomJavaAction<Boolean> | ||
{ | ||
private IMendixObject __DeviceParameter1; | ||
private pushnotifications.proxies.Device DeviceParameter1; | ||
private String MessageText; | ||
private String Title; | ||
private Long Badge; | ||
private String LaunchImage; | ||
private String Sound; | ||
|
||
public SendMessage(IContext context, IMendixObject DeviceParameter1, String MessageText, String Title, Long Badge, String LaunchImage, String Sound) | ||
{ | ||
super(context); | ||
this.__DeviceParameter1 = DeviceParameter1; | ||
this.MessageText = MessageText; | ||
this.Title = Title; | ||
this.Badge = Badge; | ||
this.LaunchImage = LaunchImage; | ||
this.Sound = Sound; | ||
} | ||
|
||
@Override | ||
public Boolean executeAction() throws Exception | ||
{ | ||
this.DeviceParameter1 = __DeviceParameter1 == null ? null : pushnotifications.proxies.Device.initialize(getContext(), __DeviceParameter1); | ||
|
||
// BEGIN USER CODE | ||
createAndSendMessage(getContext(), DeviceParameter1, MessageText, Title, Badge, LaunchImage, Sound); | ||
return true; | ||
// END USER CODE | ||
} | ||
|
||
/** | ||
* Returns a string representation of this action | ||
*/ | ||
@Override | ||
public String toString() | ||
{ | ||
return "SendMessage"; | ||
} | ||
|
||
// 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
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
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
Empty file.
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
18 changes: 18 additions & 0 deletions
18
test/javasource/pushnotifications/implementation/MessagingServiceConnection.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,18 @@ | ||
package pushnotifications.implementation; | ||
|
||
import java.util.List; | ||
|
||
import pushnotifications.proxies.Message; | ||
import pushnotifications.proxies.MessagingServiceSettings; | ||
|
||
public interface MessagingServiceConnection<S extends MessagingServiceSettings, M extends Message> { | ||
|
||
void stop(); | ||
|
||
void sendMessages(List<M> messages); | ||
|
||
void sendMessage(M message); | ||
|
||
void start (S settings); | ||
|
||
} |
Oops, something went wrong.