I wanted to know is there any classes or API for accessing the same ? I have seen lots of applications on windows phone store. click here for sample.
For Windows Phone, you can use Microsoft Media Foundation APIs. If you want to use the volume APIs in c# you need to make a reference to a C++ project that does it.
IMFMediaEngine::SetVolume method :
HRESULT SetVolume(
[in] double Volume
);
Volume [in] : The volume level. Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation).
I think you can use a background audio agent too.
Related
I am building an application with the following requirements:
Must run on both mobile phones and tablets
Must support online/offline scenarios
Requires geolocation
Requires local storage
Platform is unknown at the moment (due to the nature of this project, I cannot yet rely on a particular platform version, e.g. Android 4+ or Windows 8.1)
I am leaning towards building this in HTML5/CSS/jQuery/Bootstrap. Since HTML5 supports both geolocation and local storage, and since I do not need to use any device feature such as a camera, I don't think something like PhoneGap is necessary.
However, as I am new to mobile development and PhoneGap, I am not sure if I am missing something. Are there any reasons - apart from future-proofing against future requirements - why I should consider using PhoneGap even though I don't think I need it for any particular reason? Is there value in having its API sitting in front of any interaction with the devices upon which my application will be running?
Factors to consider with respect to Local Storage.
Local Storage size limit:
Web storage provides far greater storage capacity (5 MB per origin in Google Chrome,Mozilla Firefox,and Opera; 10 MB per storage area in Internet Explorer;25MB per origin on BlackBerry 10 devices) compared to 4 kB (around 1000 times less space) available to cookies. ( source Wiki)
Local Storage Method.
Web Storage:
Web SQL Database:
Indexed Database:
File Access:
source: html5rocks, sitepoint
All MOBILE broswers have varying degree of support for above local storage method.
The most widely supported method is Web Storage.
If you would like to store more than the limits mentioned above than you need to use the native (OS) features for storing data. Then PhoneGap is the obvious choice for accessing native features.
How are you planning to distribute your app!! If you want to distribute using a website, then may be you don't need phonegap. BUT..... if you want it as an mobile app, then you'll need phonegap to easily wrap your code. Phonegap will help you to build installation package for many platforms (e.g. APK for android)
I am building a small cards game for Windows Store using HTML/JS as my programming languages. One of the features that I would like to add is multiplayer capability. My game it's based on a 1 versus 1 player (unlike Hearts where you need 4 players), so an ad-hoc peer-to-peer connection is enough. Also, keep in mind that I am only considering local network multiplayer, without internet support (meaning that "privateNetworkClientServer" capability is required on that app manifest).
So I am imagining, when a player want to start a multiplayer game, the app will periodically broadcast a message to find any candidates. Meanwhile he will also have to listen for those same messages (in case of another player is broadcasting them also). When they find which other we transmit the game state back and forward to perform the required games changes.
My question is, does WinRT provide any functionality out of the box to do something like this? If no, do you have any suggestion for my problem?
Thanks
Look at the documentation for the PeerFinder class. Proximity can use either NFC or by browsing on the same subnet. Note, in the case of WiFi, not all WiFI cards support the browsing model, so some older PCs may not be able to use this solution.
The proximity sample application on msdn should help you with this.
I need to compare the FPS between phones from diffrent manufacturers. I will be using default phone applications such as Contacts.exe, Browser and SMS applications. I read from the forum that there is setting to enable the FrameRateCounter widget which application developer can enable to measure FPS for his application.
Application.Current.Host.Settings.EnableFrameRateCounter = true;
But since all applications that I am trying to use for performance measurement are default (no source code), can we enable this feature globally and check FPS for any application that we launch globally?
Thanks
There is no way to activate this setting on a global scale. To benchmark different phones, you'll probably have to make your own multi-purpose app to test the scenarios you're interested in. Note that there's already a few benchmark apps available on the MarketPlace.
As a side note, Application.Current.Host.Settings.EnableFrameRateCounter is a Silverlight setting, while Contacts.exe is a native app. So even if there was a way to activate the setting globally, it wouldn't work for this specific app.
I am new to the Emebedded Linux. I want to use my USB keyboard using threading.. I know the concept of the threading but i want to know how i can detect it using the concept of threading. ?
If you don't wish to use non-blocking I/O to read the keyboard, you can use a thread which does a blocking read and signals your main thread (or sets a flag which it can poll) when input is available.
In addition to blocking, you may have to contend with a default setting to line mode.
A common choice for polling or responding too single characters in a single threaded program is to change the terminal mode settings - see the man pages for termios, stty, etc. You will however need to change them back if your program exits.
Another option would be to skip the whole terminal infrastructure and read the input events directly through /dev/input/. Or at an extreme you could skip the USB HID driver and write your own kernel driver for USB keyboards.
If I understood you correctly you have a embedded linux board and now you want to connect a USB keyboard and use it with applications on the embedded linux board? If this is correct then you dont need to do anything with threading. What you need to do is have drivers installed for that keyboard. For that you should look into the kernel build config to see if the USB keyboard drivers (HID drivers) are enabled or not.
You can use either of following based on your requirement :
blocking I/O
non-blocking I/O
For non-blocking I/O, try Multi-threading based approach. For blocked I/O, try epoll() system call based approach.
Regarding the method to detect the keyboard, you can try the following :
Use the file /proc/bus/input/devices to detect on the devices, but it does not get updated until you reboot in certain systems.
Detect using /dev/input/eventN and the ioctl() call to detect the event bits. The event interface is very useful as it exposes the raw events to userspace.
I am writing an application which is supposed to work on various mobile devices, and i need to retrieve the device hardware on which it is running.
Is it possible, and how ( if it is ) to retrieve the device hardware parameters ?
As Flextras pointed out, check out the documentation for the following classes:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/sensors/Geolocation.html
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/System.html
You may find additional stuff of interest within the flash.system.* package:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/package-detail.html