[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 T

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@goo

[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 de

[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, sen

[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 Goo

[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 still

[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 p

[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 subscribed

[android-developers] Re: Using jbcrypt in app

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

[android-developers] Re: Loading a Class from an APK file with dependency on other Jars

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

[android-developers] Re: Problems to get Latitude/Longitude from a picture

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

[android-developers] Re: listview not clickable after scrolling beyond the main view

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

[android-developers] Re: Problem with localhost connection

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

[android-developers] Re: Save user options in reboot

2011-06-16 Thread Streets Of Boston
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 android-developers@g

[android-developers] Re: How r things

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

[android-developers] Re: taskAffinity specifying name with activity problem.

2011-06-21 Thread Streets Of Boston
Why do you have to use the '/' character? Almost any string will do. Just make sure it's unique. You could use your package-name followed by a task-name. -- 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: taskAffinity specifying name with activity problem.

2011-06-21 Thread Streets Of Boston
Ah.. i see... Then I don't have an answer for 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-developer

[android-developers] Re: Why two fragments instead of one?

2011-06-22 Thread Streets Of Boston
Yes, the compatibility package is open source. When you get it, you get full sources as well: \android-compatibility\v4\src About ListActivity vs ListFragment. In my opinion, Fragments are all about re-use. It is fairly easy to dropt a Fragment into any activity and it will save you from re-cod

[android-developers] Re: Who's going to AnDevCon V? Discount available. . .

2013-05-10 Thread Streets Of Boston
I'll be there. How can i not be there, since I live in Boston. :) On Thursday, May 2, 2013 4:45:55 PM UTC-4, Nathan wrote: > > Who is going to AnDevCON in Boston this month? > > I will be there speaking at two sessions about "Driving App Success". > Much smarter people than me also are speaking t

[android-developers] Re: Couldn't Create Directory for shared preferences

2013-05-10 Thread Streets Of Boston
Usually, this is a bug in the OS. Uninstalling and re-installing your app can make it go away. Google *android Could n't create Directory for shared preferences* and you'll find many links/answers/comments on your problem. On Friday, May 10, 2013 12:34:42 AM UTC-4, rahul wrote: > > Hi Gu

[android-developers] Re: Who's going to AnDevCon V? Discount available. . .

2013-05-10 Thread Streets Of Boston
10, 2013 11:14:40 AM UTC-7, Streets Of Boston wrote: >> >> I'll be there. >> How can i not be there, since I live in Boston. :) >> > > I'll try not to tread on you too heavily, Streets of Boston. > > You may have to mutate into human form for me to fin

[android-developers] Re: Intent confusion

2013-05-10 Thread Streets Of Boston
I guess the *Send For Signature *Activity is part of the Adobe Reader package/app *com.adobe.reader* as well. On Friday, May 10, 2013 2:17:05 PM UTC-4, bob wrote: > > I'm trying to understand Intents better. > So I have this code to show a PDF: > *String file_loc = "/mnt/sdcard/mypdf.pdf";* > *Ur

[android-developers] Re: Fragment state (and view) not restored when using ViewPager with nested fragments

2013-05-23 Thread Streets Of Boston
When using fragments inside a fragment, you should use the fragment's ChildFragmentManager and not the (activity's) main FragmentManager. On Thursday, May 23, 2013 9:12:31 AM UTC-4, Miha wrote: > > Hi! > > I'm using a ViewPager to swipe "between screens". One of the fragments is > composed of t

[android-developers] Re: FragmentManager.popBackStack not working when used with child fragment manager

2013-05-28 Thread Streets Of Boston
Did a google search and wound up on stackoverflow, where Dianne Hackborn answered this question: http://stackoverflow.com/questions/8772921/how-to-pop-back-stack-for-activity-with-multiple-fragments In short: The backstack doesn't work for 'inner' fragments, it only works for Activity (i.e. 'mai

[android-developers] Re: Handling process killed by system

2013-06-21 Thread Streets Of Boston
The singletons stick around as long as your process is alive. If your process is killed (and therefore your DalvikVM running your app), nothing sticks around, including your static variables/fields. This is just like any other Java/C/C++ app. The issue is that the OS kills your process, not the

[android-developers] Re: Handling process killed by system

2013-06-21 Thread Streets Of Boston
Your app is stateful (state is carried over from Activity to Activity) and this is indeed an issue you'll run into. If you want to use a static variable (object) for your session state, you'll have to code your own persistence. E.g. Access your (global/static) state through a static method (Fa

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-31 Thread Streets Of Boston
Is your render-mode continuously or when-dirty? If it is when-dirty, be sure to call surfaceView.requestRender() in your onTouchEvent implementation. On Tuesday, July 30, 2013 7:14:22 AM UTC-4, Edvinas Kilbauskas wrote: > > > The best solution to your problem is probably to "bite the bullet" and

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-31 Thread Streets Of Boston
UTC-4, Edvinas Kilbauskas wrote: > > > > 2013 m. liepa 31 d., trečiadienis 19:28:23 UTC+3, Streets Of Boston rašė: >> >> Is your render-mode continuously or when-dirty? >> If it is when-dirty, be sure to call surfaceView.requestRender() in your >>

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-08-01 Thread Streets Of Boston
Running out of ideas here :-) The test wasn't meant to see if Canvas would work or not. It was about the speed of the touch-event-message delivery. At least we figured out it isn't an issue with the onTouch callbacks. They happen fast enough. What happens if you play with the values of the cal

[android-developers] Re: What is the use of services in Android?

2013-08-08 Thread Streets Of Boston
For option 2, use an IntentSerrvice. Then you don't have to worry about calling 'stopService'. It does it for you when necessary. On Thursday, August 8, 2013 7:40:02 AM UTC-4, ashish wrote: > > I read about services in Android very carefully, but I didn't find any > valid reasons to use it. E.g

Re: [android-developers] What is the use of services in Android?

2013-08-08 Thread Streets Of Boston
Send another Intent (different action) to the IntentService. Override the onStartCommand to catch this Intent and this could allow you to stop/interrupt the ongoing process in the IntentService's background thread. On Thursday, August 8, 2013 2:04:33 PM UTC-4, ashish wrote: > > Hi, > > if a serv

[android-developers] Re: Is this OK ? (Triggering an event in an Activity from a Service)

2013-09-04 Thread Streets Of Boston
Yep, this is fine for a *local* Service. For a Service that could be remote, you'd need some other way of communicating (Service sending BroadCasts to a BroadCastReceiver in/of the Activity; ResultReceiver provided by the Acivity to the Service; AIDL; etc). On Wednesday, September 4, 2013 10:56

[android-developers] Re: does executable code change (improve) with increase in minSdkVersion declaration in manifest? is minsdk 11 declaration really needed for tablets?

2013-10-28 Thread Streets Of Boston
*minSdkVersion:* If this is less than the version you are compiling against, *you *have to take care with Java code (methods/classes/etc) that is defined in sdk-versions higher than the declared minSdkVersion. *You *have to deal with making your code somehow compatible with older sdk-versions.

[android-developers] Re: ViewPager does not respect WRAP_CONTENT?

2013-12-02 Thread Streets Of Boston
The ViewPager specified WRAP_CONTENT as its width. What content? The ViewPager can show more than one page and only one is visible at a time. If it had to choose the 'content' to use to figure out how wide the WRAP_CONTENT width should be, which page should it use? WRAP_CONTENT doesn't make sens

[android-developers] Re: With Updated APK, Can't Purge Previous Data

2013-12-03 Thread Streets Of Boston
If your updated APK has its own SQLite database and your app uses a sub-class of SQLiteOpenHelper, you could increase your database version each time your update your app (increase version value in SQLiteOpenHelper constructor) and implement that sub-class' onUpgrade method to clear out data (e

[android-developers] Re: image not coming proper some times lazy loading grid view

2013-12-04 Thread Streets Of Boston
Not sure if this would work, but may be worth a try: Before you close the FileOutputStream 'fs', have you tried to call fs.getFD(),sync() ? On Wednesday, December 4, 2013 3:00:43 AM UTC-5, Amit Mangal wrote: > > Hi there, > i am loading images on grid view using lazy loading from network. proble

[android-developers] Re: position value in getView seems too big

2014-05-15 Thread Streets Of Boston
There is no method 'getView' on a ListView class. And i expect i wouldn't return a number However, you do define a *static *field called *listItems*. Do you update the *listItems *field directly without notifying the your *BaseAdapter*? If so, this could be the problem. Notify the *BaseAdap

[android-developers] Re: position value in getView seems too big

2014-05-16 Thread Streets Of Boston
That is hard to figure out without you posting the code of your adapter and how you create an instance of your adapter. It is probably a subtle bug... On Friday, May 16, 2014 2:34:19 PM UTC-4, plnelson wrote: > > > Sorry - should be lv.get*Count*. > > And yes, I am calling notifyDataSetChanged.

[android-developers] Re: ListView getCount is wrong - how do I reset it?

2014-05-19 Thread Streets Of Boston
It's bad programming practice, but you inherited it, so you need to deal with it.. :-) Question, though, and if this applies to your problem, you'll see why it is bad practices to make it static. Your ListActivity, does it have more than one instance? In other words, are there more than one Li

[android-developers] Re: ListView getCount is wrong - how do I reset it?

2014-05-19 Thread Streets Of Boston
Debug the listItems (ArrayList of Strings). Monitor its add method(s), i.e. set breakpoints on them, and figure out which code adds to this static list without notifying the ListAdapter(s). On Monday, May 19, 2014 9:53:44 AM UTC-4, plnelson wrote: > > > I call if after adding each one mostly f

[android-developers] Re: position value in getView seems too big

2014-05-19 Thread Streets Of Boston
The ListAdapter's max value of the 'position' parameter of its getView(...) method is determined by the ListAdatper's getCount() method. It will never be larger than the value returned by getCount(): 0 <= position < getCount() I have never seen position being larger or equal than getCount(

[android-developers] Re: Help with native exception: ScriptIntrinsicBlur.create() throws RSRuntimeException: Internal error: Object id 0

2014-05-28 Thread Streets Of Boston
Be sure to call 'destroy()' on your Renderscript rs variable when you're done with it (just before the 'return bm' statement). It wouldn't hurt to call 'destroy()' on the 'input' and 'ouput' variables as well when you're done with it. Try that and see if this fixes your problem. On Tuesday, May

[android-developers] Re: AndroidStudio - Wipe data between deploys

2014-06-16 Thread Streets Of Boston
There is, to my knowledge, no such thing as a 'wiping all data of my app' programmatically . However, you can program something similar yourself. Add a setting (SharedPreferences setting) to your app that stores the version-number of your app that the user is running. Upon start-up, read this

[android-developers] Re: terminating android application

2013-01-03 Thread Streets Of Boston
First of all: Why? Secondly: If your process is killed (through a 'kill' command issued, through System.exit or Process.killProcess), the OS may restart it (like you see sometimes when your app crashes and is starting up immediately again with the previous Activity). Also, and this depends on y

[android-developers] Re: How to avoid useless getView in GridView

2013-01-08 Thread Streets Of Boston
It probably has something to do with the scrap-head, where recycled views are stored. I wouldn't worry about it too much. On Monday, January 7, 2013 11:57:04 PM UTC-5, William Guy wrote: > > I have tested GridView behavior in getView() , and i got: > > 01-08 11:18:55.925: E/getView(4113): Positi

[android-developers] Re: How to avoid useless getView in GridView?

2013-01-08 Thread Streets Of Boston
See my answer in your earlier question in this group. On Tuesday, January 8, 2013 12:04:38 AM UTC-5, William Guy wrote: > > I have tested GridView behavior in getView, and i got: > > > 01-08 11:18:55.925: E/getView(4113): Position: 0, Child Count: 0, > ConvertView: Null > > 01-08 11:18:55.945: E

[android-developers] Re: debug blues

2013-01-10 Thread Streets Of Boston
Yes. The code on the device (Nexus 7) has debug info that tells Eclipse the line-numbers of the source-code. If your source-code (android-16) is out-of-date, these line-number don't match up and Eclipse shows you something wrong (correct line-number, wrong source-version). On Thursday, January

[android-developers] Re: MemoryFile - ParcelFileDescriptor

2013-01-10 Thread Streets Of Boston
Why are you using a MemoryFile? If you need to read the file into memory, you could just use a byte[] and byte-arrays are parcelable. Actually, I'd suggest not reading it into memory a all and just pass the 'Uri uri' from the parcelable producer to the consumer and the consumer can read the fil

[android-developers] Re: MemoryFile - ParcelFileDescriptor

2013-01-10 Thread Streets Of Boston
Why are you using a MemoryFile? If you need to read the file into memory, you could just use a byte[] and byte-arrays are parcelable. Actually, I'd suggest not reading it into memory a all and just pass the 'Uri uri' from the parcelable producer process to the consumer process and the consumer

Re: [android-developers] Correct way to implement Activity onDestroy()?

2013-01-14 Thread Streets Of Boston
An Activity's onDestroy is called all the time (but not every time :)). It is true that you can't *rely *on it being called, though. E.g. the onDestroy is always called when you click the 'back' key or do some other action (code-execution) that causes the Acitivity's 'finish()' method to be cal

[android-developers] Re: SyncAdapter and multiple threads?

2013-01-17 Thread Streets Of Boston
The answer is right here in the documentation: https://developer.android.com/reference/android/content/AbstractThreadedSyncAdapter.html#onPerformSync(android.accounts.Account, android.os.Bundle, java.lang.String, android.content.ContentProviderClient, android.content.SyncResult) "*... invocatio

[android-developers] Re: SyncAdapter and multiple threads?

2013-01-17 Thread Streets Of Boston
The answer is right here in the documentation: https://developer.android.com/reference/android/content/ AbstractThreadedSyncAdapter.html#onPerformSync(android.accounts.Account, android.os.Bundle, java.lang.String, android.content.ContentProviderClient, android.content.SyncResult) "*... invocatio

Re: [android-developers] Re: Application.onCreate Method Randomly Called?

2013-01-18 Thread Streets Of Boston
"*SharedPreferences are persistent, assuming that you use commit() or apply(). *" Be mindful, though, when different parts of your app are running on different processes: If you change some SharedPreferences settings and call 'commit()' in one process, these changes are not immediately availabl

[android-developers] Re: Passing an object as extras in intent

2013-01-18 Thread Streets Of Boston
If the intent crosses process boundaries and you wrote your own Parcelable, be sure to set the ClassLoader on the Bundle (which represents all the Extras in an Intent) before you read the content of the Intent. getIntent().getExtras().setClassLoader(getClass().getClassLoader()); On Friday, Ja

[android-developers] Re: Passing an object as extras in intent

2013-01-18 Thread Streets Of Boston
If your object crosses different packages, look at this post: http://stackoverflow.com/questions/5743485/android-resultreceiver-across-packages On Friday, January 18, 2013 10:04:11 AM UTC-5, Streets Of Boston wrote: > > If the intent crosses process boundaries and you wrote yo

[android-developers] Re: Create bitmap from view but keep view

2013-01-25 Thread Streets Of Boston
Replied to it on StackOverflow. On Wednesday, January 23, 2013 9:24:09 PM UTC-5, Caio Ricci wrote: > > I found two ways of creating a Bitmap from a view. But once I do that, the > view disappears and I can't use it anymore. How can I redraw the view after > generating my bitmap? > > Please check

[android-developers] Re: asynctask vs. FragmentRetainInstance.java in API demo

2013-02-01 Thread Streets Of Boston
After your Fragment, the one without a UI, has started the AsyncTask, i.e. after the AsyncTask's 'execute' method has been called, it can stop it by calling 'cancel' on it. task.execute(...); ... ... And on some event, (Fragment's onDestroy for example), you just call. task.cancel(t

[android-developers] Re: startActivity

2013-02-04 Thread Streets Of Boston
If you want to start one activity (screen) and report a result back to the calling activity (screen) you need the handle of the calling activity. No way around it. If you are not worried about reporting a result back, you can get hold of the Application Context (context.getApplicationContext())

Re: [android-developers] Re: asynctask vs. FragmentRetainInstance.java in API demo

2013-02-04 Thread Streets Of Boston
still do not understand whether it is okay to add multiple > invisible fragments as worker threads to the UI and why it tries to stop > the thread in both onDestroy() and onDetach(). > > 2013/2/1 Streets Of Boston > > >> After your Fragment, the one without a UI, has star

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread Streets Of Boston
This is one way of doing it (as long as simHandler was created on UI thread). However, this is too much work. Just call simHandler.postDelayed on the simHandler itself; no need to create a separate thread: See documentation here: https://developer.android.com/reference/android/os/Handler.html#p

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread Streets Of Boston
Yes, you can. Use a WeakReference to your activity. static class MyHandler extends Handler { private WeakReference activityRef; public MyHandler(MyActivity activity) { activityRef = new WeakReference(activity); } /** * @return The activity for which this MyHandler was created. * Returns null i

[android-developers] Re: startActivity

2013-02-04 Thread Streets Of Boston
> I was looking at the docs for Activity, and didn't realize it was an * > override*. > > > > > > On Monday, February 4, 2013 11:07:08 AM UTC-6, Streets Of Boston wrote: >> >> If you want to start one activity (screen) and report a result back to >

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread Streets Of Boston
Yep, but you risk a memory leak of your activity, because the Handler (being tied to the UI thread which will stick around for a long time) is not tied to the life-cycle of your Activity. On Monday, February 4, 2013 2:09:35 PM UTC-5, skink wrote: > > > > Streets Of Boston wrote:

Re: [android-developers] Re: asynctask vs. FragmentRetainInstance.java in API demo

2013-02-05 Thread Streets Of Boston
ction to users, I need to perform the request again > when a corresponding event happens, such as a button click event. I could > not figure out another way but only adding the same fragment to my > activity. It is why I am concerned about adding multiple UI-less fragements > to my act

Re: [android-developers] ydpi != xdpi

2013-02-06 Thread Streets Of Boston
Just look here: http://developer.android.com/reference/android/util/DisplayMetrics.html#density On Wednesday, February 6, 2013 10:35:52 AM UTC-5, bob wrote: > > Can you please rephrase what you are saying here? I can't understand it. > > > Part of the issue is that a lot of code relies on the de

[android-developers] Re: Daemon Threads in Android

2013-02-06 Thread Streets Of Boston
It's mostly just 'ported' from regular Java, where a process could not do a normal 'exit' when non-daemon thread were still running. But you're right. It would seem that if android decides to 'kill' your app, it doesn't much matter whether there are some daemon threads still running or not. Sti

[android-developers] Re: Daemon Threads in Android

2013-02-07 Thread Streets Of Boston
I agree; Unless your code creates the threads/thread-pools, i.e. if your code doesn't own these threads, avoid calling 'setDaemon(...)'. On Wednesday, February 6, 2013 8:08:47 PM UTC-5, Nathan wrote: > > > > On Wednesday, February 6, 2013 4:52:00 PM UTC-8, Streets

[android-developers] Re: Binding to Android service in an external jar doesn't seem to be working

2013-02-11 Thread Streets Of Boston
Maybe this service class uses/loads other classes that fail to load. Strong candidates that may fail to load are R. classes and their members: If your JAR is generatedfrom a library project and if you distribute just the JAR file, you may not distribute any R. classes along with it, sin

Re: [android-developers] Can this variable become null?

2013-02-25 Thread Streets Of Boston
In addition to Treking's answer; Never rely on the order in which (you think that) activities are started to initialize or modify static/global data. E.g. User goes through your app, starting from the homescreen, going from Activity A then to Activity B then to C. This could be order in which

[android-developers] Re: Avoiding the dreaded ANR & background work

2013-02-25 Thread Streets Of Boston
Does your receiver handle the JSON update (i.e. it goes out to the server, retrieves the updated json from the server and notifies the registered activities)? If so, this is not correct. BroadcastReceivers should never ever do long running tasks. Instead, your BroadcastReceiver should receive

[android-developers] Re: How to get device raw width and height or actual screen width and height ?

2013-03-08 Thread Streets Of Boston
For any API-level less than 17, use the snippets of code you are using successfully now. For API-level 17 and higher (your Nexus 7 running 4.2), use this: https://developer.android.com/reference/android/view/Display.html#getRealSize(android.graphics.Point) On Monday, November 19, 2012 6:29:14 A

[android-developers] Re: Concurrency: Do you use Loaders? AsyncTask? or Runnables?

2013-03-20 Thread Streets Of Boston
There are even more ways of doing stuff in the background: IntentService :-) - Runnable If you mean a Thread (running itself or a Runnable): Generally, avoid using them. But there are good use cases: When you want to setup something that runs in the background for a long time (possi

Re: [android-developers] Re: Concurrency: Do you use Loaders? AsyncTask? or Runnables?

2013-03-20 Thread Streets Of Boston
2013 11:06:05 AM UTC-4, Kristopher Micinski wrote: > > Though it's worth noting that since an `IntentService` doesn't run in > a background thread context. (Probably one of the biggest things > beginners screw up..) > > Kris > > On Wed, Mar 20, 2013 a

Re: [android-developers] Re: Concurrency: Do you use Loaders? AsyncTask? or Runnables?

2013-03-21 Thread Streets Of Boston
you for reading. > > > > On Wed, Mar 20, 2013 at 2:15 PM, Kristopher Micinski > > > wrote: > >> That's what I get for not reading the documentation before speaking. :-) >> On Mar 20, 2013 12:59 PM, "Kristopher Micinski" >> >

Re: [android-developers] Re: How to start again if some third party task killer has killed my app ?

2013-03-25 Thread Streets Of Boston
You haven't found it, because it doesn't exist :-) When the OS or a 3rd party app kills your process, it *kills* it forcefully. And if your app's process is killed your app no longer runs and obviously can't process any callbacks/lifecycle-events, etc. On Sunday, March 24, 2013 3:47:17 AM UTC-

[android-developers] Re: Seurity concern in Webview using javascript.

2013-03-27 Thread Streets Of Boston
As long as your WebView's HTML content doesn't load an external site, i.e. you control *all *the content shown in your WebView, there is no concern. However, if you make an app that becomes popular and has a WebView that can load external/public content, then someone could examine your app, fig

[android-developers] Re: Debugging the Activity life-cycle?

2013-03-29 Thread Streets Of Boston
Look at your logcat. It tells you when an activity hasn't started. For the onActivityResult getting called instantly: Your returning activity was probably started with a singleTask or singleInstance. This means that onActivityResult was called immediately after your activity was started (and no

[android-developers] Re: Activity won't start when launchmode is standard

2013-03-29 Thread Streets Of Boston
Look at your logcat and see why your activity can't be started. Could be as simple as a typo in your manifest. On Friday, March 29, 2013 4:02:04 PM UTC-4, plnelson wrote: > > This question has (so far) stumped them on Stack Overflow. . . . > > I'm trying to launch an Activity which launches *pe

[android-developers] Re: Activity won't start when launchmode is standard

2013-03-29 Thread Streets Of Boston
t; > On Friday, March 29, 2013 5:57:46 PM UTC-4, Streets Of Boston wrote: >> >> Look at your logcat and see why your activity can't be started. Could be >> as simple as a typo in your manifest. > > > I only see things in LogCat about DGraphActivity when it *does* star

[android-developers] Re: Activity won't start when launchmode is standard

2013-03-29 Thread Streets Of Boston
rch 29, 2013 7:04:39 PM UTC-4, Streets Of Boston wrote: > > I've never seen this. If it fails to start, i get a logcat message and an > exception is thrown (and you are catching that). > Have you tried to set the Intent.FLAG_ACTIVITY_NEW_TASK flag when starting > the activity

[android-developers] Re: Activity won't start when launchmode is standard

2013-04-02 Thread Streets Of Boston
Maybe you could add one more log statement: Add a default constructor and print a log statement. This would check if the DGraphActivity instance is created or not: public DGraphActivity () { // Print out a log statement that this code here is reached properly. } If this constructor is execu

[android-developers] Re: reusing AsyncTaskLoader with always fresh data

2013-04-03 Thread Streets Of Boston
The call to getLoaderManager().initLoader(0, args, this); is enough to have your Loader run at least the first time it is created. Do *not *call 'startLoading()'. If you want to refresh your Loader's data call getLoaderManager().*restart*Loader(0, args, this); When initLoader or restartLoade

[android-developers] Re: What methods can be called after Activity.finish() is called?

2013-04-11 Thread Streets Of Boston
Any listener that listen to events happening on your Views in your Activity should cease to receive message-notifications as soon as the Activity and its Window (and View hierarchy) are destroyed. But if your code or some other code did a postDelayed on the main UI Looper, they will be dispatc

[android-developers] Re: Animated background drawable

2010-10-19 Thread Streets Of Boston
If i remember correctly, Twitter used to draw its animated backgrounds using the LiveWallpaper feature (which you can show in your own Activities' backgrounds as well). On Oct 6, 8:15 am, oriharel wrote: > Just like Twitter for android used to have (they removed it) - I need > to display an anim

[android-developers] Intent, launchmodes, intent-flags etc.: How to and best practices for starting/handling Activities

2010-10-23 Thread Streets Of Boston
Understanding how to declare activities in the manifest file, how to set the appropriate flags when starting them through intents, is quite challenging in all but the default cases. The combination of all these settings and flags is daunting. I've been developing for Android for over a year now, h

[android-developers] Re: Intent, launchmodes, intent-flags etc.: How to and best practices for starting/handling Activities

2010-10-23 Thread Streets Of Boston
guides and reference-guides and on the forums. But it is hard to put it all together and make real-world sense of it... all these possible combinations of settings and configs. On Oct 23, 9:45 pm, Dianne Hackborn wrote: > What are you trying to do? > > On Sat, Oct 23, 2010 at 2:28

[android-developers] Re: Application still Running After Exit

2010-10-23 Thread Streets Of Boston
Why is that an *un*fortunate feature? If your app is still running, it allows for a quicker startup next time. Even if cold or warm startup times are not much different from each other, what is unfortunate by having your process still running? The Android OS will kill it when it needs resources.

[android-developers] Re: Custom GridView with ArrayAdapter out of sync with backing data

2010-10-28 Thread Streets Of Boston
I see that in the onClick, you try to access the list's (GridView's) items by accessing its child-views. This is not correct. Child-views are re-used for when displaying items in the listview(GridView). When a child-view (list-item view) scrolls off the screen, it is re-used for ones that start sc

[android-developers] Re: Kube example with simple 3D object select

2010-10-28 Thread Streets Of Boston
Search for 'gluUnproject' on this forum. You'll find plenty of info for mapping 2D touch-screen coords to your 3D world-coords. There is still work left to figure out what is being picked given 3D world-coords: Map the (sx,sy,0) screen coordinate (close plane) to the 3D world- coord (wx1, wy1, wz

[android-developers] Re: How to catch android.intent.action.MEDIA_MOUNTED

2010-10-28 Thread Streets Of Boston
You'd have to register your broadcaster in your code: http://groups.google.com/group/android-developers/browse_frm/thread/c2a91e60bff34028/a6bf11c05641a909?lnk=gst&q=MEDIA_MOUNTED# On Oct 28, 4:53 am, Karteek N wrote: > How to cath android.intent.action.MEDIA_MOUNTED event > I implemented an bro

[android-developers] Re: Custom GridView with ArrayAdapter out of sync with backing data

2010-10-28 Thread Streets Of Boston
tons.  How do I make it > work for an indiviudal actor (clicking Checkbox for actor) such that > the isSelected field gets changed properly.  I see I have the > setOnCheckedChangeListener for a checkbox but how do I get the > position of the ActorList to actually change. > >

[android-developers] Re: Custom GridView with ArrayAdapter out of sync with backing data

2010-10-29 Thread Streets Of Boston
You're welcome. :-) Have a great weekend. On Oct 29, 3:50 pm, stanchat wrote: > Awesome!  This worked like a charm. > > On Oct 28, 2:54 pm, Streets Of Boston wrote: > > > > > When you create a brand-new convertView (v) in your getView(...) > > method (within

[android-developers] Re: SIGH ... Android & SOAP

2010-11-02 Thread Streets Of Boston
My advise is the same as the previous two posters; try to avoid SOAP if you can. If you can't avoid it, ksoap2 is a soap library for Android. I haven't used it personally, so your mileage may vary :-). On Nov 1, 7:30 pm, Darkside Android wrote: > This post is directed to those of you who may hav

[android-developers] Re: Problem with turning off GPS updates when application goes into the background.

2010-11-02 Thread Streets Of Boston
Get the LocationManager in onCreate(). Store this in an instance- variable. Request location updates in onResume(), using the instance-variable. Remove location updates in onPause(), using the instance-variable. On Nov 2, 2:10 pm, Chirag Patel wrote: > Hi I'm having a problem when trying to sto

[android-developers] Re: Problem with turning off GPS updates when application goes into the background.

2010-11-03 Thread Streets Of Boston
> back button and call finish() the app goes into the background but the > activity remains alive i.e when I go back to it, it doesn't start a > new instance just resumes the old one. Any help on this would be much > appreciated.. Thanks! > > On Nov 2, 10:45 pm, Streets Of Bo

<    1   2   3   4   5   6   7   8   9   10   >