×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    13

    Exclamation RmsStorage Problem

    Hello developers,
    i have an application on J2me polish platform.This application use RmsStorage system to save image and another data to rms..Code works fine on Symbian Os Fp3 but dont work
    on Samsung İ900 Omnio platfor Windows mobile and Samsung jet8003 platform samsung os..These platform i couldnt save image on rms with rmsstorage...



    My code is below...I'm open any advice and directions.

    My mapping object


    /**
    * Kamo@Columbus
    */
    package net.columbus.polish;

    import javax.microedition.lcdui.Image;
    import de.enough.polish.io.Serializable;

    /**
    * @author kamo
    * Rms ile etkilesim icin Kayit Objesi
    */
    public class Hat implements Serializable{

    /**
    * RMS kayit icin Mapping Class
    */
    private String baslangic;
    private String bitis;
    private String nasilGidilir;
    private Image haritaResim;
    private int resimGenislik;
    private int resimYukseklik;
    private String resimAd;


    public Hat() {
    //default settings
    this.baslangic=null;
    this.bitis=null;
    this.nasilGidilir=null;
    this.haritaResim=null;
    this.resimGenislik=0;
    this.resimYukseklik=0;
    this.resimAd="harita";
    }

    /**
    * @return the haritaResim
    */
    public Image getHaritaResim() {
    return haritaResim;
    }
    /**
    * @param haritaResim the haritaResim to set
    */
    public void setHaritaResim(Image haritaResim) {
    this.haritaResim = haritaResim;
    }
    /**
    * @return the baslangic
    */
    public String getBaslangic() {
    return baslangic;
    }

    /**
    * @param baslangic the baslangic to set
    */
    public void setBaslangic(String baslangic) {
    this.baslangic = baslangic;
    }

    /**
    * @return the bitis
    */
    public String getBitis() {
    return bitis;
    }

    /**
    * @param bitis the bitis to set
    */
    public void setBitis(String bitis) {
    this.bitis = bitis;
    }

    /**
    * @return the nasilGidilir
    */
    public String getNasilGidilir() {
    return nasilGidilir;
    }
    /**
    * @param nasilGidilir the nasilGidilir to set
    */
    public void setNasilGidilir(String nasilGidilir) {
    this.nasilGidilir = nasilGidilir;
    }

    /**
    * @return the resimGenislik
    */
    public int getResimGenislik() {
    return resimGenislik;
    }

    /**
    * @param resimGenislik the resimGenislik to set
    */
    public void setResimGenislik(int resimGenislik) {
    this.resimGenislik = resimGenislik;
    }

    /**
    * @return the resimYukseklik
    */
    public int getResimYukseklik() {
    return resimYukseklik;
    }

    /**
    * @param resimYukseklik the resimYukseklik to set
    */
    public void setResimYukseklik(int resimYukseklik) {
    this.resimYukseklik = resimYukseklik;
    }

    /**
    * @return the resimAd
    */
    public String getResimAd() {
    return resimAd;
    }

    /**
    * @param resimAd the resimAd to set
    */
    public void setResimAd(String resimAd) {
    this.resimAd = resimAd;
    }
    }


    And save operation is below

    /**
    * @param kayit
    * @return
    * Rms'e veri kaydetme
    */
    public void rmsKaydet(Hat savedObject)
    {
    //Arraylist manuplation
    try {
    int size=arrayList.size();
    if(size<3) //eger eleman sayisi 3 den kucuk ise yeni gelen kaydi Rmse ekle
    {
    arrayList.add(savedObject);
    }
    else if(size == 3) //eger eleman sayisi 3 den buyuk veya esit ise ilk elemanı ucur listin sonuna yenisini ekle
    {
    arrayList.remove(0);
    arrayList.add(savedObject);
    }
    System.out.println("*************Array Liste yeni kayit eklendi**************");
    } catch (Exception ex) {
    System.out.println("*************Array list islem hatasi**************");
    }
    //RMS SAVING
    try
    {
    depo.save(arrayList,"hatlar");
    System.out.println("*************Veri Girisi Rms'e Basariyla Kaydedildi**************");
    }
    catch (IOException e1)
    {
    System.out.println("*************Veri Girisi Rms'e Kaydedilemedi**************");
    popUpUyariGoster("*************Veri Girisi Rms'e Kaydedilemedi**************");
    }
    }


    Also indicate that if i set image null with height and widht 0 just save string data rmsstorage can save any platform..

    Take it easy


    KAMO

  2. #2
    Registered User
    Join Date
    Sep 2009
    Posts
    13

    Re: RmsStorage Problem

    Also i add some trick for image.My images size are about 90-100 kb..But if Rms doesnt have available size my image couldnt save on symbian os Nokia N79..İ dont understand this problem

  3. #3
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    62

    Smile Re: RmsStorage Problem

    Hi Kamo,

    RMS Size vary device to device. May be some devices like motorola and samsung does not allow to save the large images.
    If your code running fine on Nokia N79 then your code is OK.First you just try to save less size images like 3 to 4 kb.
    One more think you can do, to find the available record store size on Samsung device.

    Hope my suggestion will help you to find the solution of your problem.

    Thanks
    Avdhesh

  4. #4
    Registered User
    Join Date
    Sep 2009
    Posts
    13

    Smile Re: RmsStorage Problem

    Thanks for reply Avdhesh..You're right.I think rms size is the biggest my problem and this change device to device..So i am thinking to change rms to JSR 75 file api..i'll save my image on device file system..

Similar Threads

  1. STLPort namespace issue
    By yickhong in forum Open C/C++
    Replies: 0
    Last Post: 2009-04-09, 08:54
  2. SyncML link problem
    By samuel_ in forum Symbian
    Replies: 4
    Last Post: 2009-03-27, 08:02
  3. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  4. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  5. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

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