Android :: How To Pass Large Amount Of Data During StartActivityForResult
Nov 3, 2009
From one activity, I want to pass a lot of data (about 1MB of Strings).I tried sticking it in Intent.putExtra(ArrayList<String>), but if I put in too much data, I get "FAILED BINDER TRANSACTION".What's the easiest way? I don't want to publish a service, or use the file system. I really want a pipe that can write data from one end and read it from the other end. I can handle the case where the starter Activity dies while the "startee" activity is trying to read from the pipe.
View 6 Replies
Jun 26, 2010
I will be making a mobile application in Android. My application is like Google Map's Get Direction feature, but a lot more complex, so I need to store data about points in the map. So I'm worried that SQLite may not be able to handle these large amount of data(or considering the limited storage of the phone). I have no background in SQLite so please bear with me.
View 3 Replies
View Related
Jul 13, 2010
We are supposed to cache textual and audio data in our application until device is booted or maximum of two days, whichever happens earlier. To get a perspective on data to be cached, note that we are to store about 200 text headers containing around 10 fields, each of length 30 bytes and about 20 sound files each about a minute long.We are getting the textual data by parsing XMLs and then we keep them in ArrayLists. The sound files are directly written inside the app storage using File I/O (and not on SDcard or Apps Cache directory).This application is to be run on devices running Android 1.5 or later.I understand, and please correct me if I am wrong, that we can cache the files either on SDcard or inside the application or inside applications Cache directory.
View 2 Replies
View Related
Aug 2, 2010
I am writing a application that needs to draw a "route" comprised of lots of GPS points (long+lat). The points are close together and don't follow roads, simply drawing a line between each point is ideal.
The current implementation I have is very slow as I am looping over all the GPS coordinates and creating a new Point and overlayitem in an itemized overlay. This takes around 20 seconds for it to load all of these points and draw them to the mapview. Is there a way in which I can construct a series of lines or point from the GPS coordinates and draw them onto the mapview?
Example of current implementation:
CODE:...................
View 2 Replies
View Related
May 6, 2009
I am trying to create an activity layout that has a top level vertical linear layout like so:
CODE:................
This works ok as long as the wordDefinition text isn't very long. But, when I set the text to something very long, it pushes the back button off the bottom of the screen. Why? Isn't the ScrollView supposed to scroll the text in the child TextView?
I've tried playing with weights (e.g., giving the top text view a weight of .2, the scroll view a weight of .7 and the button a weight of .1, but to no avail.
View 4 Replies
View Related
Apr 21, 2009
Ok, I have 2 Activities I want to send data between activity A and B.My problem is that some random code of mine seems to be called between startActivityForResult() and onActivityResult()in Activity A.This doesn't make any sense because there is no code after startActivityForResult() is called.Shouldn't onActivityResult() be the first thing A does after B finishes?
View 2 Replies
View Related
Dec 23, 2009
The database of my application need to be filled with a lot of data, so during onCreate(), it's not only some create table sql instructions, there is a lot of inserts. The solution I chose is to store all this instructions in a sql file located in res/raw and which
is loaded with Resources.openRawResource(id).
It works well but I face to encoding issue, I have some accentuated caharacters in the sql file which appears bad in my application. This
my code to do this : Code...
The solution I found to avoid this is to load the sql instructions from a huge static final string instead of a file, and all accentuated characters appears well.
But Isn't there a more elegant way to load sql instructions than a big static final String attribute with all sql instructions?
View 4 Replies
View Related
Apr 5, 2010
I am trying to write a streaming application.I have my own decoder and I am playing PCM audio using AudioTrack. At any point in time I want to know how much data is buffered with the device. I want to use this so that if the data with the device go below a level, I want to go into a buffering mode where I will buffer 2-3 seconds of data before continuing playback again. Can someone please tell me how to do this?
View 5 Replies
View Related
May 12, 2010
I have decided to go to a smartphone on 13th June when my present contract expires. My Query is, I am in the U.K. and if I look at contracts for the iphone they normally include unlimited Wifi and 1Gb of wireless data, whereas the Desire seems to come with only 500Mb of wireless.
I would much prefer to get a Desire, but I am concerned that I could be lumbering myself with excess charges if I go over the 500Mb limit.
I have never had a phone with an Internet connection before so I'm sure that there will be a lot of playing going on at least to start with.
View 25 Replies
View Related
Aug 2, 2010
I was wondering if the weather app that Moto has built in still uses the same amount of battery/data regardless of whether or not it is on the home screen. I took the widget off the home screen and stopped the weather process and it just comes back anyway. So the weather process is still running in the background. I'd like to use the weather widget, but don't want to deal with battery drain. Bad enough my phone has reset itself twice in the last 24 hours.
View 2 Replies
View Related
Nov 25, 2010
So I've had my DHD for 3 days, done a little 3G browsing the usual stuff Facebook, emails etc., but nothing more as I used my home WiFi for the widget and app downloads. But today I got a text from Vodafone saying I was near my internet usage limit for the Month! Within 3 days!? I have a 750MB limit, which the chap in the shop assured me was enough to keep me happy as 'no one ever goes over that.'
I was happy with that even though my previous contract was unlimited internet as he said it would be ok. All I can think of is the email syncing, so turned that off. But what else could be causing me to go over the 750MB limit within 3 days? Surely thats a huge amount to be used?
View 12 Replies
View Related
Sep 13, 2010
Maybe a rookie question, but here goes.I've seen a lot of posts about where to find an app/widget that allows you to switch between 3G and 2G. My question is: why would I want to do this? Does switching to 2G lessen the amount of data usage (which could be important, considering I'm on AT&T's 200 MB plan)? Or is there some other benefit/reason for doing this?Related: I have the SwitchPro widget, which has a 3G-2G switch available -- does this mean I am able to switch if I want to?
View 5 Replies
View Related
Nov 11, 2010
Just got my first android phone, the eris! I'm really excited, if anyone could help me out with some tips please do! are there ways i can watch my data usage, since i have a limited amount?
View 8 Replies
View Related
Dec 10, 2009
My application needs to intensively manipulate (read-write) on some structured text data.The size of the data is significant 1Mb. And there is initial data available for the user to start with.My idea is to put this data as a file in the .apk. Then, on initial application launch to read this data and populate Android SQLite database with it. Then just work with this database. But after the database is populated the data file is no longer needed. And I'd like to remove it to free some memory. Alternate approach is to work with this data file instead of SQLite database. But I assume SQLite would work a magnitude faster then i/o on my data file..
View 16 Replies
View Related
Jan 21, 2009
My application may consist og 100Kb code and 800 Kb Database content. If I include a datafile with the 800Kb data and import it into an SQLite database under the initial run of the applcation, I cannot delete the data file afterwards and my application will take up 800 Kb unnecessarily. Is there a better way to include/import my data....? (I want my application to not depend on being online after download - so the data should be downloaded with the application.
View 14 Replies
View Related
Jul 2, 2009
The main activity includes some variables with set values. I created a sub-activity with the form which has to be filled with the data from main activity so I guess the data have to be passed to the sub-activity when it starts. how to pass the variable values to the sub-activity from the main activity?
View 1 Replies
View Related
Oct 6, 2010
I'm developing an app which basically navigates through a xml-feed. When I parse the feed or let's say the list, then each (list)item becomes a model. All the models are wrapped up in an array list. Now, when the user clicks on a list item, the underlying model is going to be serialized and sent as IntentExtra to the next Activity (e.g. a deeper sub list). (Originally I asked here a different question. The solution was not related to Serializable and wouldn't help anybody. However MatteKarla gave an interesting input. Thats why I decided to rewrite this question.)
View 1 Replies
View Related
Aug 24, 2009
I have two activity in my project. I am callilng second activity from main activity. can some one tell me how can i pass some data to that activity? Simply i want to pass object array. Can some one tell me how can i do it ?
View 5 Replies
View Related
Jun 29, 2010
In my Android app,I start a new activity with startActivityForResult(). I get the result in onActivityResult() perfectly. My problem is that there is a small bit of data that I know before I start the activity and I need that value to be available in onActivityResult(), too. I tried attaching it to my intent as an extra, but it wasn't attached to the intent that is available when the activity returns the result. I made it work by storing the data in a global variable, but I really don't like that approach. Is there a better, right way to pass data through an activity (instead of just to it)?
View 1 Replies
View Related
Aug 4, 2009
Have some tryed to pas databuffer on android by jni?
View 6 Replies
View Related
Dec 21, 2012
This is my 1st activity code:
Intent i = new Intent(getApplicationContext(), CustomerLogin.class);
i.putExtra("GrandTotal", mGrandTotal);
startActivity(i);
This is my 2nd activity code:
Intent in = getIntent();
Bundle b = getIntent().getExtras();
String total = b.getString("GrandTotal");
TextView grandtotal = (TextView) findViewById(R.id.grand_total);
grandtotal.setText("Welcome ," + total );
Here the value is pass from 1st to 2nd activity successfully. Now i have to pass these value to third activity.how can i do.
Now this is my 2nd activity:
if(isUserValidated && isPasswordValidated)
{
Intent intent = new Intent(CustomerLogin.this,PayPalIntegrationActivit y.class);
intent.putExtra("GrandTotal", total);
intent.putExtra("login",username.getText().toStrin g());
startActivity(intent);
}
This is my third activity:
Bundle b = getIntent().getExtras();
String total = b.getString("GrandTotal");
TextView grandtotal = (TextView) findViewById(R.id.check);
grandtotal.setText("Welcome ," + total );
Now i have to run the app means am getting the total value on 2nd activity.but am not getting the total value in 3rd activity.
This is my full source code:
1st activity:#5564017 - Pastie
2nd activity:#5564018 - Pastie
3rd activity:#5564020 - Pastie
View 2 Replies
View Related
Sep 2, 2009
I need to insert approximately one million rows of data (spread over 4 tables) - each row has one or two numeric fields, and two or three text fields (normally quite short). Single-column indexes on all the fields. After doing some tests on the emulator with a small test set, I extrapolated (assuming the last row will be inserted with a similar speed to the first row) my results to figure out that this would take about 15 hours (I have a Core 2 Duo running Vista). However, then I tried running the small test set on my Hero and I was surprised to see it run more than four times faster. I would guess it would take about 3 hours on the Hero. Alternatively, I could make the pre-populated database available as a download on the first run but this is likely to be a 120MB download. I have a few questions I'm hoping someone can help me with: 1. SQLite performance on the actual device being 4-5 times faster compared to the emulator - is this normal/expected? 2. Do the figures above generally sound fast/slow/normal (sorry this is so vague)? 3. From a user perspective - would it be best to provide a 120MB download or a 3 hour "first-time initialisation" step (plus 6MB download)?
View 14 Replies
View Related
Jun 10, 2009
I am working on an android app that needs to act on a few data files totaling around 30MB. I put together a test and the emulator failed with OutOfDiskSpace. Debugging on a device failed with even a smaller data size. After reading through the google groups, it appears that the application size limit isn't stated anywhere and nobody from google has been forthcoming with specifics about this. Given that there are iPhone apps that are over 100MB in size, putting such a small limit on Android apps seems weird, except just for the fact that you have a relatively small amount of total available app storage space (< 100MB).What techniques do you use to deal with this limit? If you have an app that needs more than 10MB, do you put it on a web server and deal with downloading it the first time? If so, how do you handle access control so that only your app can get the data?
View 2 Replies
View Related
May 24, 2010
I am working on an application and one feature that would make it really useful is the ability to share some information, but the other device may not be expecting the data to be sent.For example, if I am reading a really good book, and I realize that a friend may like it, I could use an application to send the data to him, so he could order the book from Amazon.But, since he isn't expecting the data, I would hate for the application to be polling a server every so often, as that will be needlessly draining the battery.Ideally it would be great if there was a way to make a phone call to the target device, send a data packet and end the call.If it could be done and prevent the phone from ringing, then it would be very useful to me.I am curious if there is some way to send data between devices without polling.
View 1 Replies
View Related
Nov 11, 2010
in my app i am having an Activity that launches another Activity ontop of it. The second Activity is meant to provide controls like next and previous for the first activity.How can i pass button events between the two activities that are visible at the same time without closing the Activity with the controls?
View 2 Replies
View Related
Jun 17, 2009
I am stuck - or perhaps I am trying to do something that can't be done.I would like to send an intent to the NotificationManager with data so that if it is clicked, the Activity that is called will do something with that data.I have tried a variety of things, the Activity does get called but no sign of data (and I am frankly a little unclear as to where to retrieve it).If someone out there can either suggest something or tell me I am headed down a dead end I would be grateful.
View 7 Replies
View Related
Oct 30, 2010
I'm trying to pass data from notification to activity.
View 1 Replies
View Related
Jun 12, 2010
I am want to pass data back from a Thread to Activity (which created the thread). So I am doing like described on Android documentation.Only one thing I am missing here - where and how should be defined mResults so I could access it from both Activity and Thread, and also would be able to modify as needed? If I define it as final in MyActivity, I can't change it anymore in Thread - as it is shown in example.
View 1 Replies
View Related
Nov 2, 2010
I wounder if there is some possible to know from which parent Iam coming from in the child so I can do different stuff depending on who the parent is of the activity.This is how Iam going over to the child. But I don't know how to handle this in the child to check who is the parent. The above code is used on one of the parents,, is there somehow I can use "EQ_CODE_SELECT_LOCATION"? Also I wounder how is possible to send data to a child activity?
View 1 Replies
View Related
Mar 15, 2010
I am building an application for Android (1.5) that, after quering a webservice, shows to the user a big amount of data that should be displayed in a "grid" or "table" style.
I must show a result of about 7 columns and 50 rows (for example a customer list with names, addresses, telephone number, sales amount last year and so).
Obviously, the 7 columns will not fix in the screen and I would like the user would be able to scroll up/down and LEFT/RIGHT (important because of the number of columns) to explore the grid results.
cell selection level is NOT necessary, as much I would need row selection level.
What is the best approach to get this interface element? Listview / GridView / TableLayout?
View 5 Replies
View Related