11-27-2013 10:35 PM
Have the following
and I'm attempting to call it with
But I get back an error when trying to run the invoke.
InvocationWrapper:nQueryFinished: no matching result from Menu Service for query
InvocationPrivate:nQueryResolved: no result matching query, no armed signal sent.
Solved! Go to Solution.
11-29-2013 08:14 AM
unfortunately you've hit a known issue for which a fix is on the way. In the meantime you should use the InvokeManager API from C++.
12-04-2013 01:18 PM
I believe you can also work around it by not specifying the target ID (do you really care if the user gets the image from the offical camera app? It's not present in the work perimiter, for example, so if you ever want your app deployed there your invocation will need to be more generic)
You can also use file picker and specify that you want an image. The user can then select the camera from there, or pick a photo they have already captured.
12-05-2013 10:26 AM
Depends on your use case. The main reason you wouldn't want to just add your own camera control is because then you have to build a bunch of UI to control it. The camera card will do things like focus regions and modes, HDR, different aspect ratios, scene modes, and a whole host of other stuff that you would have to either replicate or accept as lost functionality.
Why do that when you can simply invoke it or use the file manager for less work?
The camera control is really only for if you are going to do something special with the camera, like apply filters or do panoramas or scan barcodes or whatnot.
12-05-2013 01:48 PM
1. I think it's better to use the card then roll my own both in terms of end result and amount of work.
2. I've used the filepicker before and yes it's very easy, however I'm building a game in which using a photo downloaded from google would be an easy way to cheat(a photo scavenger hunt) so I only want the user to be able to use the camera.
Since posting I've moved to using C++ for this with the following function
InvokeTargetReply *targetReply = manager.invoke(request);
The difficulty now is getting the photo taken in the card back into my app so I can use it. Not sure of the best way to do that I think I'll have to use a signal and a slot. It was so much easier when I was using the file picker.
12-05-2013 02:37 PM
Yes, that is an excellent reason for using the card, and the built in one specifically.
Getting the photo back isn't that hard, You do need to use a signal/slot though. They are great!
You just need to connect to the InvokeManager's childCardDone signal. If you get "save" back as the reason, then the data attribute will hold the path to the captured image. From there, you can do what you want with it (if your app needs it for more than a few seconds, you should proably copy it into the data folder of your app so the user can't delete or swap it. Make sure there is some process to delete that later, as the user can't manually do anything to your data folder short of uninstalling the app)