[3d Touch Plugin] Don't know how to use this 3D Touch plugin

[3d Touch Plugin] Don't know how to use this 3D Touch plugin

  
Forge Component
(1)
Published on 2016-08-12 by Experts
1 vote
Published on 2016-08-12 by Experts

Could someone give me a quick guide on how to use this on mobile apps?

That much I could figure. But where do you define the page you want the in 3D Touch action?

Ricardo Monteiro wrote:

That much I could figure. But where do you define the page you want the in 3D Touch action?

Ricardo, 

I think in action "SetQuickActions", and when you ill press over the icon of app what you configure in that action ill appear


Look at the component Documentation:

https://github.com/OutSystems/cordova-plugin-3dtouch




Can't see where I define that (for example) the check in 3D Touch shortcut goes to the app's check in page.


onHomeIconPressed

When a home icon is pressed, your app launches and this JS callback is invoked. I found it worked reliable when you use it like this (you should recognize the type params used previously):

  document.addEventListener('deviceready', function () {
    ThreeDeeTouch.onHomeIconPressed = function (payload) {
      console.log("Icon pressed. Type: " + payload.type + ". Title: " + payload.title + ".");
      if (payload.type == 'checkin') {
        document.location = 'checkin.html';
      } else if (payload.type == 'share') {
        document.location = 'share.html';
      } else {
        // hook up any other icons you may have and do something awesome (e.g. launch the Camera UI, then share the image to Twitter)
        console.log(JSON.stringify(payload));
      }
    }
  }, false);

Maybe you need change something, the plugin dont has that if in bold

Search for onHomeIconPressed in ThreeDeeTouchPlugin and you ill see that



Could you make a working example of that? Send me an oml with a 3D Touch action going to a certain page of your mobile app please.

Hi Ricardo,


I don´t have any IOS to test, i can do a oml but i'll dont 100% sure if it work's :(

Fábio Vaz wrote:

Hi Ricardo,


I don´t have any IOS to test, i can do a oml but i'll dont 100% sure if it work's :(

It would help me a little :)


Ricardo Monteiro wrote:

Fábio Vaz wrote:

Hi Ricardo,


I don´t have any IOS to test, i can do a oml but i'll dont 100% sure if it work's :(

It would help me a little :)



Ricardo, lets pray :P


Use this oml and see the comment inside him. Hope it works


Create in QuickActions test type and Share type

Fábio Vaz wrote:

Ricardo Monteiro wrote:

Fábio Vaz wrote:

Hi Ricardo,


I don´t have any IOS to test, i can do a oml but i'll dont 100% sure if it work's :(

It would help me a little :)



Ricardo, lets pray :P


Use this oml and see the comment inside him. Hope it works


Create in QuickActions test type and Share type

Sadly it doesn't work...


Ricardo Monteiro wrote:

Fábio Vaz wrote:

Ricardo Monteiro wrote:

Fábio Vaz wrote:

Hi Ricardo,


I don´t have any IOS to test, i can do a oml but i'll dont 100% sure if it work's :(

It would help me a little :)



Ricardo, lets pray :P


Use this oml and see the comment inside him. Hope it works


Create in QuickActions test type and Share type

Sadly it doesn't work...


Sorry, maybe someone with a iphone can be more usefull

Fábio Vaz wrote:

Ricardo Monteiro wrote:

Fábio Vaz wrote:

Ricardo Monteiro wrote:

Fábio Vaz wrote:

Hi Ricardo,


I don´t have any IOS to test, i can do a oml but i'll dont 100% sure if it work's :(

It would help me a little :)



Ricardo, lets pray :P


Use this oml and see the comment inside him. Hope it works


Create in QuickActions test type and Share type

Sadly it doesn't work...


Sorry, maybe someone with a iphone can be more usefull

I will pray for another kind soul :P