This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Java functionalities on mobile phones  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am pretty new to this ... so maybe not the smartest question

If a mobile phone (java one) has WLan than it can use RMI, right? How about sockets?

Is there a way to tell the mobile phone from java to vibrate? (say having a function that activates vibrations for a specific amount of time)?

Thanks

best
 
Bartender
Posts: 19454
88
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That will depend entirely on the phone, since any version of Java that expects to access resources internal to the phone - including the addressbook, Bluetooth and LAN interfaces and so forth - has to have been customized to do so by the phone supplier.

The basic standard for Java in mobile devices is spelled out in the Sun J2ME specifications. There are 2 primary architectures covered there, with JavaDocs that describe what features are available. A lot of phone vendors also add one one or more of the JSR extensions such as the one for Bluetooth.

Of course, now we also have another Java option for mobile phones - Android. It, too has a set of specs, provided by Google. And we have a forum for Android on the JavaRanch as well!
 
Steffen Bluemm
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply ...

I looked at the API (sun API) and there is RMI - but of course, it has to be implemented ...

For some Nokia phones it seems that one an access the vibrator from within Java .... which is not that bad to know ...

Android, yes, seems interesting ... some of the Nokia phones no also have accelerator sensors like the iPhone and stuff like that, which is quite nice ... but I will definitely have a look at the Samsung Android ...

Thanks ...

best
 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
J2ME is comprised of a number of specifications and what your phone supports depends on what specs the manufacturer has implemented in the phone model. That said, the bare minimum API that is typically supported is CLDC and MIDP for mobile phones and these APIs support basic sockets, SMS, UDP, and HTTP. I don't think RMI is supported by default.

Apart from this, other APIs such as Bluetooth, WMA, and PIM provide support for other modes of communication.

Support for phone vibration is provided in the MIDP API by default and hence, is supported in most phones with basic J2ME capability. You can look at the MIDP API to find the appropriate methods and additional functionality (such as backlighting, which is also supported)
 
expectation is the root of all heartache - shakespeare. tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!