A friend gave my an idea,
I thought if doing a query twice in the past, one for the first list
and the other once a row was chosen, since i don't use projects
parameter the queries are not efficient, however if for the first
list i need just two rows and for the second i take only a single
column
Isn't that an overkill ? create a service to share a single cursor
between 2 activities ? if it were a generic service that i used to
share many cursor from many queries (lets say it's a query management
service) and several activities will use it then i can understand the
efficiency and code
Isn't that an overkill ? create a service to share a single cursor
between 2 activities ? if it were a generic service that i used to
share many cursor from many queries (lets say it's a query management
service) and several activities will use it then i can understand the
efficiency and
I agree with you, static members don't have to be a manace regarding
GC, but they do carry the memory leaks danger if you don't treat them
well, i close the cursor and null the instance in onDestroy and
recreate it in onCreate.
However in a big complicated program with a lot of code it's a
Hi,
data size is 960987 bytes, logcat:
V/ImageCaptureCallback( 8863): onpicturetaken...@43678fb0 length =
960987
I'll try to increase heap size next, thx.
olli
On Aug 15, 8:24 am, powerbyte powerb...@gmail.com wrote:
Hello Olli,
what is the size of byte[]data?
may be problem with the
I have tried to share betweeb two simple activities:
On parent activity, I'll start ImageCapture Activity:
Intent cameraIntent = new Intent();
cameraIntent.setClass(this, ImageCapture.class);
cameraIntent.putExtra(cameraData, null);
Hello Olli,
what is the size of byte[] data?
may be problem with the heap size. In logcat output, is something like
grow heap? if yes, try with increasing heap size.
pb
On Aug 14, 2:22 pm, Elias elias.va...@googlemail.com wrote:
I have tried to share betweeb two simpleactivities:
On parent
I have a similar question. Basically I have an app with several
activities, each needs to read different data from a common local
SQLite db. This data doesn't have to be accessed outside of the
application itself - hence I decided against using a content provider.
I was thinking of using the
sylvestercaro...@gmail.com wrote:
I have a similar question. Basically I have an app with several
activities, each needs to read different data from a common local
SQLite db. This data doesn't have to be accessed outside of the
application itself - hence I decided against using a content
Another way to share data between activities in the same process
is to use the Application class:
http://developer.android.com/reference/android/app/Application.html
You have to specify the name of your Application class in the
manifest and the framework will create only an instance of this
thanks man, that is an excellent way of explaining so even an android-
beginner can understand. Is there a similar way of returning data to
the first activity when the second activity has finished running,
corresponding to javas return value1;?
Regards
Per Sandström
On 4 Aug, 17:44, powerbyte
I haven't tried this but its another alternative.
If your application runs multiple activities inside one process I
assume you can create a class that has public static variables. Than
you can access these variables in any of the process activities.
Might be wrong but I think it could work...
Start it with startActivityForResult(), and return the data with
setResult().
2009/8/5 Per Sandström pg.sandst...@gmail.com
thanks man, that is an excellent way of explaining so even an android-
beginner can understand. Is there a similar way of returning data to
the first activity when the
yes, for returning values from second activity call setData(,,) from second
activity before finishing activity.
And in first activity instead of startActivity(..) call
startActivityForResult(..)
and override onActivityResult(...)
for Example:
In parent activity,
declare a variable for aaa
-Jona, the idea with static variables would work (without having
efficiency in mind). The only problem I see is when you are working in
a threaded environment. Then you might have to make sure that your
implementation is thread safe.
--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile·
but how do I create and pass this global object? I cant do it like I
do in java or other programming languages where . AIDL is an
alternative, but it still seems overkill for a small app.
regards
Per Sandström
On Jul 22, 10:50 pm, niko20 nikolatesl...@yahoo.com wrote:
On Jul 22, 1:19 pm, Roman
Hello
To summarize: Activities don't have constructors! How do I send data
to them from their parent activity???
we can send data from parent activity to childs, using Intent
for example:
In parent activity,
Intent intent = new Intent(this,com.sample.aaa.class); //aaa is
child activity
As already mentioned earlier, you could also use Intents which are
very lightweight. You are able to attach also a data record to your
intent using the method putextra().
http://developer.android.com/reference/android/content/Intent.html
--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· ·
Android supports multiple IPC mechanisms.
You can use the Intent mechanism as well as the AIDL mechanism for
doing this. The AIDL approach is more complex but offers you also more
flexibility to pass objects.
Find information about this topic on
On Jul 22, 1:19 pm, Roman roman.baumgaert...@t-mobile.com wrote:
Android supports multiple IPC mechanisms.
You can use the Intent mechanism as well as the AIDL mechanism for
doing this. The AIDL approach is more complex but offers you also more
flexibility to pass objects.
Find
20 matches
Mail list logo