Then you're stuck with what you have. Re-hashing can be expensive indeed...
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email
You have to make sure that the class resolves properly.
- Don't change the class and load the JAR as well
- Change the class (if that's possible) to remove dependencies on that jar,
and recompile.
--
You received this message because you are subscribed to the Google
Groups Android Developers
Have you tried to read the images' EXIF information for the
longitude/latitude?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send
setClickable or the Clickable attribute of your text and imageview. Set them
to false.
Note that when you call 'setOnClickListener()' on your text or imageview, it
will effectively set 'clickable' back to 'true'.
--
You received this message because you are subscribed to the Google
Groups
In your URLs on the phone or emulator, localhost or 127.0.0.1 resolve to the
phone (or emulator) itself.
Instead, use 10.0.0.2 (i think this is the correct IP-address) for accessing
the PC/Mac that your phone is connected to (your emulator is running on).
--
You received this message because
Writing to a file or db, as you mentioned, is one option.
Another option is to write it to your app's preferences (SharedPreferences).
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
No, you don't need to come by. All is ok.
But thanks for the offer!
:-)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
I've seen this error when unmarshalling my own parcelable object-types. But
i've never seen it with types from the framework (in this case IdentityModel
from the motorola blur interface?).
This is usually due to a problem with class-loaders. E.g. when calling
'Parcel.readArray(ClassLoader
Very true, Nathan.
When calling cancel(true), an interrupt is 'called' on the thread. This
means that methods that put the thread into a wait-state (wait, sleep and
such) get interrupted and these will throw an interrupted-exception. Some
(not all!) blocking IO operation may get interrupted as
This looks like a stack-trace from the layout-editor in Eclipse.
Older versions of Android's layout-editor plugin are known to not support
all types of drawables (e.g. shapes with rounded corners).
Be sure to install the latest plugin (10.0.0.1, if i'm not mistaken).
Then try to select the
Your background thread should provide a method that allows the caller to
register a listener (and a method to un-register again).
When you background thread has new data to show from the network, it calls
the listener(s) with the necessary parameters.
When (one of) your activity is coming to
First, have you tried javascript:loadTOC*()* instead of javascript:loadTOC.
You forgot the open and close braces.
Secondly, i'm not sure what your script does.
You want to execute an anonymous function when your document finished
loading. This anonymous function just declares another function
Listener interface example:
public interface Listener {
public void notifyMe(Object someParam);
}
Listener example (e.g. your Activity that will implement Listener):
...
protected void onResume() {
...
backgroundThread.registerListener(this);
}
protected void onPause()
We have the same issue in my company's application.
For now, we do not cache sensitive data and our app has no offline
capabilities.
Actually, security is not the major issue in our case. You can properly
encrypt the cached data and that should be sufficient (as long as the app
cannot be
My first answer would be: use less memory by chopping up the large text file
in chunks.
My second answer is this: Apart from setting null values to your (temporary)
objects, try to call System.gc() as well. It *may* improve your situation
somewhat, since Android's (DalvikVM's) garbage
No, you don't *have to* move to Java.
I would suggest staying on the NDK (using the NDK's opengl libs) for a high
performing 3D game.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
It may have to do with the initialization of the database during the
construction of your TabActivity:
base baseDatos = new base(this,programacion,null,1);
SQLiteDatabase db = baseDatos.getWritableDatabase();
These fields are assigned during the construction of your TabActivity.
Move
If your file is not huge, why not store it in your app's sandbox?
Take a look at these methods of Context: getDir(...) and getCacheDir(...)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Unless your app is a test-project, i don't see much use in your app.
You'd be better of just talking to each other, because you will be no more
than about 10 meters (30 feet) from each other. Blueotooth's range is about
10 meters...
--
You received this message because you are subscribed to
You took the words right out of my mouth.
- Requests to do someone else's homework.
- This forums seems to become the defacto debugger: If you get a
null-pointer exception, ask about it on android-developers group.
But i always like the responses from TreKing to these questions. Keep'm
coming,
Tree views are very hard to use on small mobile devices. Maybe up to 2 or 3
levels is fine, but that's just about it.
Instead, try to implement a 'sliding' list, where clicking on an item in a
list-view (list-item is a parent-node) will open up another activity with a
list of this list-item's
I don't understand this sentence which has a link to the original one.
What does that mean in your code?
Anyway,
onRestoreInstanceState is only called when your Activity's process had been
killed (maybe due to low memory) while your Activity was still in the
back-stack.
You can simulate this
Make your Activity full-screen.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
This is a developer forum and most of us do expect that before you ask any
questions that you have done some searching yourself. If not, the same
questions are going to be asked over and over again. And if you're not
willing to read (god forbid to open a booklet to find some answers, ow! my
In my experience, apps run somewhat slower in the debugger, but not by much.
It is certainly not 'utterly unusable' slow.
If you do experience a very very slow performance while debugging, it may
help us answer or solve your problem to describe what your setup is. Maybe
some issue in the USB
The one main difference between my setup and yours is that your use
Jetbrains. I'm using Eclipse 3.6. Have you tried using Eclipse?
What is your performance if you just fire up 'ddms' (not Jetbrains or any
other IDE) and dump the heap or take a look at your apps' threads?
--
You received this
At what point does your app start running slowly:
- Initially, don't start DDMS or Jetbrain or Eclipse.
- Run the app on your phone which is unconnected. Does it run OK or slow?
- Then connect your phone to your Mac through USB: Does the app still run
OK?
- Then start DDMS (not Jetbrain or
I agree with you about the *simulator/emulator*. If you don't have an
absolute stellar system (and even then...), the emulator can be very slow.
But Eric's problem is with an actual device, not the emulator and Google is
acknowledging the problem with the emulator.
And I haven't seen the issues
For rotating the phone or sliding out the keyboard and such,
onSaveInstanceState is not called and the onCreate will have a null value
for the 'savedInstanceState' parameter. To handle this, use
onRetainNonConfigurationInstance and
mm...
I need to check this really quickly. I thought that using
onRetainNonConfigurationInstance and
getLastNonConfigurationInstancehttp://reference/android/app/Activity.html#getLastNonConfigurationInstance()
is
enough to carry state from one configuration to the other (e.g. when
My app stores screen-data (limited sized data that is shown to the user and
could possibly be modified by the user) in Parcelables. These are assigned
to Intents when starting the activity.
I return this Parcelable in the onRetainNonConfiguration instance and I
assign it to the bundle in
Thanks!
I think i'm doing that, since I do handle the case in which
getLastNonConfigurationInstance returns null.
Last week I was looking into the LoaderManager. It would have made some of
my app's data loading easier. But it is only for api-level 11 or up. Can't
use it...
--
You received
Add a border to the view-group that hosts the fragment, not the fragment
itself.
For borders you can use 9-patches or shape drawables.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Yep, that's what I did for a regular list-view that acts like a slot-machine
roll.
Return a value in your adapter's getCount() method that is a very very very
high multiple of the number of actual items in your list-view's adapter.
private static final int MULTIPLIER = 100; // some LARGE
It's possible. IT works fine.
You can have a RelativeLayout or a FrameLayout with a camera-preview View
(that hosts the Surface on which the camera preview is drawn) at the bottom
of the Z-stack and other views above it.
--
You received this message because you are subscribed to the Google
Try to use onSaveInstanceState to record the fact that you have 'nulled' out
some of the extras.
Then in onCreate, examine its 'Bundle savedInstanceState' parameter. If it
is not null, it is the Bundle you returned in the onSaveInstanceState
earlier. From this Bundle, you can decide to ignore
public YourActivity extends Activity {
...
private boolean extrasClearedOut;
...
public void onCreate(Bundle savedInstanceState) {
...
...
if (savedInstanceState != null
savedInstanceState.getBoolean(extras_cleared_out, false)) {
extrasClearedOut = true;
}
public YourActivity extends Activity {
...
private boolean extrasClearedOut;
...
public void onCreate(Bundle savedInstanceState) {
...
...
if (savedInstanceState != null
savedInstanceState.getBoolean(extras_cleared_out, false)) {
extrasClearedOut = true;
}
Exactly,
You initialize all your *data *(not your views)* *in the appropriate state.
Then when the views become visible/available, they get the data and show it
correctly.
In other words, the view should be getting the data when they become
available. Don't 'push' the data to views (that may
Sometimes i get the feeling that classes are about to end for the season,
some students need to get their assignments finished (quickly), and they ask
us here to do their homework. I may be mistaken, but it looks like that
sometimes.
--
You received this message because you are subscribed to
I agree with the other posters. The TimeZone is set by the phone's date
time settings. The user either specifically sets the phone's date, time and
timezone or (s)he lets it being set automatically (using network provided
values).
If the phone's date time settings are mis-configured, there
The classes Bitmap and BitmapFactory.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
Per the docs, I should be able to get a time formatted as follows: Which
docs says that 'p' and 'a' are valid values?
AM and PM are the official en-US locale strings for before noon and after
noon.
The 'p' and 'a' are not official locale strings for this.
--
You received this message because
The option from Valentin in stackoverflow doesn't work well with the
*compatibility
library*. This is what i did to make it MapActivity work with Fragments
using the compatibility library (it is not the best solution, but it seems
to work so far):
1. Use the source of the compatibililty
You're right. That's still the same (btw, the docs say you can have multiple
MapActivities per app, as long as they are in different processes ... *Only
one MapActivity is supported per process* ...).
The post above describes how you can have a MapView in a Fragment using the
V4 compatibility
I don't think you can draw an 'inverse' rectangle like that using shape
drawables.
For a good overview of what you can use for drawables go
here: http://www.idunnolol.com/android/drawables.html
I agree with Daniel: Use a 9patch drawable or do it programmatically,
creating your own Drawable
This would draw a transparent rectangle (with a 4dp border). It doesn't draw
the white area outside the rectangle.
As far as I know, drawing something transparent does not clear a 'previous'
color, i.e. drawing a transparent rectangle on a white background still
would show white background
Good one!! :) ... drawing two rectangles; the smaller one with rounded
corners slightly smaller above the larger one with rectangular corners.
As long as your paddings can be fixed/constant, this will work indeed :)
--
You received this message because you are subscribed to the Google
Groups
Using System.gc() helped me with my image editing program.
But it is NOT full proof.
This is what I do:
When ma app no longer needs (a) bitmap(s), it calls *recycle()* (this will
clean up the memory - image data - that is part of your process, but not
part of the DalvikVM), nulls the Bitmap(s)
I do this:
In the opening-callback type of methods (onCreate(), onStart(), onResume(),
etc), i call the super first.
In the closing-callback type of methods (onDestroy, onStop, onPause(), etc),
i call the super last.
I don't think it matters that much, but it has served me well :)
--
You
* onDestroy() is not guaranteed to be called, so if you create a
Thread in onCreate(), the thread may never be stopped. *
When the process hosting your activity is killed, the onDestroy won't be
called... makes sense.. your process just died. The process is force-killed
(I think): any thread
I've seen to many issues when using HttpURLConnection.
I suggest using HttpClient (DefaultHttpClient or AndroidHttpClient)
instead.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
The text and the diagram of the link you showed are indeed not saying the
same:
- The diagram only shows a direct path out of onPause or onStop only when
the process is being killed.
- The text says that the framework can just call 'finish' on the activity
(without going through
Be very careful with cleaning up some resources in onPause. A dialog being
shown could put your activity into paused-state, but not into stopped-state.
This happens when a system dialog pops up (e.g. an activity chooser) and
your activity is still visible in the background (blurred, but still
The text of the documentation says you're right. A call to 'finish()' is all
that could happen to 'destroy' the activity. No killing of the process is
necessary.
However, the image in the documentation (
http://developer.android.com/images/activity_lifecycle.png inside
It really depends on what you want.
In my app, the request to the server is made first. If this is successful
(connection is OK, login is OK), then the data from the server is assigned
to an Intent and this Intent is used to start an Activity to show that
data.
If the connection is wrong, a
I parse the data from the service into data that can be persisted.
If the data is small enough, the data is translated into a class that
implements Parcelable. This parcelable is then assigned to the Intent that
starts the Activity (using 'Extras'). When the process is killed and the
user
Yes and no.
As long as your Extra in the Intent implements Parcelable properly, it
works. Calling getIntent() in onCreate or in onNewIntent gets you the data
that was used in the Intent that (originally) started the Activity.
If the user interacts with the Activity and thus *changes *the
I think you mean that one asynctask's background process has to finish
before another asynctask's background process can start.
This is per design in pre-Donut and in Honeycomb and later. All AsyncTasks
use a pool of only one thread. If one asynctasks is 'using' it, others can't
and have to
Do your users care whether it is a 'time-out exception' or a 'network
unreachable'?
In either case, the server cannot be reached successfully. Both exceptions
are problems that cannot be solved directly by the user. What would the user
do differently when (s)he sees 'Time-out exception' or when
You could also have just one AyncTask doing all three tasks...
...
public Result doInBackground(Param parm) {
boolean result1 = callSomeTask1();
if (result1) {
callSomeTask2();
}
else {
calSomeTask3();
}
}
private boolean callSomeTask1() {
...
...
}
private
It's a bit convoluted, because i changed the FragmentActivity.java into an
*interface
*(instead of a *class*) and that needed some refactoring.
But, so far, it works :)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group,
How big is drawable/domo2048?
Is it 4MPixel. This means that, in the best scenario, it occupies 8Mbytes.
Then, depending on how you show it, you have a scaled (down) version of the
image as well.
Note that the memory held by the raw data of the image (the 8Mbytes if
RGB_565 is used) is not
I figure that multiple smaller images work better than the '1 large image'
example you have, since DalvikVM won't need to allocate one large contiguous
chunk of memory.
I won't worry about it too much. Don't start solving a problem that may not
exists in your actual app :-)
--
You received
The new contents of FragmentActivity.java are in my earlier post.
The AFragmentActivity.java is a copy of the original FragmentActivity.java
with these additional changes:
- public class AFragmentActivity extends Activity *implements
FragmentActivity*
- Then fix the compiler errors
Yes, you're right about that. Calling notifyDataSetChanged on the adapter is
the best way to go and you should use it in 99% of cases. However, in some
cases rules should be broken. :)
A call to notifyDataSetChanged redraws all the children in the ListView and
is relatively expensive and you
You cannot replace a *fragment *(e.g. your ImageView fragment) directly with
an *activity *(in your case a subclass of AFragmentMapActivity). Don't
confuse Activities with Fragments.
Have your main Activity, that hosts the Map fragment (and possibly other
fragments as well), extend
AsyncTasks are not threads.
They are chunks of work (like getting a web-document) that are executed on a
pool of (background) threads.
Read the documentation of AsyncTask carefully. Figure out a way to have a
pool of more than one background threads (happens 'automatically' for
Android OS
I've had similar issues.
I removed away from the absolute black box testing and started targeting
View by their id's (com.yourcomp.yourproject.R.id.someViewId) instead.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group,
'this' in an Activity refers to the Context, because an Activity is a
Context (Activity extends Context).
this.getApplicationContext() returns an Application. An Application is a
Context as well.
But the ProgressDialog really likes an Activity, not just a Context. As you
discovered, not just
Implement the onPause (or onStop) of your Activity. Pause your thread there
(i.e. have your thread check for a value/semaphore that indicates when to
pause a thread). In the onResume (or onStart), resume your thread.
Implement the onDestroy of your Acivity. Stop your thread there (i.e. exit
Hi Andrew,
The answers you got are correct. You should spend as little time in
onSaveInstanceState (or any other onX callback method) as possible.
Preferably a few milliseconds.
I don't know what your app does, but it looks like you try to save user
supplied information (either in a file
The problem is with a non-static inner class is that you don't 'see' the
implicit reference to the outer instance (OuterClass.this). It is easy to
forget about this one and later realize what problems it causes.
Usually,
when the lifetime cycle of an inner class matches the lifecycle of the
I don't think you can do much if users have configured their tablet to have
their WiFi disconnects when the tablet is in sleep mode: No connection, no
C2DM.
The best you can do is to query this 'WiFi off when device is asleep'
setting (i'm not sure how, but i think it should be possible) and
It entirely depends on your situation and,as the other said, get an
accountant/tax-adviser to get a good answer.
But in general: If you have income, you'd need to pay taxes on it fact
of life :-)
On Friday, July 27, 2012 3:11:31 PM UTC-4, Jaison Brooks wrote:
So i am selling
Hi,
I have a text-view next to a seekbar. The seekbar is accessible and
announces its current value. The text-view also shows this value.
For accessibility, I'd like to make the text-view not
accessibility-focusable, since the seekbar already is (no use in stating
the same thing twice).
Murphy (a Commons Guy)
wrote:
There's no accessibilityFocusable attribute in the documentation, at
least based on a simple search. I don't see anything quite like it in
the list of XML attributes for View. Where did you find this?
On Tue, Jul 31, 2012 at 10:59 AM, Streets Of Boston
wrote
view with a custom virtual view hierarchy. Do you
know of any?
On Tuesday, July 31, 2012 12:45:16 PM UTC-4, Mark Murphy (a Commons Guy)
wrote:
On Tue, Jul 31, 2012 at 12:31 PM, Streets Of Boston
wrote:
If this is not the way to do it, how would one prevent accessibility
focus
3:23:13 PM UTC-4, bob wrote:
What do you mean hover events seem to work somewhat better? What's a
hover event on a touchscreen?
On Tuesday, July 31, 2012 12:54:25 PM UTC-5, Streets Of Boston wrote:
Thank you Mark.
I've been trying to update our app to the latest and greatest
If your company is larger and is planning on developing more in-house app
for its employees (and customers?), then something like the EASE platform
of Apperian may be of interest:
http://www.apperian.com/get-started/ease-platform/
On Sunday, August 5, 2012 11:23:55 AM UTC-4, jayd wrote:
I’m
You could do both, if you abstract out the javascript-to-java calls in your
HTML5's javascript
- Create a javascript class in your HTML5 that implements a certain set of
methods that define
all the necessary javascript-to-java calls (abstraction). Let's call it
'CallToJava'.
- On Android,
As long as *global_context *is an Application object, it is 'alive' as long
as the (DalvikVM) process is alive (and vice-versa). As long as this
context is only used to load assets/resources, this should be fine.
Having such a global context (*application *context would be a better word)
I'm don't know how you use 'ServiceController', but note that for each
instance of a ServiceController, you can call 'executeService()' only *once*.
This is because it has an AsyncTask (your WebService) as a field, which is
constructed in the ServiceController's constructor. And an AsyncTask's
I'm guessing here a little bit, but is this what you want?:
The user is in ActivityA. THe user clicks on a button or does something
that requires a background Thread to do so processing.
When the Thread is done (successfully), the thread needs to spawn/start
ActivityB
If so,
use an AsyncTask.
int pixels = bitmap.getHeight() * bitmap.getWidth();
int bytesPerPixel = 0;
switch(bitmap.getConfig()) {
case ARGB_:
bytesPerPixel = 4;
break;
case RGB_565:
bytesPerPixel = 2;
break;
case ARGB_:
bytesPerPixel = 2;
break;
case ALPHA_8 :
bytesPerPixel = 1;
break;
}
int
Yes, a lot :)
Try out your code using 'hasPushedActivityB' and then rotate your phone or,
if it has a physical keyboard, slide out the keyboard:
The activities will be recreated and your 'hasPushedActivityB' of the new
activity A will be false, but the new Activity B will be showing.
Just use
I assume you have your images shown in an ImageView.
For each of your activities that shows the image in an ImageView:
In the onStart():
...
myBitmap = loadBitmap();
imageView.setImageBitmap(myBitmap);
...
In the onStop():
...
imageView.setImageDrawable(null); // disassociates the
You can try this on the emulator. Hit Ctrl+F11 and you'll 'rotate' the
device.
setResult does not immediately return results back to its parent activity
(You can call setResult many times: only the last call to setResult will be
effective, superseding all previous calls)
The Intent you use
Good to know you got it working.
Just checking;
You put images in 2 global vars in your application object. Be sure that
these images are not (Bitmap)Drawables, since Drawables may hold references
to a Context that could be an Activity. Holding a global (indirect)
reference to an Activity may
I am not quite sure (i never used ksoap2), but i can come up with these
possible causes:
1. Does your XML have some extra white-space before the top XML tag *
Envelope*?
2. Try to set your NAMESPACE variable to
http://schemas.xmlsoap.org/soap/envelope/; instead.
3. If that
Don't hold static references to Activities or Views. You will run into
memory issues and such.
But you could put your instance of ProgressBarThread into a static
reference that is accessible by Activity B.
Then Activity B can register/attach and de-register/detach to this
background task as
1) The onActivityResult will have a result-code of RESULT_CANCELED and its
'Intent data' parameter will be null.
2) Yes, you can pass back any Intent, even the one that started the
child-activity. You don't need to create a brand new one.
When an Intent is passed back or forth between
Just for debugging purposes:
Have you implemented the Activity's method 'onLowMemory()' and put a
debug/logcat statement in there to see it this one gets called or not?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group,
The documentation of GLSurfaceView states that its onPause and onResume
should be called when its Activity is paused (onPause) and resumed
(onResume).
Can it be called in onStop and onStart instead to be able to handle
partially transparent child-activities.
Say:
Activity *GLA *has a
IntentService dispenses with the
configuration changes but leaves you in a lurch when requiring a
response.
In addition to Mark's suggestions, you could assign a ResultReceiver to one
of the Intent's extras:
Your Activity could implemented this ResultReceiver's *onReceiveResult *
method.
Bumpedee bump... :)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For
Buehler, anyone, Buehler..?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
We did a proof on concept (we actually have implemented it) before asking
this question.
You can actually remove the calls to GLSurfaceView.onPause
and GLSurfaceView.onResume entirely and most of the time it will work.
Leaving these calls out will fail only after *excessive
Technically, yes, you can put 17000 items in a list.For usability, no,you
can't put 17000 items in a list.
No one would want to use a lists like that, scrolling through 17000 items.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post
They're safe These are part of the accessibility functions of your phone.
They are part of the baked-in firmware that comes with your phone. They just
got an update.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group,
1001 - 1100 of 1463 matches
Mail list logo