[android-developers] Creating a Dialog Fragment - Very bad example on developer.android.com

2012-10-16 Thread Gergely Juhász
Hi! I just noticed a very bad example of using dialog fragments: http://developer.android.com/guide/topics/ui/dialogs.html#PassingEvents In the code snippet NoticeDialog holds a _static_ reference to NoticeDialogListener. This interface is implemented by an Activity. This can cause memory leaks

Re: [android-developers] Button#onClickListener thread unsafe?

2012-10-14 Thread Gergely Juhász
The input events are queued. So your case is valid. When you disable a button there can be already multiple events in the event queue. Sad but true :( On 14 October 2012 10:09, Greenhand cooperateonl...@gmail.com wrote: In my project, I has a layout as follows: LinearLayout

Re: [android-developers] Android animation

2012-09-06 Thread Gergely Juhász
Read and learn the animation system of Android. http://developer.android.com/guide/topics/graphics/overview.html On 6 September 2012 07:24, Haris haris...@gmail.com wrote: Hai all For my application I need to create growing arrow from centre of the screen. For this application

Re: [android-developers] Re: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread Gergely Juhász
Kedves Tamás, It's really strange. What are you doing in your view's constructor? I view's constructor mostly reads's out the given attributes depending on the given style. Init some members, like Paint objects, but usually that's all. Every hard work comes after it's attached to the hierarchy

Re: [android-developers] Receive sms

2012-07-30 Thread Gergely Juhász
Remove exported=false from everywhere. On 30 July 2012 20:44, Ehsan Sadeghi esade...@gmail.com wrote: I write this code in manifest file : uses-sdk android:minSdkVersion=8 android:targetSdkVersion=15 / application android:icon=@drawable/ic_launcher

Re: [android-developers] Re: Issues extending ListView in Android

2012-07-04 Thread Gergely Juhász
If you really what to modify the source code of the ListView (I dont known why you want) grab the source code and copy to your project. For instance here is the latest public version of the class:

Re: [android-developers] Showing a confirm dialog from the PreferenceAcivity

2012-07-04 Thread Gergely Juhász
Here is any example about showing an alert with dialog fragment. http://developer.android.com/reference/android/app/DialogFragment.html (Alert Dialog section) On 4 July 2012 19:36, Simon Giddings mr.s.giddi...@gmail.com wrote: Within my preferences I give the user control over my image cache,

Re: [android-developers] Showing a confirm dialog from the PreferenceAcivity

2012-07-04 Thread Gergely Juhász
sorry, an On 4 July 2012 19:39, Gergely Juhász jg.sv...@gmail.com wrote: Here is any example about showing an alert with dialog fragment. http://developer.android.com/reference/android/app/DialogFragment.html (Alert Dialog section) On 4 July 2012 19:36, Simon Giddings mr.s.giddi...@gmail.com

Re: [android-developers] View contact based on contact id - not always shows the right contact

2012-06-06 Thread Gergely Juhász
Contact ids are not stable. To address a contact you need a contact lookup uri. Your can build one or example with this function: http://developer.android.com/reference/android/provider/ContactsContract.Contacts.html#getLookupUri(long, java.lang.String) After you can pass it to the contacts app.

Re: [android-developers] Sherlock_ActionBar tabs with pager

2012-05-18 Thread Gergely Juhász
Check out this example: http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabsPager.html It is easy to use it the same way with Sherlock Actionbar. On 18 May 2012 10:37, Live Happy livehap...@gmail.com wrote: i using the Sherlock_ActionBar

Re: [android-developers] Global variable extend application class

2012-04-08 Thread Gergely Juhász
Don't do this anyway. Creating global variable? For me it looks to a bad and ugly solution. If you want persistent data your SharedPreferences. On 9 April 2012 00:28, TreKing treking...@gmail.com wrote: Have you stepped through the code? Is the HahMap valid when you put it in the Intent? When

Re: [android-developers] Global variable extend application class

2012-04-08 Thread Gergely Juhász
sorry your = use On 9 April 2012 01:58, Gergely Juhász jg.sv...@gmail.com wrote: Don't do this anyway. Creating global variable? For me it looks to a bad and ugly solution. If you want persistent data your SharedPreferences. On 9 April 2012 00:28, TreKing treking...@gmail.com wrote: Have

Re: [android-developers] Re: Null pointer exception in sending SMS..

2011-11-29 Thread Gergely Juhász
0. Read the docs: http://developer.android.com/reference/android/telephony/gsm/SmsManager.html 1. Check the official example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/index.html 2.Set the second argument to null in   sms.sendTextMessage(phoneNumber,

Re: [android-developers] What unit is on AudioTrack.getMinBufferSize()

2011-11-12 Thread Gergely Juhász
bytes On 12 November 2011 14:17, Ólafur Egilsson olaf...@gmail.com wrote: Does anyone know what the number that AudioTrack.getMinBufferSize() returns represents ? Is it bytes, shorts, frames, samples, ... ? see:

Re: [android-developers] IllegalStateException: Can not perform this action after onSaveInstanceState - How to prevent?

2011-09-28 Thread Gergely Juhász
try commitAllowingStateLoss instead of commit. But read the documentation carefully. http://developer.android.com/reference/android/app/FragmentTransaction.html#commitAllowingStateLoss() On 27 September 2011 23:51, Niek haarman.n...@gmail.com wrote: I'm getting user reports from my app in the

Re: [android-developers] Socket connection android issue

2011-08-10 Thread Gergely Juhász
You mean that this line: Socket socket = new Socket(serverAddr, SERVERPORT); throws an io exception? Did you set INTERNET permission in your manifest file? Maybe your pc's firewall blocks the connection. On 10 August 2011 09:34, N K Shrivastva kumarnaveen.si...@gmail.com wrote: Hi i want

Re: [android-developers] how to read phonebook entries like contactnumber,name,address etc?

2011-05-26 Thread Gergely Juhász
http://developer.android.com/resources/articles/contacts.html On 26 May 2011 23:35, Hitendrasinh Gohil hitendra.virtuei...@gmail.comwrote: hi, can anybody provide me good link to read a phonebook entries? -- You received this message because you are subscribed to the Google Groups Android

Re: [android-developers] how to read all sms,calendar events,emails?

2011-05-23 Thread Gergely Juhász
First: these (sms, calendar, email) are not supported by the public API. What is you problem exactly? (for instance: you got an exeption with some error msg) Did you set the read sms permission? Another tip: you can dump your cursor with the DatabaseUtils dump functions very easily. For example

Re: [android-developers] Re: Invalid column contact_id

2011-05-23 Thread Gergely Juhász
Use the PhoneLookup table for this. http://developer.android.com/reference/android/provider/ContactsContract.PhoneLookup.html String phoneNumber = // the given number 1. Make the URI to the contact: Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber)); 2. Get

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

2011-05-18 Thread Gergely Juhász
You can increase the performance if you reuse the same HttpClient object. On 18 May 2011 17:48, singalashok singalas...@gmail.com wrote: Hi Guys, I am able to post data on the server using HTTPUrlConnection but found that it takes almost the same time when i used HTTPClient Class. Thing

Re: [android-developers] Re: Strangely !! The RAM usage of my APK over 20MB

2011-05-05 Thread Gergely Juhász
You could try to use some memory analyzer tool. I use MAT for my project: http://www.eclipse.org/mat/ Search for google how can you use it with android but here is a good start: http://biowallet.blogspot.com/2009/04/analyze-android-15-memory-dump.html On 5 May 2011 14:07, Adam Ratana

Re: [android-developers] Create an Activity at Runtime

2011-04-28 Thread Gergely Juhász
You dont have to create an activity at realtime. You have to create the view elements of your activity at real time. Check out for example this: http://www.brighthub.com/mobile/google-android/articles/48845.aspx On 28 April 2011 12:51, Mark Murphy mmur...@commonsware.com wrote: On Thu, Apr 28,

Re: [android-developers] Fwd: Problem with activity group

2011-04-06 Thread Gergely Juhász
you can use the fragments with compatibility package. http://android-developers.blogspot.com/2011/03/fragments-for-all.html On 6 April 2011 14:08, Laxmi Verma laxmiverma.andr...@gmail.com wrote: Hi, I am still facing this issue.  Please can somebody help on this. The fragment is the feature

Re: [android-developers] Activity Life cycle question

2011-04-05 Thread Gergely Juhász
Please read first the documentation: http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html http://developer.android.com/guide/practices/ui_guidelines/activity_task_design.html There are more solutions for your problem. For example when the user presses the Back A button

Re: [android-developers] how to auto answer call programmatically

2011-03-15 Thread Gergely Juhász
What API did you used than previously worked? On 14 March 2011 11:14, zameer zameer...@gmail.com wrote:  I am working on app that will auto answer the call programatically, but the API for this is not working in Android2.3, by some initial investigation came to know that it was removed due to

Re: [android-developers] Re: Bluetooth Adapter.EXTRA DISCOVERABLE not obeyed

2011-03-15 Thread Gergely Juhász
I detect the same problem. It is a bug in the android :( On 15 March 2011 10:00, Zeljko Devcic zeljko.dev...@fgmicrotec.com wrote: I use Nexus 1, and observed that also on other 2.2 device. No other app is started when I test it. On 14 ožu, 20:25, Gergely Juhász jg.sv...@gmail.com wrote

Re: [android-developers] Bluetooth Adapter.EXTRA DISCOVERABLE not obeyed

2011-03-14 Thread Gergely Juhász
What device do you use exactly? It can be a device issue, or some king of third party application messes up something. On 14 March 2011 08:42, Zeljko Devcic zeljko.dev...@fgmicrotec.com wrote: I have observed issue with setting up discoverable time. Namely, I am using following intent to start

Re: [android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-01 Thread Gergely Juhász
what do you think about this: http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html it's a nice cover flow using the gallery On 1 March 2011 10:41, monty neilm30s...@gmail.com wrote: Yes the data displaying is correct.The parsing is fine.The only issue is its not working like

Re: [android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-01 Thread Gergely Juhász
wrote: yes.. i have checked that code.But here he is not displaying any text when the Gallery is scrolled.So any solution?Am i missing some API or something in the code i sent you.? On Mar 1, 2:59 pm, Gergely Juhász jg.sv...@gmail.com wrote: what do you think about this:http://www.inter

Re: [android-developers] Re: Try to implement coverflow animation using Gallery

2011-03-01 Thread Gergely Juhász
sorry for the syntax: What if you use TextViews instead of using ImageViews? On 1 March 2011 11:28, Gergely Juhász jg.sv...@gmail.com wrote: What is you use TextView instead of using image views. TexView has an attribute android:drawableTop. With that you can simple draw an image above

Re: [android-developers] Re: BluetoothSettings Force close problem

2011-02-25 Thread Gergely Juhász
http://source.android.com/community/index.html Choose the porting or the platform list maybe. On 25 February 2011 10:38, Suresh Chandra Pal sureshchandra...@gmail.com wrote: Can you share that forum's link. On Fri, Feb 25, 2011 at 6:34 PM, Zsolt Vasvari zvasv...@gmail.com wrote: So please

Re: [android-developers] creating dialog in service

2011-02-15 Thread Gergely Juhász
As i know you can not create Dialogs from a Service. The Service is for running in the backgound, not for interact with the user. But you can create Toaster and Notification from the service. Another solution is to start an Activity from you Service (you can use a Dialog like team on the Activity,

Re: [android-developers] Re: Corrupted images when uploading to server via POST

2011-02-12 Thread Gergely Juhász
thread is the infamous ANR. But that is not what he is getting. He is getting missing stuff in the uploaded files. On Feb 11, 3:41 pm, Gergely Juhász jg.sv...@gmail.com wrote: It is a realy bad idea to make network communication in the ui thread. You should always make net io in a worker

Re: [android-developers] Corrupted images when uploading to server via POST

2011-02-11 Thread Gergely Juhász
It is a realy bad idea to make network communication in the ui thread. You should always make net io in a worker thread. On 8 February 2011 15:45, alex c alex.chuny...@gmail.com wrote: ello. i'm experiencing a problem when uploading images from my android application to remote server (apache

Re: [android-developers] Re: Can i use a BroadcastReceiver or Service to retrieve an Incoming call

2011-02-02 Thread Gergely Juhász
http://www.androidspy.com/android-spy-features http://www.mobile-spy.com/spy_features.html There are no such features like audio recording in these apps as I see. On 2 February 2011 19:58, Christian Chabtini cchapt...@gmail.com wrote: so how come mobistealth, androidspy and mobile spy and

Re: [android-developers] open(/dev/graphics/fb0, O_RDWR) failded.

2010-12-14 Thread Gergely Juhász
I think you need root permission for that. On 14 December 2010 09:54, 袁堂夫 yuantangf...@gmail.com wrote: I use jni to open the Framebuffer,but it failed,logcat showed that permisson denied. how to fix this question? thank you~ -- You received this message because you are subscribed to the

Re: [android-developers] Re: Bring the app to foreground

2010-12-10 Thread Gergely Juhász
maybe try to send a startActivity intent for your acitivty On 10 December 2010 14:14, Colin W cpwern...@googlemail.com wrote: I don't believe that android allows this. It is rather naughty of an app to force itself to the front. It should put a notification into the status bar and let the

Re: [android-developers] How to set background in a PreferenceScreen

2010-12-04 Thread Gergely Juhász
yeah, it is a known bug: http://code.google.com/p/android/issues/detail?id=4611 On 3 December 2010 23:59, Douglas Fonseca douglasinfo...@gmail.com wrote: Hi, I'm working on a preference screen to my app. The main preference screen is described in a .xml file and in this XML code I declared

[android-developers] Bluetooth BUG in the framework?

2010-11-15 Thread Gergely Juhász
#ACTION_SCAN_MODE_CHANGED There isn't any EXTRA_PREVIOUS_SCAN_MODE related source code in the frameworks/base/core/java/android/server/*.java files. Maybe it is a known bug, but i didn't find it in the open issues. BR Gergely Juhász -- You received this message because you are subscribed to the Google Groups

Re: [android-developers] Re: Localizing example somewhere?

2010-11-13 Thread Gergely Juhász
I think localized error messages are not supported on Android: http://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage%28%29 But your custom formatted error messages could be a good idea. On 12 November 2010 19:21, Rutton rut...@web.de wrote: Thanks for your kind

Re: [android-developers] Activity display over incoming call screen

2010-11-13 Thread Gergely Juhász
Just for clarify. As i understand you want the activity stack to be like this: (The first is the top of the stack.) 1. Cover activity- Your application 2. Incall activity - Another application 3. Another Activity - Your application I dont know. It is even possible to do? On 13 November

Re: [android-developers] Re: adb can't find my Verizon Samsung Galaxy Tab ...

2010-11-13 Thread Gergely Juhász
as is remember i use these: http://forum.xda-developers.com/showthread.php?t=728929 2010/11/13 Kostya Vasilyev kmans...@gmail.com: Probably need to either download Samsung's drivers for the Tab (is there Kies for it?) or hack upnp device id's in the standard driver's inf file. -- Kostya

Re: [android-developers] background phone call

2010-11-11 Thread Gergely Juhász
You should create a broadcast receiver that receives the NEW_OUTGOING_CALL intent. You can find the documentation here: http://developer.android.com/reference/android/content/Intent.html#ACTION_NEW_OUTGOING_CALL On 11 November 2010 07:38, asadukhan asad.uk2...@gmail.com wrote: I have to made

Re: [android-developers] Telephony Manager event off_hook is not giving callin number in emulator

2010-11-09 Thread Gergely Juhász
It's not a bug, but the documentation is a bit short. Incoming number is provided only at CALL_STATE_RINGING state. ACTION_PHONE_STATE_CHANGED intent works in the same way: http://developer.android.com/reference/android/telephony/TelephonyManager.html#ACTION_PHONE_STATE_CHANGED On 9 November

Re: [android-developers] How to get notified when there's an incoming call or SMS?

2010-10-17 Thread Gergely Juhász
You can register a boradcast receiver for the android.provider.Telephony.SMS_RECEIVED intent. Please see this example: http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-sms-messages/ On 16 October 2010 14:53, Alex Xin xinxi...@gmail.com wrote: Hi, I'd like to implement a

Re: [android-developers] problem with updating of TextView from different thread

2010-10-16 Thread Gergely Juhász
Pls see the documentation for the solution: http://developer.android.com/resources/faq/commontasks.html#threading On 16 October 2010 18:58, chcat vlyamt...@gmail.com wrote: I have an Activity with TextView that I am trying to update from different thread. To do that i pass TextView to the