Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2010

    Memory card Adding and removing

    I am trying to write a simple program that shows a message whenever a memory card is added or removed.

    But It responded nothing. I tested with emulator.
    What is wrong with my program?

    public class Filethread implements Runnable {
    FileConnection fileconnection;

    public void run() {
    try {
    fileconnection=(FileConnection) Connector.open("file:///root1/photos",Connector.READ_WRITE);
    Listener listener=new Listener();
    boolean a=FileSystemRegistry.addFileSystemListener(listener);
    } catch (IOException e) {
    // TODO Auto-generated catch block



    public class Listener implements FileSystemListener {
    	public void rootChanged(int state, String rootname) {
    		if(state == FileSystemListener.ROOT_REMOVED)
    			System.out.println("The root has been reomoved");
    		else if(state == FileSystemListener.ROOT_ADDED)
    			System.out.println(rootname +"has been added");

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    The Capital of INDIA

    Re: Memory card Adding and removing

    Why don't you test your demo on the real device?

    How are you inserting the memory card in the emulator?
    test the same on the device and let us know the results.
    Thanks with Regards,

    R a j - The K e r n e l

    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Removing memory card format option
    By aranisiva in forum General Development Questions
    Replies: 1
    Last Post: 2008-12-11, 08:19
  2. Replies: 8
    Last Post: 2008-04-02, 20:02
  3. Hang Device After Removing Memory Card
    By yogesh.bhople in forum Symbian
    Replies: 6
    Last Post: 2007-07-25, 09:11
  4. Removing Memory Card
    By abundea in forum Symbian
    Replies: 3
    Last Post: 2006-06-29, 15:37
  5. Removing Memory Card
    By ken_kusagi in forum Symbian
    Replies: 5
    Last Post: 2006-05-25, 16:03

Posting Permissions

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