Sharing data between views

Login to reply to this topic.
Mon, 2005-05-16 14:05
Joined: 2005-05-03
Forum posts: 12
Hi,
In my app I'd like to switch from the main view to the Media Gallery view, then select an image and switch back to the main view with the selected image.

How can I make Media Gallery return the location of the file I selected, or more generaly, how can I share data between the differents views of an application?

Tue, 2005-05-17 09:32
Joined: 2005-01-31
Forum posts: 122
Re: Sharing data between views
Quote from: trunksten
or more generaly, how can I share data between the differents views of an application?

I do this by keeping data with the appUi and paasing the appUi instance to all views.

Regards,
kurtrips
Tue, 2005-05-17 09:50
Joined: 2005-05-03
Forum posts: 12
Sharing data between views
Yes, I was thinking the same thing, but there is noway to do that when using external views from applications like calendar or phonebook, isn't it?
So can we make appUi and an external view exchange messages?, or that the external view return a message when leaving?
Sun, 2006-10-22 19:40
Joined: 2005-06-13
Forum posts: 2
Re: Sharing data between views
You can't do what you want.

When changing view to a remote application ActivateViewL(...), you can only pass information to that application. However there is not way to receive any "response" from that application. The only way would be if that application would change the view back to your application with that data.
However if you want to write to separate applications for yourself and pass information between them you can always exchange data by creating files in a common directory. This could also be the way you can use the camera application on the phone, by monitoring the directory where the application saves the images and thus see when it creates a new file.

Hope this is somewhat useful.
  • Login to reply to this topic.