Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2009

    How to get all available capabilities of a device

    Hello all!

    I´m developing a MIDlet in JavaME that uses some internal capabilities of a device (GPS, acelerometer, camera). I´m trying to get all the URL from this internal capabilities from a device (the device is a N97) using the MMAPI JSR135, Location JSR179 and JSR 256. I allready have the sensor:acceleration;contextType=user;model=Nokia;location=NoLoc for tue accelerometer.

    In the case of sensors API the process of discovering the sensors is very simple using the method findSensors (). Is there a similar method in JSR 135 or JSR179 to know which cameras or GPS are available in the Device?

    With the JSR135 I've got the url of the camera (capture://video) to take a picture. But not as distinguished from that camera is, if the front or rear. How can you indicate the MIDlet you want to use the front or rear camera?

    Is there a general method in JavaME to obtain all the internal capabilities of a particular device?

    Last edited by franmoga; 2010-02-03 at 15:33.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Cheshire, UK

    Re: How to get all available capabilities of a device

    Hmmm... no... there is not a "general" method. What you're asking is actually a whole bunch of questions. I'll try to give you some pointers.

    This article describes a general technique for detecting the presence of an API, and using it safely if it exists on the handset.

    Some APIs use "system properties" for determining information about the runtime environment. For example:

    String maxBlueToothDevices = System.getProperty("bluetooth.connected.devices.max");
    Some APIs have their own methods for querying capability. Such as '135:

    String[] types = Manager.getSupportedContentTypes(null);
    In some cases, there will be no means of determining the capability. I think, for example, you cannot tell if the device has GPS hardware or not (though, Tiger69 would know better).

    There are also many things you cannot control. So far as I know, you cannot (on most devices, at least) control which camera will be used for image capture.

    You would do well to get a copy of the Nokia Developer's Library, which contains the JavaDocs for the APIs, as well as implementation details. Look especially at the "system properties" sections in the "runtime environment notes" for each API.

    The Forum Nokia Wiki is also an essential source of information.

    Be aware that some information will be available only on some devices. Nokia provide some additional means (such as system properties) for determining informtion. Other manufacturers may make similar provision.


  3. #3
    Registered User
    Join Date
    May 2009

    Re: How to get all available capabilities of a device

    Thanks for you reply Graham.

    I think I´ll try to simplify the MIDlet. Since I use the N97 as a target device I know the APIs that are included, so this will be a task for the future if I want to make the MIDlet run in other devices.

    Now my efforts will focus on the discovery of internal capabilities on the advice you gave me. It is a pity that there is some method to check the internal capabilities that has a device. It would be a very interesting utility.


Similar Threads

  1. On Device Debugging using USB
    By tinkywinky in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 7
    Last Post: 2010-03-11, 05:17
  2. Installing Multiple Types of Fonts on a Symbian S60 Device
    By ahmadn in forum General Development Questions
    Replies: 1
    Last Post: 2009-04-22, 18:25
  3. Detect device orientation capabilities
    By adigadish in forum Symbian
    Replies: 3
    Last Post: 2008-02-01, 11:44
  4. Bluetooth Security: What exactly is an untrusted device?
    By rahulmcs in forum Bluetooth Technology
    Replies: 1
    Last Post: 2005-12-02, 06:26
  5. Device Specific Capabilities - How to Find?
    By tkinsman in forum General Development Questions
    Replies: 0
    Last Post: 2004-01-21, 20:33

Posting Permissions

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