Showing posts with label J2ME. Show all posts
Showing posts with label J2ME. Show all posts

Thursday, January 1, 2009

MeRadio - A Shoutcast Radio Streaming Client for Java ME

Hello,

a new year and a new project. This time it's a Shoutcast radio streaming client for Java ME, which I started as a hobby project. I called it MeRadio. Inspired by this post to stream Shoutcast streams to the IPhone, I wanted to make such an application (MIDlet) for Java ME (J2ME). Here it is in an initial version:

The download package (links below) contains:
- a server part which consists of three files: meradio.php5, mr.xml and php.ini
- the mobile application MeRadio (Nokia and Sony Ericsson version) with its source

The Server

The file meradio.php5 has two main functions: First it delivers the radio stream URLs from mr.xml to the mobile application, second it streams the plain audio data (mp3) of a radio station to the mobile application, while stripping off useless Shoutcast headers, which cannot be understood by Java ME.

When you want to install this server on your webspace, php must be supported. Maybe the php.ini is also needed, which sets the property "allow_url_fopen = on". This is needed for customers of 1und1. And maybe the file extension php5 doesn't work for you. Then you should rename meradio.php5 to meradio.php. The file mr.xml is an XML formatted document containing some predefined radio stations mostly taken from the radio list of Ninj's Virtual Radio Symbian application (http://www.ninj.com/vradio/vr_list.xml). Put all 3 files into the same directory of your webspace.

Test the service using a webbrowser:
- Get the radio list using this URL: http://yourhostname/meradio.php5?rlist=1
- Hear the stream of a radio e.g.using this URL: http://yourhostname/meradio.php5?play=http://sc3.radioseven.se:8500/&clientid=123234324

The php will stop executing after 24 minutes to limit the traffic on the server and on the phone. You can adjust this value according to your needs.

The Mobile Application

Select the Nokia or Sony Ericsson version of MeRadio and simply install MeRadio.jar to your Java enabled phone. During the first start you will be advised to set the URL to meradio.php5 properly. Some Nokia devices need a port number after the hostname, otherwise an invalid locator exception might be thrown. This URL can be entered in the settings menu. Then you can click on Genres, which loads the genres (and radios) from the mr.xml file using meradio.php5. This may take some seconds, especially on Sony Ericsson phones. Then you can choose a genre and select a radio stream of interest. Now you should be able to hear the selected stream with very few or even no annoying gaps that often occur on other streaming solutions based on Java ME.

Here is the download link for the current version 0.2a:

-FileFactory:
MeRadio0.2a.zip

-MegaUpload:
MeRadio0.2a.zip


Version 0.2 introduces these updates:
- Radio list is persistently saved in the RMS (radio list doesn't need to be fetched from the server everytime the MIDlet starts)
- Radio list can be updated when necessary
- Different versions of MeRadio for Nokia and Sony Ericsson phones, as these devices support different streaming mechanisms
- Small updates to meradio.php5 and new radios (Techno) in mr.xml

I have successfully tested MeRadio on a Sony Ericsson W850i and on a Nokia 3120 classic phone (S40). You can change the source as you wish and play with it. Bug reports are always welcome as this is a new project.

Have fun with it and a happy new year
Makube

PS.:
Here are the download links for the old versions:

Version 0.2:

- FileFactory: MeRadio02_all.zip

- MegaUpload: MeRadio02_all.zip

Version 0.1:

- FileFactory: MeRadio01_all.zip

- MegaUpload: MeRadio01_all.zip


Sunday, February 17, 2008

Run Opera Mini on PC - Version 0.6 (also with UMPC and Netbook support)

Today I want to release version 0.6 of the "OperaMiniLargeDevice", introduced earlier in this blog. The new version now supports the usage of numpad keys to allow shortcuts and speed dial in Opera Mini. Because of problems with the keys '*' and '#' on some keyboards they are now mapped to the keys F3 and F4. So if you want to use speed dial in Opera Mini, press F3 + a number from the numpad, and if you wish to use shortcuts, press F4 + a number from the numpad. Mouse support is activated as well.

To install the solution on your PC you should follow the steps described in this post.

Greetings makube


Monday, January 28, 2008

Youtube Mobile (J2ME) on Sony Ericsson W850i

Last week a beta version of the Mobile Youtube application (J2ME) has been released. I successfully tested the app on the SE K800i and on the SE W850i which is currently not yet on the list of the officially supported devices. You can download the version for Sony Ericsson phones directly from here. Please also make sure that you have configured the streaming preferences correctly on the phone, as the normal Java internet profile will NOT be used to stream the videos.
Greetings makube


Saturday, January 19, 2008

Run Opera Mini on PC - Now larger and cooler!

Before you read on, the newest version of "OperaMiniLargeDevice" can be found here and here.
This post only refers to the old version 0.5.

I recently updated the solution to use the Opera Mini browser on the PC to version 0.5, introduced in the previous post. Opera Mini is a mobile browser that was originally based on Java ME (J2ME). It is now also available for the iPhone, Blackberry, Windows Mobile and numerous other mobile platforms. It offers a fast browsing experience due to advanced content compression techniques. Thanks to the nice enhancement of my "OperaMiniLargeDevice" in this post at darmawanku.wordpress.com for another application, I got some ideas to improve the original solution.

So the new version 0.5 offers these changes and improvements:
  • Screensize enlarged to 1200 x 705 from 1024x705
  • Mouse can be used to control Opera Mini and to click on links
  • Escape-key does not accidentially close the emulator anymore
Version 0.5 can be downloaded from here. Please follow the installation instructions in the previous post.

The older versions 0.2 and 0.1 are still available from here and here.

Yesterday I made some tests on how much traffic you can save using this solution. For instance the big german news site www.spiegel.de took around 850 kb to completely load on the Firefox browser. On the "OperaMiniLargeDevice" only 103 kb were needed. On a Nokia 6230 only 51 kb of traffic were consumed. Here is one picture of these tests using version 0.5 of the "OperaMiniLargeDevice":



As you can see, you can really save traffic with the "OperaMiniLargeDevice" and with a dialup connection or slow GPRS connection the page load time is vastly improved, also because the Opera Mini proxy has been enhanced recently.

Greetings
makube


Thursday, January 3, 2008

Opera Mini as a PC Browser (big screen)

Hi,

a new version of OperaMiniLargeDevice (OMLD) for the new Java Platform Micro Edition Software Development Kit 3.0, which is compatible with the new Opera Mini 5, has been published here. OMLD for the older Sun WTK, which is the topic of this post, will stay online, as it is also compatible with Linux and many users have installed this solution already.

Now the original post:

Today I have worked on a solution to make the famous mobile browser Opera Mini run in a big window on the PC. The reason for this is the fast browsing experience on mobile devices with this application and the small amount of traffic it generates during browsing sessions, because the Opera Mini proxy reduces page sizes. It is now also available for the iPhone, Blackberry, Windows Mobile and numerous other mobile platforms. So also PC users could benefit from using this browser, especially from version 4 that introduces fullscreen support.

Because Opera Mini is a Java ME application, an emulator is necessary. Therefore, I used the Sun Java Wireless Toolkit with the included MIDP emulator. Then I adapted the preinstalled "QwertyDevice" and made a new emulator device template, the "OperaMiniLargeDevice" (OMLD), with the usable screen size of 1200x705 pixels. I omitted the usual control buttons of the standard emulators to have more space for the browser.

Here are two pictures of what the result looks like.

OperaMiniLargeDevice is now available in 4 variants for different screen resolutions. So if you want to test the solution yourself you should follow the next steps:

Requirements:
  • Get the Java SE Development Kit (JDK) from here.
  • Get the Sun Java Wireless Toolkit 2.5.2 for CLDC from here.
  • Get the "OperaMiniLargeDevice" for Sun Java Wireless Toolkit from here.
  • Get Opera Mini Browser 4.2 from here. Be sure to download both the JAD and the JAR to the same directory. The generic advanced version is recommended.
  • Internet access on the PC
Installation (done for Win XP):
  • Install the JDK.
  • Install the Wireless Toolkit.
  • Unzip your downloaded version of "OperaMiniLargeDevice" (simply extract it, a directory will be created automatically). Copy this directory to Path-to-WTk\wtklib\devices\ . The complete path to OMLD on my machine looks as follows: "C:\WTK2.5.2\wtklib\devices\OperaMiniLargeDevice1024x705".
  • Then choose "OperaMiniLargeDevice" as the default device, e.g. via "Start->All Programs->Sun WTK->Default Device Selection".
  • Then use "Start->All Programs->Sun WTK->Run MIDP Application" to start Opera Mini via its JAD file.
  • The start screen should appear and you should now be able to launch Opera Mini by pressing F2.

Remark:

It might be that you receive the following error on starting Opera Mini:

OTA server emulation started ...
HTTPS server emulation started ...
Error: Reason = 36

The most obvious reason for this error is that the "MIDlet-Jar-URL" in the JAD does not point to the right JAR file. Try to open the JAD with a text editor, locate the property "MIDlet-Jar-URL" and make sure that ONLY the filename of the JAR is left in this entry, e.g. MIDlet-Jar-URL: opera-mini-4.2.13918-advanced-de.jar . You must not use a complete URL to the JAR in the web. And do not forget to put the JAD and the JAR in the same directory.

Navigation:

You can set the link focus and scroll through a site with ARROW keys. The ENTER key selects an action, e.g. a text field. Texts can be entered with the normal keyboard keys. You can copy from and paste text into text fields by pressing STRG+c and STRG+v. The keys F1 and F2 control the menu actions of Opera Mini and the emulator, e.g. security questions for internet access. Since version 0.5 you can use your mouse to control Opera Mini and to click on links.

Hope you find this solution helpful. Any tips to improve this solution are welcome.

Greetings Makube

PS.:

Update to version 0.6 (see this post):
  • Shortcuts in Opera Mini usable
  • Speed dial in Opera Mini usable
  • Special version for netbooks and UMPCs like the Asus EEE or the HTC Shift available
Update to version 0.5 (Major update):
  • Screensize enlarged to 1200 x 705 from 1024x705
  • Mouse can be used to control Opera Mini and to click on links
  • Escape-key does not accidentially close the emulator anymore
Update to version 0.2:

I updated "OperaMiniLargeDevice" to version 0.2 because the first version triggered annoying keyRepeatEvents on some websites, resulting in not being able to focus links. Therefore the property keyRepeatEvents is now set to false. Happy browsing!


Monday, July 2, 2007

iPhone with no Java support

What a pity! Besides its innovative innovative input solutions and futuristic look and feel the recently released iPhone by Apple lacks some features that many current phones offer by default. This is really annoying for such an expensive device of around 500 $ for the 4GB model. Some of these negative points are:

  • No support for mobile Java applications
  • No 3G wireless data connections possible
  • Non-removable battery
  • Closed platform, no SDK available
  • Camera with only 2.0 megapixels
  • iPhone activation is mandatory
For information on the iPhone, specs can be found here.


Sunday, June 10, 2007

The JSR 281 IMS Services API

At this years JavaOne Conference a MIDlet was introduced that uses the new IP Multimedia Subsystem API (IMS). The goal of this API is to offer a standardized IP network infrastructure on which higher level services like voice and multimedia communication can be built. Operators that use this API can develop new mobile IP based services at lower costs. Users on the other hand can advantage of mobile P2P multimedia real-time communications. Possible promising fields of application are:

  • instant picture sharing
  • mobile-to-mobile video streaming
  • networked-gaming
  • enriched location based services
In general the JSR 281 is an API that allows MIDlets to be clients to IMS application servers and to realize mobile P2P services on the mobile device. The classes of this API offer functions to create session based IMS calls, to communicate with IMS application servers and to search for capablities of remote peers. The demonstrated IMS MIDlet showed how to use this API by presenting a MIDlet to exchange text and photos via the underlying SIP protocol. Because the final release of JSR 281 is scheduled for Q4 2007 we can anticipate new devices supporting this API in 2008.


Sunday, May 27, 2007

P2P-Systems for Mobile Devices

P2P-systems are very important communication infrastructures in the internet. Mobile P2P-systems are still not common, but there exist some solutions to let mobile clients take part in them. No idea what P2P-systems for mobile systems could offer in the future? Think of mobile personalized collaborative services as recommendation systems and mobile distributed search services that can benefit from using P2P-technology. Some already existent solutions will now be introduced.

JXME

JXME is a framework to build J2ME-based P2P-applications, aimed at giving access to the JXTA network for connected devices with limited ressources as phones and PDAs. JXME-Peers run on devices supporting the MIDP 1.0, MIDP 2.0 and the CDC. They can participate in P2P-activities like peer- and content-search, P2P-communication, building of peer-groups and file transfer.

Jabber

Jabber clients for mobile devices as Bombus please many Instant-Messaging enthusiasts, as mobile users can be logged in to many IM-systems like ICQ, Yahoo! and MSN at the same time using the XML-based open source Jabber protocols. Mobile file transfer is also supported by some clients, e.g. the Bombusmod.

Gnutella and BitTorrent

Symella and SymTorrent are two great and free clients for connecting Symbian-based phones to the Gnutella- and BitTorrent-networks. While Symella does not allow the upload of files, SymTorrent implements this function. Their code is open source. Another very sophisticated BitTorrent-client for PocketPCs is WinMobile Torrent which even supports the creation of torrents in the application and runs very stable and fast.

Emule P2P-client for Pocket PCs

With MopiPhant the first working standalone Emule-client is available for PocketPCs since April 2005. Although this program is working pretty well, it seems that is is not developed any further.


Sunday, May 13, 2007

My TOP 10 J2ME Applications

In my first post I would like to present my TOP 10 mobile Java applications, that I really like and would surely miss, if they would not be available anymore. The list starts with the MIDlet I use most often.
  1. Opera Mini (The best J2ME-based Internet Browser)
  2. Google Mail Mobile (Google Mail-client with a really pretty GUI)
  3. Papla (Really nice Jabber-IM-client)
  4. Google Maps (For viewing maps and route calculation)
  5. WLIrc2 (The best mobile IRC-application which also supports DCC file transfer)
  6. JIMM (Very functional ICQ-IM-client)
  7. JumpRadioGuide (A MIDlet by the german radio station JUMP, for news and traffic infos)
  8. RadioBee (Listen to internet radio stations on your phone)
  9. ZelfiSMS (Program to send free SMS from germany, austria and switzerland)
  10. MMail (A small email client with POP3/SMTP mail server support)
Hope you find these suggestions useful.