[android-developers] Re: when to (NOT) use fragments

2011-03-17 Thread Streets Of Boston
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

Re: [android-developers] Re: unable to resize a button at onCreate() method of new activity

2011-03-17 Thread Streets Of Boston
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

Re: [android-developers] App FC's every 2nd time it is launched

2011-03-17 Thread Streets Of Boston
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

Re: [android-developers] App FC's every 2nd time it is launched

2011-03-17 Thread Streets Of Boston
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

Re: [android-developers] App FC's every 2nd time it is launched

2011-03-17 Thread Streets Of Boston
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

[android-developers] Re: JUnit test case blocking main UI thread for AsyncTask

2011-03-17 Thread Streets Of Boston
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

[android-developers] Re: About certificate on Android Platform.

2011-03-18 Thread Streets Of Boston
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

[android-developers] Re: No camera changes in 2.3.3 but camera apps break going from 2.3 to 2.3.3.

2011-03-19 Thread Streets Of Boston
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.

[android-developers] Re: when to (NOT) use fragments

2011-03-19 Thread Streets Of Boston
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

Re: [android-developers] Refresh previous activity on Back Button Press

2011-03-19 Thread Streets Of Boston
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

[android-developers] Re: Cloud To Device Push Notification API in Android

2011-03-21 Thread Streets Of Boston
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

[android-developers] Re: when to (NOT) use fragments

2011-03-21 Thread Streets Of Boston
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

[android-developers] Re: SAX PARSER

2011-05-04 Thread Streets Of Boston
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

[android-developers] Re: SAX PARSER

2011-05-04 Thread Streets Of Boston
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

[android-developers] Re: SAX PARSER

2011-05-04 Thread Streets Of Boston
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

[android-developers] Re: SAX PARSER

2011-05-05 Thread Streets Of Boston
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

[android-developers] Re: 1380 Paid Applications in One Free Torrent then How to SELL it?

2011-05-05 Thread Streets Of Boston
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

[android-developers] Re: Event based communication between two apps.

2011-05-05 Thread Streets Of Boston
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

[android-developers] Re: getFirstVisiblePosition() not returning the correct value

2011-05-05 Thread Streets Of Boston
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

[android-developers] Re: 回覆:Hello, Android troubles

2011-05-06 Thread Streets Of Boston
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

[android-developers] Re: How to get the timezone from the latitude and longitude?

2011-05-06 Thread Streets Of Boston
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:

[android-developers] Re: How to get the timezone from the latitude and longitude?

2011-05-06 Thread Streets Of Boston
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

[android-developers] Re: Suspended my dev account without any explanation, Why?

2011-05-07 Thread Streets Of Boston
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

[android-developers] Re: Android and JMX

2011-05-12 Thread Streets Of Boston
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

[android-developers] Re: (2nd try) Segmentation fault when loading a certain class from an OSGi framework under Android 2.2 2.3

2011-05-12 Thread Streets Of Boston
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

[android-developers] Re: Newbie question: What is this in the code?

2011-05-16 Thread Streets Of Boston
'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

[android-developers] Re: Change Android market signing key

2011-05-16 Thread Streets Of Boston
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

[android-developers] Re: Any one has Samsung Galaxy Tab 10.1 Some problems with Android

2011-05-16 Thread Streets Of Boston
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'.

[android-developers] Re: How to debug NPE when stack trace does not show any reference to my app code?

2011-05-17 Thread Streets Of Boston
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. --

[android-developers] Re: Any one has Samsung Galaxy Tab 10.1 Some problems with Android

2011-05-17 Thread Streets Of Boston
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

[android-developers] Re: Hide Keyboard on a Password field

2011-05-17 Thread Streets Of Boston
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

[android-developers] Re: Hide Keyboard on a Password field

2011-05-17 Thread Streets Of Boston
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

[android-developers] Re: BadParcelableException: lost CREATOR?

2011-05-17 Thread Streets Of Boston
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

[android-developers] Re: Development Patterns

2011-05-17 Thread Streets Of Boston
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

Re: [android-developers] How apply a theme in a fragment?

2011-05-18 Thread Streets Of Boston
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

[android-developers] Re: How to optimize HTTPClient.execute(....) call?

2011-05-18 Thread Streets Of Boston
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

[android-developers] Re: Devs with paid apps -- check your enabled countries

2011-05-19 Thread Streets Of Boston
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

[android-developers] Re: startActivityForResult

2011-05-19 Thread Streets Of Boston
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,

Re: [android-developers] Re: Giant Android Device seen at I/O

2011-05-20 Thread Streets Of Boston
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,

[android-developers] Re: Java Guru needed -- compiler bug?

2011-05-20 Thread Streets Of Boston
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

[android-developers] Re: Java Guru needed -- compiler bug?

2011-05-20 Thread Streets Of Boston
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

[android-developers] Re: Problem when dealing with multiple screen sizes

2011-05-20 Thread Streets Of Boston
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

[android-developers] Re: How to close all activities on android app

2011-05-20 Thread Streets Of Boston
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

[android-developers] Re: Java Guru needed -- compiler bug?

2011-05-21 Thread Streets Of Boston
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

[android-developers] Re: iterating through listview child views and getting tag throws class cast exception

2011-05-23 Thread Streets Of Boston
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

[android-developers] Re: Purchases stuck again in Google Checkout

2011-05-23 Thread Streets Of Boston
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

[android-developers] Re: iterating through listview child views and getting tag throws class cast exception

2011-05-23 Thread Streets Of Boston
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

[android-developers] Re: Application crashes when downloding long data in from server and in loop.............

2011-05-24 Thread Streets Of Boston
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

[android-developers] Re: StackView getSelectedItemPosition() always returns 0

2011-05-25 Thread Streets Of Boston
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

[android-developers] Re: Need to create Android toggle button in Iphone style

2011-05-25 Thread Streets Of Boston
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

[android-developers] Re: workspace change

2011-05-25 Thread Streets Of Boston
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

[android-developers] Re: StackView getSelectedItemPosition() always returns 0

2011-05-25 Thread Streets Of Boston
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

[android-developers] All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-25 Thread Streets Of Boston
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

[android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-26 Thread Streets Of Boston
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

[android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-26 Thread Streets Of Boston
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

Re: [android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-26 Thread Streets Of Boston
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.

Re: [android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-26 Thread Streets Of Boston
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

Re: [android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-26 Thread Streets Of Boston
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

Re: [android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-26 Thread Streets Of Boston
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

[android-developers] Re: Two-way listeners/observers

2011-05-27 Thread Streets Of Boston
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

[android-developers] Re: java.lang.ArrayStoreException on Honeycomb device (Acer Iconia A500)

2011-05-27 Thread Streets Of Boston
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

Re: [android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-27 Thread Streets Of Boston
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

Re: [android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-27 Thread Streets Of Boston
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

Re: [android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-27 Thread Streets Of Boston
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

Re: [android-developers] Re: All Renderscript samples fail to run on actual device (Samsung Galaxy Tab 10.1 'google io edition')

2011-05-27 Thread Streets Of Boston
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

[android-developers] Re: JSON OR SOAP ?

2011-05-30 Thread Streets Of Boston
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

[android-developers] Re: JSON OR SOAP ?

2011-05-30 Thread Streets Of Boston
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

[android-developers] Re: onRestart from Home button or from back button

2011-06-01 Thread Streets Of Boston
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

[android-developers] Re: JSON OR SOAP ?

2011-06-01 Thread Streets Of Boston
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

[android-developers] Re: Android emulator bottleneck

2011-06-01 Thread Streets Of Boston
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.

[android-developers] Re: Android emulator bottleneck

2011-06-01 Thread Streets Of Boston
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

[android-developers] Re: Android LifeCycle and Singleton Instances

2011-06-01 Thread Streets Of Boston
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

Re: [android-developers] Re: Are dialogs supposed to be modal?

2011-06-02 Thread Streets Of Boston
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

[android-developers] Re: JSON OR SOAP ?

2011-06-03 Thread Streets Of Boston
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

Re: [android-developers] Re: Android LifeCycle and Singleton Instances

2011-06-03 Thread Streets Of Boston
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?

[android-developers] Re: Parse ISO8601 date (XML Schema Date)

2011-06-04 Thread Streets Of Boston
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

Re: [android-developers] Re: Amazon AppStore, are you earning something from there?

2011-06-04 Thread Streets Of Boston
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

[android-developers] Re: Dialog and Progress Dialog issues on Orientation Change

2011-06-06 Thread Streets Of Boston
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

[android-developers] Re: HoverView in Android

2011-06-06 Thread Streets Of Boston
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

Re: [android-developers] Re: Android LifeCycle and Singleton Instances

2011-06-06 Thread Streets Of Boston
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

Re: [android-developers] Re: Device/user identification and data security

2011-06-07 Thread Streets Of Boston
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

[android-developers] Re: preserve session

2011-06-07 Thread Streets Of Boston
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

[android-developers] Re: preserve session

2011-06-07 Thread Streets Of Boston
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

[android-developers] ADT 11 and layout-editor errors under Android 3.0 and Android 3.1 layout styles

2011-06-07 Thread Streets Of Boston
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 =

[android-developers] Re: preserve session

2011-06-07 Thread Streets Of Boston
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.

Re: [android-developers] ADT 11 and layout-editor errors under Android 3.0 and Android 3.1 layout styles

2011-06-07 Thread Streets Of Boston
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

[android-developers] Re: Passing Variable in Java to XML Values

2011-06-08 Thread Streets Of Boston
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,

[android-developers] Re: Error with XML parsing??

2011-06-08 Thread Streets Of Boston
:-) 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

Re: [android-developers] Great Problem

2011-06-08 Thread Streets Of Boston
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

[android-developers] Re: Loading Bitmaps in native heap

2011-06-08 Thread Streets Of Boston
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

[android-developers] Re: Loading Bitmaps in native heap

2011-06-08 Thread Streets Of Boston
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

[android-developers] Re: Loading Bitmaps in native heap

2011-06-08 Thread Streets Of Boston
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

[android-developers] Re: noob Q :-/ regarding global variable - declared the application class but...

2011-06-08 Thread Streets Of Boston
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

[android-developers] Re: Alternatives to SQLite for static data

2011-06-09 Thread Streets Of Boston
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

[android-developers] Re: Android 3.1 is too slow

2011-06-10 Thread Streets Of Boston
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

[android-developers] Re: June 2011 - Which Platform Should I Get?

2011-06-11 Thread Streets Of Boston
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

[android-developers] Re: Saving as Bitmap .BMP in android

2011-06-13 Thread Streets Of Boston
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

[android-developers] Re: Your Opinion between android native app or HTML-5 Web App.

2011-06-13 Thread Streets Of Boston
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

[android-developers] Re: Using jbcrypt in app

2011-06-13 Thread Streets Of Boston
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

[android-developers] Re: Camera bitmap too small

2011-06-14 Thread Streets Of Boston
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

<    5   6   7   8   9   10   11   12   13   14   >