I have a problem with showing apple pass notification in lock screen when using relevantDate.
I have created the pass and I could updated all is good.
but when the screen is locked I'm not able to show any lock screen notifications about the pass updates.
i use this doc of apple to showing a Pass on the Lock Screen.
https://developer.apple.com/documentation/walletpasses/pass/showing_a_pass_on_the_lock_screen/
NB: when i use locations with relevantDate it's work for me but in my case i want just to use "relevantDate = 2022-10-21T10:29:15.7200Z".
this is my code:
$data = [
'description' => $walletData['cardHeader'],
"relevantDate" => "2022-10-21T10:29:15.7200Z",
'formatVersion' => 1,
'organizationName' => $walletData['enseigneName'],
'passTypeIdentifier' => $config['passTypeIdentifier'],
'webServiceURL' => 'https://manager.qoodos.fr/qrcodeTest/loyaltycard',
'authenticationToken' => 'g4are8g4e54b8v71cex45w4g87ec',
'serialNumber' => $qrcode,
'teamIdentifier' => $config['teamIdentifier']
.......
];
At 10:29:15 i didn't receive any notification pass in the lock screen (we have GMT+1).
Thanks for any help.
Related
I am trying to make an enable alarm function in my pbx, so far I have this context going which works. I would like to allow a number or # being pressed at any time during the countdown (playtones) to skip to the Alarm is now armed moment (or maybe the other extension, either way works).
The issue I am facing is that Read or WaitExten only works for the defined time, but I would like to continue the dialplan and allow the button press at any time in the channel.
exten => s,1,NoOp(enable alarm)
same => n,Set(DB(alarm/status)=Enabled)
same => n,Wait(1)
same => n,Answer()
same => n,Playback(customsounds/arming-in-45-seconds)
same => n,Playtones(825/150,0/1550)
same => n,Wait(10)
same => n,Playtones(825/150,0/1000)
same => n,Wait(10)
same => n,Playtones(825/150,0/510)
same => n,Wait(10)
same => n,Playtones(825/150,0/100)
same => n,Wait(5)
same => n,Playtones(825/1500)
same => n,Wait(3)
same => n,StopPlaytones()
same => n,Playback(customsounds/the-alarm-is-now-armed)
same => n,NoOp(do shell exec here)
same => n,HangUp()
exten => 1,1,NoOp(skipped countdown)
same => n,Playback(customsounds/the-alarm-is-now-armed)
same => n,NoOp(do shell exec here)
same => n,HangUp()
You may build up your context using Asterisks Read() dialplan application instead of Wait(). The Read() application does provide a timeout parameter which you can set to your specific value. If a user presses # during the Read(), the reading will be interrupted and you can continue. Otherwise the reading will be aborted after the passed timeout. To play your tones in background you can use the filename parameter of the Read() application which can be used to play some audiofiles in the background while waiting for an DTMF input.
In this case a solution may look like this:
exten => s,1,NoOp(enable alarm)
same => n,Set(DB(alarm/status)=Enabled)
same => n,Wait(1)
same => n,Answer()
same => n,Playback(customsounds/arming-in-45-seconds)
same => n,Read(get,customsounds/waitingsound,,,,45)
same => n,Playback(customsounds/the-alarm-is-now-armed)
same => n,NoOp(do shell exec here)
same => n,HangUp()
Maybe the syntax is not 100% correct but it should work like that in your case. You can read more about the Read() application here: http://the-asterisk-book.com/1.6/applikationen-read.html
Or here: https://www.voip-info.org/asterisk-cmd-read/
I'm trying to setup loginEpic which occurs when user logs in. This is how the logic flow should work:
Epic should start with LOGIN_REQUEST action. Once login promise is finished successfully, user info should be fetched with SYNC_USER_REQUEST action (which is basically whole other epic since this is also called when initially entering site to get user info or redirect to login). Once that finishes successfully (promise and SUCCESS/FAIL calls are handled within syncUserEpic), SYNC_USER_SUCCESS should be caught in loginEpic and LOGIN_SUCCESS should be called along with push action which redirects user to starting page.
This is what I have so far:
const loginEpic: Types.RootEpic = (action$) =>
action$.ofType("LOGIN_REQUEST").pipe(
switchMap(({ payload }) =>
from(membershipService.login(payload.username, payload.password)).pipe(
switchMap((response) => [
syncUser.request(),
action$.ofType("SYNC_USER_SUCCESS").pipe( // I think this is the problem
filter(isActionOf(syncUser.success)),
map(r => login.success(response))
)
]),
takeUntil(action$.ofType(["LOGOUT_REQUEST", "LOGIN_CANCEL"])),
catchError(error => of(login.failure(error))),
endWith(push("/"))
)
)
)
but I'm getting
Actions must be plain objects. Use custom middleware for async
actions.
I'm also cancelling LOGIN_REQUEST/SYNC_USER_REQUEST with LOGOUT_REQUEST or LOGIN_CANCEL actions and also handling login error (I'm not sure if I should also handle sync user error here)
I've managed to implement it this way:
const loginEpic: Types.RootEpic = (action$) =>
action$.pipe(
filter(isActionOf(login.request)),
switchMap(({ payload }) =>
race(
from(membershipService.login(payload.username, payload.password)).pipe(
mergeMap((token) =>
from(membershipService.getUser()).pipe(
mergeMap((user) => [syncUser.success(user), login.success(token)]),
catchError(error => {
// user fetch failed, tell login that user is responsible
return of(login.failure(new BaseError("6010", "User sync failed.")));
})
)
),
catchError(error => of(login.failure(error))),
),
action$.pipe(
filter(isActionOf(logout.request)),
map(() => login.cancel()),
take(1)
)
)
)
)
Based on how it works, race is actually racing whole first block (so not just outer membershipService.login, with logout.request action. I was not aware of this, and I thought I would need another race condition for membershipService.getUser because what I need is that logout.request terminate whole process (even if login was successful and process in middle of fetching user). As far as I could test this, it's working as expected.
If anyone has any thoughts, improvements, fixes, or anti-pattern observations, please let me know.
I'am sending push messages to application with react-native-firebase and it look's wonderful ! Also, I need to receive some portion of data, so sending data something like this
$request_body = [
'to' => $TOKEN_ID,
'notification' => [
'title' => 'Title',
'body' => 'Body',
'sound' => 'default',
],
'data' => [
'key' => 'value',
],
];
I'am trying to listen open push message event as bellow
this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
const notification = notificationOpen.notification;
const data = notificationOpen.data;
setTimeout(() => {
Alert.alert(data.key);
}, 5000);
});
After 5 second left, application closes without any error message. If changing Alert.alert(data.key); with Alert.alert(notification.title); application work`s fine and show an alert. Can someone explain to me, why retrieving data is not work properly?
After some research, I found a solution
const data = notification.data;
or
const data = notificationOpen.notification.data;
When running the "cucumber" command, the iOS Simluator launches and attempts to open my app. The app's splash screen appears and then the simulator goes back to the home screen. I eventually receive an error stating:
Time out waiting for UIAutomation run-loop to Start.
I can manually start the -cal app in the iOS Simulator through xCode. Any troubleshooting steps I can try to figure out why my app isn't running through the simulator using Calabash?
My environment
$xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
$xcodebuild -version
Xcode 6.1.1
Build version 6A2008a
$ calabash-ios version
0.12.2
$ calabash.framework/Resources/version
0.12.2
server_version
{
"app_id" => "com.madeupdomain.MyApp-cal",
"outcome" => "SUCCESS",
"server_port" => 37265,
"version" => "0.12.2",
"app_name" => "Unknown",
"system" => "x86_64",
"simulator_device" => "iPhone",
"simulator" => "",
"app_version" => "1.0",
"iphone_app_emulated_on_ipad" => false,
"git" => {
"revision" => "bafa9fd",
"remote_origin" => "git#github.com:calabash/calabash-ios-server.git",
"branch" => "master"
},
"screen_dimensions" => {
"sample" => 1,
"height" => 1136,
"width" => 640,
"scale" => 2
},
"4inch" => true,
"iOS_version" => "8.2"
}
I got the same problem several times.
First of all check the APP_BUNDLE_PATH
Check the DEVICE_TARGET (if your app does not support that target).
Does your app have a Privacy Alert that appears just after launch?
If so, see the advice on this page:
https://github.com/calabash/calabash-ios/wiki/Managing-Privacy-Alerts:--Location-Services,-APNS,-Contacts
Can you update your question with exact command you are using to start cucumber?
Right now I have a simple PHP script outside of my drupal installation that just compiles a CSV for my client of orders and the credit card type (Visa, Mastercard..)
It seems like an older version of Drupal 6 just had this part of data serialized in the database "cc_card" however now it seems to be encrypted.
Is there a way to decrypt this data (Stored in us_orders.data) so that I could see the card type?
The uc_credit_cache() function should do what you want:
$order = uc_order_load($order_id);
$cc_data = uc_credit_cache('save', $order->data['cc_data'], TRUE);
$cc_data should look something like this:
Array
(
[cc_type] => visa
[cc_owner] =>
[cc_number] => 4111111111111111
[cc_start_month] =>
[cc_start_year] =>
[cc_exp_month] => 9
[cc_exp_year] => 2012
[cc_issue] =>
[cc_cvv] => 222
[cc_bank] =>
)