Launch MIDlets From a Webpage

Thanks to Sprint's extensions to the typical URI schemes, you can create links on your website that launch MIDlets installed on visitors phones. Everybody knows about "http:" and you've probably seen "ftp:" and "mailto:" as well. You'll find that Sprint handsets support the "midlet:" scheme which can not only launch a MIDlet, but can also be used as a mechanism to pass data from a website to an application.

The following is a list of the common URI schemes. You've probably seen most of these.

  • http, https
  • telnet, tn3270, rlogin
  • gopher
  • file
  • ftp

Suppose you have a MIDlet called FooBar installed on your handset. Using the midlet: scheme you can launch the FooBar application when a user selects a link on your web page. The HTML would look like this:

<html>
<a href="midlet:FooBar?data_for_foobar">Launch FooBar</a>
</html>

Now open that web page on your handset browser and select the Launch FooBar link. Amazingly enough, the Java Application Manager will launch the FooBar MIDlet.

Within the FooBar MIDlet, you can put in some code like this:

import com.sprintpcs.util.*;
...
String uri = null;
Muglet ml = null;
ml = Muglet.getMuglet();
if (ml != null)
{
    uri = ml.getURI();
}

You will find that uri contains "midlet:FooBar?data_for_foobar". Strip away the "midlet:FooBar?" part and you can process what ever data was passed from the web page.

If you launch FooBar from the application manager (rather than the web page), you'll find ml is null. You can use this technique to determine how a MIDlet was launched.

If you do not have a MIDlet called FooBar installed, your phone may actually prompt you to download one! My Sanyo 4900 directs me here:
http://vm.sprintpcs.com/redirect?request=midlet%3aFooBar

Of course there is no FooBar MIDlet available at that address, but it's nice of the phone to try. Sprint uses this technique to promote MIDlets on their site. If you try to invoke a program that is not already installed on your phone, the application manager will offer to install it for you. Sadly, it only knows to go to Sprint to look for new MIDlets. I wish it would go to my website instead.

The midlet: scheme would allow you to create a service that has both J2ME components and web pages you can access from the mobile browser. You?ve just learned how the web browser can launch a MIDlet. In another article, you'll see how to Open a Webpage from a MIDlet.

languages...

I know this seems off topic, but for some reason using spring mobile internet, google and a few other sites that support localization think I am german or something.

wondering if this is common...

Re: Launch MIDlets From a Webpage

am developing the J2ME application.

Mobile: Motorola i265

Client Side: J2ME

Server Side: .NET ( I can change my language if I got solution from other language )

In my application I need the facility to launch the J2ME application on the server request.

Scenario is:

Server will send the "Service request" to the client Mobile
On Mobile J2ME application will be activated on this service request.
Mobile application will send response to server

Problem I am facing is

I am not getting how to implement this
Somewhere I read about "Push registry", but I heard that i265 does not support the Push registry.
My client is saying that his mobile node will not necessity connected to the Internet ( that is not continuous GPRS connection)
Now I think only way is to send SMS. My client is insisting me to use the SMTP protocol to send the mail.

Please help me to find the solution for this problem. I am stuck on this issue.

Thanks & regards

Somnath Mali

Note: ... if any other way than SMS to launch the client side applicaion please send me information for that also

Additional Details

3 hours ago
Here are some more details what exactly I want ...

1. there is a Mobile Application ( in J2ME for Motorola i265 )

2. Server application in .NET

3. Currently Normal Mobile to Server data transfer is working well with HTTP Post.

4. Now I want a functionality so that somehow Server can lauch the my Mobile applicaion.

5. Important thing is ( I can change this conditions if I got proper solution)

--- Mobile may not necessarity have GPRS all time. So I think I can't use the
TCP/IP packets.as that will require Continuous GPRS ( ? Is this right I think so ...)

-- there is something called Push Registry in the Mobile Applicaion world. here I need to send the SMS to the particuler Port on the Mobile. Now I dont know how to send the SMS to ports.

If yoy have any other solutions for this problem please do reply me.

1 hour ago
Motorola Nextel i265 ( Sprints Provider )

Re: Launch MIDlets From a Webpage

I was just trying this on my Audiovox CDM-8910 phone on Bell Mobility. The only MIDlet I was able to launch was SameGame2. I tried to launch various other games and applications I had and I was always prompted if I wanted to go download new content. Weird.