How to make a camera flash turn ON in Nokia 5800 application - qt

I require my application to take 3 pictures via Nokia 5800 phone during night-time. I want to ensure that the camera's flash remains ON while taking pictures. How can I ensure it?

You can use the AMMS(JSR-234) API's FlashControl. Here is a piece of code example that shows its use.
FlashControl flash = (FlashControl)
player.getControl("javax.microedition.media.control.camera.FlashControl");
if(flash!=null) {
flash.setMode(FlashControl.FORCE_WITH_REDEYEREDUCE);
}

You need to use APIBridge.jar , this jar will allow you to call native camera application. So you can call Native Camera, application from your code. Native camera Application has default setting for Flash.
Search on google for APIBridge.jar , you will find it will example. You may also find other useful example for reading inbox, contact list etc.

Related

XAMARIN FORM : how to send message to specific number of watsapp

i have page in which i have image of watsapp icon. What i want is when i tap on that image it go to watsapp to specific number which will be our company number, so client can text us or send any image or file through watsapp
The easiest way would be through the custom URL scheme as described here: https://faq.whatsapp.com/en/iphone/23559013
Which basically tells you to open a URI like this: whatsapp://send?text=Hello%2C%20World!. You can simply open it by calling to the Device.OpenUri method of Xamarin.Forms. This should work cross-platform for iOS and Android.
If you want to share a photo immediately this isn't possible as far as I know. It is possible to someone that is in your recent chats, by the sharing API, but to my knowledge you can't send it to a random number. At least not for iOS, it might be different for Android.

Add device to nest devices list

I am using sample application control-jquery-master provided on developer.nest.com. I can access first device for e.g. thermostat as written in the code. It shows on the html page http://localhost:8080 with status "INSIDE" and two buttons "UP" arrow and "DOWN" arrow. Now, I want to add my own device instead of "thermostat" something like "mysensor" with different properties that can be set or retrieved. Is it possible to do that? If yes, what are the API, If not does it mean we can only use thermostat, smoke detector sensors which are provided by nest?
My question is how to access and modify the JSON document? Where is it stored?
Best Regards,
Sonal
The only way to add your own sensor(s) to the devices JSON payload is to make use of the Product data read/write permission.
This Nest API doc outlines the steps necessary to reach a working implementation.
The only way to add more physical Nest devices to an account is by doing so on their site or with their app. You can add virtual devices using their Chrome extension: Nest Home Simulator

Implementing back-forward in a Flex application

I'm responsible for a Flex application which shows cards/tiles. A click on each card sends a request to the server and then the Flex app renders new cards from the data returned from the server.
Now I need to add a back-forward functionality, so that after several clicks on cards, I will be able to return to the previous requests. As I understand it, I just need to save some kind of a stack of URLs which were sent to the server.
The need is for regular back-forward, so that if I'm viewing card X, then click back and then click on a different tile, I can drop card X from my data structure and forget it.
What data structure would you recommend using? Any examples?
Thanks.
Use SWFAddress and simply use the browser's back/forward functionality. Here's a video tutorial to get you started.

Capture screenshot of website on the client (Javascript or flash)

Is there some method to issue a screen capture(browser window content only) from the browser with javascript or a embedded flash object etc so that a full quality image of the page content be saved or printed or an alternative approach.
I have a web app (asp.net 3.5) with google maps and other ajax operations client side like a custom tile server. I have been trying to implement a way for the user to print good quality captures of the webpage.
I have used the basic Window.Print() but in both IE and FF there many artifacts within the google maps and some items such as the popped up bubble doesnt print. I have experimented with save pdf thru cutepdf(just to post an example here) and the quality thru window.print() is low too.
For example, A screenshot with FireShot addon is perfect and what I want the client to have. however that is FF only and I cant ask the clients to install addons/activex controls on their browsers.
Have a look at this download example zip file(4mb) with:
Example screen shot using FireShot
(example of what I want to achieve
thru a html/JS button with in the
page)
Firefox Window.Print() result
(cutepdf used to save as pdf)
IE Window.Print() result (cutepdf
used to save as pdf)
note in 2,3 the little bubble is not printed even when open.
For now, I have added the function on my site to go fullscreen and guide the user to take a screenshot or call the window.print() function.
I am still looking for a method to print/capture my page.
are there any flash/activex controls that I can include in my page and thru them provide a quality print mechanism?
Thanks again for all the help but I still need more. :)
Thank you in advance.
http://rapidshare.com/files/311849636/Print_examples.zip.html
You'll go to all that work only to find that a simple app like Snagit will do the job. Building a SnagIt Screen Capture Plugin
The only way to reliably provide a high-quality print version of whats on-screen in a rich web application is to use the client-side, say JavaScript, to send the server precise information about the current state (where bubbles are, etc.) and use that to generate an image that mimics the positioning. Convert that image to a PDF or what-have-you, then send to the client for download.
Google also has a Static Maps API that might give you good results. I looked into it myself once, and only didn't go with it since (at the time) there were limitations on how many points they could support in a polyline.
I don't think this is possible. It would be quite a security risk to be able to capture the user's screen through scripting (imagine bad sites capturing screen information).
No there is not, though it would come in quite handy at times for bug reporting etcetera.
You will probably get the best result by creating a separate version of the page as a PDF have that being generated. It's no quick fix by all means, but you'll get superb print quality and total control over everything. The map part will probably be a bit tricky though as you need to get the map as a bitmap on the server somehow, and if it's not in flash on the client I don't know how you'd do that.

How do I login in with facebook connect in a flex application

I've been checking out facebook connect stuff from the new actionscript 3 library from Adobe. I have been trying to figure out how to use the facebook connect button inside of a flex app.
In an html page you would us the fbml and it would automatically put the facebook connect button on your page and when the user clicks on it it pops up the face div and lets the user login. Well you can't use that in flex. So I could put it on the page containing the swf but, that's why I'm using flex and not html. I've seen it done by the guys at Universal Mind so I know it's possible. I just need a little direction.
I know the function to use in the facebook connect api to cause that login dialog to come up I just can't figure the correct combination.
Chcek out the Create your first Facebook application with Flex tutorial and in particular the section on Add Facebook login.
This should be applicable to Flex. This would be done using the ExternalInterface calls from within Flash.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html
In Adobe facebook-actionscript-api there is a class LoginWindow which you can use.
When you need it this window will open like small flash popup window and it will display facebook login page and enable user to login. All needed events will be raised and you should be connected after that. I didn't tested it but from the code looks like what you need.
this developer created this js/flash bridge you are talking about using the ExternalInterface classes. you can download all source files as well. i found it very useful.
http://www.wellconsidered.be/blog/2009/01/04/facebook-connect-to-actionscript-3/
There is also a very clean and elegant solution/tutorial at:
http://www.stevenvh.be/blog/?p=57
Use this API:
http://code.google.com/p/facebook-actionscript-api/
Look at ConnectDemo.
The sample kind of sucks... it forces you to connect before showing the Flex app.
You need to tweek the example to get it to do what you want.
Also, FB depreciated some of the methods, so you have to look up new methods that aren't depreciated.
I'd love to update the sample, but I don't have the time to dedicated to another project.

Resources