×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    77

    Smile [Moved] new image notification

    Hi all,

    is possible to get an event notification when a new image has been taken from the built-in camera or when a new file is created on the filesystem?
    In my specific case i have to write an application who can detect when a new image as been taken from the built in camera and stored on the device's filesystem.
    For the camera events i'm watching on the MCameraObserver and the MCameraObserver2 who can notify me if a new image has been taken from the built-in camera but if then i would recover the new created image how can i find her on the fileSystem?
    What is the default path where the images are saved to? How can i get it and how can i know what is the last image created on this path so that i can get the last camera taken picture?
    Furthermore is this also applicable to video recorded from the built-in camera?

    Best regards.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: new image notification

    try searching in the wiki for RFs::Notifychange, this will give you avery good article.

  3. #3
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    77

    Re: new image notification

    I'm already watching to the Rfs::NotifyChange method but with this observer i maybe can detect a change on the photo's dir (an image has been added for example) but how can i then know which is the specific file that has been added to this dir?

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: new image notification

    hello

    sorry for replying late.

    To get the latest file, you need to check the CDir & TEntry Class it has some easy and good methods.


    Regards,

  5. #5
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    77

    Re: new image notification

    Thank's gaba88 for the replies.

    I have to implement an observer for the built-in camera who receives notifications when any other application is accessing the camera hardware.I have read that this is possible through the MCameraObserver2 but i can't understand how to use it. Is any example presents in the forum?
    I don't want to implement the CCamera application but only the observer.

    Best regards

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: new image notification

    hello

    i have never used that but a search in the wiki with key MCameraObserver give you some good links i guess.

    Regards,

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: new image notification

    I am not sure if you can achieve it using MCameraObserver2 approach but I can suggest you an alternate way which is not an ideal one but you can go with it until you find the ideal one. Its base will be RFs::Notifychange.

    1) Get the images path using PathInfo API. It has a static method, named: ImagesPath.
    2) Store the file names in one array. This article might help: http://wiki.forum.nokia.com/index.php/Find_Files
    3) Observe that path using RFs::Notifychange
    4) When you get notified for RFs::Notifychange, get the file names from the current time and compare it with your previous array entries.
    5) The difference will be your new file.
    6) Update your array to contain all the entries again for next round
    Nokia Developer Wiki Moderation team

  8. #8
    Nokia Developer Champion
    Join Date
    May 2004
    Posts
    2,267

    Re: [Moved] new image notification

    Hi,

    See this easy way:

    "Detect the file name when a new image/video clip has been taken from the built-in Camera"
    http://wiki.forum.nokia.com/index.ph...ra_application

    Ziteng Chen

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: [Moved] new image notification

    Quote Originally Posted by chenziteng View Post
    Hi,

    See this easy way:

    "Detect the file name when a new image/video clip has been taken from the built-in Camera"
    http://wiki.forum.nokia.com/index.ph...ra_application

    Ziteng Chen
    thanks for the article, i just tried on v5.x phones for a application actually you saved us lot of code size. thanks again.

  10. #10
    Nokia Developer Champion
    Join Date
    May 2004
    Posts
    2,267

    Re: [Moved] new image notification

    Hi,

    You are welcome, thank you for your appreciation of the article.

    Regards

    Ziteng Chen

  11. #11
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: [Moved] new image notification

    ya really thanks a lot chen earlier this whole thing use to take a toll of three classes for me and now just one class. :-)

    Thanks a lot again. :-)

    Regards,

  12. #12
    Nokia Developer Champion
    Join Date
    May 2004
    Posts
    2,267

    Re: [Moved] new image notification

    Yeah I'm always trying to make life easier, enjoy!

Similar Threads

  1. [moved] Image Button !!!
    By damodharan in forum Symbian User Interface
    Replies: 7
    Last Post: 2010-01-08, 09:28
  2. [moved] Bluetooth image printing
    By dushdushyant in forum General Development Questions
    Replies: 0
    Last Post: 2009-12-03, 05:48
  3. Getting Thumbnail image
    By siva_321 in forum Symbian
    Replies: 7
    Last Post: 2009-11-09, 10:27
  4. load image problem
    By Pmarcoen in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2009-08-23, 06:19
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

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