Setting AlbumArt from isolated storage of AudioTrack - windows-phone-8

I'm using Background Audio Player on Windows Phone 8 and I'm trying to set an album art for my audio track. As I've read here and at MSDN the image MUST be at shared/media/
image is present into isolated storage
test1
new Uri("Shared/Media/1.jpg")
test2
new Uri("ms-appdata:///local/Shared/Media/1.jpg")
but not it works, why?

in a Windows phone 8 control not it works with bindings from isolated storage.
I'm used a SuperImage control of Coding4Fun Toolkit

Related

Saving images locally in windows phone 8.1 universal app

I want to download and save(cache) images locally in windows phone 8.1 universal app. so that if Phone is offline I can show users images(avatars) in ListView.
What is the best way of saving images to local storage(should I use local storage or I use sqlite as i am using sqlite to store user's other information)?
How can I save (download) images to local store?
Thanks!
There's a great extension by Q42 in their Q42.WinRT framework called ImageExtensions.cs
You use it on normal Image objects in XAML, but instead of setting the Source of the Image, you set the ImageExtensions.CacheUri.
<Image q42controls:ImageExtensions.CacheUri="https://www.google.com/favicon.ico" />
q42controls is just a namespace added on top of the XAML page
xmlns:q42controls="using:Q42.WinRT.Controls"
When the image is loaded, it's automatically cached!

WP8 toast notification with custom sound

I'm currenly writing an app where I need to use custom sound for toast notifications (which is sent from cloud). MSDN states that the audio clip must be stored in the app's installation directory or local storage folder. So how is this done?
I tried the CopyToIsolatedStorage() code sample from How to play background audio for Windows Phone. It fetches the audio clip correctly but when the toast should be shown the device won't play any audio or even show the toast which indicates that it can't find the audio clip correctly. In the app, I have a method which shows contents of the push notification when the app is in foreground. From there I can see that the toast notification is sent and received correctly with toast.mp3 sound tag. So the problem must be in the app but I can't figure out what I did wrong.
Tl;dr version:
I want to change toast notification sound, my device is running WP8 with Update 3 and I have a 5 sec long mp3. I can't figure out how and where I should put the audio clip.
I dont think you need to copy the sound to isolated storage, just put it in your main project and set it as content. Then in your Push just reference it.
<wp:Sound>toast.mp3</wp:Sound>
Or if it is in the Assets folder in your project do
<wp:Sound>Assets/toast.mp3</wp:Sound>
Note: This only works for Windows Phone 8 Update 3 and later, works fine for all Windows Phone 8.1.
So the problem was that I blindly assumed one can reference to the audio clip with just <wp:Sound>toast.mp3</wp:Sound> or new Uri("toast.mp3", UriKind.RelativeOrAbsolute), as in the MSDN tutorial, when the file is copied to the root of the isolated storage but this isn't the case. You'll have to include the directory where the clip is in your project to the path, in my case Audio\. Thaks goes to WiredPrairie for pointing this out.
So to wrap things up:
Copy the audio clip which you want to use to the isolated storage with CopyToIsolatedStorage() from How to play background audio for Windows Phone and follow the instructions in Using custom sounds in toasts on Windows Phone 8 Update 3 . And remember to include the directory structure to the path of the clip or put the clip in the root of your project.

Launch music from sd card in wp8

I am working a wp8 app which can read some different types file.Then launch them in a simply way.Like we can launch mp3 using MediaPlayerLauncher .But I failed.Any help will be kind to me.Thanks
I assume that you managed to use ExternalStorage. Firt of all you are not able to see this (mp3) files because they are reserved. What you can do is to change extensions to them and copy to InternalStorage. As you have done that you can play them well with MediaElement or BackGroundAudio.
Also it's not possible (for now) to play directly from ExternalStorage (SD card).

convertion of .mp4 file to .3gp in windowsphone 8 using c#.net

Using capturesource I got the video in isolated storage, But I need to upload that video to server,
whenever I try to send the video, The size is huge so I need to compress(convert) the video from MP4 to 3GP
The default message screen of windows phone shows "processing video" whenever I send a video message through attachment,and it convert .mp4 video to .3gp.
I tried a lot of research to achieve the conversion from MP4 to 3GP please help me
The code is
CaptureSource captureSource = new CaptureSource();
private string isoVideoFileName = "CameraMovie.mp4";
private FileSink fileSink;
VideoCaptureDevice webcam = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();
AudioCaptureDevice audio = CaptureDeviceConfiguration.GetDefaultAudioCaptureDevice();
captureSource.VideoCaptureDevice = webcam;
captureSource.AudioCaptureDevice = audio;
fileSink = new FileSink();
fileSink.CaptureSource = captureSource;
fileSink.IsolatedStorageFileName = isoVideoFileName;
captureSource.Start();
I tried to change the resolution of VideoCaptureDevice but it not helped me.
If it's possible for you, you can upgrade your app to Windows Phone 8.1 Silverlight (you'll need to download Update 2 for Visual Studio 2013 and put the developer preview on your developer device(s)). The conversion itself is straightforward - I had no issues with a very complex WP 8.0 app (although backup your app first!)
Once that's done you can then access the Windows.Media.Capture.MediaCapture library. This will allow you to change to more resolutions than are available using VideoCaptureDevice. For example you can create a profile that will record video to QVGA like this:
MediaEncodingProfile profile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Qvga);
Which will give you a resolution of 320 x 240 and a file size of ~20MB for 4 mins of video. Still not ideal from my purposes either, but a big improvement. MediaEncodingProfile also has methods like MediaEncodingProfile.CreateWmv() and MediaEncodingProfile.CreateAvi() but I've not been able to get these to work yet (see my question here: MediaEncodingProfile.CreateWmv gives "No suitable transform was found to encode or decode the content." error).
The tutorial I used to get video recording using MediaCapture can be found here: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn642092.aspx
Hope this helps...
Currently there is no public API that allows you to convert from MP4 to 3GP.
One option would be to port FFmpeg to Windows Phone but currently, if anyone has done it, its not publicly available.

using camera class in android in flex

The default camera showing up is the back camera using Camera getCamera
I want to know how to switch to front camera.
Also Camera names length is showing only length as 1 and not 2 , but i am having a front and back camera on galaxy tab, so i think it should show 2 names.
Please let me know a way out to this.
I am using air 3.1 , which is the latest version at present.
and the application is built in Flex 4.6 version
Air for Android only supports the back facing camera -- at least that might have been the case until very recently.
I have downloaded and saved the AS3 API reference from Adobe. On my local copy of the docs, it says this about the Camera.names property:
On Android, only one camera is supported, even if the device has more than one camera devices. The name of the camera is always, "Default."
However, when I look at the docs online, that comment is no longer there. So maybe Air 3.2 (released yesterday) now supports both cameras on Android!
Online docs:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html#names