How can I switch camera by onClick using Google Vision API - google-vision

Can I change .setFacing(CameraSource.CAMERA_FACING_FRONT) by clicking button ? I used it for qr-, barcode scanning and want to change cameras.

I have found answer for my question.
I just called CameraSource.release(), my init() method with FRONT param and all other logic
and recall cameraSource.start(visionCameraView.getHolder());
and it's worked

Related

Proper way to close dialogs in Flutter tests

Flutter's WidgetTester has a pageBack() method for popping the route stack. When I open a page as a fullscreen dialog using MaterialPageRoute's fullscreenDialog property, the pageBack() method does not work ("One back button expected on screen"). I can't find an alternative method for the job.
What is the standard way to cancel/close a dialog in a Flutter test?
I am able to close the dialog as follows:
await tester.tap(find.byIcon(Icons.close));
But then I could have instead done a pageBack() as follows:
await tester.tap(find.byIcon(Icons.arrow_back));
Why have the pageBack() method but no equivalent for closing a dialog?
I have not yet written my Cupertino UI yet. Will that test need to look for a different icon?
See also a similar problem I had with selecting the overflow menu.
UPDATE: Maybe pageBack() emulates pressing the system back button, not the back arrow? In that case, there would be no need to emulate the behavior on iOS, and I would have to find the back button by icon to emulate pressing it, anyway.
You can have a dialog that contains a button with a text 'X', which pops the dialog.
This button, you can find with
await tester.tap(find.text('X'));
and don't forget to pump to go through with the tap
await tester.pumpAndSettle();
Have a look at the full code sample the flutter team is using to test dialogs: source code
I think finding by Icons.close seems reasonable. I did similarly in my app. Another option could be assuming the x,y of the button in the navigation bar and just tapping at that location on the screen.
I faced a similar problem earlier and I found the following solution that worked fine for my case.
Navigator.of(context, rootNavigator: true).pop('dialog')
Or you can write like,
Navigator.of(context).pop();
Navigator.pop(context);
You can check the brief documentation on Flutter Navigation and Routing here.
Hope, this would work. Have a great day.

Can i get screenshot of desktop using vuejs

i am working on tracking app using vue.js. I am a new developer.i wanna know is it possible to track mouse click and capture screenshots even if person is on desktop or any where else on browser
This has nothing to do with VueJs specifically. However, you can use HTML5/Canvas/Javascript to take a screenshot, but that's still experimental.
Take a look at this answer: Using HTML5/Canvas/JavaScript to take in-browser screenshots
i have found the solution
i followed the steps here
https://www.webrtc-experiment.com/getScreenId/
these steps allowed me the screen sharing on my webpage and then i use html to canvas to get the image of the video tag

Android how to clustering markers on map v2

I am writing an apps about google map v2
i have around 6000 makers to add into the map,
and to hide and show them with the camera change,
and also on info window click event include.
I have done the above functions, but i have no idea on how to clustering the markers,
as i search in GOOGLE, i found that there is a library call CLUSTERKARF, it works,but i got some problem on it,
I dont know how to change the markers' icon, infowindow function disabled....
Do anyone of you had working on that library? or maybe another library or method that i can use?

call back after google plus share button

i am implementing google plus in my application. i wanted to implement a callback function after the message was shared by a user. please let me know whether it is possible or not to implement callback after clicking on share button in google plus.
Thanks in advance
pratap
There are actually two possible callbacks available by setting the share tag attributes or by setting parameters in a call to gapi.plus.render. The function specified by onstartinteraction is called when the share bubble pops up, and the function specified by onendinteraction is called when the bubble closes.
See https://developers.google.com/+/plugins/share/#sharetag-parameters for further details.
Google+ Share buttons do not support callbacks. There is an open feature request to add this functionality. Star it to show your interest but please do not add "+1" and "Me too!" comments.

How to use AssistiveTouch UI in iOS

I'm now developing an app on iOS. With some reason, I want to use AssistiveTouch UI in my app. For example, there will display a button in my app like AssistiveTouch, if anyone press this button, four buttons will appear like AssistiveTouch, if anyone press one of there four buttons again, some action i set before will excuse.
Does apple support api about this? Or Is there any source code available?
You would have to reimplement this from scratch. There is no public API for either accessing the existing Assistive Touch feature (it has to be turned on by the user in the settings) or for creating a similar UI.