GeezerVison is showing github.com — Implement Skyper activation call in subscriber settings · Issue #18 · dapnet-core/web
Implement Skyper activation call in subscriber settings #18
Description
Where Type === SKYPER
Button und Notification-Box
Activity
dh3wr commented on Feb 14, 2019
@Override
public PagerMessage createMessageFromActivation(Activation activation) {
List<String> activationCode = Arrays.asList(settings.getActivationCode().split(","));
StringBuilder sb = new StringBuilder();
for (int i = 0; i < activationCode.size(); ++i) {
List<String> activationSubCode = Arrays.asList(activationCode.get(i).split(" "));
if (activationSubCode.size() != 3) {
return null;
}
int shift = Integer.parseInt(activationSubCode.get(0));
int mask = Integer.parseInt(activationSubCode.get(1));
int offset = Integer.parseInt(activationSubCode.get(2));
int cInt = ((activation.getNumber() >> shift) & mask) + offset;
char c = (char) cInt;
sb.append(String.valueOf(c));
}
return new PagerMessage(sb.toString(), activation.getNumber(), PagerMessage.MessagePriority.ACTIVATION,
PagerMessage.FunctionalBits.ACTIVATION);
}
dh3wr commented on Feb 14, 2019
private String activationCode = "0 7 50,0 7 34,0 7 53,0 7 51,0 7 51,0 7 52,0 7 52,0 7 52";
Metadata
Metadata
Development
No branches or pull requestsIssue actions