You Are Here:

Community: Developer Discussion Boards

#1 Old Runs in the Emulator, but in the phone doesn't - 2006-06-27, 16:59

Join Date: Sep 2005
Posts: 119
Pepper_91
Offline
Regular Contributor
Hi!

I wrote this code, to play a midi song while my application runs:

public void startApp() {
display = Display.getDisplay(this);
miInterfaz = new Interfaz(this, display);

new Thread(new Reproductor()).start(); //Play the midi in a paralel thread

new PantPresentacion(display, miInterfaz);//show a splash screen and later a menu
}

The "Reproductor" method "run" is like this:

public void run(){

try {
InputStream in = this.getClass().getResourceAsStream("/res/pp.mid");
Player miPlayer = Manager.createPlayer(in, "audio/midi");
miPlayer.setLoopCount(2);
miPlayer.realize();
miPlayer.prefetch();
miPlayer.start();
} catch (IOException ex) {ex.printStackTrace();}
catch (MediaException ex) {ex.printStackTrace();}
}


My problem is that in the emulator runs correctly, but in my phone appears the splash screen, and the menu list, but the midi don't sound!

If I don't use threads, and copy/paste the code of the "Reproductor" class below the "new PantPresentacion(display, miInterfaz);" line doesn't work either.

Why?
Reply With Quote

#2 Old Re: Runs in the Emulator, but in the phone doesn't - 2006-06-27, 18:52

Join Date: Mar 2006
Posts: 518
wang_shui
Offline
Super Contributor
Hi,

On which phone r u testing ur application??
Please check whether the sound setting for application is on.

while on the phone does it throw any exception??


Regards,
Wang
Reply With Quote

#3 Old Re: Runs in the Emulator, but in the phone doesn't - 2006-06-28, 12:13

Join Date: Sep 2005
Posts: 119
Pepper_91
Offline
Regular Contributor
I'm using a Nokia 6630. If I Start the midi in the first menu list, the midi plays, but if I enter in some option of the menu, then I can't ear nothing, and if I return to the 1ºst menu, then the midi starts from the first note.

If I start the player in the startApp, I can ear one note, and later nothing, for that reason I use a Thread, that execute the player at the same time that the application, but I can't ear nothing :( only if I copy paste the code of the "run" method below the code that creates the 1ºst menu.

Thank you a lot!
Reply With Quote

#4 Old Re: Runs in the Emulator, but in the phone doesn't - 2006-06-28, 13:54

Join Date: Sep 2005
Posts: 119
Pepper_91
Offline
Regular Contributor
I've tested the application in a Qtek and in a motorola v3, and works fine, but in the nokia doesn't :( WHY?
Reply With Quote

#5 Old Re: Runs in the Emulator, but in the phone doesn't - 2006-06-28, 16:55

Join Date: Jun 2006
Posts: 3
AskiToday's Avatar
AskiToday
Offline
Registered User
Hi,

I’m a newcomer to the “Java universe” and therefore in this forum too.
I’m currently learning Java ME (after becoming Sun Certified Java Programme past year)
Since a few weeks, I try to get a solid overview around Java ME
… So I use also Nokia 6630 mobile device and try to learn developing Java applications for it.
I try to give you an idea (maybe wrong!):

It seems, your MIDlet on Nokia 6630 encounters the mentioned problem within scope of your UI.-code.
Nokia Series 60 SDKs include “Nokia UI APIs”.
May be it’s a useful indication (because your MIDlet runs on devices of other vendors)!
If you in a new project (using your current code) make use of Nokia UI APIs and test the new distribution jar on 6630, y<ou may get the target result also for Nokia device.
I hope so…

bye
AskiToday
Reply With Quote

#6 Old Re: Runs in the Emulator, but in the phone doesn't - 2006-06-28, 18:56

Join Date: Sep 2005
Posts: 119
Pepper_91
Offline
Regular Contributor
ok, but I tried compiling my project under the s60 platform, and the app runs exactly :(
Reply With Quote

#7 Old Re: Runs in the Emulator, but in the phone doesn't - 2006-06-29, 15:27

Join Date: Mar 2003
Posts: 66
Location: Sweden, Stockholm
ovjo12
Offline
Regular Contributor
Hi,
No help here, sorry!!
But... at JavaOne this year, Nokia demo next release of Carbide.j.
Next release of Carbide.j, version 1.5 that will support remote debugging on the phones. It look nice and it is very good to have in this situations.
- ove
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone with a nokia 3330? Can anyone help me to copy phone memory to the sim? pabmania General Discussion 1 2006-10-29 23:34
How to initiate a GPRS connection to the mobile phone from a remote server? VigenIssahhanjan Symbian Networking & Messaging 2 2004-11-22 09:50
7610 Contacts - Formatted Phone Numbers padlon General Discussion 2 2004-11-12 19:02
App. runs OK on emulators, failed on phone. rex567 Mobile Java General 1 2004-09-20 02:53
Phone Lock-Up Using Bluetooth (requires battery pull!!) cyberabi Bluetooth Technology 1 2003-05-05 19:40

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ