Since you can't share Fragments between Activities
This true for sharing Fragment instances, not for Fragment classes. You do
mention this in point (a), re-instantiating a particular Fragment for a
different activity, but i wanted to point out you can share Fragment
implementations.
I think
Syed,
Maybe it is not the 'best' way of doing this, but I think it is good for
what you want to do without spending tons of times writing a custom layout.
Maybe you can do that (writing a custom layout) in one of the future
versions of your app. :)
Using onWindowFocusChanged is fine, as long
The second time, when you get the null-pointer issue, does your server
(GlobalVars.HOST_WAP)
receive the request?
I
--
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
Maybe you could try HttpClient (DefaultHTTPClient) from the
org.apache.http.client package instead.
--
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
Someone had a similar problem and asked on stackoverflow:
http://stackoverflow.com/questions/2792843/httpurlconnection-whats-the-deal-with-having-to-read-the-whole-response
Maybe you can find the answer from that thread there.
--
You received this message because you are subscribed to the
JUnit test-methods in the instrumentation test-case classes always run in
another thread than the main UI thread. I run both indiviual test-cases and
test-suites (that execute lists of test-cases) and test-methods are always
called in a different thread than the background thread.
I read this
Security certificate for what?
For signing your APKs?
Supported cert types for communcation (SSL)?
,...
--
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
I've not seen any regressions in my camerap app (camera module of Snap FX)
when my Nexus One was upgraded to 2.3.3. I do set and retrieve camera
parameters and such and it seems to work fine.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
You're right. And you shouldn't put any possible sub-division of a screen
into a Fragment.
But if you plan to have your app support both regular/large and extra-large
screens and want to have tablet-specific layouts (extra-large), then
Fragments are an excellent way to go, enabling to re-use
Yep, and if you only want to refresh when coming back from an activity that
was started by your original activity (startActivityForResult), implement
onActivityResult callback as well.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To
It is still in Google Labs, this means it's still in 'beta'. Some of the
information about service levels (e.g. total quota or max frequency of
message that can be sent, etc) is not yet clear.
--
You received this message because you are subscribed to the Google
Groups Android Developers
About the activities being 3.0: Yes, but it's possible on 1.6 and up as well
- to some extent - using the Android Compatibility Library.
I think that the View Toggle type design should be possible without serious
implications to the memory footprint. Fragments are designed to work well
with
What error?
--
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 more
Then you need to change your code to not set this sax feature.
--
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
If i understand correctly, you wrote the code that uses the SAX parser. I
assume you know something about coding with SAX parsers.
There is an issue with the 'parameter-entities' feature.
Go to http://developer.android.com and search for the SAX parser classes and
figure out which SAX
Yep, good choice. Also Piccolo XML pull/sax parser is a very lean and fast
parser:
http://sourceforge.net/projects/piccolo/
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
I 100% agree with nemic. You can put tons and tons of effort in fighting
piracy and maybe get a small return on it. It's better to spend this energy
and effort in improving/augmenting your app for your paying customers.
--
You received this message because you are subscribed to the Google
Maybe you can answer this:
You can only have one app (screen/activity) active at any given time. If one
app is in the foreground (i.e. it is active), the other app is in the
background at best (maybe even been killed). What does 'down' mean in your
situation?
Is one app an activity (it has a
Good find!
About the multiple calls to notifyDataSetChanged() in the same 'event loop'
cycle:
I don't think it will cause multiple redraws, much like multiple calls to a
view's 'invalidate()' method in the same event-loop cycle that won't cause
multiple redraws either.
--
You received this
Do these steps:
- In Eclipse, make sure you're project is open.
- Right click on your project (in the Package Explorer)
- Select 'Properties...'.
- Select Java Build Path.
- Select the 'Libraries' tab.
- Make sure that only 'Android x.x' -- '*android.jar*' is there. This
Another way of doing it is to just get the phone's default timezone. Note
that the timezone could be set (incorrectly) by the user.
If this is not possible and you have to use the user's location, just google
it: gps timezone. Plenty of info available there.
E.g. i found this in just 1 minute:
earthtools uses a REST like interface with XML as content.
Maybe you can find more here:
http://www.programmableweb.com
--
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
Why other developers are not blocked: It's like a speeding ticket that way.
You can't get out of a speeding ticket by saying to a cop that others were
speeding too and didn't get a ticket
Anytime you add artwork (images, sounds, etc) that you didn't create
yourself, you have to ask
As far as i know, you can't do that. JMX (javax.management.**) is not
supported by Android (not in android.jar) or by any third part library for
Android.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
i can't help you with your particular problem, but I'm wondering why you
write your Android app under an OSGi framework. That looks like overkill to
me. Couldn't you use just plain Java?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To
'this' in Java is much like 'self' in XCode.
(there are some subtle differences, though...)
--
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
It would be BAAAD business-practice if a company allows one of its
developers to sign a company's app with the developer's certificate. A
developer/employee could create a self-signed certificate, but it should
become property of his/her company immediately.
--
You received this message
Hi Ahmad.
for 1):
In landscape mode you'll see the 5 apps that you were using most recently
(they may or may not be active/running at the moment).
In portrait you'll see 7 apps.
for 2):
You can't close it directly. Unless you go to 'Apps -- Settings --
Applications -- Manage Applications'.
These are hard to debug.
Did you set a custom background (bitmap/drawable) for one of your Views that
got set to 'null' somehow...?
Once i just went to http://android.git.kernel.org/ and figured out what line
was causing the NPE. Try to do the same and see what could cause your
problem.
--
These are not bugs.
The *limit *of 5 or 7 apps that are shown in 'most recently used' list may
get removed in Android 3.1 (where the list will become scrollable).
Why would you want to close running programs on a regular basis? Android OS
closes the apps for you if it needs resources (such as
If there is no virtual keyboard, how would users enter their password if
their phone doesn't have an actual keyboard?
--
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
Try not to use a EditText control. Instead use a TextView and use the 'one
of the other methods' to input the password and write masked chars into the
TextView programmatically.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to
Hard to say. You'd have to show us your code of my.class.Name before we can
give you an answer.
--
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
I do the same. We developed a bunch of activities and as soon as code
duplication reared its ugly head, we started to create an Activity subclass
to avoid code duplication. If you can use delegation, try that instead.
Strings.xml:
If a string is sensitive to locale/language, put it into a
Thank you Dianne. I didn't know about this class at all. Good to know it
exists! :-)
Could this class be used to make Themes selectable by the user throughout
one's app?:
- Inflate a View using a ContextThemeWrapper that is selected/created
according to user preferences.
- Call setContentView
Take a look at AndroidHttpClient and see what params they use.
Or, if you can, just use AndroidHttpClient yourself in your code:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/java/android/net/http/AndroidHttpClient.java;hb=refs/heads/gingerbread
--
You
For me, only Croatia, Serbia and Kazakhstan were marked as one of the
'except for:' countries. Anyway, strange behavior by the AM. :)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
startActivityForResult is only implemented for an Activity, not for a
Context!
If 'androidContext' in your code-snippet above is declared as a Context,
trying to call 'startActivityForResult' will result in a compiler error.
If 'androidContext' in your code-snippet is declared as an Activity,
At least some of them had working touch-screens at Google IO! 't Was pretty
cool :)
--
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,
Welcome to the wonderful world of generics.
The emptyList method is defined as follows:
public static final T List
http://download.oracle.com/javase/1,5.0/docs/api/java/util/List.htmlT
emptyList()
With the statement CollectionString s = Collections.emptyList(), the
compiler knows (because of
Welcome to the wonderful world of generics.
The emptyList method is defined as follows:
public static final T List
http://download.oracle.com/javase/1,5.0/docs/api/java/util/List.htmlT
emptyList()
With the statement CollectionString s = Collections.emptyList(), the
compiler knows (because of
Do you try to draw a picture/image (ImageView) inside a frame
(my_background)?
If so, have the my_background resource draw a shape-drawable, e.g. a
rectangle with rounded corner with a padding on all 4 sides.
Then assign my_background to a layout (e.g. linear layout). Make the
ImageView a
Killing a process (in this way) may have undesired side-effects (e.g.
Android trying to start your app's process again, etc.).
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
I'm purely guessing here, but i may have to do with the fact that methods
can be overridden and especially overloaded.
--
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
What type of list-adapter are you using? Some predefined types of adapters
(like the CursorAdapter and maybe the ArrayAdapter as well), already use the
'tag' attribute of each list-item view (i.e. the view that the getView
method returns). If you're using the 'tag' attribute as well for your
I've had this happening to my sales for a long time now. There are only a
few of those, though, not even 1%.
--
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
You are using setTag and getTag on children of a ListView, which are list*
-item* views.
If your list*-item* views are just an ImageView, wrap each ImageView in a
parent-view (a FrameLayout or something) instead and return this parent-view
as the return-value of 'getView'. Then *lView *in your
This would mean your program put the entire 10Mbyte of data into one large
JSONObject...
Then you'd have, at least temporary, a 10MByte large json-string *and*a 10MByte
(or larger) JSONObject hierarchy
If this is the case, you'd probably run out of memory.
--
You received this message
What if you use the setOnItemClickListener?
--
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
Best is to stay with the general design of the Android set of widget. This
will create consistency across the apps on your users' devices. The Android
standard ToggleButton does what the iPhone's counterpart does (although
visually different, the user interaction is the same).
I wonder who is
I have had one workspace for the longest time now. When i'm not active in a
project, I just 'Close' it. It is still shown, but it will be inactive.
But you have 40 of those that's a lot :-).
--
You received this message because you are subscribed to the Google
Groups Android Developers
About the onItem*Selected*Listener: A wild guess here; it may work when you
have a track-ball or a keyboard that is used for navigation.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
I'm trying to run a renderscript sample from the Android SDK.
The SDK comes with a bunch of samples. All of them compile fine, but they
don't run:
05-25 21:04:56.470: VERBOSE/RenderScript(20521): Cache file for
'com.android.fountain:raw/fountain' '.oBCC' is
Yeah,,, i saw some other threads about this later without any resolution.
I'll try to bump this thread so now and then (not too often, i promise :-)).
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
I tried the following:
In the sample's onCreate() method, i created the mentioned file in the
cache-dir (0 size, readable, writable, executable).
This got rid of the original error-message. But instead, it complained about
the cache-file being too small and the sample still crashes.
Then I put
Thank you, Romain.
I hope it's not the Renderscript runtime (i don't think so, since youtube
and other renderscript based apps run fine). I hope the samples can be fixed
and made to run :-)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
Let's hope not, but if it is, I hope it would be fixed by the 3.1 update (is
it coming soon to the Google IO edition of the tab?). ;-)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Thank you Xavier!
Is there anything we could do manually, e.g. manual code change in the
samples to make the 'buggy' compiler create a proper run-time, to
temporarily fix this issue ourselves?
--
You received this message because you are subscribed to the Google
Groups Android Developers
Awesome!
Thank you.
--
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
Yes, that's possible. You'd have to take care of the threading issues,
though (avoiding race conditions or deadlocks, etc).
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Debug it.
put getCell(i) into a variable and see what that variable is.
And it seems that during run-time something is about to be stored in a
LinkedHash*Map* (and not in LinkedHashSet as shown in your code).
--
You received this message because you are subscribed to the Google
Groups Android
Hi Xav,
Were you able to deploy a fix?
--
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
No inconvience :-)
Thanks for the update. I'm going to try it out asap.
--
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
Alas, same result... it still doesn't work. still the same result, the error
that the cache-file cannot be opened:
05-27 20:12:11.220: WARN/bcc(9334): Unable to open
/data/data/com.android.rs.helloworld/cache/@com.android.rs.helloworld:raw@helloworld.oBCCin
read mode. (reason: No such file
Success!!! Thank you!
You are awesome :-)
Have a great memorial day weekend!
--
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
I would make this argument instead: REST or SOAP?
A big part of creating a seamless experience on mobile devices is to be able
to handle* limited connectivity* (temporary loss of connection) and to have
*stateless* (remote) services available (user can access data directly
without going
The original question wat about *consuming* web services, not necessarily
creating them. The answer to your question is:
- When you don't have control of server-side that provides the REST
services, and/or
- When the REST services are going to be accessed by more than just
Maybe this would work, assuming all your activities run in the same process:
Implement every onStart and onStop of your activities like this:
In onStart(), increment a static (global) counter: e.g. visibleCount++;
In onStop(), decrement that static counter: e.g. visibleCount--;
In onStop, start
I entirely agree with DanH. SOAP for mobile devices is not the best choice
and does get messy quickly 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
Yes there is. Intel has honeycomb running on their IA (Intel Architecture).
But it's all in early phases.
But Google TV runs on x68 and Google TV will upgraded to Honeycomb (3.1)
this year.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
From discussions with the Google Engineers, the emulator emulates the *entire
*device on the lowest levels, not just the DalvikVM. It emulates the ARM
processor and the code that runs on it and a bunch of the in and output
devices (keyboard, touchscreen in some form, screen, GPS, etc). You can
The code below will work fine for a singleton:
...
private static MyObject myObject = null;
public static MyObject getMyObject() {
if (myObject == null {
myObject = new MyObject();
}
return myObject;
}
Note that variable won't be 'reset' to null. There is nothing to reset when
your
Experimentation is good.
But the post is encouraging to actually use it in actual applications.
And so far, i haven't seen a use-case that can only be solved by using modal
dialogs that 'block' the calling UI thread. Calling 'showDialog(id)'
(pre-Fragment period) makes your underlying activity
I haven't tested JSON's performance on Android, but for XML, I found that
this was the fastest and most convenient (i needed a proper context for XML
elements, know where the XML element is in the document):
- Use android.sax.RootElement and related classes to listen only for
elements I'm
Wait a minute. Do you mean that this code below:
public class MySingleton {
*private* static mySingleton = null;
public static *synchronized* getMySingleton() {
if (mySingleton == null) {
mySingleton = new MySingleton();
}
return mySingleton;
}
does not fix this?
Use the java.text.SimpleDateFormat class.There is one issue with that one
though. The timezone info of ISO8601 is usally HH:mm, while SimpleDateFormat
expects HHmm (without a ':') for a timezone value.
--
You received this message because you are subscribed to the Google
Groups Android
That's easy.
If you get your hand on an APK that, as an example, deletes all the contents
of the phone's SD card, you can install that APK through 'adb install'...
But if you install an APK you have no knowledge about at all like that, you
almost deserve the thrasing :-) (pun my or may not be
Are you sending a request to the server in the implementation of the
'onCreateDialog(...)' method? If so, this is not good. The onCreateDialog is
called by the OS when the hosting activity is recreated due to a config
change when a dialog is shown using the showDialog method (i.e. an
What is *hover view* animation?
--
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
Yep, you're correct.
However, if your 'getMySingleton()' method is called only occasionally (i.e.
it is not part of some performance sensitive code-path), making it
thread-safe like that is good enough. No need to squeeze out every
optimization.
Using DCL or the 'on-demand' holder work all
For authentication, let your users log in.
Right now, if you have any sensitive data (personal user data or other
sensitive data) or data that can lead to sensitive data, never ever use
plain HTTP (remember when google needed to send out a patch quickly when
Calendar and other Google apps sent
Yes, you can use DefaultHttpClient.
However, you should attach a org.apache.http.client.CookieStore to the
client:
Create a class that implements CookieStore.
The implementation is straight-forward. Just maintain a list of cookies in
memory if you only need session type cookies.
When
This would start your browser with the URL. Why do you need the
DefaultHttpClient if you let the browser show your php page?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Hi,
It seems that the layout-editor cannot run this code successfully in our
EditTime.java implemenation:
...
TypedArray customTypedAttrs =
context.obtainStyledAttributes(attrs, R.styleable.EditTime);
(*line 279*) regularTextColor =
Ah... you need to be able to communicate the session-cookies from your apps'
logon into the browser (which you start by the startActivity call).
Since you move your app's work-flow to a different application (the
browser), I don't know how to send the cookies from your app to the
browser-app.
I just installed the latest *released **tools *libraries, not the previews.
It's not blocking me terribly now. But if these are fixed in the preview
versions, i can wait :-)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this
You can't.
The resource-manager (Activity.getResources()) read from your XML files in
your *project/res/* directory and sub-directories. You can't write into
them.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group,
:-)
This is one of these 'DOH!' moments, while slapping your hand on your
forehead :-)
had tons of those... l;-)
--
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
But which line in your code throws the null-pointer-exception? We can't
guess that since you haven't shown us the full stack-trace.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
I wrote an image editor app that claims to deal with full-resolution of the
images.
However, there is a limit due to the 'issues' you found (limit memory).
I got around it (at least, i haven't seen many stack-traces/error-logs sent
my way) by doing this:
- Limit the resolution. On 1st gen
I guess it's playing nice to other background apps. Even a foreground app
can't gobble up all the memory and starve the background apps.
I figured out a way to edit 9MPixel images 16-bit (i.e. 18MByte of data). It
makes you program quite carefully when using the left over 6Mbyte of memory,
but
Yeah, but it'll do. :-)
The quality of the cameras on phones and tablets is not that great anyway.
--
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
If this is what you currently do:
In your Activity, you call a method that winds up parsing some XML. Then you
have implement an xml-handler (content-handler), that has no idea of how to
get at the 'current activity'... And you need that activity (or at least the
application-context associated
If it is simple sorting, write your own custom adapter (BaseAdapter, for
example).
--
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
Hope is on the horizon :-)
I've seen some preliminary work at Google IO being done by Google engineers
to use PC's hardware acceleration for the emulator's screen. It wasn't quite
stable yet, but the performance shown was great!
--
You received this message because you are subscribed to the
Depends for who you want to write your Android app for.
If it is just for your device, i would suggest SDK api-level 8.
--
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
Maybe it is faster to compress and un-compress than to read a bigger file
from the SD-card/network
--
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
That depends on sooo many factors.
Are you a company that has many Web developers and no or few Java
developers?
Does you app need background processing or tight integration with native
elements (e.g. contacts)?
Do your customers want a native look and feel or a web/html look and feel?
You
Is the slowness on an actual device or on the emulator.
Anyways...it seems that you need to calculate the hash on a background
thread as not to hang your app and risk an ANR force-close.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To
Instead of getting the raw (but very small) bitmap data, get the Uri of the
(full-sized) bitmap instead. The Uri is part of the result of an ACTION_PICK
intent, if i'm not mistaken. Then, given the Uri, read the full bitmap data
yourself.
--
You received this message because you are
901 - 1000 of 1463 matches
Mail list logo