Help Developers Please - Windows Phone 7 Software Development

i am trying to build a music player app that can play in any orientation (zune doesnt rotate !) my build is so basic and got few functions
i am completely new to building apps but i got this code from microsoft sdk and added the any orientation code from a website but cant find a code that makes the player reads the library also i wish any one help me or if anybody know how to make zune run in horizontal mode it will be great

AhmedtSadek said:
i am trying to build a music player app that can play in any orientation (zune doesnt rotate !) my build is so basic and got few functions
i am completely new to building apps but i got this code from microsoft sdk and added the any orientation code from a website but cant find a code that makes the player reads the library also i wish any one help me or if anybody know how to make zune run in horizontal mode it will be great
Click to expand...
Click to collapse
Not sure if you know how to make the app play music or not, but ask if you need help. For the orientation, in your XAML code, you are going to need the following to support landscape:
Code:
SupportedOrientations="PortraitOrLandscape"
That goes in your XAML page, above the '>' character near the top.
Additionally, this can be used to default it to portrait or landscape:
Code:
Orientation="Portrait"
or
Code:
Orientation="Landscape"
With that said, that doesn't mean it will look good. No offense Layout can be very tricky and in many cases additional code is needed to handle the orientation change. Although, if you use proper layout (in this case meaning horizontal/vertical alignment correctly and not relying too much on margins), then your app may end up working fine in both orientations. If you use Expression Blend, it makes it a lot easier to do this stuff if you go into the devices window.

i am asking for codes that make the app read my music library i already did what you said!

AhmedtSadek said:
i am asking for codes that make the app read my music library i already did what you said!
Click to expand...
Click to collapse
Okay, you are going to need a reference to the assembly 'Microsoft.Xna.Framework'.
Then add the using statement:
Code:
using Microsoft.Xna.Framework.Media;
Initialize your library:
Code:
MediaLibrary library = new MediaLibrary();
Then to play, for example, the first song in the library:
Code:
MediaPlayer.Play(library.Songs[0]);
Also, try getting albums (or genres, artists, etc.)
This shows how to play the first song from the 11 album:
Code:
Album album = library.Albums[10];
MediaPlayer.Play(album.Songs[0]);
Of course, I would recommend showing them in a listbox or something.

Related

HTC TF3D on Touch Pro 2

Any idea why when you scroll to the music tab, albums are not listed in the order in which they were synced? I have the album artwork ok, and all of the tracks are listed - but not in the correct order. If I switch to WMP on my TP2 everything is as it should be - its only in the TF3d that things go a bit weird.
Also, is it possible to customise the weather to a city/town that isn't listed?
Cheers
Followed this up today with HTC and get this - the TF3D interface has been designed to randomly sort the tracks and this they claim is a 'selling point'. The only way to have tracks in the order in which they should appear is to create a playlist for all of them. Unbelievable, totally unbelievable.
What muppet designed it this way?
So if you have tracks
1 aaa
2 bbb
3 ccc
they can get ordered like this:
3 ccc
1 aaa
2 bbb
?? And there is no way to sort on alphabetical order?
I never use the mp3 player, have my IPod for music and TP2 for radio.
I always go to the Albums sub-tab in the Music tab.
Every album is listed correctly.
Are you sure your tags are ok?
TomLoth said:
Are you sure your tags are ok?
Click to expand...
Click to collapse
That may also be a problem. You may have to correctly set your ID3v1 and ID3v2 tags of your MP3's.
Perhaps you could edit them using magic mp3tagger. www.magic-tagger.com. Is fairly cheap and works splendid. I've bought it for my iTunes (had over 25 GB to edit ... took too long for manual editing).
Mp3Tag is free and AWESOME!
vdKarel said:
Perhaps you could edit them using magic mp3tagger. www.magic-tagger.com. Is fairly cheap and works splendid. I've bought it for my iTunes (had over 25 GB to edit ... took too long for manual editing).
Click to expand...
Click to collapse
GET SONGBIRD!! it's free!!! based on mozilla engine with plenty of extensions: foldersync extension with will sync with any disk: ie your microsd
It will edit MP3 tags by batch
AND ALL FREE
http://getsongbird.com/
You guys are formatted by micro$oft and find normal to pay an application to edit a mp3 tag!
phigafr said:
GET SONGBIRD!! it's free!!! based on mozilla engine with plenty of extensions: foldersync extension with will sync with any disk: ie your microsd
It will edit MP3 tags by batch
AND ALL FREE
http://getsongbird.com/
You guys are formatted by micro$oft and find normal to pay an application to edit a mp3 tag!
Click to expand...
Click to collapse
Hmz, haven't heard of that program before. Does it also retrieve the id tags from an online database? With magic tagger you can insert let's say 300 mp3s from different artists, albums, etc all without ID tags or with very wrong ones and it looks up the correct ID tags from an internal and online database. Making manual (batch)tagging obsolete. Just import, synchronize, tag!
vdKarel said:
Hmz, haven't heard of that program before. Does it also retrieve the id tags from an online database? With magic tagger you can insert let's say 300 mp3s from different artists, albums, etc all without ID tags or with very wrong ones and it looks up the correct ID tags from an internal and online database. Making manual (batch)tagging obsolete. Just import, synchronize, tag!
Click to expand...
Click to collapse
Both Song Bird and MP3tag and nigh on every other mp3 tagging application will need some form of reference point.
An example being, put a CD in to be ripped. the combination of number of tracks, track length and total time will make that CD nigh on Unique, so the application can reference it back.
If I present a set of random tracks with no details, what tells the system that track a (2.04) is actually Song A or song B?
even with the auto-tagging features, you may want to manually adjust your tags. For instance, I like my tracks to have a leading 0 if needed (01, 02 etc) Most databases have it as 1,2,3. So I need to change that. Also, I prefer to have songs with guest artists to have the guest artist in the Artist information field.
ANYWAY.... my TP2 TF3D MP3 player puts all the album information how i want it. (80GB of Mp3's means I have to be a little anal with my tags)

Big News! rmplugin(not rmsplitter) for tcpmp!!

It's a rmplugin for tcpmp developed by ghosting from pdafans.com(Chinese).
Source: bbs.pdafans.com/viewthread.php?tid=884413&extra=&highlight=&page=1
It was tested on Xda flame with rv40+aac,rv30+cook(low bitrate).
But it didn't play so smoothly with rv40+aac(640*480,25fps,600kbps).
important: try to import the fix.reg while your rm video can't be played.
Sorry for my BAD English....
These are nice news indeed Did the author rlease the source code for this (and if so could you post it here? pdafans doesn't allow to view posts unless you're a member...).
The plugin seems to piggyback on dlls compiled from mplayer by ajeet (version 0.3).
Just tried and it works quite well (apart from a display issue if "Pixel Aspect Ratio" is set to "Auto"... the image becomes too stretched...).
the author said he would release the source code soon.
but until now I didn't see the source.
Maybe the Mplayer on ppc and this rmplugin share the same binary code from real, I think.
in addition, thank you for your introduction to this new mplayer.
Those are good news
TCPMP has been seeing a lot of action lately. bimbam69 did some much needed updates and improvements and even skin support to TCPMP.
ajeet hasn't released his sources yet... Don't know if those plugins can be compiled direcly from mplayer without any modifications... If not we'll have to wait for him to update these components or release the sources.
Sorta works... Sorta doesn't...
Just downloaded, currently testing... So far, the .rmvb files I have will parse, and I can hear the audio just fine, unfortunately I could do the same with my previous rmsplitter plugin. I still cannot see video however. I get the error message "RealVideo9 not supported!" any ideas? Is this an improvement over just the rmsplitter plugin? and if so, which RealVideo formats does it support?
Video works for me...
Try deleting the old rmsplitter and the whole TCPMP registry subkey using a registry editor...
Final Report
frmariam said:
Video works for me...
Try deleting the old rmsplitter and the whole TCPMP registry subkey using a registry editor...
Click to expand...
Click to collapse
As it turns out, I did not need to delete the subkey, It appears .rm files encoded using RealVideo9 cannot be played, but .rm files encoded using older versions of RealVideo can. During testing, I also noticed that audio and video were out of sync, with the video playing approximately .5 to .7 seconds faster than the audio playback. Also, the video tended to freeze at points with high motion, then jump forward to a almost synced point. Compared to the .rm plugin for PWMP, the video playback is a cut above, smooth and crisp, if a bit choppy. However, the PWMP version has slightly better audio synchronization, with the audio stopping when the video did, even with chop. This plugin is a significant step forward in the area of RealMedia playback, but more testing/development is needed, especially in the areas of removing .dll dependencies altogether, and improving audio/video synchronization though this may be a hardware issue. I am definitely looking at this as a valuable addition to my Master Codec Pack once development is complete.
The video playback portion is done by the dll files that were done by ajeet...
In his thread some users reported they needed to use add LoadModuleLow, 1 (reg name, value) to use them but I personally didn't experince this (did you import the fix.reg file to your registry?). Then again other users in ajeet thread were also not able to watch real video.
ghosting won't be able to update these since ajeet never released the source (also the latest version of wince mplayer doesn't even come with the rv20, rv30 and rv40 dlls).
Actually, I entered all the reg entries manually, and playback works almost flawlessly with lower bitrate files, not perfect, but as I mentioned previously, a significant step foreward. I also had no problems once the reg values were loaded. now what did you mean by: "add LoadModuleLow, 1 (reg name, value)" ?
What I meant was to do exactly what you did (entering those reg keys)...
try to import fix.reg...
Hey great news a new plugin
But unfortunatly I can't get it to play real media files Can you post some test files, because all files i have can't be played. I downloaded some test files from http://service.real.com/realplayer/test/.
Also there is an idea for dev who is workin on it a ffmpeg has its native decoders for realmedia.
@bimbam69
How did you download the files (I couldn't... those were just the streaming protocol links)?
Try mplayer sample database
I've downloaded those files using rmDownloder Anyway thanks for link to some not bad collection of test files
Tried real media videos from there ant some files were played on tcpmp. Plugin works for me without adding reg values.
thank you........

Some basic questions

Hi - I am new to Android and am struggling with some fairly basic concepts:
1. Unloading images, and video: I have Win7 and using the built in Windows image importer - it tries to unload all other images - not just camera. So I get lots of bookmark thumbnails etc; etc; I have also tried doubleTwist but that seemed overly complicated?
2. Sharing recorded video with others: The Desire seems to record to a format that no one can play. Well the video does but the sound does not. I have read that there is no way round this and you can only play it on your phone!!?? Surely thats not right? I just want to email friends some videos - surely thats not tricky!?
3. Multiple calendar reminders: When I get a reminder I get the option to Snooze All or Dismiss All - but I cant seem to dismiss just one reminder. Any ideas?
Thanks in advance for any help
vilbs said:
Hi - I am new to Android and am struggling with some fairly basic concepts:
1. Unloading images, and video: I have Win7 and using the built in Windows image importer - it tries to unload all other images - not just camera. So I get lots of bookmark thumbnails etc; etc; I have also tried doubleTwist but that seemed overly complicated?
2. Sharing recorded video with others: The Desire seems to record to a format that no one can play. Well the video does but the sound does not. I have read that there is no way round this and you can only play it on your phone!!?? Surely thats not right? I just want to email friends some videos - surely thats not tricky!?
3. Multiple calendar reminders: When I get a reminder I get the option to Snooze All or Dismiss All - but I cant seem to dismiss just one reminder. Any ideas?
Thanks in advance for any help
Click to expand...
Click to collapse
1. The beauty of using a non-Apple smartphone is that you don't have to use a special application to manage your files. Just connect your device to your PC as a disk drive. Browse to it with your file explorer and just drag&drop.
2. Not sure what you mean here. Windows Media Player on Windows can play the videos recorded with the Desire. And Quicktime on OSX can as well.
3. Yeah, there's no way around this one. Bummer...
In terms of photos, why don't you just drag and drop...you don't really need to use an importing tool. That seems overly complicated for what you want.
On the video side of things, you have two formats to choose from. 3gp and Mp4. When you're shooting video there's a tab on the left. Pull it out and at the bottom is the settings. You can then choose "Encoding type" and switch. I believe you'll get the best compatibility with Mp4.
The reminders thing? I have no clue.
1. Issue with sync - OK I will drag and drop. The importer utility is normally quite handy as it only unloads images that havent already been unloaded etc; etc;
2.
Aitese said:
On the video side of things, you have two formats to choose from. 3gp and Mp4. When you're shooting video there's a tab on the left. Pull it out and at the bottom is the settings. You can then choose "Encoding type" and switch. I believe you'll get the best compatibility with Mp4.
Click to expand...
Click to collapse
I have the choice out of H.263 and MPEG4. Both options output a .3gp file (I presumed that MPEG4 should output a .MP4). Both .3gp give the following message in VLC player "No suitable decoder module: VLC does not support the audio or video format "samr". Unfortunately there is no way for you to fix this." Media player doesnt give me a message it just doesnt give audio. Google this tells me that there is no easy way to solve this. So how come it works for you?
3. "...Yeah, there's no way around this one. Bummer..." Bummer indeed
Oh well - thanks for your answers guys but I would really love to try and sort this video issue. Incidentally its the same with sound recordings - they use the same samr codec which basically cant be used
Ah, well it seems both RealPlayer and Quicktime can play back the videos encoded with the mp4 or H.263 format.
EDIT - And also Windows Media player. I have read that VLC can't play them due to licensing issues for the AMR sound format.
download and install the k-lite codec pack it will include the classic player which is more than capable of playing these videos. I did have an issue with my vids i was recording when i was making a recording that lasted longer than 10 minutes, it was almost as if the card was too full record properly however the recorder still carried on going, this can be recognised when you press stop on the video recording and it goes straight back to the desktop instead of the camera. when this occurs nothing will play the file as it is corrupt. it must have been a third party program i had installed as when i defaulted the device the problem stopped and it would record as normal.

The three major problems with android music player

First of all, for fix one of my problems (yes, code!) scroll to bottom!
Okay, coming from an iphone, I really like my Desire, better battery life, easy to install apps, better coverage and what not more. One thing that really stings me is how buggy and ****ed up the music player is. A smartphone should have a good music player, but this one is just ridden. Three of the major annoyances:
1. (FIXED WITH FROYO!)
Genre tags are not read. Even with my perfect tagging, genre tags are not read. iTunes reads them, Zune reads them, iPhone reads them, foobar reads them, the only one screwing up is the android player, so please do not tell me its just because tags aren't stored universal. This is a bug that must be fixed ASAP.
2.
Album Artists are not even read.
Music should be sorted by album artist, rather than artist. I know the fix was in the CyanogenMod one time, but i believe its removed now. You might wonder why this is such a big problem, but now I have albums scattered over THIRTY artists. Its a 4CD rap compilation with lots of ft. blah blah, so instead of
Celph Titled -> The Gatalog: A collection of chaos
It now is
Celph Titled ft. Chinook XL -> The Gatalog: A collection of chaos
Celph Titled ft. Apathy -> The Gatalog: A collection of chaos
etc. etc.
This is another prime bug that must be fixed!
Equalizer is not really important, despite what people say. Focus on these bugs instead!
3.
The 3rd annoyance is having no search function in the music player, but this is somewhat covered by 3rd party apps. It should functionality of the stock player though.
Just had to get that off my chest. Besides the OS and having a good SMS/Call functionality, the the third priority of a smartphone should be the music player, in tie with the browser. It is really really really important.
Peace out
P.S. The Code:
h ttp://code.google.com/p/android/issues/detail?id=3679
and
h ttp://code.google.com/p/android/issues/detail?id=2397 (less relevant)
Here is some of the fixes posted on google code by a guy named rainwoodman:
Further study shows it is more complicated than a few lines of changes.
The definition of MediaStore will be relevant. They are putting all stuff into one
database during scanning.
I wasn't able to find the source code for MediaStore. But I suppose the change would
be in where they build the database and determine 'ArtistID' from ArtistName.
This is where they refer to the database:
h ttp://android.git.kernel.org/?p=platform/packages/apps/Music.git;a=blob;f=src/com/android/music/MediaPlaybackService.java;h=09edf522e7cdd0ecddc2bbe0ced213a6241ce091;hb=HEAD
The column names are declared in MediaStore, imported on line 46. No clue where to
find it. The class is also imported in
h ttp://android.git.kernel.org/?p=platform/packages/providers/MediaProvider.git;a=blob;f=src/com/android/providers/media/MediaProvider.java;h=cbc4f9411e48fd725bd245172e81d55633e370fd;hb=HEAD
Then:
Tracked down to this line:
h ttp://android.git.kernel.org/?p=platform/packages/providers/MediaProvider.git;a=blob;f=src/com/android/providers/media/MediaProvider.java;h=cbc4f9411e48fd725bd245172e81d55633e370fd;hb=HEAD#l1454
Who the hell is calling MediaProvider.insert ?
Then:
(THIS IS THE COMMENT 9 FIX. IT IS USEFUL TO SEE WHAT TO DO, BUT DO NOT IMPLENT IT!)
The problem is on the following line of MediaScanner.java(link in comment 6).
Simply replace these lines
Code:
680 // use album artist if artist is missing
681 if (mArtist == null || mArtist.length() == 0) {
682 mArtist = mAlbumArtist;
683 }
----replace with ----
681 if(mAlbumArtist != null && mAlbumArtist.length() != 0) {
682 mArtist = mAlbumArtist;
683 }
Click to expand...
Click to collapse
will solve the problem.
I do not have the 6GB free space to build and test the changes.
Someone look at this issue; at least merge it to Cyanogen Mod!
then he gets to:
h ttp://android.git.kernel.org/p=platform/packages/providers/MediaProvider.git;a=blob;f=src/com/android/providers/media
/MediaProvider.java;h=cbc4f9411e48fd725bd245172e81d55633e370fd;hb=HEAD
Around line 2410, the same-album heuristic is wrong.
Then he concludes to:
Further traces down to these lines:
Code:
1477 synchronized(albumCache) {
1478 int albumhash = path.substring(0, path.lastIndexOf('/')).hashCode();
1479 String cacheName = s + albumhash;
1480 Long temp = albumCache.get(cacheName);
1481 if (temp == null) {
1482
albumRowId = getKeyIdForName(db, "albums", "album_key", "album",
1483 s, cacheName, path, albumhash, artist, albumCache, uri);
1484 } else {
1485 albumRowId = temp;
1486 }
1487 }
Folder name is definintely not the right rehash key to use. Shall use Album artist & year
& number of tracks & release & cd number here.
His final fix is:
Two modifications towards a full fix:
0. revert the temperory fix on comment 9.
1. put albumartist (default = artist) to values in mediascanner
2. int albumhash = values.getAsString("albumartist") + values.getAsString("year") +
values.getAsString(".......")...... in media provider
Cyanogen already had these implented in 5.8, I do not know if its in Cyanogenmod 6.
Also, check out this post for a full explanation, its on modaco:
h ttp://android.modaco.com/content/htc-desire-desire-modaco-com/310583/music-players-fix-yes-all/
I hope on Froyo this music app will be better and support Lyrics and rating system then sync with iTunes ... Yahoo.....
Yeah, the Android music player is pretty broken, and no third party replacement can provide the essential feature that is a lockscreen widget. The problems you outline are probably the main ones. I also really want lyric support and a more solid album artwork implementation. Lack of in-app music-specific search when I can choose search for music systemwide is just odd. Also (and this is bloody infuriating), there isn't always an option to go up the artist-album-song hierarchy. Overall a really half-baked player.
I really would have thought google would focus on a *solid* media player with integrated search, podcast + audiobook support. The Apple implementation of the music player is pretty damn tight (itunes syncing notwithstanding) - it's something google needs to compete with.
DashingGentleman said:
and no third party replacement can provide the essential feature that is a lockscreen widget
Click to expand...
Click to collapse
Cubed (a.k.a. 3) has a lockscreen widget. It's a fantastic player as well. I know this doesn't solve the problems with the stock player, but you might want to take a look
MrBadgerMilk said:
Cubed (a.k.a. 3) has a lockscreen widget. It's a fantastic player as well. I know this doesn't solve the problems with the stock player, but you might want to take a look
Click to expand...
Click to collapse
Full version of Mixzing media player supports this as well. I do not know about TuneWiki or Meridian media player. and yes, ALL of those players do not support genres nor album artists.
Also, as I mentioned, this fix seems to have been implented in the 4.2.0 Cyanogenmod, but has been taken out ever since (?)
MrBadgerMilk, The_limit thanks a lot! I will definitely check these out (when my phone is back from repair ). I saw that TuneWiki, BeyondPod and a couple of other players I tried didn't have lockscreen controls, so I assumed it wasn't possible with Sense.
i believe lock 2.0 support lock screen MP controls
I hope HTC will fix this themselves in the upcoming FroYo, otherwise can we get an update.zip to fix ourselves. but i really dont wanna root my phone and void my warranty just for the sake of this.

[Q] WP7 Zune artist background list

Im still trying to figure out why when in wp7 zune player, why wont all of the artists appear on the background. im sure if we all put our heads to gether we can come up with a reason. i probably have about 30 albums or some on my phone heres is a list of the artists and albums which have and have not background images when using wp7 Zune. NONE of these have been downloaded from zune( as far as i know) and even direct ripped CD`s didnt always work.
Fail = No artist background
Pass = Artist Background
Artist
30 seconds to mars- This is war = FAIL
Alicia Keys - The Element of freedom = FAIL
Alicia Keys - As I am = FAIL
Beyonce - I am Sasha Fierce (deluxe) = PASS
Maroon 5 - Songs about jane= PASS
Paolo Nutini - Sunny Side Up = FAIL
Paolo Nutini - These Streets = PASS
these are just some examples, if anyone nelse has ANY PASS or FAIL please say here. I found it very interesting to see that 1 paolo nutini album worked and the other didnt!.....strange.......
I know, it's weird.
Many of us have the same problem. Hope Zune will be updated to solve this issue.
Did you try on your Zune (PC) to right click on a specific album and select "Find info concerning this album"? Sometimes it helps.
Also a soft named Zune Social Tagger can help. But it also messes up the tags sometimes (because tags used by Zune are themselves wrong)
Following the probelms I had with background not changing and no album art showing on "now playing" screen, I spent some time with this last night.
I wiped all the music from my phone, went through a chunk of albums and did the "find info for this album" thing then synced back with my phone (of course also making sure the setting under music and video on the phone "connect with Zune" is on).
Now I have all album art showing on now playing screen (finally!) and I also have backgrounds changing as well for most artists/albums (although it normally just shows 1 background per artist/album).
Major and newer artists like Foo Fighters, Oasis, Kasabian, The Who, Friendly Fires all change when songs are played. Others like Ocean Colour Scene and Sneaker Pimps are just black. Not sure If my tags are wrong on these or if Zune just doesn't have any images for these artists (is there any way to check if Zune has images)? Will have another play at the weekend!
dov74 said:
I wiped all the music from my phone, went through a chunk of albums and did the "find info for this album" thing then synced back with my phone (of course also making sure the setting under music and video on the phone "connect with Zune" is on).
Click to expand...
Click to collapse
I don't even have such a setting.
Tom Servo said:
I don't even have such a setting.
Click to expand...
Click to collapse
Strange!? I tap settings then applications then Music & Videos and it's the only option under there (apart from a link for Zune account settings). Is this mabye just on the Mozart?
see my response to this question here
http://forum.xda-developers.com/showthread.php?t=833871

Categories

Resources