Open enzor77 opened 7 years ago
Have you also tried it as shown in the readme?
Any idea on how override the splashscreen collision? Any help will be much appreciated
Hi, what is teh difference between what I used and what is showed on readme? I'm using same procedure, if not wrong... Thanks a lot for your prompt reply
Hi all,
is not working from both, cold start and hot start!
@enzor77 try wrapping onHomeIconPressed in addEventListener
document.addEventListener('deviceready', function () {
ThreeDeeTouch.onHomeIconPressed = function(payload) {
console.log("Icon pressed. Type: " + payload.type + ". Title: " + payload.title + ".");
if
(payload.type == 'searchapplication') {$state.go('app.vehicles');}
else if
(payload.type == 'searchcode') {$state.go('app.code');}
else if
(payload.type == 'searchproduct') {$location.path('app/product');}
else if
(payload.type == 'searchbarcode') {$location.path('app/barcode');}
else {
// wrapping in a timeout, otherwise it collides with the splashscreen
setTimeout(function() {
alert(JSON.stringify(payload));
}, 500);
}
};
})
[edit]: also, are your injecting $state and $location ? can you try without those and just get it to console.log the payload?
hi,
the plugin stopped working for me as well. I had some custom icon templates, working fine and all of a sudden it stopped working. i've removed the plugin and re-added it, i've used the stock example code, nothing. should i remove and re-add the ios platform? though i wouldn't want to do that and go through all the hassle with the pods etc.
might have something to do with ios 10.3 (iphone7)
also, if i add your example code in the .plist file, both of those actions open my front camera (opening the front camera is one of the options i have set in the configureQuickActions)
thanks
@EddyVerbruggen is this repo still maintained?
@toriqo Sure, all PR's are welcome as always.
@EddyVerbruggen well, i was expecting some feedback regarding this issue :) do you know what's happening or should i do a pull request for a fix? :)
thanks
Do you have one?
nope. but i could investigate and see what's wrong. just wanted to know if it's something you know about.
Anyone can help me , I'm experiencing the same problem with ionic v1 (1.3.1), the actions are correctly added but I can't make the method assigned to ThreeDeeTouch.onHomeIconPressed
get trigger, I tried many ways to do it but no luck at the end I have an implementation pretty much like this : https://github.com/ashteya/ionic-tutorial-quickactions , If anyone can make it works please let me kwon how to do it
Greetings and thanks for your time and effort
Guys, any movements to fix this issue?
Hi @akaNightmare , I managed to make this works with the following steps:
Configure the Quick Actions in the config function in the angular module like this: ...
.config(function () {
document
.addEventListener("deviceready", function () {
ThreeDeeTouch.isAvailable(function (available) {
if (available) { // Comment out this check if testing in simulator
console.log('Configure 3D touch, available');
// Configure Quick Actions
ThreeDeeTouch.configureQuickActions([
{
type: 'send', // optional, but can be used in the onHomeIconPressed callback
title: 'Enviar Dinero', // mandatory
iconType: 'location' // optional
}, {
type: 'pay',
title: 'Pay',
iconType: 'compose' // optional
}, {
type: 'locations',
title: 'Locations',
iconType: 'markLocation' // optional
}
]);
}
})
}, false);
...
Add the actions listener in the run function in the angular module like this: ...
.run(function ($rootScope) {
document
.addEventListener('deviceready', function () {
ThreeDeeTouch.onHomeIconPressed = function (payload) {
console.log("Icon pressed. Type: " + payload.type + ". Title: " + payload.title + ".");
if (payload.type == 'send') {
$rootScope.$broadcast('openQuickSend');
} else if (payload.type == 'pay') {
$rootScope.$broadcast('openQuickPay');
} else if (payload.type == 'locations') {
$rootScope.$broadcast('openQuickSendLocations');
}
};
}, false)
...
3. Note that I'm using `$rootScope.$broadcast()` to emit another event in the rootScope so the actions can be trigger in the controllers for example I handle all the actions in the `
MainCtrl`, each one look like this:
...
$rootScope.$on('openQuickSendLocations', function () { console.log('opening locations') $state.go('locations'); });
...
I hope this helps you!
@enzor77 thanks, however, I using ionic3. Also, I found how to fix this issue, just need to update ionic/native package and particular commit for this fix -> https://github.com/ionic-team/ionic-native/commit/6cd97ca
Did we run into the same issue again?
The modification posted by @akaNightmare was done in a file that does not exist anymore on Ionic Native's codebase.
And onHomeIconPressed does not fire for me either, although configureQuickActions works. From my debugging, the plugin's performActionForShortcutItem
is not running (using with Ionic/Capacitor).
Did we run into the same issue again?
The modification posted by @akaNightmare was done in a file that does not exist anymore on Ionic Native's codebase.
And onHomeIconPressed does not fire for me either, although configureQuickActions works. From my debugging, the plugin's
performActionForShortcutItem
is not running (using with Ionic/Capacitor).
I have the same issue. Were you able to get it to work?
Hi, @stevenleija ! I didn't. My codebase has changed recently to React Native, so I won't be looking at solutions anymore.
hello
does anyone solve this issue into ionic 5 and capacitor?
My end also same issue, it not called onHomeIconPressed
Thanks
Hi added the plugin to a project but I have some issues; QuickActions added properly but not fired when I use it. I'm working with an iphone7 with iOS 10.3
Below is the code I used inside the app.run JS: