×

Discussion Board

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

    Series 40 6th Edition shoot multiple pictures with SnapshotControl

    Hi everybody,

    I have the new Nokia 7510 Supernova, which supports the Camera- and the SnapshotControl of the Adanvance Multimedia API (JSR-234) and now I want take mutiple pictures with the burst mode of the SnapshotControl. All other functions of the API working correct, but when i call the method this.snapshotControl.start(int shots), i get an NumberFormatException after i confirm with yes to allow taking snapshots.

    Code:

    ...
    this.snapshotControl.setFilePrefix("J2ME");
    this.snapshotControl.setFileSuffix(".jpg");
    ...
    this.player.start();

    this.snapshotControl.start(5); //throws the Exception and then the application crashes


    In the predefgallery/photos i can find one Image but not with the Prefix and Suffix J2MEXXXX.jpg (i!temp!0000....jpg and so on)
    But this is only for one picture not for five.

    My Application with the burst mode working will on Sony Erricsson Devices.

    Thank for help,

    Sincerly Moritz

  2. #2
    Registered User
    Join Date
    Sep 2010
    Posts
    1

    Re: Series 40 6th Edition shoot multiple pictures with SnapshotControl

    Hi! I have the same problem on Nokia 3720. It seems, that snapshot control simply ignored! As for Nokia, for example on 6303ci all it's working properly. Who know anybody, maybe Nokia has bugtracker system? Maybe it's their problem?

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    76

    Re: Series 40 6th Edition shoot multiple pictures with SnapshotControl

    I believe it is a bug in Nokia implementation. N6303c , and also SDK behaves similarly. Temporary file is something like "!tmp!00000037000-7223.jpg". The problem is the '-' which is a result of improper casting long to int, then formatting it as string and then parsing back to long later:

    * temp filename generation:

    int salt = ((int)System.currentTimeMillis() % 10000);
    Long id = new Long(nbrGeneration * 10000 + salt); // nbrGeneration is: private int nbrGeneration = 0;
    String playerIdPart = formatNumber(37, 8); // 37 is player id from real device tests
    String idPart = formatNumber((int)id.longValue(), 8);
    String newFileName = "!tmp!" + playerIdPart + idPart + ".jpg";

    Depending on the time, salt can be negative! And later they try to parse part of the filename (from position 13 up to '.', .ie "000-7223" in the sample) as long:

    String idStr = encodedFilename.substring(13, encodedFilename.lastIndexOf(46));
    Long key = new Long(Long.parseLong(idStr));

    Here we get NumberFormatException. And we are doomed.
    Last edited by hnipak; 2012-01-15 at 11:51.

Similar Threads

  1. Series 40 3rd Edition SDK cannot be installed!
    By ralpugan in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2009-04-27, 12:19
  2. Icons in s60
    By drizzt6 in forum Mobile Java General
    Replies: 5
    Last Post: 2009-03-06, 09:32
  3. sms push Issues in series 40 2nd edition phones.
    By darwin_cyriac in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2009-03-04, 12:21
  4. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43
  5. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05

Posting Permissions

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