[android-developers] Re: scaleType="fitXY" works scaleType="centerInside" doesnt

2010-10-01 Thread Streets Of Boston
The Eclipse plugin sucks if you do a bit more than just simple layouts or drawables. The only way to check if it all works fine, is to check it during runtime (either on the emulator or, better, a real device). On Oct 1, 3:08 am, Shawn Brown wrote: > > If you know or can guess please tell me why:

[android-developers] Voice Search from Keyboard not working (Voice Search works fine in Google Search, though)

2010-10-01 Thread Streets Of Boston
Since quite a while (i think after the the OTA update to Froyo (2.2)), my Voice Search from the keyboard stopped working. A Voice Search from Google Search, for example, still works fine without problems. But when clicking on the keyboard's microphone button to speak a text that needs entering in

[android-developers] Re: OutOfMemory exception in OnCreate

2010-10-02 Thread Streets Of Boston
You haven't shown us enough of your code (code snippets) for us to begin figuring out what may be wrong with your app. Could you provide more details? But to your questions; 1. The onCreate is called once per Activity instance. If you have instance-variables/fields in you activity, you can assume

[android-developers] Re: Goo Market Frustration(s) -- a request to experienced app developers

2010-10-08 Thread Streets Of Boston
Also, your app may not work on HIS hero-phone. It could be tons of things, depending on your app, that may have nothing to do with a particular (brand of) device, but with software loaded on it. E.g. your app uses services that a task-manager on his device keeps killing. E.g. your app may use some

[android-developers] Slow initial showing/drawing of Activities when using own Theme

2010-10-08 Thread Streets Of Boston
When i create an activity that uses a custom-theme, e.g. android:theme="@style/MyLogonTheme". I create my theme in styles.xml: sans @drawable/ android_screen_logon_bg (note that i have a few more themes a

[android-developers] Re: Slow initial showing/drawing of Activities when using own Theme

2010-10-09 Thread Streets Of Boston
king your app to launch.  If you want to > reduce that, you need to profile and optimize your app's launch time. > > On Fri, Oct 8, 2010 at 3:50 PM, Streets Of Boston > wrote: > > > > > > > When i create an activity that uses a custom-theme, e.g. > >

[android-developers] Re: Slow initial showing/drawing of Activities when using own Theme

2010-10-09 Thread Streets Of Boston
ark Murphy wrote: > You could try Traceview and see where the time is going: > > http://developer.android.com/guide/developing/tools/traceview.html > > On Sat, Oct 9, 2010 at 5:32 PM, Streets Of Boston > > > > > > wrote: > > Thank you Dianne, > > I'

[android-developers] Re: Multi-touch & My Touch Phone Questions

2009-07-13 Thread Streets Of Boston
Some hackers have been able to enable multi-touch on the G1. The hardware is there, but because of legal issues, it has not been enabled. It is a patent issue. Just google this: apple patent multi touch And to be honest, i don't miss multi-touch that much. I like that i can use only one hand t

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-13 Thread Streets Of Boston
Simple. :-) The error says that the file does not exist... that means you should create it. Use File#createNewFile(). On Jul 13, 5:53 pm, doubleminus wrote: > Romain is? I don't understand. Is there something I should be doing > to avoid filenotfound exception? > > On Jul 13, 12:40 am, 郑伟 wrot

[android-developers] Re: List View not properly updated from AsyncTask

2009-07-14 Thread Streets Of Boston
First: You directly modify the activity's attribute 'items' (that serves as your data in your list-adapter) in your background thread, without any proper synchronization with the main GUI-thread. This is bad news. It may work for a while, but it's bound to fail at some point. Second (and i assume

[android-developers] Re: OpenGL ES, How to rotate a cube?(3D Rotation)

2009-07-14 Thread Streets Of Boston
Take a careful look at the API Demo code. And then take a look at the OpenGL ES documentation (http:// www.khronos.org/opengles/) Having the code that shows you how to rotate around the X or Y axis, it should not be hard to figure out how to rotate along the Z axis On Jul 14, 11:23 am, quill wro

[android-developers] Re: OpenGL ES, How to rotate a cube?(3D Rotation)

2009-07-15 Thread Streets Of Boston
7;t use the total angle to rotate because the axis > is changable. I use gl.glLoadMatrixf(mModelViewMatrix, 0) to reach the > previous state and then do glRotatef, it can work when I slip my > finger quickly, but it works bad when I slip slowly. > > On Jul 14, 11:34 pm, Streets Of Bos

[android-developers] Re: getView from CustomizedAdapter called several times

2009-07-15 Thread Streets Of Boston
I'm not a google engineer, so i don't know the answer, but i have a theory why this may happen. In your layouts, do you use 'weights' (weightsum and layoutweight)? If i remember correctly, if you use these attributes, layout-code is called twice. If the layout-code for a list-view includes the 'g

[android-developers] Re: extending parcelables

2009-07-15 Thread Streets Of Boston
It looks like your Animal class is abstract and should never be constructed. Declare Animal 'abstract' and see if you get an instantiation error. Have your tried to put the 'public static final Parcelable.Creator CREATOR' and 'public static final Parcelable.Creator CREATOR' variables and definiti

[android-developers] Possible solution: showDialog and dismissDialog behave strangely when changing orientation

2009-07-15 Thread Streets Of Boston
@Override public void ready(String path, Uri uri) { ACTIVE_INSTANCE.dismissDialog(R.layout.alert_dialog_waiting); } where 'ACTIVE_INSTANCE' is set to 'this' in the onCreate (and set to 'null' in the onDestroy). This works fine. On Jul 12, 11:13 pm,

[android-developers] Re: About the oneway keyword in AIDL

2009-07-17 Thread Streets Of Boston
I hope it's not 'private'! :=) I'm using oneway quite a bit in my service's aidl definition. On Jul 17, 10:20 am, Guillaume Perrot wrote: > Hello, > I found in Android source code an interesting but undocumented keyword > for aidl: "oneway" (before void in a function). > As it sounds, the gener

[android-developers] Re: Disabling specific wireless radios in the airplane mode

2009-07-17 Thread Streets Of Boston
I think this is deliberate. If the user chooses Airplane Mode, he/she expects that all radios that need to be turned off (by law/airline-regulation) are indeed turned off. What's the use of Airplane Mode if it leaves some radios turned on that would make the phone not be in Airplane Mode, i.e. v

[android-developers] Re: Alternatives to Multitouch

2009-07-19 Thread Streets Of Boston
Currently I'm writing an app that contains an image viewer. I implemented zooming as follows: Zoom in: Long press; Then a zoom-in icon appears at your finger-location. Then drag a rectangle (with aspect ratio of your screen) from your current finger position to another position; Move your finger

[android-developers] Re: Date.getTime() and Daylight Saving Time?

2009-07-19 Thread Streets Of Boston
Be careful with DST and such. I work for a company that tracks time (timecards, scheduling etc.). Handling DST properly is tricky. The method Date.getTime() is timezone-less. It is a 'universal' time, a *timestamp*, just a time without a definition of place/location! It returns the number of mill

[android-developers] Re: translated application dealing with English only server

2009-07-20 Thread Streets Of Boston
Kizza, If you need to be able to tranlate 'on the fly', then you need to do all translations yourself. Don't use the strings.xml file. On Jul 20, 9:52 am, Mark Murphy wrote: > kizza wrote: > > Hi, and thanks for your help. > > I've managed to make my own ListAdapter now, but how do I load the >

[android-developers] Re: Bitmap in GLSurfaceView

2009-07-20 Thread Streets Of Boston
For no repeat: http://www.khronos.org/opengles/documentation/opengles1_0/html/glTexParameter.html and look at GL_CLAMP. Texture y-coordinates go from the bottom to the top when y increases. Bitmaps/images usually go from the top to the bottom when y increases. Just flip your bitmap along the y-ax

[android-developers] Re: Strange bug found when subtracting a float from another float, or a double from another double

2009-07-20 Thread Streets Of Boston
Doubles and floats have a limited precision. The extra -0.0019 you have in your result is a precision error. You'll find this behavior on any machine that implements floats and doubles according to the most prevailing spec: http://en.wikipedia.org/wiki/IEEE_754-2008 On Jul 18, 7:41 am, DKIT

[android-developers] Re: AsyncTask error handling

2009-07-20 Thread Streets Of Boston
Just have the AsyncTask's 'doInBackground' method return an object that contains the result of your background computation (including any possible error). myAsyncTask = new AsyncTask() { @Override protected MyResult doInBackground (MyParams... params) { MyResult result = new MyResult();

[android-developers] Re: Byte array from bitmap

2009-07-20 Thread Streets Of Boston
Just read the reference on developer.android.com. I'll give you a hint :-) Bitmap.getPixels( ... ) On Jul 20, 9:54 pm, Sharmila wrote: > Is it possible to create a byte array from bitmap?How can I do so? > Thanks, > Sharmila --~--~-~--~~~---~--~~ You received

[android-developers] Re: Strange bug found when subtracting a float from another float, or a double from another double

2009-07-20 Thread Streets Of Boston
That depends... You can do floatNumber == 0 in many cases or floatNumber1 == floatNumber2. But you have to remember that precision-errors could be a problem. It depends on how floatNumber(1/2) has been assigned and what you're using it for. But to say 'never', that's a bit too strong. :-) On Jul

[android-developers] Re: Use sqlite in AsyncTask freeze all

2009-07-21 Thread Streets Of Boston
It's hard to tell why this happens with your app. Try to debug it: Attach the Eclipse debugger to your process when it hangs and then pause the entire process. Then open up (expand) the threads and see where the stack-trace of each thread is currently at. This may give you a hint about why your pr

[android-developers] Re: Bitmap in GLSurfaceView

2009-07-21 Thread Streets Of Boston
You forgot GL_TEXTURE_WRAP_T. :=) On Jul 21, 2:30 am, kalyan simhan wrote: > thanks for the reply.. but it still does not work.. > the bitmap still repeats...i did this.. > >         gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, >                  GL10.GL_NEAREST); >      

[android-developers] Re: Date.getTime() and Daylight Saving Time?

2009-07-21 Thread Streets Of Boston
Use Calendar instead for locale sensitive info (timezone, dst, etc). Code snippets: Date timeStamp = ...; ... // Get the system calendar for 'here' and set the timestamp (universal time). Calendar cal = Calendar.getInstance(); cal.setTime(timeStamp); // Get the system calendar for 'somewhere' a

[android-developers] Re: SurfaceView to slow for games? OpenGL necessary to do games?

2009-07-21 Thread Streets Of Boston
Did you try to have the rendering done in a seperate thread? On Jul 21, 4:33 pm, klirr wrote: > I use SurfaceView for my game, tried normal View first but that was to > slow. > Problem is, it still is. The redrawing just isn't anywhere fast enough > for a game. So unless it is a lot faster on th

[android-developers] Re: How to use Thread with SurfaceView, ie draw in a separate thread?

2009-07-22 Thread Streets Of Boston
A seperate thread should not implement/extend SurfaceView or any other view. You still create your GameView as you had before, but you add a new class called (for example) GameRenderer. This GameRenderer will implement a Thread. The GameRenderer will execute its 'run()' method at some point. Thi

[android-developers] Re: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!

2009-07-22 Thread Streets Of Boston
Same here. I have successfully removed (by asking moderators of online forums) my app from multiple forums where it could be downloaded freely, but I have not been able to keep up lately :( It's a fact of life, alas. Every piece of software is pirated. I just hope that most people think that 99 c

[android-developers] Re: facing problem with bitmap size.

2009-07-22 Thread Streets Of Boston
Why not make it smaller? Or load it scaled (inSampleSize > 1). Your screen is only 320x480; you don't need 1000x1000. On Jul 22, 7:00 am, Y2U wrote: > Hey guys, > > I am using bitmap image that i have to rotate on fling. its actually a > circular image that will act like a spin wheel. > so image

[android-developers] Re: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!

2009-07-23 Thread Streets Of Boston
This is actually one of the forums which honored my request to remove my app from offered to download. However, i see that some now post links from other sites on this forum (instead of hosting the apks on ip-forum itself) to download my, and many other, apps. On Jul 23, 12:01 am, NitroDesk wro

[android-developers] Download here library for reading/writing EXIF from your JPEG images

2009-07-23 Thread Streets Of Boston
Android does not provide an Exif Reader or Exif Writer in its SDK (it has a native implemenation, though, but that API is private). The Sanselan library, however, does provide a full fledged set of functionality for reading and writing Exif metadata. However, Sanselan pur sang cannot be included

[android-developers] Re: AsyncTask reuse

2009-08-10 Thread Streets Of Boston
Or use the ExecutorService (Future/Tasks/etc) in the java.util.concurrent package. On Aug 7, 2:02 pm, Dianne Hackborn wrote: > If you don't like it, use your own Thread or the slightly higher-level > HandlerThread and implement the semantics you want. > > On Fri, Aug 7, 2009 at 10:50 AM, Jason P

[android-developers] Re: A better splash screen

2009-08-10 Thread Streets Of Boston
What about setting the background color of the LinearLayout of the splash-screen explicitly to (semi)transparent? On Aug 7, 1:40 pm, Carl Whalley wrote: > I have an app with a View which fills the display at 320x480. I made > asplashimage which is smaller, 200x200, and the logic to display this

[android-developers] Re: problems purchasing my own app

2009-08-11 Thread Streets Of Boston
I tried it a while ago and i could not buy my own app either (i got the same error). I read (somewhere in this forum or another forum) that buying your own app is not allowed. I just wished that the error message was more clear "you cannot buy your own application" instead of "server error has oc

[android-developers] Re: Simply touching screen reduces fps

2009-08-13 Thread Streets Of Boston
For me a sleep of about 20millisecs was most effective. Note that this only works if your opengl render-thread is a seperate thread (not the main gui-thread). On Aug 13, 6:32 pm, "Justin (Google Employee)" wrote: > The recommendation for this is to sleep in the touch event handler. > The system

[android-developers] Re: About the mixture of 2D and 3D drawing

2009-08-14 Thread Streets Of Boston
I have not tried to put 2D elements (Views) onto a opengl surface. However, what does work is to add more than one view to your activity (setContentView & addContentView). Specify your opengl-view to setContentView and specify your regular view(group) to the addcontentview and make sure that that

[android-developers] Re: Simply touching screen reduces fps

2009-08-14 Thread Streets Of Boston
E.g. when you handle the ACTION_MOVE in your touch-handler, just do a Thread.sleep(20) before your method returns. If you don't have a touch-handler in your app, just register one and only do the Thread.sleep(20) when handling the ACTION_MOVE. On Aug 14, 3:32 am, Jiri wrote: > Could someone ple

[android-developers] Re: AdSense & Android - A Disappointed Developer's Rant

2009-08-14 Thread Streets Of Boston
I don't know... only Google knows.. What (little) did google tell you about the reasons for shutting down your account? Google must have felt that you abused/games the AdSense system, rightly or wrongly.. Either way, I can imagine that this all does not make you happy. On Aug 14, 8:00 am, Photi

[android-developers] Re: any development book for new guy?

2009-08-14 Thread Streets Of Boston
Mark Murhpy's (regular here on these forums) e-books are highly regarded: http://commonsware.com/mmurphy.html http://commonsware.com/books.html On Aug 14, 2:42 am, Barry Wei wrote: > could anyone send me some e-book about develop android application? > > thanks a lot. --~--~-~--~~---

[android-developers] Re: How to add the character '&' intto the tag?

2009-08-14 Thread Streets Of Boston
Use & On Aug 14, 7:49 am, tomispig wrote: > How to add the character  '&' intto the tag? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-develo

[android-developers] Re: canvas.save() / restore() , what is this?

2009-08-14 Thread Streets Of Boston
Before you call save() on the canvas, your canvas is in a certain state (clip region/transformation matrix/etc). Then you call save() and all this info is saved away somewhere. Then other code (e.g. paints of child-views) can modify this canvas anyway they like. Then when control is returned bac

[android-developers] Re: AsyncTask and Exception handling

2009-08-18 Thread Streets Of Boston
Add an instance-variable to your own AsyncTask subclass that will hold the result of your background processing. When you get an exception, store the exception (or some other error-string/code) in this variable. When onPostExecute is called, see if this instance-variable is set to some error. If

[android-developers] Re: Curved graphics in OpenGL ES

2009-08-18 Thread Streets Of Boston
I fear the best one can do, is using textures... On Aug 18, 4:02 am, String wrote: > I was disappointed to discover that OpenGL ES, the flavor of OpenGL > implemented in Adroid, doesn't appear to support the usual techniques > for drawing graphics involving curves. I'd be happy with either > Ope

[android-developers] Re: glQueryMatrixxOES missing from Qualcomm driver?

2009-08-18 Thread Streets Of Boston
If you are trying to get the current model or project matrix, use/copy the MatrixGrabber and MatrixTrackingGL classes (from the API Demoes). On Aug 17, 11:59 pm, ceder wrote: > I have stumbled onto the problem of the function glQueryMatrixxOES > being absent from GL10Ext when the Qualcomm hardwa

[android-developers] Re: Android Market Functionality - Best way to add a "loading... row" with Efficient Adapter?

2009-08-18 Thread Streets Of Boston
"getView method checking if the position is the last one": When the getView is called repeatedly to populate the list with views, it is not guaranteed that the value of parameter 'position' is going to be 1, 2, 3, ... , n in sequence. In other words, the statement "if position is the last item in

[android-developers] Re: Android Market Functionality - Best way to add a "loading... row" with Efficient Adapter?

2009-08-18 Thread Streets Of Boston
does not necessarily have its 'position' parameter set to N-1. On Aug 18, 6:44 pm, Mark Murphy wrote: > Streets Of Boston wrote: > > In other words, the statement "if > > position is the last item in the list then the user is at the bottom > > of the list&qu

[android-developers] Re: Android Market Functionality - Best way to add a "loading... row" with Efficient Adapter?

2009-08-19 Thread Streets Of Boston
I have seen some posts on this forum that people try to do this inside the 'getView' method (in pseudo code): if position == getCount()-1 then { "The user has stopped scrolling and the list is showing the last element on the bottom." Do something: E.g. lazily load more items. } My previou

[android-developers] Re: Render OpenGL to regular View (not GLSurfaceView)

2009-08-19 Thread Streets Of Boston
You can put a 'regular' View on top of your GLSurfaceView (call addContentView with the regular View). If your regular view has areas with a transparent background, you can combine 2D controls with your 3D OpenGL. But it looks like you want to be able to apply OpenGL style operations on regular 2

[android-developers] Re: easiest way to set an ImageButton background to be transparent

2009-08-19 Thread Streets Of Boston
Set the background-color to a transparent color (i.e. its alpha- component is 0). I'm not sure about the syntax, it may be totally incorrect, but you'll get the idea :-) : in colors.xml # and in your layout-xml, set the background to transparent: android:background="@color/transparet"

[android-developers] Re: easiest way to set an ImageButton background to be transparent

2009-08-20 Thread Streets Of Boston
Thanks, i did not know about the @null. On Aug 19, 8:47 pm, Dianne Hackborn wrote: > You should be able to just set the color directly as > android:background="#".  But @null is the most efficient. > > On Wed, Aug 19, 2009 at 2:49 PM, Streets Of Boston > wrote:

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-22 Thread Streets Of Boston
I'm writing an app that needs to save a color-corrected full-sized (6 megapixels == 12MByte) to a file (since it can't be held in memory next to the original non-color-corrected bitmap): 'Original Bitmap' + 'ColorMatrix' --> 'Color-Corrected Bitmap in a file' I use getPixels to get an integer-a

[android-developers] Re: catching out of memory errors

2009-08-22 Thread Streets Of Boston
You can catch it. Just catch the OutOfMemoryError (or Throwable). On Aug 22, 7:45 pm, Bob wrote: > Hi, > I am getting an outofmemory error (java.lang.outofmememoryerror) from > a bitmapfactory that doesn't seem to be caught despite the fact that > it is in a try{ }catch block.  Can I catch this

[android-developers] Re: catching out of memory errors

2009-08-22 Thread Streets Of Boston
t a normal > exception that will be caught by try{}catch(Exception ex){}? > > On Aug 22, 7:47 pm, Streets Of Boston wrote: > > > > > You can catch it. > > Just catch the OutOfMemoryError (or Throwable). > > > On Aug 22, 7:45 pm, Bob wrote: > >

[android-developers] Re: (beginner question) variables reset when I change device orientation?

2016-04-12 Thread Streets Of Boston
Hint: Your Activity object is destroyed and then recreated on a rotation. This means that all your *new* Activity's fields have been set to 0/false/null again. Read the documentation about the `onSaveInstanceState(...)` method and how this stores data in the `savedInstanceState` parameter of th

[android-developers] Re: Android Studio + Kotlin + databinding = unused methods?

2016-05-16 Thread Streets Of Boston
What about just disabling the Lint processing for this 'unused' issue? Click on the yellow warning and fix it by adding a lint-disabling comment to the method. This will remove the warning. On Saturday, May 14, 2016 at 10:47:33 AM UTC-4, Mike Hurley wrote: > > Here are the versions I'm using: >

Re: [android-developers] Re: Android Studio + Kotlin + databinding = unused methods?

2016-05-17 Thread Streets Of Boston
if the Kotlin plugin is simply less advanced in this area. > > On Mon, May 16, 2016 at 1:51 PM, Streets Of Boston > wrote: > >> What about just disabling the Lint processing for this 'unused' issue? >> >> Click on the yellow warning and fix it by adding a lint

[android-developers] Re: Meta: Changes to new-user moderation policy

2016-08-31 Thread Streets Of Boston
Please, make this group moderated again or figure something out to weed out all the spam, rants and job-postings. This group has been basically useless. Finding actual questions to answer is near impossible. Posting your own question will get drowned out in a sea of spam a second later. Thank

[android-developers] Re: activity.getResoures()

2014-07-14 Thread Streets Of Boston
If 'res' is a local variable or a member/field of your activity, it's fine to use 'res' all over your method/activity. However, don't make res static/global (if you do and fail to set it to null at the appropriate time, you may set yourself up for memory leaks. Don't give it to other instances o

[android-developers] Re: switch case using string from Enum

2014-07-18 Thread Streets Of Boston
Yep, you can't do that. If 'event' is of type 'Type', then you could do "switch(event) { case TYPE_ONE: case TYPE_TWO: ...} ...", because Enum values are considered to be constant. Instead, change your switch statement to "if (...) else if (...) { ... } else if (...) { ... } else if (...

[android-developers] Re: switch case using string from Enum

2014-07-18 Thread Streets Of Boston
vent.getType() to return enum of the string instead of > returning string? > > > On Friday, July 18, 2014 1:22:45 PM UTC-4, Streets Of Boston wrote: >> >> Yep, you can't do that. >> >> If 'event' is of type 'Type', then you could do "

[android-developers] Re: Tracking down multiple Activity instances in memory

2014-09-16 Thread Streets Of Boston
I had a similar issue once and I tracked it down to the View#setTag(int key, Object tag) method. In my code, setTag was called with a tag value being an object holding/referencing an instance that had children referring to children of the View on which this setTag was called (tag was a 'ViewHold

[android-developers] Re: Creating a custom-view with rounded corners

2014-11-13 Thread Streets Of Boston
Simple solution: Use a FrameLayout and set the foreground drawable: https://developer.android.com/reference/android/widget/FrameLayout.html#setForeground(android.graphics.drawable.Drawable) The foreground drawable is drawn *over/on top of* the background and the children of a FrameLayout. If th

[android-developers] Re: onCharacteristicWrite Error Status 14

2014-12-09 Thread Streets Of Boston
I found this one here: https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/android-4.3_r1.1/stack/include/gatt_api.h It seems 14 means "GATT_ERR_UNLIKELY", whatever that is ... On Monday, December 8, 2014 11:34:30 PM UTC-5, Tony Pitman wrote: > > I am writing an Android ap

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-06 Thread Streets Of Boston
Oleksi: What do you mean by 'killed'? Do you mean that its 'onDestroy' method gets called? Let's assume you are talking explicitly about starting the Service, not binding to it: If a Service is started by some other component, it needs to be explicitly stopped, either by the same component, an

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-06 Thread Streets Of Boston
Oleksi: What do you mean by 'killed'? Do you mean that its 'onDestroy' method gets called? Let's assume you are talking explicitly about starting the Service, not binding to it: If a Service is started by some other component, it needs to be explicitly stopped, either by the same component, an

[android-developers] Re: Is it possible, that Android kills a service inside an app?

2015-01-06 Thread Streets Of Boston
Oleksi: What do you mean by 'killed'? Do you mean that its 'onDestroy' method gets called? Let's assume you are talking explicitly about starting the Service, not binding to it: If a Service is started by some other component, it needs to be explicitly stopped, either by the same component, an

[android-developers] Re: Receive Callback from Service

2015-04-22 Thread Streets Of Boston
Another option is to add a *ResultReceiver* ( https://developer.android.com/reference/android/os/ResultReceiver.html ) as a parameter to your AIDL function. This parameter can be used as a callback. The client (i.e. the one calling the AIDL function) will implement the parameter's *onReceiveRes

[android-developers] Re: Android Studio & NDK

2015-06-16 Thread Streets Of Boston
It is not (yet!) properly supported. But building your sources works well. Start here to figure out how. It helped me. http://ph0b.com/android-studio-gradle-and-ndk-integration/ On Tuesday, June 16, 2015 at 1:19:20 PM UTC-4, MB wrote: > > Hi, > > I would really if someone could tell me where on

[android-developers] Re: Android Java Call getBytesFromFile() Fails

2015-09-11 Thread Streets Of Boston
The method *getBytesFromFile* is not a static method in *java.io.File* It is a static method in *com.compoze.util.IoUtility* On Friday, September 11, 2015 at 12:44:20 PM UTC-4, JediDroid wrote: > > I am using Android Studio and Oracle Java 8. I am trying to get all bytes > from a file and pass th

Re: [android-developers] webview load page in background

2015-09-24 Thread Streets Of Boston
WebViews are only rendered if they are attached (to the Window) and if they are not 'View.GONE'. This means you have to add a WebView to your Activity's hierarchy somehow and either set it to View.INVISIBLE or set its alpha to 0 (make it transparent). There are 'optimizations' in the WebView im

[android-developers] Re: android mediaplayer notification

2015-10-19 Thread Streets Of Boston
Take a look here: https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.html And google (or go to StackOverflow) "MediaSessionCompat" for more info if you get stuck. On Monday, October 19, 2015 at 7:20:23 AM UTC-4, Russell Harrower wrote: > > PLEASE HELP! I

[android-developers] Re: Android Studio unit testing useless

2015-11-04 Thread Streets Of Boston
I never found TDD easy, or even feasible, using Android Studio or even Eclipse. Most projects' builds take too long to to TDD effectively. If you can't check your code and run your TDD tests within a few seconds of hitting the 'run-tests' button, it is useless... alas On Tuesday, November

[android-developers] Re: handling data migration in android application upgradation

2015-11-05 Thread Streets Of Boston
Read this first https://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html In the onUpgrade helper you can execute SQL statements to add columns, add/alter tables, drop tables, etc., whatever your need is. Here is some more info http://stackoverflow.com/questions/144193

[android-developers] Re: Android Studio unit testing useless

2015-11-05 Thread Streets Of Boston
fast and don't need the emulator or > device to run the tests. I think you should check this out. Of course, > still somehow slow to build (due the gradle build), but the run of tests > should be very fast. > > -- > Paulo Morandi > > On Wednesday, November 4, 2015

[android-developers] Re: how can I catch deadlock or hang of process?

2015-11-13 Thread Streets Of Boston
I don't know of an API that can help you figure out a deadlock for you. However, this is what I do to figure out the objects on which a deadlock occurs. -When the app deadlocks, attach the debugger (if it is not yet being debugged). -Then hit the Pause '||' button on the 'Debug' tab. -Then in t

[android-developers] Re: JSON parsing in Android

2015-12-16 Thread Streets Of Boston
Looks like the server is sending the escape character "\" as well all over the place. This one needs to be removed basically everywhere, i.e. the server should send something like {"User":{"id":"5", "name":"Bob" ... ... ... "FirstYear"}} On Wednesday, December 16, 2015 at 6:11:36 PM UTC-5, Muk

[android-developers] Re: save web page login credentials via webview in android storage

2016-01-14 Thread Streets Of Boston
You should NEVER store the users credentials (password) in SharedPreferences or anywhere else for that matter. This is very un-secure. At best, use Android's *AccountManager* facilities. Back to your WebView question. The WebView of your app gets access to a cache where it can cache the necess

[android-developers] Re: listView get child items in a loop

2016-02-22 Thread Streets Of Boston
I assume your ListView has a ListAdapter (probably a BaseAdapter?). In your Adapter's getView(...) method, you have a position parameter. The position is the index into your array-list of data that you'd like to show in the correct list-item-view. You get your data-item from the Adapter given

[android-developers] Re: An android application to display cursor position

2009-05-29 Thread Streets Of Boston
Which cursor? Do you mean the position of the user's finger when it's on the screen? On May 29, 9:03 am, arun choudhary wrote: > Hi All, > > I am new in Android application programming. I need to develop an android > application which simply displays  the cursor position (co ordinates) very > ur

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Streets Of Boston
"So, how do I keep the service alive between orientations but shut it down when the user has totally exited the app?" I use this 'trick' to figure out if an onDestroy is really a destroy or just a configuration change by the user (e.g. closing keyboard): Use onRetainNonConfigurationInstance() an

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Streets Of Boston
This code seems to rely on the fact that your background thread does not die immediately. If your service is rebound within 30 * 1000 milliseconds, then it all works well. - This is an unlikely scenario, but what if the re-bind happens more than 30 seconds later? - What if the service is stopped

[android-developers] Re: implementation of onDestroy for a service containing a worker or backround thread

2009-05-29 Thread Streets Of Boston
onDestroy() can still be called. If an activity calls stopService(...), the service's onDestroy may be called. On May 28, 12:24 pm, Gautam wrote: > Thanks... > The plan is to start the service once (startService()) and never call > stopService. I want my service to be running always (will set >

[android-developers] Re: Help with Services

2009-05-29 Thread Streets Of Boston
Take a look at the API Demoes source code. There is source code for a Service that handles request from an activity and that can do callbacks back to an activity for updates (e.g. progress). On May 29, 1:03 am, Sujay Krishna Suresh wrote: > Hi all, >               i'm starting an activity that i

[android-developers] Re: openGL library doc

2009-06-02 Thread Streets Of Boston
This is what i use: http://www.khronos.org/opengles/1_X/1_0/ http://www.khronos.org/opengles/documentation/opengles1_0/html/index.html On Jun 2, 9:30 am, Saurav Mukherjee wrote: > i am using eclipse 3.4.2 but the OpenGL javadocs r not visible. does anyone > where i can find the same? > > thanks

[android-developers] Re: Problem with getChildCount method???

2009-06-02 Thread Streets Of Boston
Like Romain said, the number of items in the entire list is not the same as the number of child-views of the list. You should know the number of items in the list. You (your code) put the items in the list. If you use a list-adapter (Adapter, BaseAdapter, etc) to provide the data for creating all

[android-developers] Re: VM won't let us allocate 6291456 bytes

2009-06-02 Thread Streets Of Boston
Scale the image. 2048 * 1536 * 2 (16 bit color) = 6MByte. This is too large for most android processes. You can usually load one of these big ones, loading two becomes problematic, 3 of them is usually not possible. The best thing to do is to avoid loading one big one at all. Your image-view is

[android-developers] Re: AIDL issue with 1.5sdk and eclipse plugin

2009-06-02 Thread Streets Of Boston
Your parcelable 'Song': Is that currently defined in your project.aidl? If so, this no long works. The inclusion of project.aidl for your own parcelables was a sdk1.0/1 thing. It's no longer supported in sdk1.5. Here is how you do this in sdk1.5: http://developer.android.com/guide/developing/t

[android-developers] Re: Passing pointer to AsyncTask that changes GUI to onRetainNonConfigurationInstance?

2009-06-02 Thread Streets Of Boston
This is how i solved these type of issues. I'm not sure if it's the most correct way to do this, but it works for me :-), at least for a task that takes place in one process. In the onCreate() of my activity, i save 'this' (reference to this activity) into a static variable: public static MyActiv

[android-developers] Re: Clarification on static variables

2009-06-03 Thread Streets Of Boston
I completely agree with Mark: "Better yet, get rid of the static variables. " Peter, if possible, it may be 'easier' to change all your non-constant static variable to member variables of your activity/service by refactoring. When you activity/service is destroyed, these variables will go too

[android-developers] Re: Problem with getChildCount method???

2009-06-03 Thread Streets Of Boston
You have to do this through your BaseAdapter. Make sure that your BaseAdapter's individual elements/items have a variable that can determine if one is checked or not. If you want to check-mark all your list-item item's, run through every element in your BaseAdapter. Set every element to 'isChecke

[android-developers] Re: setText for EditText is not working in 1.5

2009-06-03 Thread Streets Of Boston
Great! But this tells me that Mark's hunch was correct. On Jun 3, 12:20 am, cindy wrote: >  After I switch the sequence of 2 lines, it is working. > > mEditText = (EditText)findViewById(R.id.text_edit); > mEditText.setText("123456"); > mEditText.addTextChangedListener(new TextContentWatcher());

[android-developers] Re: Problem with getChildCount method???

2009-06-04 Thread Streets Of Boston
uot;narendrasingh.bi...@gmail.com" wrote: > What if we have to find a single view down in the list > > On Jun 3, 7:20 pm, Streets Of Boston wrote: > > > > > You have to do this through your BaseAdapter. > > Make sure that your BaseAdapter's individual ele

[android-developers] Re: How to get bitmap infomation before decode an image file?

2009-06-04 Thread Streets Of Boston
Set the Options.inJustDecodeBounds to true and call the BitmapFactory's method to get/decode your bitmap. The bitmap returned will be null, but the Options.outWidth and Options.outHeight will be set to the image's width and height in pixels. Then call the BitmapFactory's method to get/decode you

[android-developers] Re: Menu should be on the Image

2009-06-04 Thread Streets Of Boston
Have you looked through the API Demoes examples that come with the SDK, on how to set your buttons' (background) images? Plenty of examples there. Have you looked at the developer.android.com site? On Jun 4, 2:50 am, "android.vinny" wrote: > Hi every one > Can Any body help me how to create thi

[android-developers] Re: what is the picture format for Picture.WriteToStream?

2009-06-04 Thread Streets Of Boston
I'm not sure, but reading the documentation of Picture, it looks like that only the Picture class can read the data written by WriteToStream. It may as well be a totally proprietary format only known to the Picture class. But, i could be wrong... :) On Jun 4, 1:23 am, Jerry Fan wrote: > bump >

[android-developers] Re: How to read not visible elements of listview

2009-06-04 Thread Streets Of Boston
Have you thought about deleting the item from the Adapter (BaseAdapter/ ListAdapter) or the array that backs the list instead? On Jun 4, 12:22 pm, "narendrasingh.bi...@gmail.com" wrote: > Or can u tell that how can i get the "_id" of a particular item > selected(checked). I tried getSelectedItem

[android-developers] Re: Publishing Paid Apps on Android Market Can Cost You Money

2009-06-04 Thread Streets Of Boston
It's part of the Android distribution agreement. For apps less than $10, Google will automatically refund after a dispute and charge you back for $3.00. For apps of $10 or more, google will do an investigation: You may or may not get the charge-back, depending if the investigation determines that

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