Background Voice recording in Windows Phone 8.1 - c#

Researched a lot for Solution for recording voice in Background (When another app is running/ when phone is locked, etc).
Searched whole MSDN, stackoverflow for any solution regarding this, Still didn't find it.
Also checked the Api references, they say MediaCapture wont work in background.
But I found two apps, which can record in background. As reverse engineering is not possible with encrypted app, I can't check how did they achieve it.
http://www.windowsphone.com/en-us/store/app/pocket-recorder/eda4e045-733f-e011-854c-00237de2db9e
http://www.windowsphone.com/en-in/store/app/voice-recorder-8-1/511c6375-8bf3-4d19-8248-1650a60ea1ae
I checked whether they use Voip Capabilities, but it is not listed. So there is some other work around, But don't know how!. These apps are paid, so I wish to help community with free solution.

I don't believe you can do this with background tasks. This is because if your app has a lock on the microphone, you won't be able to perform certain functions with your phone (i.e. phone calls)

Yes, Voice Recorder can record voice at the background by stopping every audio files and listening from the phone mic. Even if you switch the screen off, or the screen shut off, the under dog software will still be very active and recording the least sounds it hears and very powerfully clear. Now, I am very surprised to find a software that broke the feats of windows phone, although the software can not allow you to copy the recorded file to sd card or to the phone memory unless a paid version. This is good all the same.

Related

How to detect if another application's audio is playing in background? (UWP, Windows 10)

I am writing a C# SDK (to be used by UWP Publishers) and would like to detect if another application (Pandora, Spotify, Amazon Music, etc.) is playing music in the background, so that I can mute my SDK's sounds.
This comment to this question seems to indicate that I can use BackgroundMediaPlayer.IsMediaPlaying(), but when I play Pandora in a web browser, or the Amazon Music App, this method seems to always return false when music is playing in another app.
This answer to this question seems to indicate that we used to be able to use Microsoft.Xna.Framework.Media.MediaPlayer.State to detect if another app was playing background music, but I don't believe this call is not available in UWP (please let me know if I'm wrong -- I mainly care about this working on Desktop and XBox One).
So my question is, how can I determine if another app (on desktop or in web browser or on Windows phone) is playing music?
I believe the BackgroundMediaPlayer.IsMediaPlaying detects audio playing from WinRT/UWP apps only and not Win32 apps. This API was important for apps on Mobile because you were only allowed to have one app with background audio at any given time. I don't think there is a way to detect this for Win32 apps at this time.
The BackgroundMediaPlayer.IsMediaPlaying method is now obsolete. I've noticed that if background music is playing in UWP, calls to Microsoft.Xna.Framework.Media.MediaPlayer.Play succeed but do not actually play any music, so it seems the check is not necessary in some cases.

Run function in app from ms band

So I've had a look around and I cant seem to find an answer anywhere so here goes. Is it possible with the MS Band SDK to run a function within my app when the user taps a button?
Currently (at the time of writing) there is no way for the user to directly interact with a tile-app and thus pass a response to the application installed on the phone*
Your options are (as I see it):
To use the sensors to define 'gestures'**
Guide the user to use Cortana to provide speech commands ***
*This might change, but due to the very little storage capacity on the band if this was added I would assume only very basic interaction such as yes/no/cancel dialogos etc. and simpler responses using the keyboard when/if it becomes available for third party tiles.
**There is currently a bug with background work so you might have to prevent the lock screen from locking while receiving and interpreting sensor data on the phone which will impact the battery on the phone. This is expected to be fixed soon.
*** Speech commands are well supported on Windows Phone but I'm unsure how well supported they are on iOS and Android

Screensaver app on Windows Phone 8.1

I would like to create an app which would pop-up fullscreen when user is not interacting with the device; the first tap would then close it. So it's exactly like a screensaver. It should "run" 24/7. Display should always be lit. Battery is of no concern.
I've already done this on android, but my WP skills are lacking and complete research would take me at least a couple of days, so I'm asking any WP gurus out there:
can the same functionality (screensaver) be achieved on the Windows Phone 8.1 platform?
If so, which are the basics that should be covered (programming-wise)?
Edit:
The only solution I have at this moment is changing the LockScreen background on a 30minute interval.
I'm still not sure whate happens in 2 weeks as some info suggests that the registered task will expire. Not to mention that LockScreen is shown only a few seconds.
Edit 2:
Subquestion: is there a way to keep LockScreen shown at all times (while charging)? Or maybe lauch lock screen from code?
Windows Phone doesn't usually allow apps to pop up on their own. Exceptions are made for specific usecases such as voip. There is also no way for an app that isn't running in the foreground to realise that the user hasn't interacted with the screen for any number of minutes.
Therefore your only option is to use the inbuilt lockscreen functionality.

can my windows phone application auto start?

Is there a way for my application to auto-start after some time instead of a notification? Or am I constrained to just notifications?
The difference between Android and Windows Phone (you mentioned Android in your comment) is that Android allows you to do pretty much everything while Windows Phone is a very restricted system. So, unfortunately, the answer is no. (There are ways to launch your app from other places than the app's tile, though. See the end of the answer)
Why am I saying unfortunately? Of course, Windows Phone is a nice and seek operating system that runs wonderful even on low-spec devices like the Lumia 520. But that doesn't mean developers shouldn't get the freedom to interact with the Operating System and do innovative tasks.
But there are reasons Microsoft chose not to allow Autostart (or at least, restrict the area an app can access, not the autostart in particular):
it may irritate customers. Even if you show a message box, many customers just dismiss it without reading it and they wouldn't understand why an app would appear without their interaction
each feature would make the operating system slower and bigger. I don't want to say that an autostart makes the phone unusable, but here's a question: Do you need to run a registry cleaner on you PC from time to time? Yes, you do need to do so You even need to reinstall a PC form time to time. You don't need to do that on a Windows Phone. It just works and will always work (OK, that's maybe a bit too optimistic, but you get it...)
I also don't think an autostart is particularly useful on a mobile. Because each app runs full screen, the system would boot up to your app instead of to the start screen. I don't think the user will always want your app (most of the time, he'll want to look at his start screen or launch another app), so it would just be annoying. On a PC, you can use the auto start for small programs that should run in the background (for example, I've got a progamm that provides Git with my SSH keys that automatically starts up each time).
But as I mentioned above, there are other ways to launch your app. Using url schemes can be surprisingly powerful as you can put a button on a web page that will directly launch your app. Other apps will also be able to launch your app. But as it is not directly what you wanted to know, I won't explain it in detail and instead provide you wiht a gread link to msdn: Auto-launching apps using file and URI associations for Windows Phone 8
For such features you should look into: Windows Embedded 8.1 Handheld instead of the consumer version Windows Phone 8.1.

Lock screen notification not working on store build (Windows Phone 8)

We have a Windows Phone 8 game which includes text notifications on the lock screen. When we test the app on our devices the notifications work fine, and the app can be selected in the lock screen settings to display notification text. However, once the app is uploaded to the Windows Phone store and downloaded, the app is not listed in the settings for the lock screen, so can't be selected to show lok screen notifications. Has anyone else had this problem or might know why it's happening? I was thinking it was possibly something to do with the downloaded version being installed in the 'games' folder on the device, whereas the working test version is just listed in the main list of apps.
It turns out that this is a limitation with Windows Phone 8. Games cannot use lock screen notifications. From the Windows Phone developer forums:
I was hoping to find out WHY this limitation exists and if there was any way around this for you. Unfortunately it appears to be just a limitation that games cannot have lock screen notifications. You would either need to NOT post your game into the Games hub and make it an App, or not have a lock screen notification.
There was no indication that this would be changed in the near future, but I have made them aware of this issue and hopefully they will look into modifying this in a future update.
That's the answer from Dan Reagan, Team Manager, Windows Store Developer Solutions

Categories