Mute application volume in win CE - windows-ce

I have developed a media based application that runs on a device with Win CE. I need to have a mute/unmute button for controlling the application volume. I have developed the app using .Net compact framework.

I've used waveOutSetVolume for mute in WinCE:
http://www.pinvoke.net/default.aspx/coredll/waveOutSetVolume.html

You cannot control the sound volume for certain application. What you could do is define a static Mute boolean. When it's set to true, the sounds are not being played.
OR
You could look for a custom library that allows playing audio files and controlling the volume - anyway, this isnt the case, if you are only interested in mute/unmute.

Related

Programmatically turn off the system sound for NFC proximity on Windows 10 phone

I'm developing a Universal Windows Platform (UWP) app for use on Windows 10 phones (e.g., Lumia 950/950XL). Part of the app requires that an NFC tag is tapped to allow the user to indicate their presence at a particular location.
When the phone comes into range of a tag, a system generated sound plays. This is independent of the app. I'd like to be able to turn this sound off, because when the tag is tapped, I want to indicate success or failure by my own sounds. The system sound is quite long, and as far as I can see there's no way to change it.
Is there any way to turn off the system sound from within the app?
At this time, the Universal Windows Platform cannot change system settings for the user. There are, of course, operating system API used by the Windows Settings apps, but those are not public and have not been announced to be made so. This includes sounds. Sorry.

AVRCP for Windows phone 8?

I have a project for multimedia player running on WP8. Does WP8 SDK supports AVRCP that user can control playback from Bluetooth device? What APIs or events I should use to receive control events? Thanks!
From a consumer perspective WP7 OS supports BT-AVRCP 1.3 and so does WP8 OS. Based on MSDN the BT-AVRCP 1.4 profile is supported for WP8.
From a developer perspective BT-SPP is supported for direct developer reads & writes. I'm not sure if WP8 can successfully open a BT-AVRCP socket, so go ahead and try to open a socket to one and see what happens.
If you're just trying to play Audio on a Bluetooth headset, use the plain-old WP7/WP8 media playback classes and use the new WP8 AudioRoutingManager to force output on bluetooth headset.
AudioRoutingManager.SetAudioEndpoint(AudioRoutingEndpoint.Bluetooth)

iOS BLE - How to keep app active in the background?

I am trying to find a clever way to keep a BLE app active in the background on iOS 6, without breaking any of Apple's rules. I plan to use the phone as a peripheral device and another BLE circuit as the central. My app will automatically be opened when a user arrives to a building using geofencing. After that the iPhone will connect to the first BLE central device it sees (the device will be in its white list). The user will then be able to move throughout the building switching to different BLE "nodes".
My question is: What do I need to do in the background when a user is stationary at their desk so that the app does not get suspended due to memory resources?
My idea is based on this solution for a separate problem: There could potentially (not regularly) be 10-50 users in an area with only a few BLE "nodes" and I read at bluetooth.org that I could setup a dynamic connection system, basically rotating connections through all the users.
My idea is to setup a similar dynamic system where the central device (not the iPhone) disconnects the device on regular intervals (30-40 minutes) and then the iPhone will reconnect.
Is this something that some feasible? Is this against the iOS development guidelines? I was unable to find anything explicit about this. I have also asked on the iOS developer forum, but unfortunately it is not as popular as this site.
Thanks in advance!
Xcode -> Project target -> Capabilities -> Enable background mode
Check Uses Bluetooth LE Accessories
Capabilities
Also enable the following key in .plist file
Required background modes
App communicates using CoreBluetooth
Plist

Auto Detect Windows Mobile Device programmatically

I am writing a windows application (written entirely in C++) which reads files from a storage card on a mobile phone running Windows Mobile. The tough part is, I don't know how to make my application detect the event that a user has connected the mobile phone to the USB of laptop. I did some reading on MSDN and have written a small code using RegisterDeviceNotification, which detects whenever a USB disk is attached/removed from the laptop. However, I am unable to tweak this to make it work for phone type devices. Please help me out through any links/tutroials which explains this(preferrably C++, as I don't know .NET or C#).
Thanks
Alok
According to this article you can use RegisterDeviceNotification to get notifications when activesync detects a device has been plugged/unplugged. (See option 3 at the end of the article)
It may just be a matter of setting up the correct notification filter.
Windows Mobile devices use RNDIS, a network interface protocol behind the scenes. Hence, the RegisterDeviceNotification method still works, but you're looking for a DEV_BROADCAST_DEVICEINTERFACE, not DEV_BROADCAST_VOLUME. (i.e. dbch_devicetype==DBT_DEVTYP_DEVICEINTERFACE)
You can use RAPI or RAPI2 to detect when a Windows Mobile device connects to a PC via Active Sync or Windows Mobile Device Center. RAPI can also be used to read the files on the storage card and much more.
RAPI is simpler to program because it is a C based API. RAPI2 has more functionality than RAPI, but is an object oriented COM API. If your needs are simple and you only care about one device/connection at a time then RAPI is good enough. There are two RAPI functions used to detect connections: CeRapiInit (blocking), and CeRapiInitEx (signals an event upon connection).

can J2ME access camera(image capture) event from N73 device

I am working on project where I need to catch the image capture event.
It's for nokia N73 having platform S60 3rd edition.
Is there any possible way using J2ME only (without using symbian).
Description:
J2ME application running in background, on click of capturing image from camera J2ME application initiates and comes in front. Takes the captured image and transfers it to J2ME app and displays on screen.
if not possible using J2ME , Is there any possible way using symbian? can anyone provide tutorial or code snippet?
Thank you.
Regards,
Rajiv
Not possible to access the native camera from J2ME. You'd need to get the user to start your app first, then access the camera from your app (using JSR 135, spec here, introduction and examples here). Then you can use the captured image however you wish.
HTH
The N73 in particular has a fairly large hardware limitation when you want to use the camera.
You need to have the user manually open the camera cover before you can use the camera.
This launches the native camera application included in S60.
The user then needs to close that application.
From that point on, J2ME can use the camera, via the mobile media API defined in JSR-135.
If the user reboots the phone, the camera cover needs to be re-opened before J2ME can use the camera again.
You may have better luck using J2ME and JSR-135 to capture images using the front camera on the N73.
I seriously doubt that J2ME would see the user pressing the camera key in javax.microedition.lcdui.Canvas.keyPressed();
JSR-135 doesn't really provide a system-wide camera capture event for J2ME.

Resources