How do you turn on the camera flash without taking pictures? [duplicate] - windows-phone-8

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
wp8 - Reflection API issue - Please check
I know you can control the camera flash but that only seems to actually turn on the flash when you take a picture or record video. I also found one other way to turn it on by focusing the camera.
Is there a way to turn the LED flash on without either of these battery intensive hacks?

Yep, it's possible to do that on WP8 using public APIs, please see my answer # Reflection failure when attempting to access Microsoft.Phone.Media.Extended
There's also a way to do that for WP7, see # http://www.locked.nl/wp7-flashlight-getting-started

Related

How to start an embedded kml tour?

This is my first post, wooohooo! I've been using stack exchange when I needed information but usually someone had the same problem as me and I didn't need to make a post. Which means this website is really good.
Now turns out I have a pretty unique problem.
Please check out http://gaia.tru.ca/birdMOVES/
You will see a website with a google map. It is connected to a db which will be automatically updated.
The purpose of this website is to track how birds feed. There is going to be bird feeders equipped with NFC all over the world to track birds equipped with RFID when they feed.
I am taking care of the front-end, the web app for visualizing.
This is a work in progress so try not to care about the looks of it.
Apparently everything was written in RApache because the person who made everything this far is a Geography teacher(Not a lot of programming background, I had to refactor his code and learn R because it wasn't in my array of known languages.)
My client asked me to add time animation to his map. Feasible with the help of Google Earth.
I made the existing R code generate a tour. It works perfectly and even shows on my map.
Here is the address of my dev server: http://thelab.dyndns.org:1080/birdmoves/
You can see that there is an extra check box for time animation. If you check it, the tour will appear as an object on the map (no way to use it whatsoever right now).
So what I'd like to know is how do I make it work? How do I make it autoplay when the submit button is pressed? With standard google earth controls for rewind, pause and fast-forward. And independently from the google maps without tour?
This is intense. I have the feeling google earth isn't going to work because they deprecated all their gadgets.
I'm on the clock and I need help.
In case you were wandering what eventually happened:
We ended up making a hybrid website where the static visualization is within Google maps using kml and the time animation is within CesiumJs using CZML.
CZML is based off JSON and can be used very similarly to kml.
The api is also very nice, it only takes one line of javascript code to get a map running on an existing server.
To implement time visualization CZML supports putting multiple consecutive values for almost any property(like position, to animate movement, or even color to change colors) and takes account of time.
Also very nice, CesiumJs supports animated 3d models!
If you're interested http://cesiumjs.org/
It also has a lot of support, documentation and tutorials... etc..
It's being maintained by professionals. I really recommend it.
The Google Earth API got deprecated and will not function by December this year which is not a viable option for a long term service. So cesium was the only option for this specific project.
Cheers

Windows Phone 8 ApplicationBar button long-tap event [duplicate]

This question already has an answer here:
Windows Phone 8 Application Bar Button Long Tap Event
(1 answer)
Closed 9 years ago.
I'm trying to create a music player in my Windows Phone 8 application. I want to use same ApplicationBar buttons for Next and Forward as well as Previous and Backward functions.
Is there any chance to get long-tap event of an ApplicationBar button(?) so that I can differentiate Next/Forward functions.
Can anyone help me with this?
This is not possible. The ApplicationBar API is quite restrictive, which is a deliberate move by Microsoft to ensure consistency. You cannot handle arbitrary events from the ApplicationBar. If you want this kind of behaviour, you will have to build your own UI to support it.
It is worth noting that your users will not expect 'long press' (more commonly referred to as tap-and-hold) behaviour on the app-bar.
The ApplicationBar buttons only support a click event. It is not possible to detect a "long-tap".
As the ApplicationBar support up to 4 buttons you could use separate buttons. Alternatively create buttons on the actual page for this functionality. Then you can have as many as you want. (See Nokia Music, Last.FM or Pandora for examples of other music apps that have put buttons on the page.)

Multiple stage sizes in Actionscript 3/Flash CS5 [duplicate]

This question already has answers here:
Flash dynamic stage size control
(2 answers)
Closed 9 years ago.
I'm building a downloadable flash app that appears as a window on a computer rather than a window in a browser. However, certain parts of the program will play YouTube videos, still within the program, not in a browser. That part is working fine.
However, I would like to change the size of the stage when it is running a Youtube video. Is that possible, or do I have to have the same size window showing for everything?
You can change the size of the stage by accessing the Document's Class, like this: this.width and this.height
UPDATE
It turns out only the embedding application can change the state, and changing the size through actionscript will not work, so throughout the player you'd have to probably access the NativeApplication through adobe air as you can see here: http://www.actionscript.org/forums/showthread.php3?t=222865 and as you can see here: http://www.actionscript.org/forums/showthread.php3?t=242042 - this shows you can only set the stage size during compile time.

How to save a 'div' as an image? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Get image data in Javascript?
Hello,
I've got a single div, which has a background already defined (note: its a single layer, on tag, or body background-image), and has an overlaying HTML5 canvas element which will let me draw on top of the background image.
I'd like to know how (if its possible) to create a button which when clicked, will save a snapshot of the div on the server side.
Example situation: I load page - > I draw something within the div -> I click save - > I go to repository - > I see my drawing (with the background and the user created overlay).
My current server side infrastucture is WinServer 2008 R2, IIS7.5, MSSQL 2000 RTM DBMS, Classic ASP application layer... Anything else you'd like to know?
Thanks for the assist in advance... :-)
For as far as I know, there is no standard .Net function to capture HTML to an image. What you could do is taking a snapshot with an extension.
Maybe this article can help you out.
Alternatively, I managed to scrounge up an indirect answer from StackOverflow (Mods - I is sorry, please don't be banning me for not searching first...)
Answer source: "http://stackoverflow.com/questions/934012/get-image-data-in-javascript"
Once again, thanks to "Uw Concept" for the prompt responses, and thanks to "Mathew Crumley" for the original answer...
Again, mods, I is sorry... :-(

Using GoogleMaps with JXMapKit

I have been searching on the web to see if I can use GoogleMaps with the JXMapViewer.
According to this, it is illegal, but the article is more than three years old.
Could anyone be kind enough to tell me if I can use GoogleMaps with the JXMap viewer? I know that Google has recently allowed desktop applications to use their static maps provided that the application is freely accessible to people on some website.
If this can be done, I would appreciate some pointer to where I could start looking so that I can use Google Maps, I tried messing around with this but to no avail.
Thanks in advance.
Edit: I have managed to show a map in my JXMapKit. The only problem is that I am getting the image as a tiled image, whilst I only need one. Any help on this issue?
It seems that the JXMapViewer will never be able to use GoogleMaps since Google decided to not make their Tile Servers available to the general public, as shown here.