Comments (19)
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).
from cordova-plugin-3dtouch.
Have you also tried it as shown in the readme?
from cordova-plugin-3dtouch.
Any idea on how override the splashscreen collision?
Any help will be much appreciated
from cordova-plugin-3dtouch.
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
from cordova-plugin-3dtouch.
from cordova-plugin-3dtouch.
@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?
from cordova-plugin-3dtouch.
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
from cordova-plugin-3dtouch.
@EddyVerbruggen is this repo still maintained?
from cordova-plugin-3dtouch.
@toriqo Sure, all PR's are welcome as always.
from cordova-plugin-3dtouch.
@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
from cordova-plugin-3dtouch.
Do you have one?
from cordova-plugin-3dtouch.
nope. but i could investigate and see what's wrong. just wanted to know if it's something you know about.
from cordova-plugin-3dtouch.
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
from cordova-plugin-3dtouch.
Guys, any movements to fix this issue?
from cordova-plugin-3dtouch.
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!
from cordova-plugin-3dtouch.
@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 -> danielsogl/awesome-cordova-plugins@6cd97ca
from cordova-plugin-3dtouch.
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?
from cordova-plugin-3dtouch.
Hi, @stevenleija ! I didn't. My codebase has changed recently to React Native, so I won't be looking at solutions anymore.
from cordova-plugin-3dtouch.
hello
does anyone solve this issue into ionic 5 and capacitor?
My end also same issue,
it not called onHomeIconPressed
Thanks
from cordova-plugin-3dtouch.
Related Issues (20)
- iconTemplate HOT 27
- Custom icons HOT 2
- Use in android HOT 1
- Opening IOS native share window HOT 5
- Black dot appears when no iconType or iconTemplate is passed HOT 6
- Peek and pop functionality is not working with IONIC framework HOT 2
- Replacing static home icons by dynamic icons HOT 1
- Need help with .disableLinkPreview() HOT 2
- Preview bug
- 2 questions HOT 1
- Whitescreen issue with lastest Ionic version 3.9.2 HOT 1
- Remove irrelevant items from the npm package
- Automating the custom iconTemplate assets for iOS
- Ionic 4 compatibility
- isAvailable always return false (new iphones) HOT 5
- Action not triggered on cold start HOT 2
- isAvailable is false for iPhone 11 Pro HOT 1
- onHomeIconPressed not working (even after reading all issues about it) HOT 8
- BSF Cordova Ecosystem Crowdfunding Plan
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-3dtouch.