Skip to content

Commit 28415f9

Browse files
author
ChristineXYS
committed
Add two Android functions for setting large/small icon resource id. Revert setInteractivePushBtnPair in js.
1 parent cdbb5cf commit 28415f9

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/ios/Streethawk.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,16 @@
355355
*/
356356
- (void)getIcon:(CDVInvokedUrlCommand *)command;
357357

358+
/**
359+
* Android function, ignored in ios.
360+
*/
361+
- (void)setLargeIconResID:(CDVInvokedUrlCommand *)command;
362+
363+
/**
364+
* Android function, ignored in ios.
365+
*/
366+
- (void)setSmallIconResID:(CDVInvokedUrlCommand *)command;
367+
358368
/**
359369
* Android permission function, ignored in ios.
360370
*/

src/ios/Streethawk.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,18 @@ - (void)getIcon:(CDVInvokedUrlCommand *)command
13331333
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
13341334
}
13351335

1336+
- (void)setLargeIconResID:(CDVInvokedUrlCommand *)command
1337+
{
1338+
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
1339+
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
1340+
}
1341+
1342+
- (void)setSmallIconResID:(CDVInvokedUrlCommand *)command
1343+
{
1344+
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
1345+
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
1346+
}
1347+
13361348
- (void)shStartLocationReporting:(CDVInvokedUrlCommand *)command
13371349
{
13381350
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];

www/Streethawk.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ SHLibrary.prototype.addInteractivePushButtonPairWithIcons = function(string_b1,s
156156
SHLibrary.prototype.addInteractivePushButtonPair = function(string_b1,string_b2,string_pairname,appSuccess, appFail) {
157157
exec(appSuccess, appFail, 'Streethawk', 'addInteractivePushButtonPair', [string_b1,string_b2,string_pairname]);
158158
}
159+
SHLibrary.prototype.setInteractivePushBtnPair = function(appSuccess, appFail) {
160+
exec(appSuccess, appFail, 'Streethawk', 'setInteractivePushBtnPair',[]);
161+
}
159162
SHLibrary.prototype.setLargeIconResID = function(string_name,appSuccess, appFail) {
160163
exec(appSuccess, appFail, 'Streethawk', 'setLargeIconResID',[string_name]);
161164
}

0 commit comments

Comments
 (0)