[android-developers] Can this variable become null?

2013-02-25 Thread user123
I have an instance variable in a singleton class which I'm using in all the app. It's basically a global configuration parameter. I initialize it in the first (launcher) screen of the app. The app will not continue without this initialization (where it's sure that the variable is not null).

[android-developers] Is there a method to force the web browser of android render a multiple select box desktop way?

2013-02-25 Thread J
Thanks all! 发自我的 iPhone -- -- 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] Creating a view divider with default holo color

2013-02-25 Thread dashman
I'd like to create a view divider with a background color of holo accent color View android:id=@+id/div1 android:layout_width=match_parent android:background=# android:layout_height=2dp / how can i do that i.e. not hardcoding it. something

[android-developers] replacing ParcelFileDescriptor.createPipe() on pre-9 API levels

2013-02-25 Thread Latimerius
Hello, I've got code that uses ParcelFileDescriptor.createPipe(). However, that function was only introduced in API Level 9 and I need to make my code work down to API Level 7. The function doesn't seem to be available from the support library. It's mostly implemented in native code so its

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

2013-02-25 Thread bob
You are not using the singleton pattern properly. You should access it with a getInstance method which will initialize it if it is null. On Monday, February 25, 2013 3:52:30 AM UTC-6, user123 wrote: I have an instance variable in a singleton class which I'm using in all the app. It's

Re: [android-developers] Re: Draw 2d circle ontouch android

2013-02-25 Thread bob
I guess you inadvertently divided it by 2? On Saturday, February 23, 2013 3:10:06 PM UTC-6, Numair Qadir wrote: Wow.. Thank you .. Very detailed and helpful answer.. Helped me a lot.. The problem was the calculation of radius from the points.. Thanks again :) On Fri, Feb 22, 2013 at

Re: [android-developers] Box2d on Android

2013-02-25 Thread bob
Thanks. Looks like there is a book on this: http://www.amazon.com/AndEngine-Android-Game-Development-Cookbook/dp/184951898X/ The price of the Kindle version looks reasonable. On Saturday, February 23, 2013 10:39:10 AM UTC-6, mbanzon wrote: Most examples of Box2D on Android I've seen use

[android-developers] Re: Hiding media files from Music Player

2013-02-25 Thread Brill Pappin
I'm testing for the problem right now, and it most defiantly is *not* working for me. at least the .foldername is not working and I am now experimenting with .nomedia. I'm using the download manager for this and it actually looks like the download manager is marking the file as scannable by

[android-developers] Facebook Login MainFragment Android App froze

2013-02-25 Thread blitz
I setup FB Login into an Activity and also created a class MainFragment.java which follows FB's tuturial perfectly. Found here: https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/ The login works well, but the App is stuck in the Fragment and therefore the rest of

[android-developers] native_drawArc src

2013-02-25 Thread bob
can someone help me see what the easiest way to view the source code for functions such as these is: native_drawArc Preferably, I would like to be able to jump to it in Eclipse. Thanks. -- -- You received this message because you are subscribed to the Google Groups Android Developers group.

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

2013-02-25 Thread TreKing
On Mon, Feb 25, 2013 at 3:52 AM, user123 ivanschu...@gmail.com wrote: And I'm wondering, if there's any case where I can get a null pointer? Because e.g. the system kills the app while it's in the background, and tries to restart it in the last screen - since the variable is only initialized

[android-developers] Re: replacing ParcelFileDescriptor.createPipe() on pre-9 API levels

2013-02-25 Thread Nobu Games
Can you use http://developer.android.com/reference/java/nio/channels/Pipe.html instead? On Monday, February 25, 2013 8:03:50 AM UTC-6, latimerius wrote: Hello, I've got code that uses ParcelFileDescriptor.createPipe(). However, that function was only introduced in API Level 9 and I need

[android-developers] Does File.exists() work for external memory?

2013-02-25 Thread Brill Pappin
I've run across a situation where File.exists() doesn't seem to work as expected for external memory. I have not tested in depth yet, but I'm wondering if anyone else has seen this happen? -- -- You received this message because you are subscribed to the Google Groups Android Developers

[android-developers] Re: Security lock replacement

2013-02-25 Thread Brill Pappin
Nope, you can't do it because of the security risks. However, there are a lot of apps that run on top of the lock screen using some sort of trickery. You could also do it in a Custom ROM because you could make it part of the system. - Brill On Friday, 22 February 2013 03:59:58 UTC-5,

[android-developers] creating menu for android game

2013-02-25 Thread Дмитрий Тимошенко
I'd like to create menu for my game like in pictures where MI1 is any item with an image, it is clicable and after click there will apear menu like at an image1 where I1-I5 are clickable items with images. I'm new with android games can you say me any ideas about how to do it?

Re: [android-developers] How to enable data roaming programmatically?

2013-02-25 Thread Brill Pappin
No. Most people would be upset if roaming was turned on without them realizing the consequences. Even if you have the best intentions, its one of those things that is locked out for a reason. On Thursday, 21 February 2013 22:00:24 UTC-5, Suraj wrote: Is there a way to turn on data roaming

[android-developers] Re: Alternative SQLite

2013-02-25 Thread Brill Pappin
I don't think I'd every use HSQLdb on a mobile device. I only ever used it on servers and desktops as an experimental DB. On Wednesday, 20 February 2013 15:25:39 UTC-5, Tim wrote: Dear Sagar, Could I suggest you have a look at the MobiForms Developer. MobiForms is a rapid application

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

2013-02-25 Thread user123
No, no, the question is not about the singleton itself. It's about an instance variable of the singleton. Am Montag, 25. Februar 2013 16:36:39 UTC+1 schrieb bob: You are not using the singleton pattern properly. You should access it with a getInstance method which will initialize it if

[android-developers] Re: Alternative SQLite

2013-02-25 Thread Brill Pappin
It would be *possible* to create a wizard for SQLite, but most android developers simply learn how their chosen language works. Even if we had a wizard to do it for us, I am pretty sure that in 99% of anything I've written, I'd quickly have to abandon it for some customization. On Tuesday, 19

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

2013-02-25 Thread user123
Ok, thanks. I couldn't reproduce this case, so I wasn't sure. I'll handle it in other way then. Am Montag, 25. Februar 2013 17:34:43 UTC+1 schrieb TreKing: On Mon, Feb 25, 2013 at 3:52 AM, user123 ivans...@gmail.com javascript: wrote: And I'm wondering, if there's any case where I can

[android-developers] Re: How to launch a process as a different user?

2013-02-25 Thread Brill Pappin
Wouldn't that cause a security issue? On Thursday, 21 February 2013 02:31:25 UTC-5, Put_tiMe wrote: I want to launch a native process, from Java code, using RuntimeInstance.exec. But the problem is, the new native process gets launched under user me. I want the new process to run as user

Re: [android-developers] Alternative SQLite

2013-02-25 Thread Kristopher Micinski
There are also tons of ORM solutions that run atop SQLite, so you might look into those as well. Kris On Tue, Feb 19, 2013 at 9:14 AM, Sagar Rout sagar.rout...@gmail.com wrote: Hello friends, is there any solution for the alternative of SQlite database so that we can drag and drop and the

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: creating menu for android game

2013-02-25 Thread bob
Compute the distance from the touch point to the center of the circle. If it's less than the radius, the user is selecting that option. Maybe use this function in the Math class? public static native double *hypot*(double x, double y); On Thursday, February 21, 2013 11:42:32 AM UTC-6,

[android-developers] Re: Update UI of Android

2013-02-25 Thread bob
Maybe call the invalidate() method of the widget? On Saturday, February 23, 2013 11:54:03 PM UTC-6, abhay_401 wrote: Hi, I want to update the UI, onclick of widget. How can we achieve this. I tried but it's not working. Can anyone is having idea on this. -- -- You received this

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

2013-02-25 Thread user123
Ok, thanks, this was exactly what I needed to know. The case where the system kills the app while being in the background and not in first screen. Am Montag, 25. Februar 2013 18:21:27 UTC+1 schrieb Streets Of Boston: In addition to Treking's answer; Never rely on the order in which (you

[android-developers] Re: native_drawArc src

2013-02-25 Thread RichardC
It's C/C++ you will need to pull down the AOSP source and try and find it by hand (grep) - after a while you will get to find your way about. On Monday, February 25, 2013 4:30:51 PM UTC, bob wrote: can someone help me see what the easiest way to view the source code for functions such as

Re: [android-developers] Re: replacing ParcelFileDescriptor.createPipe() on pre-9 API levels

2013-02-25 Thread Latimerius
On Mon, Feb 25, 2013 at 5:42 PM, Nobu Games dev.nobu.ga...@gmail.comwrote: Can you use http://developer.android.com/reference/java/nio/channels/Pipe.htmlinstead? Hm, I need this for a ContentProvider.openAssetFile() implementation which ultimately has to return an AssetFileDescriptor. I

[android-developers] Avoiding the dreaded ANR background work

2013-02-25 Thread stanlick
I have been experimenting with an easy way to execute synch type bursts without all the hassle of Services, Loaders, Threads, etc. I have come up with a technique that works great, but I'd like to get a consensus regarding the pattern. I am performing sendBroadcast(synch.my.app) from the

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

2013-02-25 Thread Larry Meadors
That works pretty well, but I'd suggest you read up on using the MVP pattern to keep your activities from becoming an unmanageable cluster of spaghetti-code. I'm in the process of refactoring a bunch of code to do that now, and it makes unit testing them super simple. In my case, the activity

[android-developers] Re: Widget on click....

2013-02-25 Thread bob
Maybe use android.widget.ToggleButton? On Saturday, February 23, 2013 12:11:58 AM UTC-6, abhay_401 wrote: Hi, Actually I want something like, toggle button type widget. When the user clicks on widget i want to change the widget background or layout so that user will know the on/off

[android-developers] Android ScreenSaver

2013-02-25 Thread Daniel Morsoleto
Hello. I'm doing a marketing action for a client, where a video should run on a tablet with android and tapping the tablet customers can browse it usually equal to what has been in stores today. Does anyone know if there is an app that does this? Or a tuto on how to do this kind of app?

[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: Facebook Login MainFragment Android App froze

2013-02-25 Thread blitz
I figured it out. I was suppose to create a separate xml for the Fragment. On Monday, February 25, 2013 9:56:05 AM UTC-6, blitz wrote: I setup FB Login into an Activity and also created a class MainFragment.java which follows FB's tuturial perfectly. Found here:

[android-developers] Can one upgrade to the latest android on an older phone?

2013-02-25 Thread Anil
I have a 2 year old android phone HTC Mytouch 3G Slide that HTC stopped updating android on - last update was android 2.2. I want to use it to develop apps and wondered if I can update android to the latest version, or is there some dependency that would prevent me from doing so. The phone is

[android-developers] Widget onClick is not working

2013-02-25 Thread saex
I want that when the user press on the widget, the widget stops itself, and when the user press again, the widget put ON his functions i'm using the solution of this post to achieve onClick on my widget: http://stackoverflow.com/questions/2748590/clickable-widgets-in-android The solution

[android-developers] Widget onClick is not working

2013-02-25 Thread saex
Hi all I want that when the user press on the widget, the widget stops itself, and when the user press again, the widget put ON his functions i'm using the solution of this post to achieve onClick on my widget: Clickable widgets in

[android-developers] Best way to apply complex actions to view during pressed state?

2013-02-25 Thread user123
I want to apply certain transforms to a view and it's children during pressed state, e.g. a color filter. As far my current knowledge, I can't do this using StateListDrawable or XML configuration. The concrete situation: A GridView where the cells have a background drawable, an ImageView,

[android-developers] Re: Best way to apply complex actions to view during pressed state?

2013-02-25 Thread bob
You need to process ACTION_CANCEL. If a user presses the button and slides his finger off the button before lifting it up, that's a cancel. On Monday, February 25, 2013 4:51:18 PM UTC-6, user123 wrote: I want to apply certain transforms to a view and it's children during pressed state,

[android-developers] Re: Android ScreenSaver

2013-02-25 Thread bob
I'd look at the VideoView sample in apidemos. On Monday, February 25, 2013 1:27:52 PM UTC-6, Daniel Morsoleto wrote: Hello. I'm doing a marketing action for a client, where a video should run on a tablet with android and tapping the tablet customers can browse it usually equal to

[android-developers] accessing data downloaded by another app

2013-02-25 Thread dashman
My app requires the use of database that's relatively large. I was thinking of creating a separate app - that downloads the files. But if one app downloads a file - can another app access it? Thanks. -- -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: MediaController not visible for VideoView in Dialog

2013-02-25 Thread Swap
hello, Is your problem of mediacontroller is solve? On Monday, 25 June 2012 23:13:11 UTC+2, Vance Turnewitsch wrote: Hi, I am displaying a VideoView in a custom Dialog I am creating. I am attaching a MediaController to the VideoView, but the MediaController won't show up when

Re: [android-developers] accessing data downloaded by another app

2013-02-25 Thread Larry Meadors
Just use a command service. Larry On Mon, Feb 25, 2013 at 4:25 PM, dashman erjdri...@gmail.com wrote: My app requires the use of database that's relatively large. I was thinking of creating a separate app - that downloads the files. But if one app downloads a file - can another app

Re: [android-developers] Can one upgrade to the latest android on an older phone?

2013-02-25 Thread Kevin Duffey
Your best bet is to search Google to see if there is a rom for your phone and if it can be rooted. If there is one you'll need to root your phone then replace the default rom with the updated one. Look for cynogen or something like it. On Feb 25, 2013 12:52 PM, Anil anil.r...@gmail.com wrote: I

Re: [android-developers] accessing data downloaded by another app

2013-02-25 Thread dashman
command service is that a special kind of a service. or are you just saying use a service. -- -- 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

Re: [android-developers] accessing data downloaded by another app

2013-02-25 Thread Kristopher Micinski
What's the motivation for having a separate app versus your own? Kris On Mon, Feb 25, 2013 at 7:51 PM, dashman erjdri...@gmail.com wrote: command service is that a special kind of a service. or are you just saying use a service. -- -- You received this message because you are subscribed

[android-developers] Re: Is there a method to force the web browser of android render a multiple select box desktop way?

2013-02-25 Thread Jim Qiu
Hi all, I want the android browser render HTML select multiple='multiple' / in the destop style, is there a solution to achieve this ? Best regards, Jim On Mon, Feb 25, 2013 at 6:45 PM, J bluefishe...@gmail.com wrote: Thanks all! 发自我的 iPhone -- -- You received this message because you

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

2013-02-25 Thread Lew
bob wrote: You are not using the singleton pattern properly.\ If you're using the Singleton pattern, you aren't using it correctly. You should access it with a getInstance method which will initialize it if it is null. You should initialize the variable in the class initialization and

[android-developers] specify account for ContactsContract editor

2013-02-25 Thread Peri Hartman
From my app, I want to invoke the Contacts editor to allow the user to add a new contact. I want to find a way for the app to pass to the editor an account to be used. How can this be done? I have not found any documentation on how to do this. I did find some code on github which shows a

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

2013-02-25 Thread William Ferguson
You should access it with a getInstance method which will initialize it if it is null. You should initialize the variable in the class initialization and declare it 'final'. There are times when you cannot do this, in which case probably Singleton is the wrong choice. For the rest

[android-developers] TextView vs Button

2013-02-25 Thread Seshu
Hi All, I have one textview and one button. i know the purpose of both views but if i used background image and displayed text on both then both r looking same only. Is there any particular point which differentiate them. Thanks for all, Thanks and Regards, S.Seshu -- -- You received

[android-developers] How do I find reminders of future calendar events and remove if needed?

2013-02-25 Thread don rhummy
When I query the content resolver for Events.CONTENT_URI, it correctly shows me future events. But when I query for Reminders.CONTENT_URI, it only shows me reminders that have occurred already. I want to find if a future event has a reminder and allow the user to remove it if needed. How do I

[android-developers] 15th February payment delayed?

2013-02-25 Thread Héctor Júdez
Have you received the half month payment of February 2013? I am in Europe and I have still not received the money and 11 days have passed already. -- -- 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: TextView vs Button

2013-02-25 Thread skink
Seshu wrote: Hi All, I have one textview and one button. i know the purpose of both views but if i used background image and displayed text on both then both r looking same only. Is there any particular point which differentiate them. Thanks for all, Thanks and Regards, S.Seshu