Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 25
Registered: ‎06-28-2012
My Device: Z10, Q10
My Carrier: Beeline
Accepted Solution

Invocation issue

Hi all,

 

I'm trying to implement MediaPlayer invocation in my app, but faced the following problem. Here is the code:

 

Invocation {
    id: mediaPlayerInvocation

    query: InvokeQuery {
        invokeTargetId: "sys.mediaplayer.previewer"
        mimeType:       "video/mp4"
        uri:            "file:///accounts/1000/shared/downloads/video.mp4"
        invokeActionId: "bb.action.OPEN"
    }

    onArmed: {
        console.debug("ARMED");
    }
}

 However I always get the following error on app startup:

 

Warning: InvocationWrapper::onQueryFinished: no matching result from Menu Service for query
   mimeType="video/mp4"
   uri=QUrl("file:///accounts/1000/shared/downloads/video.mp4")
   data= ""
   metadata= QMap()
   perimeter= 0
   action= "bb.action.OPEN"
   target= "sys.mediaplayer.previewer"
   invokerIncluded= false
Warning: InvocationPrivate::onQueryResolved: no result matching query, no armed signal sent.

and therefore all subsequent calls to mediaPlayerInvocation.trigger("bb.action.OPEN") doesn't work - literally nothing happens.

 

I tried to omit mimeType, specify another URL (even netwok http:// URLs), but I always get "no matching result from Menu Service" error as above. I'm running this on Z10 OS version 10.2.0.1743. I would be grateful for any suggestions.

 

Thanks in advance for your help.

 

Developer
Posts: 1,178
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Invocation issue

Old news.

 


oleg_derevenetz wrote:

Hi all,

 

I'm trying to implement MediaPlayer invocation in my app, but faced the following problem. Here is the code:

 

Invocation {
    id: mediaPlayerInvocation

    query: InvokeQuery {
        invokeTargetId: "sys.mediaplayer.previewer"
        mimeType:       "video/mp4"
        uri:            "file:///accounts/1000/shared/downloads/video.mp4"
        invokeActionId: "bb.action.OPEN"
    }

    onArmed: {
        console.debug("ARMED");
    }
}

 However I always get the following error on app startup:

 

Warning: InvocationWrapper::onQueryFinished: no matching result from Menu Service for query
   mimeType="video/mp4"
   uri=QUrl("file:///accounts/1000/shared/downloads/video.mp4")
   data= ""
   metadata= QMap()
   perimeter= 0
   action= "bb.action.OPEN"
   target= "sys.mediaplayer.previewer"
   invokerIncluded= false
Warning: InvocationPrivate::onQueryResolved: no result matching query, no armed signal sent.

and therefore all subsequent calls to mediaPlayerInvocation.trigger("bb.action.OPEN") doesn't work - literally nothing happens.

 

I tried to omit mimeType, specify another URL (even netwok http:// URLs), but I always get "no matching result from Menu Service" error as above. I'm running this on Z10 OS version 10.2.0.1743. I would be grateful for any suggestions.

 

Thanks in advance for your help.

 






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Contributor
Posts: 25
Registered: ‎06-28-2012
My Device: Z10, Q10
My Carrier: Beeline

Re: Invocation issue

What's interesting, Invocation of BB World still works in QML. OK, I'll try to do this via C++.


greenmr wrote:

Old news.

 

Developer
Posts: 1,178
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Invocation issue

[ Edited ]

Yes, that's exactly what happened to my app too. When BB10.2 showed up all my bound invocations (Browser, Remember, etc.) stopped working, EXCEPT BBWorld, which still worked fine.

 

I haven't sideloaded 10.2.1 so I don't know if they fixed invocations already, but BlackBerry says they are working on it. Even if 10.2.1 does include a fix it will be quite a while before it rolls out across the world and in the meantime we all had to rewrite our invocations so our apps would still work.

 

You might want to mark this thread as resolved since it a basically a duplicate of several other ones.


oleg_derevenetz wrote:

What's interesting, Invocation of BB World still works in QML. OK, I'll try to do this via C++.


greenmr wrote:

Old news.

 






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.