Re: [android-developers] Re: Android beginner
the same kind of error is the one which i get when i downgrade my app from 2.2 to 2.1 and i am not using any specific library. I have done all the changes like in manifest file and project properties then cleaned the project and still it gives the error. I dont knw much how to debug but all i can give you the information is that the splash screen comes up in 2.1 and when it disappears then i get force close due to null pointer while all this work fine in 2.2 On Wed, Feb 2, 2011 at 1:25 PM, Thomas thomasjakw...@gmail.com wrote: You tried to access an object you haven't constructed yet, meaning you're using only a reference. The reference has to be constructed or point to an object somewhere, should look like this: Foo f = new Foo(); f.func(); if you just have: Foo f; f.func(); You're trying to access memory that isn't there. The line: new Foo(); Allocates memory and points the reference 'f' to it. f can then be used to access that memory. Its called a nullpointerexception because currently your reference is pointing to a null memory address (invalid). On Feb 1, 9:16 pm, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi, I get following compile time error, pls give any solutions [2011-02-02 10:37:46 - Mcatalog] Unknown error: java.lang.NullPointerException Thanks and regards, subha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Post on Facebook wall post for beginner
I am new to the world of sharing stuff on facebook. My target for today is to make a simple application which has a Post to FB button . When the user clicks on it then a hard coded String from java file is displayed on the user's profile ; after logint to the facebook account and creating a session. Is there any simple beginner tutorial for this cause what i find on net is quite complex. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: viewgroup and view
yes they are. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] APIs for stereoscopic camera support in Android 3.0?
Apparently, some Honeycomb (Android 3.0) tablets like the T-Mobile G- Slate are coming out with dual rear-facing cameras for stereoscopic video recording http://www.androidpolice.com/2011/02/01/t-mobile-releases-details-and-images-of-the-lg-g-slate-honeycomb-tablet/ I'd like to do some depth mapping and other real-time processing of the live stereo video feed, but cannot find the relevant APIs for working with stereoscopic camera input in the Android 3.0 Preview SDK. Am I missing something, is it coming with the final Android 3.0 SDK, or is this again a manufacturer's proprietary extension that is not (yet) covered by an official Android 3.0? I know that Android 3.0 has support for multiple cameras, but that is here insufficient to tell for instance which cameraId represents the left camera and which cameraId represents the right camera. Camera.CameraInfo currently only offers CAMERA_FACING_BACK and CAMERA_FACING_FRONT, which is irrelevant here. In the Preview SDK there is no Camera.CameraInfo.CAMERA_FACING_LEFT or Camera.CameraInfo.CAMERA_FACING_RIGHT or generalization thereof as needed to prevent a possible fragmentation of conventions. Thanks! The vOICe for Android http://www.seeingwithsound.com/android.htm -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Diacritics/international characters in AutoCompleteTextView
You could implement your own filter, by overriding getFilter() in your adapter, and implementing a Filter that does what you want. http://developer.android.com/reference/android/widget/Filterable.html#getFilter() (various adapter classes implement Filterable) http://developer.android.com/reference/android/widget/Filter.html (this is what does the filtering) -- Kostya 02.02.2011 10:50, svebee пишет: I have a (array) list Car Something Šibica Čavao Cavao Is there a way to force AutoCompleteTextView so if user type in letter c it would show Car Čavao Cavao so it would show standard letter and international letter (C and Č/Ć, S and Š, Z and Ž, D and Đ). -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Disable dictionary on softkeyboard ?
Hello, my target version is still 1.6, how can i prevent the dictionary to appear ? I want that the user simply enters text as he types it. Since SDK Target Version 5 theres the Option android:inputType=textNoSuggestions EditText android:id=@+id/codeTextfield android:hint=@string/ main_pleaseEnterBarcode_Hint android:layout_height=fill_parent android:layout_width=fill_parent android:layout_weight=0.7 android:singleLine=true android:textSize=20dp android:inputType=text android:focusable=true android:autoText=false android:imeOptions=actionSearch / best regards, Jens -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to sort HashMap?
It should *really* be: ArrayListyourItemClassNameHere list = new ArrayListyourItemClassNameHere(); This is type safe, as the array above knows that it keeps a list of yourItemClassName - whereas plain ArrayList only knows that it keeps a list of Object's. The angle brackets above is a sign of a *generic* class, you should learn more about them, and btw, your previous code with HashMaps also used them. Plenty of tutorials on this exist, this one seems pretty good: http://en.wikipedia.org/wiki/Generics_in_Java Oh, and as for the runtime error - start by checking the logcat. -- Kostya 02.02.2011 8:48, Mystique пишет: sorry shd be: ArrayList qqq = new ArrayList(); -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] WiFi Error/Unable to connect in AVD
Kim, I have a *very* WiFi specific application, and never knew you could get *any* support for WiFi in the emulator! FWIW, I implemented my own emulation code, so I could use the emulator to test the UI on various screen sizes: http://kmansoft.wordpress.com/2010/07/27/debugging-wifi-in-the-emulator/ -- Kostya 02.02.2011 8:51, Kim пишет: About a month ago I stopped being able to test my app on the AVDs because it would not connect to WiFi. My app uses WiFi heavily. When I open a 2.1 AVD and go into Settings|Wireless and Networks and click on Wi-Fi it says Unable to connect to wifi. In a 2.2 AVD it just says Error. Additional info: I went to another computer that I was using last fall for development and it has the same problem. I never updated it, so I don't think it is related to HoneyComb, Samsung Tab add-in or any other newer update. They are both on the same LAN. I know I must be doing something dumb. Any ideas? I have been doing all of my debugging on actual devices lately, so I didn't think much of it, but now I would like to do some screenshots. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Samsung Fascinate AVD definition
02.02.2011 10:34, Anindo Ghosh пишет: Kostya, I've read other posts by you and your blog, you are probably one of the most helpful people in the Android community I've found so far. Thank you for being there! Thanks. A perfect contrast to TreKing, who has been rather aptly described by the original poster, so I won't bother. TreKing is like an army drill sergeant, he makes people figure things out themselves. And that is very valuable, and is a special talent in itself. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Nested layouts in separate XML
Well, thanks for the link, this seems to work fine. However - about the reopening the 2 years old thread - searching only provided obsolete results, most referring to the technique Selmi gave a link above. I am glad this changed meanwhile, however it is hard to find, no reference in the Dev Guide either. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to develop new android apps considering that the app will also be developed for other phones
There are plenty of platform out there that attempt this. Having tried many, and even having been involved in building frameworks to cover multiple devices I don't recommend any of them unless you are doing really trivial applications or you are in a position to negotiate enterprise level support with the provider. A framework is no use to you unless there is someone there to jump in and fix the issues you are bound to have with it. What you can do is to write pretty general code across the various Java environments (Android, Symbian, Blackberry). Bearing in mind that even for each of these platform the API's vary from one generation to another. You can then take this general code and hook it up to the UI / threading model associated with ever platform / generation. If you're going for games the most general thing you can do is to pick the lowest supported OpenGL revision for your render loops. Then at least porting this code between the platforms becomes pretty easy. But as always I recommend starting small on one platform that you can easily support, and expanding outwards from there. On Feb 2, 7:33 am, Streets Of Boston flyingdutc...@gmail.com wrote: This problem you describe is hard. If you find the magic bullet, you'd be rich. However, others have tried to solve this problem: I'm not sure which platforms (i.e. phones) are currently supported by each of them, but try to use PhoneGap, AppCelerator, RhoMobile, etc. or just plain HTML5. On Feb 1, 8:37 pm, Christian Chabtini cchapt...@gmail.com wrote: Hi, I want to know what kind of general strategy i would have to follow while developing android apps in order to easily make my app available to other phones .. in other words easily transferable. For example, i would like to know the basic strategy i need to follow to make an app available to an iphone OS,blackberry OS, Windows and Nokia. It would be nice to develop an app that translates existing apps from one phone to another despite the differences in libraries, languages and security... not to mention hardware.. thats another s Just want to make sure that i am starting my project right --- - Thank you, Christian Chabtini Software Engineer EMIDA -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Get RSSI of surrounding wireless networks
Hi, Is it possible to get the RSSI of surrounding wireless networks without doing a full scan? I need periodic updates about surrounding networks perhaps every 5 seconds. Can't do a scan that often. Using aidl would work if the info is available anywhere. /Schoel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Get RSSI of surrounding wireless networks
The results of a most recent scan are available by calling getScanResults, even if your application didn't start a scan, that's probably the best you can do without initiating a scan. However, if there is an active connection, then AFAIK, Android doesn't initiate scans on its own. If there is none, and WiFi is enabled, it does periodic scans looking for known networks, but not as often as 5 seconds. Also scanning, I believe, is an explicit process that has to be initiated with the WiFi radio chip, it doesn't just happen as a side product of it being enabled. So - in short - no. If you need to reliably get surrounding networks, you've got to initiate scanning, or rethink why you need it so often. -- Kostya 02.02.2011 13:09, Schoel пишет: Hi, Is it possible to get the RSSI of surrounding wireless networks without doing a full scan? I need periodic updates about surrounding networks perhaps every 5 seconds. Can't do a scan that often. Using aidl would work if the info is available anywhere. /Schoel -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Can't properly stop a thread
In my application I am connecting to a server and downloading some things. Not much but the connection it self takes a while. Off course this is done in a thread (class that implements runnable). If some error occurs, the thread sends a message to the UI using a Handler and the UI displays an dialog window. My problem is that I can't stop the thread in the UI properly. For example if during the connection I would press the 'home' button on the phone, after some seconds I get an error saying that my application couldn't create a dialog window (because it is not running anymore). That means that my thread was not stopped and kept on working until an error (i.e. timeout) occurred and tried to send a massege to the UI by a handler. to Stop the thread I have a function that I found: public synchronized Thread stopThread(Thread thr){ if(thr != null){ Thread temp = thr; thr = null; temp.interrupt(); } return thr; } And I use it like: @Override public void onDestroy() { super.onDestroy(); senderTh= stopThread(senderTh); finish(); } Why this doesn't stop my Thread? How can I do it from the UI? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Can't properly stop a thread
Adam, interrupt() doesn't necessarily stop a thread right then and there. It sets an internal flag, which can be checked with isInterrupted(). If your thread happens to call wait() or sleep(), then this flag will be turned into an InterruptedException. Also this flag is reset after isInterrupted() returns true. Given this, it might be better to implement your own flag that tells the thread that it should stop what it's doing and exit. However, if the thread is inside a network call, it might not see the flag for a while. So one other fix is needed - add code to your thread (such as setting the handler to null) that tells it that the UI has gone away, and that it shouldn't try to update it. You could also use AsyncTask rather than rolling your own thread, which has a method to cancel. Note however that prior to 2.2., this method has a race condition, and may occasionally not work properly. -- Kostya 02.02.2011 14:07, Serdel пишет: In my application I am connecting to a server and downloading some things. Not much but the connection it self takes a while. Off course this is done in a thread (class that implements runnable). If some error occurs, the thread sends a message to the UI using a Handler and the UI displays an dialog window. My problem is that I can't stop the thread in the UI properly. For example if during the connection I would press the 'home' button on the phone, after some seconds I get an error saying that my application couldn't create a dialog window (because it is not running anymore). That means that my thread was not stopped and kept on working until an error (i.e. timeout) occurred and tried to send a massege to the UI by a handler. to Stop the thread I have a function that I found: public synchronized Thread stopThread(Thread thr){ if(thr != null){ Thread temp = thr; thr = null; temp.interrupt(); } return thr; } And I use it like: @Override public void onDestroy() { super.onDestroy(); senderTh= stopThread(senderTh); finish(); } Why this doesn't stop my Thread? How can I do it from the UI? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Can't properly stop a thread
Hey Kostya can async task be the reason i can not properly play my application in 2.1 while it works fine in 2.2?? On Wed, Feb 2, 2011 at 4:54 PM, Kostya Vasilyev kmans...@gmail.com wrote: Adam, interrupt() doesn't necessarily stop a thread right then and there. It sets an internal flag, which can be checked with isInterrupted(). If your thread happens to call wait() or sleep(), then this flag will be turned into an InterruptedException. Also this flag is reset after isInterrupted() returns true. Given this, it might be better to implement your own flag that tells the thread that it should stop what it's doing and exit. However, if the thread is inside a network call, it might not see the flag for a while. So one other fix is needed - add code to your thread (such as setting the handler to null) that tells it that the UI has gone away, and that it shouldn't try to update it. You could also use AsyncTask rather than rolling your own thread, which has a method to cancel. Note however that prior to 2.2., this method has a race condition, and may occasionally not work properly. -- Kostya 02.02.2011 14:07, Serdel пишет: In my application I am connecting to a server and downloading some things. Not much but the connection it self takes a while. Off course this is done in a thread (class that implements runnable). If some error occurs, the thread sends a message to the UI using a Handler and the UI displays an dialog window. My problem is that I can't stop the thread in the UI properly. For example if during the connection I would press the 'home' button on the phone, after some seconds I get an error saying that my application couldn't create a dialog window (because it is not running anymore). That means that my thread was not stopped and kept on working until an error (i.e. timeout) occurred and tried to send a massege to the UI by a handler. to Stop the thread I have a function that I found: public synchronized Thread stopThread(Thread thr){ if(thr != null){ Thread temp = thr; thr = null; temp.interrupt(); } return thr; } And I use it like: @Override public void onDestroy() { super.onDestroy(); senderTh= stopThread(senderTh); finish(); } Why this doesn't stop my Thread? How can I do it from the UI? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Schedule notification instead of permanently check
Today I read this on googles documentation: Broadcast Receivers listening for boot completed The system delivers the ACTION_BOOT_COMPLETED broadcast before the external storage is mounted to the device. If your application is installed on the external storage, it can never receive this broadcast. I don't know why it worked in past, cause I used the same device (emulator) with sdcard all the time, but this seems to be the reason why this broadcast is never received. Now I have 2 possibilities: 1. remove the possibility to install the app on external storage (I wanted to support App2SD...). Then the broadcast should be received. 2. find another indicator to start my service, e.g. ACTION_EXTERNAL_APPLICATIONS_AVAILABLE (I prefer this, are you with me?) 3. Do you have an other idea? Detailled infos: http://developer.android.com/guide/appendix/install-location.html What would you do? Thanks a lot! -Danny On Feb 1, 11:40 am, Danny S. danny.schi...@googlemail.com wrote: OMG, today I determined, that my BootReceiver is not called again :'( But I changed nothing in relation with this :( it looks like an issue to me. I don't do anything in the onReceive yet, only log out something. This morning it worked very well then I started to implement code to start my applications service within the receiver. That worked very well. I used the context.getApplicationContext() to start the Service. This worked for me, then I tried to change to start the service with context instead of application context. From this moment on I've seen no output for onReceive. The broadcast receiver is never called when the device booted. I build it back to version with only log output implementation in the onReceive method. But I still dont get it to work again. I tried to use a completely new created emulator, but nothing changed :-( I don#t think I am doing something wrong here, cause I got it to work in past... -Danny S. On Jan 27, 4:33 pm, Danny S. danny.schi...@googlemail.com wrote: Hi together, using a second receiver worked for me: ... receiver android:name=.AlertReceiver / !-- only for device is booted detection: -- receiver android:name=.BootedReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver ... I am confused doing it this way. I would have preferred using only one receiver for handling corresponding actions but it seems this is the only way... Maybe it has to be like this, but somebody would explain to me ;-) Thanks! -DannyS. On 27 Jan., 16:19, DannyS. danny.schi...@googlemail.com wrote: Kostya, yeah, I am with you and think my AndroidManifest looks correct. I figured out too, that all data get lost when Wipe user data is enabled. I started the emulator always without Wipe user data but it does not work. Maybe it is an emulator problem... I can try to figure out on my real device and show up a notification with information about intent's action when onReceive() is called. I temporery implemented notification output and tested it on emulator. One for boot action and one for any other. In any case there should be a notification but when I restart the emulator nothing happened... onReceive is not called. As said I'll try with my real device and give response ASAP. If it does not work I try using a second receiver that handles the boot action and nothing else... hope I can solve the problem soon ;-) Thanks for your help! -DannyS. On 27 Jan., 15:23, Kostya Vasilyev kmans...@gmail.com wrote: Danny, Your app's manifest for the broadcast action, as well as the permission, look fine. When you start the emulator, make sure you don't have Wipe user data enabled, as that will erase the application, so it won't be available at boot. Other than that, maybe you're just not seeing the logcat message? Try doing something more visible, like a notification or starting an activity. -- Kostya 27.01.2011 16:49,DannyS. пишет: Hi Kostya, I removed the category, but have still the same issue: boot completed is never recognized. You said you dont see the other action. I create the Broadcast- Intent and put it into PendingIntent.getBroadcast(), without a action in AndroidManifest: ... alertReceiverIntent = new Intent(this, AlertReceiver.class); alarmSender = PendingIntent.getBroadcast(this, task.getId(), alertReceiverIntent, 0); // insert a new alert mAlarmManager.set(AlarmManager.RTC_WAKEUP, deliverTime, alarmSender); ... The receiver is used like expected, onReceive() is called, but never when the device came up. I can try using a second receiver if it is ever possible, only for boot recognization.
Re: [android-developers] Can't properly stop a thread
02.02.2011 14:27, Robin Talwar пишет: Hey Kostya can async task be the reason i can not properly play my application in 2.1 while it works fine in 2.2?? More on the bug in AsyncTask.cancel: http://groups.google.com/group/android-developers/browse_thread/thread/07ea01892ee7a5f4 Fixed post-Froyo, so not in Froyo, sorry for misquoting before. So the bug in your application can't be related to this, since there is no change *in* Froyo, only *post* Froyo. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Schedule notification instead of permanently check
Danny, According to this: http://developer.android.com/reference/android/content/Intent.html#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE The extra data EXTRA_CHANGED_PACKAGE_LIST contains a list of packages whose availability changed. The extra data EXTRA_CHANGED_UID_LIST contains a list of uids of packages whose availability changed. *Note that the packages in this list do not receive this broadcast.* So you might want to run some tests before relying on this broadcast. I see that Mark Murphy submitted a documentation bug for this: http://code.google.com/p/android/issues/detail?id=8485 -- Kostya 02.02.2011 14:31, Danny S. пишет: Today I read this on googles documentation: Broadcast Receivers listening for boot completed The system delivers the ACTION_BOOT_COMPLETED broadcast before the external storage is mounted to the device. If your application is installed on the external storage, it can never receive this broadcast. I don't know why it worked in past, cause I used the same device (emulator) with sdcard all the time, but this seems to be the reason why this broadcast is never received. Now I have 2 possibilities: 1. remove the possibility to install the app on external storage (I wanted to support App2SD...). Then the broadcast should be received. 2. find another indicator to start my service, e.g. ACTION_EXTERNAL_APPLICATIONS_AVAILABLE (I prefer this, are you with me?) 3. Do you have an other idea? Detailled infos: http://developer.android.com/guide/appendix/install-location.html What would you do? Thanks a lot! -Danny On Feb 1, 11:40 am, Danny S.danny.schi...@googlemail.com wrote: OMG, today I determined, that my BootReceiver is not called again :'( But I changed nothing in relation with this :( it looks like an issue to me. I don't do anything in the onReceive yet, only log out something. This morning it worked very well then I started to implement code to start my applications service within the receiver. That worked very well. I used the context.getApplicationContext() to start the Service. This worked for me, then I tried to change to start the service with context instead of application context. From this moment on I've seen no output for onReceive. The broadcast receiver is never called when the device booted. I build it back to version with only log output implementation in the onReceive method. But I still dont get it to work again. I tried to use a completely new created emulator, but nothing changed :-( I don#t think I am doing something wrong here, cause I got it to work in past... -Danny S. On Jan 27, 4:33 pm, Danny S.danny.schi...@googlemail.com wrote: Hi together, using a second receiver worked for me: ... receiver android:name=.AlertReceiver / !-- only for device is booted detection: -- receiver android:name=.BootedReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver ... I am confused doing it this way. I would have preferred using only one receiver for handling corresponding actions but it seems this is the only way... Maybe it has to be like this, but somebody would explain to me ;-) Thanks! -DannyS. On 27 Jan., 16:19, DannyS.danny.schi...@googlemail.com wrote: Kostya, yeah, I am with you and think my AndroidManifest looks correct. I figured out too, that all data get lost when Wipe user data is enabled. I started the emulator always without Wipe user data but it does not work. Maybe it is an emulator problem... I can try to figure out on my real device and show up a notification with information about intent's action when onReceive() is called. I temporery implemented notification output and tested it on emulator. One for boot action and one for any other. In any case there should be a notification but when I restart the emulator nothing happened... onReceive is not called. As said I'll try with my real device and give response ASAP. If it does not work I try using a second receiver that handles the boot action and nothing else... hope I can solve the problem soon ;-) Thanks for your help! -DannyS. On 27 Jan., 15:23, Kostya Vasilyevkmans...@gmail.com wrote: Danny, Your app's manifest for the broadcast action, as well as the permission, look fine. When you start the emulator, make sure you don't have Wipe user data enabled, as that will erase the application, so it won't be available at boot. Other than that, maybe you're just not seeing the logcat message? Try doing something more visible, like a notification or starting an activity. -- Kostya 27.01.2011 16:49,DannyS. пишет: Hi Kostya, I removed the category, but have still the same issue: boot completed is never recognized. You said you dont see the other action. I create the Broadcast- Intent and put it into PendingIntent.getBroadcast(), without a action in AndroidManifest: ...
[android-developers] Default local charset/encoding?
Is there a way to get the default local charset/encoding for a device? I.e., I'd like to get e.g. ISO-8859-1, windows-1251, ISO-2022-CN, or whatever is common in the device's default locale (and supported by the device), not UTF-8 like Charset.defaultCharset() or System.getProperty(file.encoding) will return. Reason is, I'd like to read text files the user creates on his desktop PC, which, sadly, most of the times still use the old local encodings... While of course it's useful to offer an encoding selection (which I'll offer in the preferences), it'd be nice if the most likely encoding would be used by default... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Schedule notification instead of permanently check
Hey Kostaya, wow, thanks. It seems I'll be forced don't support external storage. There is really a conflict between the statements... I don't know such missunderstandings by Google ^^ Thanks a lot for this Kostaya! You helped me so many times with solutions and important information ;-) -Danny S. On Feb 2, 12:46 pm, Kostya Vasilyev kmans...@gmail.com wrote: Danny, According to this: http://developer.android.com/reference/android/content/Intent.html#AC... The extra data EXTRA_CHANGED_PACKAGE_LIST contains a list of packages whose availability changed. The extra data EXTRA_CHANGED_UID_LIST contains a list of uids of packages whose availability changed. *Note that the packages in this list do not receive this broadcast.* So you might want to run some tests before relying on this broadcast. I see that Mark Murphy submitted a documentation bug for this: http://code.google.com/p/android/issues/detail?id=8485 -- Kostya 02.02.2011 14:31, Danny S. пишет: Today I read this on googles documentation: Broadcast Receivers listening for boot completed The system delivers the ACTION_BOOT_COMPLETED broadcast before the external storage is mounted to the device. If your application is installed on the external storage, it can never receive this broadcast. I don't know why it worked in past, cause I used the same device (emulator) with sdcard all the time, but this seems to be the reason why this broadcast is never received. Now I have 2 possibilities: 1. remove the possibility to install the app on external storage (I wanted to support App2SD...). Then the broadcast should be received. 2. find another indicator to start my service, e.g. ACTION_EXTERNAL_APPLICATIONS_AVAILABLE (I prefer this, are you with me?) 3. Do you have an other idea? Detailled infos:http://developer.android.com/guide/appendix/install-location.html What would you do? Thanks a lot! -Danny On Feb 1, 11:40 am, Danny S.danny.schi...@googlemail.com wrote: OMG, today I determined, that my BootReceiver is not called again :'( But I changed nothing in relation with this :( it looks like an issue to me. I don't do anything in the onReceive yet, only log out something. This morning it worked very well then I started to implement code to start my applications service within the receiver. That worked very well. I used the context.getApplicationContext() to start the Service. This worked for me, then I tried to change to start the service with context instead of application context. From this moment on I've seen no output for onReceive. The broadcast receiver is never called when the device booted. I build it back to version with only log output implementation in the onReceive method. But I still dont get it to work again. I tried to use a completely new created emulator, but nothing changed :-( I don#t think I am doing something wrong here, cause I got it to work in past... -Danny S. On Jan 27, 4:33 pm, Danny S.danny.schi...@googlemail.com wrote: Hi together, using a second receiver worked for me: ... receiver android:name=.AlertReceiver / !-- only for device is booted detection: -- receiver android:name=.BootedReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver ... I am confused doing it this way. I would have preferred using only one receiver for handling corresponding actions but it seems this is the only way... Maybe it has to be like this, but somebody would explain to me ;-) Thanks! -DannyS. On 27 Jan., 16:19, DannyS.danny.schi...@googlemail.com wrote: Kostya, yeah, I am with you and think my AndroidManifest looks correct. I figured out too, that all data get lost when Wipe user data is enabled. I started the emulator always without Wipe user data but it does not work. Maybe it is an emulator problem... I can try to figure out on my real device and show up a notification with information about intent's action when onReceive() is called. I temporery implemented notification output and tested it on emulator. One for boot action and one for any other. In any case there should be a notification but when I restart the emulator nothing happened... onReceive is not called. As said I'll try with my real device and give response ASAP. If it does not work I try using a second receiver that handles the boot action and nothing else... hope I can solve the problem soon ;-) Thanks for your help! -DannyS. On 27 Jan., 15:23, Kostya Vasilyevkmans...@gmail.com wrote: Danny, Your app's manifest for the broadcast action, as well as the permission, look fine. When you start the emulator, make sure you don't have Wipe user data enabled, as that will erase the application,
Re: [android-developers] Re: Force Close Question
If the process is being killed, the Application is gone too. On Tue, Feb 1, 2011 at 9:38 PM, bruce palant...@gmail.com wrote: If your process is killed, all the activities are killed so its not like the globals are released and you still have activities running causing a force close. Sounds like you need to extend Application() and use that to contain your static globals. Not that its a good practice and likely you have settings and other items that need to use a database, etc. but it is available. See http://developer.android.com/reference/android/app/Application.html. Cheers, Bruce -- http://mtterra.com/quicklogger On Feb 1, 5:31 pm, Scott Deutsch surger...@gmail.com wrote: Thats what I fearedok I will redesign it to make it work. Thanks a bunch. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to sort HashMap?
You didn't provide the compare method required for a Sortable object. On Feb 1, 11:43 pm, Mystique joven.ch...@gmail.com wrote: Ok, I did this but runtime error, did I do wrong? --- public class Sortable { private String name; private String age; public Sortable(){ } public Sortable(String name, String age){ this.name = name; this.age = age; } public String getName() { return name; } public String getAge() { return age; } } --- ArrayList test = new ArrayList(); . . . Sortable qqq = new Sortable(name, age); ppp.add(qqq); . . . // Before I try the Collections.sort(), I have error. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Requirement of a SIP Client for Android
I am looking for an experienced Mobile application developer who can develop or provide a Mobile SIP Client for the BlackBerry and Android Platforms with the below features • Making and receiving SIP calls ... • Contacts (Integrated address book with “search” option) • Loudspeaker • Balance information* ( should fetch it from an XML File ) • Destination, rate* * ( should fetch it from an XML File ) • Time, call status logs • Last calls log • Redial • Digits Interception (Dialer pops up once dialing from the phone's “Dial pad” or choosing a number from the phone's “Contact list”) • Support for G711u, G711a and GSM codecs. • Connectivity over WIFI, EDGE or UMTS. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to sort HashMap?
An alternative is to put your HashMaps into a regular HashMap[] array and then use Arrays.sort. Create an external Comparator class that is roughly: class MyComparator implements Comparator { public int compare(HashMap o1, HashMap o2) { Integer key1 = (Integer) o1.get(age); Integer key2 = (Integer) o2.get(age); return key1 - key2; } } (This can just be an extra method and interface added to your current class, and then use your this pointer for the Comparator in sort(). Or you can define and instantiate a new class.) On Feb 1, 10:12 pm, DanH danhi...@ieee.org wrote: You have a bunch HashMaps of different people, and you want to sort by age? You need to spin through the list of HashMaps and extract age from each one, then insert the age and HashMap into, eg, a TreeMap, with age being the key. On Feb 1, 8:15 pm, Mystique joven.ch...@gmail.com wrote: Ok, I just read but unclear (java newbie) about this one: ArrayListHashMapString,String list = new ArrayListHashMapString,String(); // I have a loop collecting these value from a XML parser HashMapString,String map = new HashMapString,String(); map.put(name,Tname); map.put(age,Tage); list.add(map); So let say I have test data, I want to sort the age in the ArrayList call list: mary, 12 john, 11 Any sample to look at? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Account name with spaces throws Exception on Android 2.2
Hello, there seems to be some changes from Android 2.1 to Android 2.2 which throws an Exception when contact account names have spaces. I use the following code: mEntityUri = ContactsContract.Groups.CONTENT_URI.buildUpon() .appendQueryParameter(ContactsContract.Groups.ACCOUNT_NAME, mAccountName) .appendQueryParameter(ContactsContract.Groups.ACCOUNT_TYPE, mAccountType) .appendQueryParameter(ContactsContract.CALLER_IS_SYNCADAPTER, true) .build(); and later (with the same values): ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(mEntityUri); Log.v(TAG, create accountgroup: +mAccountType+, +mAccountName); builder.withValue(ContactsContract.Groups.ACCOUNT_TYPE, mAccountType); builder.withValue(ContactsContract.Groups.ACCOUNT_NAME, mAccountName); builder.withValue(ContactsContract.Groups.SYSTEM_ID, mAccountName); builder.withValue(ContactsContract.Groups.TITLE, mAccountName); builder.withValue(ContactsContract.Groups.GROUP_VISIBLE, 1); mBatchOperation.add(builder.build()); mBatchOperation.execute(); // this is line 133 in GroupManager.java On Android 2.1 this code works fine on Android 2.2 this works fine as long as there are no spaces in mAccountName. If there are spaces the following Exception is thrown: java.lang.IllegalArgumentException: When both specified, ACCOUNT_NAME and ACCOUNT_TYPE must match; URI: content://com.android.contacts/groups?account_name=Home%20Address%20Bookaccount_type=org.dmfs.carddav.accountcaller_is_syncadapter=true, calling user: org.dmfs.carddav.sync, calling package:org.dmfs.carddav.sync at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java: 144) at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java: 137) at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java: 491) at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java: 95) at android.content.ContentResolver.applyBatch(ContentResolver.java: 622) at org.dmfs.contacts.BatchOperations.execute(BatchOperations.java:54) at org.dmfs.contacts.GroupManager.execute(GroupManager.java:133) at org.dmfs.carddav.syncadapter.SyncAdapter.onPerformSync(SyncAdapter.java: 124) at android.content.AbstractThreadedSyncAdapter $SyncThread.run(AbstractThreadedSyncAdapter.java:163) BatchOperations is implemented following the example in sampleSyncAdapter. resolveAccount from ContactsProvider2.java uses a different check now, maybe the %20 is not properly replaced. Is there a known work-around (aside from removing spaces in the account name)? cheers Marten -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to sort HashMap?
Oops -- since the key values are Integer objects, should be something like: return key1.compareTo(key2); On Feb 2, 6:21 am, DanH danhi...@ieee.org wrote: An alternative is to put your HashMaps into a regular HashMap[] array and then use Arrays.sort. Create an external Comparator class that is roughly: class MyComparator implements Comparator { public int compare(HashMap o1, HashMap o2) { Integer key1 = (Integer) o1.get(age); Integer key2 = (Integer) o2.get(age); return key1 - key2; } } (This can just be an extra method and interface added to your current class, and then use your this pointer for the Comparator in sort(). Or you can define and instantiate a new class.) On Feb 1, 10:12 pm, DanH danhi...@ieee.org wrote: You have a bunch HashMaps of different people, and you want to sort by age? You need to spin through the list of HashMaps and extract age from each one, then insert the age and HashMap into, eg, a TreeMap, with age being the key. On Feb 1, 8:15 pm, Mystique joven.ch...@gmail.com wrote: Ok, I just read but unclear (java newbie) about this one: ArrayListHashMapString,String list = new ArrayListHashMapString,String(); // I have a loop collecting these value from a XML parser HashMapString,String map = new HashMapString,String(); map.put(name,Tname); map.put(age,Tage); list.add(map); So let say I have test data, I want to sort the age in the ArrayList call list: mary, 12 john, 11 Any sample to look at? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can't properly stop a thread
Thank you Kostya. As you have nicely noticed my network code doesn't 'see' any flag so that's not an option for me. Setting the handler to null actually came to my mind but it seem a little bit 'dirty'. What worries me is that if I exit my application, the thread is still working, trying to connect and only after finishing that it can 'see' that it was stopped from outside and doesn't want to communicate with UI :/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Schedule notification instead of permanently check
Hi, for information: I changed the android:installingLocation in the AndroidManifest.xml to internalOnly and now the broadcast received successfully. Installing the app on external storage was the reason like expected after I read the docs. -Danny S. On Feb 2, 1:06 pm, Danny S. danny.schi...@googlemail.com wrote: Hey Kostaya, wow, thanks. It seems I'll be forced don't support external storage. There is really a conflict between the statements... I don't know such missunderstandings by Google ^^ Thanks a lot for this Kostaya! You helped me so many times with solutions and important information ;-) -Danny S. On Feb 2, 12:46 pm, Kostya Vasilyev kmans...@gmail.com wrote: Danny, According to this: http://developer.android.com/reference/android/content/Intent.html#AC... The extra data EXTRA_CHANGED_PACKAGE_LIST contains a list of packages whose availability changed. The extra data EXTRA_CHANGED_UID_LIST contains a list of uids of packages whose availability changed. *Note that the packages in this list do not receive this broadcast.* So you might want to run some tests before relying on this broadcast. I see that Mark Murphy submitted a documentation bug for this: http://code.google.com/p/android/issues/detail?id=8485 -- Kostya 02.02.2011 14:31, Danny S. пишет: Today I read this on googles documentation: Broadcast Receivers listening for boot completed The system delivers the ACTION_BOOT_COMPLETED broadcast before the external storage is mounted to the device. If your application is installed on the external storage, it can never receive this broadcast. I don't know why it worked in past, cause I used the same device (emulator) with sdcard all the time, but this seems to be the reason why this broadcast is never received. Now I have 2 possibilities: 1. remove the possibility to install the app on external storage (I wanted to support App2SD...). Then the broadcast should be received. 2. find another indicator to start my service, e.g. ACTION_EXTERNAL_APPLICATIONS_AVAILABLE (I prefer this, are you with me?) 3. Do you have an other idea? Detailled infos:http://developer.android.com/guide/appendix/install-location.html What would you do? Thanks a lot! -Danny On Feb 1, 11:40 am, Danny S.danny.schi...@googlemail.com wrote: OMG, today I determined, that my BootReceiver is not called again :'( But I changed nothing in relation with this :( it looks like an issue to me. I don't do anything in the onReceive yet, only log out something. This morning it worked very well then I started to implement code to start my applications service within the receiver. That worked very well. I used the context.getApplicationContext() to start the Service. This worked for me, then I tried to change to start the service with context instead of application context. From this moment on I've seen no output for onReceive. The broadcast receiver is never called when the device booted. I build it back to version with only log output implementation in the onReceive method. But I still dont get it to work again. I tried to use a completely new created emulator, but nothing changed :-( I don#t think I am doing something wrong here, cause I got it to work in past... -Danny S. On Jan 27, 4:33 pm, Danny S.danny.schi...@googlemail.com wrote: Hi together, using a second receiver worked for me: ... receiver android:name=.AlertReceiver / !-- only for device is booted detection: -- receiver android:name=.BootedReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver ... I am confused doing it this way. I would have preferred using only one receiver for handling corresponding actions but it seems this is the only way... Maybe it has to be like this, but somebody would explain to me ;-) Thanks! -DannyS. On 27 Jan., 16:19, DannyS.danny.schi...@googlemail.com wrote: Kostya, yeah, I am with you and think my AndroidManifest looks correct. I figured out too, that all data get lost when Wipe user data is enabled. I started the emulator always without Wipe user data but it does not work. Maybe it is an emulator problem... I can try to figure out on my real device and show up a notification with information about intent's action when onReceive() is called. I temporery implemented notification output and tested it on emulator. One for boot action and one for any other. In any case there should be a notification but when I restart the emulator nothing happened... onReceive is not called. As said I'll try with my real device and give response ASAP. If it does not work I try using a second receiver
Re: [android-developers] separate thread for browser,webkit.
It seems that no one is interested in webkit browser. On Tue, Feb 1, 2011 at 9:01 AM, yogi yogi.ru...@gmail.com wrote: Hi all, Since webkit is a huge libary so i suggest to open a separate thread for discussion on webkit,browser stuff specific to android platform. And i also request to join all the member to that group who are working or facing problem in these area.So kindly create a separate group and linked that one with this big group.And if it already exist please let us know. Regards Yogi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Yogendra Singh B-Tech,Computer Science and Engg., MNNIT,Allahabad -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: motion effect in Rubber Band
Note that 2.3 is going to allow this in a generic manner. Look at the release notes about overscrolling Support for overscroll New support for overscroll in Views and Widgets. In Views, applications can enable/disable overscroll for a given view, set the overscoll mode, control the overscroll distance, and handle the results of overscrolling. In Widgets, applications can control overscroll characteristics such as animation, springback, and overscroll distance. For more information, see android.view.View and android.widget.OverScroller. ViewConfiguration also provides methods getScaledOverflingDistance() and getScaledOverscrollDistance(). New overScrollMode, overScrollFooter, and overScrollHeader attributes for ListView elements, for controlling overscroll behavior. http://developer.android.com/sdk/android-2.3.html http://developer.android.com/reference/android/widget/OverScroller.html On Feb 2, 1:49 am, Mathias Lin m...@mathiaslin.com wrote: You could probably use a TranslateAnimation with a BounceInterpolatorhttp://developer.android.com/intl/fr/reference/android/view/animation... On Feb 2, 3:20 pm, Honest honestsucc...@gmail.com wrote: hello, I am creating Rubber Band effect in my ListView. So for that i created the class which extends AdapterView. When user ups the mouse i am setting the co-ordinate again so it is again re-positioning and there is similar effect but the problem is there is no motion effect. So can some one tell me how can i provide motion effect ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: to GUI gurus:a question about dialog window and activity
There are at least 2 ways to display a dialog in an activity. One is to call showDialog, which is managed by the class Activiy. In this case, to understand the dialog is restored by onSaveInstanceState / onRestoreInstanceState. I believed u are talking about this scenrio. The other is to AlertDialog, with codes like: Dialog dialog=new AlertDialog.Builder(mctx) .setTitle(about) .setMessage(...) .setPositiveButton(OK, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { return; } }) .create(); dialog.show(); What I am talking about is this scenario. On 2月1日, 下午10时26分, Kostya Vasilyev kmans...@gmail.com wrote: I'm not a GUI guru, but I'll try to answer :) Dialogs are managed by Activity class inside the Android framework. If a dialog is shown with showDialog(id, [bundle]), it's remembered by Activity as being visble, and will be saved by Activity at the same time as your onSaveInstanceState / onRestoreInstanceState are called (if you have those overrides). This means that managed dialogs survive orientation changes, as well as the activity being destroyed and re-created when the user comes back to it (such as with the list of recent applications, called up by [Home] long press). http://developer.android.com/guide/topics/ui/dialogs.html AFAIK, there is no way to check whether a a given dialog is on the screen, although the framework certainly knows this. -- Kostya 01.02.2011 16:31, Jian Chen пишет: A problem confused me for a little while, which is about dialog window and activity。 In a normal activity,an alert dialog is called to be shown on top of this activity,and HOME key is pressed to go to HOME screen。 Then HOME key is long pressed to go back to this activity。 Surprisingly, the alert dialog is restored. Is this job done by activity manager? A second question is, in some scenarios the activity does not hold the reference, is there a way to index its top window(for example, dialog window) from this activity's API? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Need quick help about superboot
Hi Am using Nexus one (build FRG83D ) , while i was trying to superboot my nexus one, i downloaded a package and run the command fastboot-windows.exe flash boot nexusone.superboot.1.1.img After that ... there is no wifi signal, did not recognize sd, very glitchy, unstable and maybe worst of all unable to mount to computer. Dont know what went wrong, and mobile is getting restarted again and again.. I need your help guys.. Please update me on this critical issue.. -- Thanks and Regards Raju .G -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: to GUI gurus:a question about dialog window and activity
showDialog and AlertDialog.Builder are orthogonal (independent). You can create a managed dialog with Builder (by using it inside onCreateDialog) or an unmanaged dialog using new Dialog(), etc. Now with this being said, your code below creates an unmanaged dialog, and if you want it to persist through activity being recreated, you've got to write code to do it yourself. -- Kostya 02.02.2011 16:07, alligator пишет: There are at least 2 ways to display a dialog in an activity. One is to call showDialog, which is managed by the class Activiy. In this case, to understand the dialog is restored by onSaveInstanceState / onRestoreInstanceState. I believed u are talking about this scenrio. The other is to AlertDialog, with codes like: Dialog dialog=new AlertDialog.Builder(mctx) .setTitle(about) .setMessage(...) .setPositiveButton(OK, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { return; } }) .create(); dialog.show(); What I am talking about is this scenario. On 2月1日, 下午10时26分, Kostya Vasilyev kmans...@gmail.com wrote: I'm not a GUI guru, but I'll try to answer :) Dialogs are managed by Activity class inside the Android framework. If a dialog is shown with showDialog(id, [bundle]), it's remembered by Activity as being visble, and will be saved by Activity at the same time as your onSaveInstanceState / onRestoreInstanceState are called (if you have those overrides). This means that managed dialogs survive orientation changes, as well as the activity being destroyed and re-created when the user comes back to it (such as with the list of recent applications, called up by [Home] long press). http://developer.android.com/guide/topics/ui/dialogs.html AFAIK, there is no way to check whether a a given dialog is on the screen, although the framework certainly knows this. -- Kostya 01.02.2011 16:31, Jian Chen пишет: A problem confused me for a little while, which is about dialog window and activity。 In a normal activity,an alert dialog is called to be shown on top of this activity,and HOME key is pressed to go to HOME screen。 Then HOME key is long pressed to go back to this activity。 Surprisingly, the alert dialog is restored. Is this job done by activity manager? A second question is, in some scenarios the activity does not hold the reference, is there a way to index its top window(for example, dialog window) from this activity's API? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Media Controller in VideoView should never disappear
Guys at present the MediaController for video view is visible only for 3 seconds. I want the controller to be there permanently till the song finishes i know there is something like mc.show(0) but i dont know how and where to use this code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Can't properly stop a thread
Adam, Thread not stopping right away is normal, since a thread is there so it can do its own thing. Just make sure that your thread function checks the handler or a boolean flag or whatever as often as it can, and stops after it's been set - this includes before connecting. You can also close the socket from the UI thread, which will cause the current network operation in the worker to fail with an IO exception. -- Kostya 02.02.2011 15:35, Serdel пишет: Thank you Kostya. As you have nicely noticed my network code doesn't 'see' any flag so that's not an option for me. Setting the handler to null actually came to my mind but it seem a little bit 'dirty'. What worries me is that if I exit my application, the thread is still working, trying to connect and only after finishing that it can 'see' that it was stopped from outside and doesn't want to communicate with UI :/ -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can't properly stop a thread
If think I'll need to go with the flagging approach. Seem the more 'elegant' way to do this. Thanks for your help Kostya (As usual :) On 2 Lut, 14:56, Kostya Vasilyev kmans...@gmail.com wrote: Adam, Thread not stopping right away is normal, since a thread is there so it can do its own thing. Just make sure that your thread function checks the handler or a boolean flag or whatever as often as it can, and stops after it's been set - this includes before connecting. You can also close the socket from the UI thread, which will cause the current network operation in the worker to fail with an IO exception. -- Kostya 02.02.2011 15:35, Serdel пишет: Thank you Kostya. As you have nicely noticed my network code doesn't 'see' any flag so that's not an option for me. Setting the handler to null actually came to my mind but it seem a little bit 'dirty'. What worries me is that if I exit my application, the thread is still working, trying to connect and only after finishing that it can 'see' that it was stopped from outside and doesn't want to communicate with UI :/ -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] disabled EditText display glitch (Android 2.2)?
Hello, Disabled EditText fields (android:enabled=false) have a horizontal line being drawn through them. Created simple test app using standard Eclipse wizard, added EditText for main.xml layout as follows: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/hello / EditText android:id=@+id/edittest android:layout_width=fill_parent android:layout_height=44dp android:enabled=false / /LinearLayout The field is grayed out, as expected, but also a horizontal line through the middle, on Nexus One (2.2.2), Motorola Droid (2.2.1), but NOT on Samsung Galaxy (2.1). Help in understand where this is coming from would be much appreciated. Chris @ Vertifi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] DroidX adding or editing contact problem
Hi all, I have a question about adding or editing contact on DroidX. This is my code for starting standard Add Contact activity Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT); intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE); intent.putExtra(ContactsContract.Intents.Insert.PHONE, + + data); But after returning on my activity by Save I have Activity.Result_CANCEL and no data(but contact saved in contact list). Whats wrong I made? On Galaxy S all works fine. Logs show me this: 02-16 12:10:37.591: ERROR/ContentValues(1335): Cannot cast value for is_primary to a Integer: true 02-16 12:10:37.591: ERROR/ ContentValues(1335): java.lang.ClassCastException: java.lang.Boolean 02-16 12:10:37.591: ERROR/ContentValues(1335): at android.content.ContentValues.getAsInteger(ContentValues.java:288) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2$DataRowHandler.insert(ContactsProvider2.java: 999) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2$CommonDataRowHandler.insert(ContactsProvider2.java: 1350) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2$PhoneDataRowHandler.insert(ContactsProvider2.java: 1600) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2.insertData(ContactsProvider2.java: 2608) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2.insertInTransaction(ContactsProvider2.java: 2437) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.SQLiteContentProvider.insert(SQLiteContentProvider.java: 106) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2.insert(ContactsProvider2.java: 2244) 02-16 12:10:37.591: ERROR/ContentValues(1335): at android.content.ContentProviderOperation.apply(ContentProviderOperation.java: 214) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.SQLiteContentProvider.applyBatch(SQLiteContentProvider.java: 216) 02-16 12:10:37.591: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2.applyBatch(ContactsProvider2.java: 2278) 02-16 12:10:37.591: ERROR/ContentValues(1335): at android.content.ContentProvider $Transport.applyBatch(ContentProvider.java:193) 02-16 12:10:37.591: ERROR/ContentValues(1335): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java: 195) 02-16 12:10:37.591: ERROR/ContentValues(1335): at android.os.Binder.execTransact(Binder.java:304) 02-16 12:10:37.591: ERROR/ContentValues(1335): at dalvik.system.NativeStart.run(Native Method) 02-16 12:10:37.974: ERROR/ContentValues(1335): Cannot cast value for is_primary to a Integer: true 02-16 12:10:37.974: ERROR/ ContentValues(1335): java.lang.ClassCastException: java.lang.Boolean 02-16 12:10:37.974: ERROR/ContentValues(1335): at android.content.ContentValues.getAsInteger(ContentValues.java:288) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2$DataRowHandler.insert(ContactsProvider2.java: 999) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2$CommonDataRowHandler.insert(ContactsProvider2.java: 1350) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2$PhoneDataRowHandler.insert(ContactsProvider2.java: 1600) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2.insertData(ContactsProvider2.java: 2608) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2.insertInTransaction(ContactsProvider2.java: 2437) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.SQLiteContentProvider.insert(SQLiteContentProvider.java: 106) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2.insert(ContactsProvider2.java: 2244) 02-16 12:10:37.974: ERROR/ContentValues(1335): at android.content.ContentProviderOperation.apply(ContentProviderOperation.java: 214) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.SQLiteContentProvider.applyBatch(SQLiteContentProvider.java: 216) 02-16 12:10:37.974: ERROR/ContentValues(1335): at com.android.providers.contacts.ContactsProvider2.applyBatch(ContactsProvider2.java: 2278) 02-16 12:10:37.974: ERROR/ContentValues(1335): at android.content.ContentProvider $Transport.applyBatch(ContentProvider.java:193) 02-16 12:10:37.974: ERROR/ContentValues(1335): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java: 195) 02-16 12:10:37.974: ERROR/ContentValues(1335): at android.os.Binder.execTransact(Binder.java:304) 02-16 12:10:37.974: ERROR/ContentValues(1335): at dalvik.system.NativeStart.run(Native Method) -- You received this message because you are
[android-developers] Re: Disable dictionary on softkeyboard ?
Put the input type as email I think that gets rid of the dictionary. On Feb 2, 8:38 am, mac-systems jens.h...@gmx.de wrote: Hello, my target version is still 1.6, how can i prevent the dictionary to appear ? I want that the user simply enters text as he types it. Since SDK Target Version 5 theres the Option android:inputType=textNoSuggestions EditText android:id=@+id/codeTextfield android:hint=@string/ main_pleaseEnterBarcode_Hint android:layout_height=fill_parent android:layout_width=fill_parent android:layout_weight=0.7 android:singleLine=true android:textSize=20dp android:inputType=text android:focusable=true android:autoText=false android:imeOptions=actionSearch / best regards, Jens -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Bluetooth activation Alert dialog multiplication after screen rotation
I have encountered strange issue. From Activity I request Bluetooth activation and 120s discoverability via intent: Intent activateBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); startActivityForResult(activateBTIntent, BT_ACTIVATE_INTENT); I use it no matter if the Bluetooth is already activated or not. Android documentation says that Bluetooth will be activated if it was not, and that works fine. In both cases I get system Alert dialog saying Bluetooth permission request: An application on your phone is requesting permission to turn on Bluetooth and ... When I rotate the screen I observe flickering. Press on Yes/No removes one dialog, but there is still another one below. Performing screen rotation I can get a pile of Alert dialogs, and have to press Yes/No on each to get rid of them. Described issue is present only if Bluetooth was not already started when intent was sent, otherwise it works correctly. Tried on different 2.2 phones, and issue is present on all. Looks to me like Android system issue. Has anybody encountered it also, and maybe have some useful hint how to avoid this? Thanks and best regards. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] please stop sending me email
hello, please stop sending me email. i've chosen to unsubscribe, i've also chosen to disable emailing to me, yet every day i keep getting letters from the forum . thank you for your time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to sort HashMap?
Hi DanH, Although I'm a bit lost as Java is a very new language to me, I will try to figure what you mean. SimpleAdapter adapterShop = new SimpleAdapter(this, ppp, R.layout.sort_by_name, new String[] {name,age}, new int[] {R.id.name,R.id.age ); I have this error - The constructor SimpleAdapter(Directory, ArrayListSortable, int, String[], int[]) is undefined Not very sure about it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to sort HashMap?
On Wed, Feb 2, 2011 at 9:12 AM, Mystique joven.ch...@gmail.com wrote: I have this error - The constructor SimpleAdapter(Directory, ArrayListSortable, int, String[], int[]) is undefined Not very sure about it. The best advice I can give you at this point: stop. Just stop. Put your Android project on hold. Put hashmaps and arraylists and generics on hold. Now go get an introductory book on Java and play around with simple Hello World programs where you can familiarize yourself with the language and Eclipse. Knowing how to spot compile time errors and what they mean and knowing how to debug your program is *crucial* to you making any progress. This is a forum for Android SDK questions. You are asking basic Java questions. This thread could go on forever with multiple suggestions on how to solve your given problem but it won't make a lick of sense to you unless you understand the basics. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to sort HashMap?
Yes sir. On Feb 2, 11:41 pm, TreKing treking...@gmail.com wrote: On Wed, Feb 2, 2011 at 9:12 AM, Mystique joven.ch...@gmail.com wrote: I have this error - The constructor SimpleAdapter(Directory, ArrayListSortable, int, String[], int[]) is undefined Not very sure about it. The best advice I can give you at this point: stop. Just stop. Put your Android project on hold. Put hashmaps and arraylists and generics on hold. Now go get an introductory book on Java and play around with simple Hello World programs where you can familiarize yourself with the language and Eclipse. Knowing how to spot compile time errors and what they mean and knowing how to debug your program is *crucial* to you making any progress. This is a forum for Android SDK questions. You are asking basic Java questions. This thread could go on forever with multiple suggestions on how to solve your given problem but it won't make a lick of sense to you unless you understand the basics. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Samsung Fascinate AVD definition
On Wed, Feb 2, 2011 at 1:34 AM, Anindo Ghosh anindo.gh...@gmail.com wrote: This thread amused me... Kostya, I've read other posts by you and your blog, you are probably one of the most helpful people in the Android community I've found so far. Thank you for being there! A perfect contrast to TreKing, who has been rather aptly described by the original poster, so I won't bother. Seems rather unnecessary to bring up a month-old post for a cheap shot. How was I aptly described? Wise ass? Because I wear that moniker proudly, so thanks! =) So sorry if I expect people to put a little bit of effort into solving their own problems before asking people to do their work for them. I don't mind being the bad cop to Kystya's good cop. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: MMS/SMS Module Design Document
Thanks ... On Jan 24, 9:46 pm, TreKing treking...@gmail.com wrote: On Mon, Jan 24, 2011 at 2:05 AM, chetan chetanchauha...@gmail.com wrote: I wand to understand the MMS/SMS module, is there any design document available for MMS/SMS module. It's doubtful there's any design document for anything in Android that's publicly available. Look at the source code. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android beginner
NullPointerException is so common and so general that you can't know anything from I got a NullPointerException. One this I can tell you, you're new to Java programming(or a lousy programmer) if you don't know what it means. On 2 фев, 10:13, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: the same kind of error is the one which i get when i downgrade my app from 2.2 to 2.1 and i am not using any specific library. I have done all the changes like in manifest file and project properties then cleaned the project and still it gives the error. I dont knw much how to debug but all i can give you the information is that the splash screen comes up in 2.1 and when it disappears then i get force close due to null pointer while all this work fine in 2.2 On Wed, Feb 2, 2011 at 1:25 PM, Thomas thomasjakw...@gmail.com wrote: You tried to access an object you haven't constructed yet, meaning you're using only a reference. The reference has to be constructed or point to an object somewhere, should look like this: Foo f = new Foo(); f.func(); if you just have: Foo f; f.func(); You're trying to access memory that isn't there. The line: new Foo(); Allocates memory and points the reference 'f' to it. f can then be used to access that memory. Its called a nullpointerexception because currently your reference is pointing to a null memory address (invalid). On Feb 1, 9:16 pm, subhashini alaguchokku subhashini.andr...@gmail.com wrote: Hi, I get following compile time error, pls give any solutions [2011-02-02 10:37:46 - Mcatalog] Unknown error: java.lang.NullPointerException Thanks and regards, subha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Strange orange background color when custom 9 patch button is pressed...
FINALLY figured it out. Here is the solution: TextView does NOT support pressed state correctly. I changed the view to a Button and it worked perfectly! so menuitem.xml changed to Button xmlns:android=http://schemas.android.com/apk/res/android; android:textColor=@color/btn_blue_text android:textSize=14px android:layout_width=fill_parent android:layout_height=60px android:paddingTop=5px android:paddingBottom=5px android:text=test string android:layout_gravity=center_horizontal android:gravity=center android:background=@drawable/btn_blue / -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Strange orange background color when custom 9 patch button is pressed...
Try using your scroller(the optical thing or the ball at the bottom of your phone) and select items in the list. If when selecting using a scroller adds the orange background, then it's simple becuase it's default behaviour of Array adapter's item wrapper. You have to create your own ListAdapter to create views(Adapter.getView() method) to create the actual line in the list. There is a sample in the API Demos - http://developer.android.com/intl/de/resources/samples/ApiDemos/src/com/example/android/apis/view/List4.html http://developer.android.com/intl/de/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html On 2 фев, 06:55, Jarrette jarrette.sch...@gmail.com wrote: man, still can't figure this one out. Very strange. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to create an app as a service and make it invisible to the user?
There's always rooting and building custom ROMs On 2 фев, 03:46, Mark Murphy mmur...@commonsware.com wrote: On Tue, Feb 1, 2011 at 8:39 PM, Christian Chabtini cchapt...@gmail.com wrote: I would like to be able to create a service that runs in the background. The user should not be able to detect this app. Fortunately, this is not possible from the SDK. At minimum, the user will see it in the applications list, the manage services Settings screen, and via any third party task monitors. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in Atlanta:http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Nested layouts in separate XML
On Wed, Feb 2, 2011 at 3:19 AM, MerlinBG merli...@gbg.bg wrote: however it is hard to find, no reference in the Dev Guide either. Not sure what you mean there's no reference. Besides sample I linked you to, this is clearly documented in the layouts section: http://developer.android.com/guide/topics/resources/layout-resource.html#include-element - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] please stop sending me email
On Wed, Feb 2, 2011 at 8:44 AM, Liran Barsisa li...@thecto.co.il wrote: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Dynamic array ListView problem
Hi guys, I am experimenting with locations and listviews. I am getting location results back and I am trying to create a listview of my locations results using the following code: ListView locationList = (ListView)findViewById(R.id.ListView01); String[] items = new String[]{}; try { Geocoder geocoder = new Geocoder(this, Locale.getDefault()); ListAddress addresses = geocoder.getFromLocation(LATITUDE, LONGITUDE, 5); address_textview.setText( +addresses ); Address[] addresses_array = new Address[addresses.size()]; addresses.toArray(addresses_array); for( int i = 0; i addresses_array.length; i++ ){ items[i]= addresses_array[i].getPostalCode(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } ArrayAdapterString adapter= new ArrayAdapterString(this, R.layout.list_item, items); locationList.setAdapter(adapter); My problem is, when I try to write into my items array ( items[i] = addresses_array[i].getPostalCode(); ) in the forloop, my application crashes. Can anyone please help. I am stuck at this point. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Dynamic array ListView problem
On Wed, Feb 2, 2011 at 10:54 AM, sisko adeod...@gmail.com wrote: my application crashes. When your application crashes, it's up to you to debug it and figure out why. If you need help we need more information than it crashes. Use your debugger and logcat to get more information and post it if you're still stuck. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Post on Facebook wall post for beginner
On Wed, Feb 2, 2011 at 2:16 AM, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: When the user clicks on it then a hard coded String from java file is displayed on the user's profile ; after logint to the facebook account and creating a session. You're in the wrong place. This group is for the Android SDK. If you need help with FB, try looking through their developer resources (I assume they have them, I don't really know). - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] viewgroup and view
On Tue, Feb 1, 2011 at 7:41 AM, blackbelt emanuel...@gmail.com wrote: My question is.. if I want to know wich view has been touched what i need to do? Could please provide me some information or example? OnTouchListener takes the view that was touched as the first parameter. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: InputMethodManager and it's active View
I spent some time researching InputMethodManager.java and besides having a ton of threading code I couldn't follow, the best I could gather was that whatever view currently has focus SHOULD be able to invoke showSoftInput as it the InputMethod's active view. After much further testing... the only conclusion that I can come to is that the InputMethodManager Service is not getting flagged soon enough that the view I'm trying to use to call the softInput has focus. I threw a little test together... I subclassed Thread and created a constructor that takes the Activity so I can call runOnUIThread from that started Thread. In the View's onFocusChangeListenter, I start the thread, have it sleep for just a moment, and then have it call runOnUIThread() and in it's Runnable call to showSoftInput() and viola... it works just fine. This is hackish... but since what I'm working on is entirely my own personal project for only my hardware... it'll have to do. On Feb 1, 3:21 pm, TreKing treking...@gmail.com wrote: On Tue, Feb 1, 2011 at 5:10 PM, Jeremiah Sellars sylus.mcf...@gmail.comwrote: I will try that, but part of the problem, is when to call clearFocus() and requestFocus(). I've tried that after the dialog is shown, but it doesn't work. Try requesting focus on something else first, then the EditText. I certainly don't have to have it work this way... it was just something I thought would be much easier than it's become and have gotten wrapped up in finding a solution and wanting to understand how the InputMethodManager is tracking the active view. I know that feeling. You stupid machine, you will not defeat me! =P Good luck. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: data upload java script
JavaScript does not handle uploading; you'll need to have some code written on the server to handle a POST request with the data you are posting. Inside a WebView, you can use the XHR object to make your call to your server asynchronously, but JavaScript itself can't actually do the uploading of the data. On Feb 1, 6:55 am, Jags jag...@gmail.com wrote: I need a javascript snippet to upload some data to a server, any sample code ? basically what i need is a page loads and the java script loads as part of thet page. that page also puts some data in hidden value. (or suggest better alternative). now, as soon as the page loads completely, the javascript uploads the data in hidden variable to another web server. please give me some pointers and code snippets. i need it to run in android browser -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Can an application control the open / closed state of the status bar panel?
I have an application which exhibits two different behaviors, possible related to Android 2.2 vs. Android 2.1 update 1. The application uses the proximity sensor to determine when the phone is near the ear. If a near condition is detected, I get the applications window and set the LayoutParams to FLAG_NOT_TOUCHABLE and FLAG_FULLSCREEN. In general, this has the desired effect of preventing accidental screen touches by the ear from causing any unwanted action. However... With my Android V2.2 phones: If I am in the process of sliding open the Status Bar at the time the proximity sensor detects a near condition, the Status Bar immediately closes and all is good. With my Android V2.1 phones: If I have the Status Bar partially open, detect a near condition, and then simultaneously (more or less) revert to a far condition while releasing the Status Bar, the Status Bar is left in a partially opened state. Meanwhile, part of my application remains visible, but not touchable. I can simulate this at will with 2.1 phones, but can not do so at all with 2.2 phones. My questions: 1) Does anyone know why this behavior is different, and if it is indeed related to different Android versions? 2) Is there a way that an application (such as mine!) can detect if the Status Bar is opened, or in the process of sliding open, and tell it to close? Thanks for any help you can 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to create an app as a service and make it invisible to the user?
Hi, can you please give more details or some links about rooting and building custom ROMs ? what is that mean? thank you Mark and Aleksandr for your feed... your help is much appreciated On Feb 2, 8:47 am, JAlexoid (Aleksandr Panzin) jalex...@gmail.com wrote: There's always rooting and building custom ROMs On 2 фев, 03:46, Mark Murphy mmur...@commonsware.com wrote: On Tue, Feb 1, 2011 at 8:39 PM, Christian Chabtini cchapt...@gmail.com wrote: I would like to be able to create a service that runs in the background. The user should not be able to detect this app. Fortunately, this is not possible from the SDK. At minimum, the user will see it in the applications list, the manage services Settings screen, and via any third party task monitors. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in Atlanta:http://bignerdranch.com/classes/android- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Force Close Question
Wished Android made a class that it does not touch until the app is totally dead...so when you tap back on the app, it will start back from the beginning. Oh well. I will just redesign to be better then. Thanks group. On Feb 2, 4:09 am, Mark Murphy mmur...@commonsware.com wrote: If the process is being killed, the Application is gone too. On Tue, Feb 1, 2011 at 9:38 PM, bruce palant...@gmail.com wrote: If your process is killed, all the activities are killed so its not like the globals are released and you still have activities running causing a force close. Sounds like you need to extend Application() and use that to contain your static globals. Not that its a good practice and likely you have settings and other items that need to use a database, etc. but it is available. Seehttp://developer.android.com/reference/android/app/Application.html. Cheers, Bruce -- http://mtterra.com/quicklogger On Feb 1, 5:31 pm, Scott Deutsch surger...@gmail.com wrote: Thats what I fearedok I will redesign it to make it work. Thanks a bunch. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can i use a BroadcastReceiver or Service to retrieve an Incoming call
so how come mobistealth, androidspy and mobile spy and similar apps that works on all android cell phones along with a big list of other phones.. how and why were they able to access and record phone calls ? On Feb 1, 5:47 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Feb 1, 2011 at 8:38 PM, Christian Chabtini cchapt...@gmail.com wrote: I would like to fist detect an incoming call with all the info and then retrieve the audio at will You have no access to the in-call audio in Android, sorry. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in Atlanta:http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] can multiple activiites share an ActionBar?
Hello there. I am looking at the ActionBar classes in 3.0. Each activity can control its ActionBar. Activity { . ActionBar bar = getActionBar(); bar.addTab(..1..) bar.addTab(..1..) . } Does every activity in an application setup an ActionBar independently? Especially if there are common icons or actions that needs to be activated across multiple activities, is it still the responsibility of the individual activities to orchestrate? Thanks Satya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Back Button ?what it really does?
Hi i was wondering what the back button really does okay so its kinda confusing but here is the problem? i have 2 tabs and another page of intent so my app acts like a music palyer basically that once u click on the song it brings u to another page. but on the first tab i have a seekbar thats like volume so i adjust taht click on a song then i use intent to go to another page which now has a volume seek bar that also is changed based off the first tab adjustment soo i tried the public static int vol then on the intent pge i adjust the volume so that i changes the value firstTab.vol = getprogress() something like this but when i click the back button it doesnt update on the oncreate like it should i know the value is changed though cuz like i said i have 2 tabs so the second tab doesnt really do anythng i just go to that tab and go back to the first tab and then the volume on the seekbar changes? so my main questions is why isnt the back button updating the oncreate i know that if u did backbutton i does changes things like when u make ur own custom arrayAdapter u can have a change on an item when u back button it but like for this example wit the seekbar its not updating??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Back Button ?what it really does?
O yea just so if anyone wasnt sure i do have the format setup right like with setprogression and stuff in the code because like i said when i go to 2nd tab and back to 1st it looks good but im just trying to get the intent backbutton.1st tab to look right On Feb 2, 11:40 am, kiros88 ghui...@gmail.com wrote: Hi i was wondering what the back button really does okay so its kinda confusing but here is the problem? i have 2 tabs and another page of intent so my app acts like a music palyer basically that once u click on the song it brings u to another page. but on the first tab i have a seekbar thats like volume so i adjust taht click on a song then i use intent to go to another page which now has a volume seek bar that also is changed based off the first tab adjustment soo i tried the public static int vol then on the intent pge i adjust the volume so that i changes the value firstTab.vol = getprogress() something like this but when i click the back button it doesnt update on the oncreate like it should i know the value is changed though cuz like i said i have 2 tabs so the second tab doesnt really do anythng i just go to that tab and go back to the first tab and then the volume on the seekbar changes? so my main questions is why isnt the back button updating the oncreate i know that if u did backbutton i does changes things like when u make ur own custom arrayAdapter u can have a change on an item when u back button it but like for this example wit the seekbar its not updating??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: WiFi Error/Unable to connect in AVD
Thanks, Kostya. Your code got me looking in the right direction. I went back to an earlier release that had been working and found two things, both of which I had to change to get it to work: 1) In my startup code I changed while(!wifi.isWifiEnabled()) wifi.setWifiEnabled(true); to what I had in an earlier version, which was while(!wifi.setWifiEnabled(true)); Both of these are meant to turn on wifi if it is not on. The first does not work in the emulator, but does work on real devices. The second does not work on the Samsung Epic, but does work on a Galaxy Tab and the HTC devices I test with. 2) I had added a connectivity check (using ConnectivityManager) in the newer version of the software that I had to remove for the emulator. Once I made those changes it works fine in the emulator. I like your idea of just having a boolean value that I can change when I am using the emulator. Of course, I just have to remember to test the release version to be sure I change the value before putting the app in the Market :-) Thanks!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Multiple SPP / RFCOMM Connections Cause Phone To Lock Up
I have an app that uses bluetooth SPP (RFCOMM) to communicate with a piece of hardware. The app and the bluetooth connection work great. The problem is when another app is started that also uses SPP and then one of the apps is stopped. Once either of the apps is stopped, either by quitting the app or by using a task killer, the phone slows down to a near halt. Most of the time I have to pull the battery. I have seen this with Pandora, which uses SPP, probably as part of its Ford Sync support, and with my app. I have also seen this with the sample apps for SPP. It doesn't matter which apps I use. Any two apps that use SPP cause this. I have seen this on Android 2.1, HTC device on ATT. I did not see this on a Motorola Droid running 2.2.1 stock, however I did see this on the same phone while running 2.2 and LFY 1.95 ROM with a custom kernel. I have logs from the debugger if anyone needs to see them, but I see nothing in there that points out the problem. Once either SPP apps is stopped the slow down starts immediately. I still get logs but nothing at all indicating a problem. The slow down does not stop until the phone is rebooted. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Video View // Media Controller ?? Show(0) = Null Pointer Exception = Frustrated
Guys i am playing an video with a video view . So far it is cool and video plays nice but the media Controller which comes at the bottom of the screen appears only on touch and i want that it should be there permanently. I googled and i thot the following code should be fine :- Uri path = Uri.parse(android.resource://com.vid1/ + R.raw.p1); vv=(VideoView)findViewById(R.id.vv); getWindow().setFormat(PixelFormat.TRANSLUCENT); MediaController mc = new MediaController(this); mc.setAnchorView(vv); mc.show(0); mc.requestFocus(); vv.setMediaController(mc); vv.setVideoURI(path); and this gives me a force close and a Null Pointer in log cat. i am sorry this may be a duplicate post but this one has detailed code and more clear understanding of situation. Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: WiFi Error/Unable to connect in AVD
02.02.2011 23:23, Kim пишет: Thanks, Kostya. Your code got me looking in the right direction. I went back to an earlier release that had been working and found two things, both of which I had to change to get it to work: 1) In my startup code I changed while(!wifi.isWifiEnabled()) wifi.setWifiEnabled(true); to what I had in an earlier version, which was while(!wifi.setWifiEnabled(true)); Both of these are meant to turn on wifi if it is not on. The first does not work in the emulator, but does work on real devices. The second does not work on the Samsung Epic, but does work on a Galaxy Tab and the HTC devices I test with. Actually, there is a broadcast action that you should use instead of a spinning loop: http://developer.android.com/reference/android/net/wifi/WifiManager.html#WIFI_STATE_CHANGED_ACTION 2) I had added a connectivity check (using ConnectivityManager) in the newer version of the software that I had to remove for the emulator. Once I made those changes it works fine in the emulator. I like your idea of just having a boolean value that I can change when I am using the emulator. Of course, I just have to remember to test the release version to be sure I change the value before putting the app in the Market :-) Supposedly there is a way to check for the emulator using one of the values in android.os.Build, but I couldn't figure it out right away, so went with a boolean instead. And yes, I know what you mean about releasing a test version :) Thanks!! -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Video View // Media Controller ?? Show(0) = Null Pointer Exception = Frustrated
Do i need to make a custom Media Controller?? Is there any Framelayout related in this stuff anywhere in layout file? On Thu, Feb 3, 2011 at 2:26 AM, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: Guys i am playing an video with a video view . So far it is cool and video plays nice but the media Controller which comes at the bottom of the screen appears only on touch and i want that it should be there permanently. I googled and i thot the following code should be fine :- Uri path = Uri.parse(android.resource://com.vid1/ + R.raw.p1); vv=(VideoView)findViewById(R.id.vv); getWindow().setFormat(PixelFormat.TRANSLUCENT); MediaController mc = new MediaController(this); mc.setAnchorView(vv); mc.show(0); mc.requestFocus(); vv.setMediaController(mc); vv.setVideoURI(path); and this gives me a force close and a Null Pointer in log cat. i am sorry this may be a duplicate post but this one has detailed code and more clear understanding of situation. Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MediaRecorder to socket -?
setOutputFile method for MediaRecorder takes either file path or FileDescriptor as argument, e.g. seems it only allows to record file locally... Is there any trick to write recorded stream into the socket? Regards, -V -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Back Button ?what it really does?
What it does is simple: if nothing in the view hierarchy consumes it, the activity in response to receiving it just calls finish() on itself. On Wed, Feb 2, 2011 at 11:40 AM, kiros88 ghui...@gmail.com wrote: Hi i was wondering what the back button really does okay so its kinda confusing but here is the problem? i have 2 tabs and another page of intent so my app acts like a music palyer basically that once u click on the song it brings u to another page. but on the first tab i have a seekbar thats like volume so i adjust taht click on a song then i use intent to go to another page which now has a volume seek bar that also is changed based off the first tab adjustment soo i tried the public static int vol then on the intent pge i adjust the volume so that i changes the value firstTab.vol = getprogress() something like this but when i click the back button it doesnt update on the oncreate like it should i know the value is changed though cuz like i said i have 2 tabs so the second tab doesnt really do anythng i just go to that tab and go back to the first tab and then the volume on the seekbar changes? so my main questions is why isnt the back button updating the oncreate i know that if u did backbutton i does changes things like when u make ur own custom arrayAdapter u can have a change on an item when u back button it but like for this example wit the seekbar its not updating??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] can multiple activiites share an ActionBar?
No, use fragments. On Wed, Feb 2, 2011 at 11:05 AM, Satya Komatineni satya.komatin...@gmail.com wrote: Hello there. I am looking at the ActionBar classes in 3.0. Each activity can control its ActionBar. Activity { . ActionBar bar = getActionBar(); bar.addTab(..1..) bar.addTab(..1..) . } Does every activity in an application setup an ActionBar independently? Especially if there are common icons or actions that needs to be activated across multiple activities, is it still the responsibility of the individual activities to orchestrate? Thanks Satya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ArrayList vs ArrayAdapter
HI, I have a problem with implementation. I use a ArrayListMyRecord as class MyRecord is: public class MyRecord { Date date; double spotreba; int pocet_km; double cena; String desc; MyRecord(Date date, double objem, int pocet_km, double liter, String desc){ this.date=date; this.spotreba=objem; this.pocet_km=pocet_km; this.cena=liter; this.desc=desc; } and in the ListView I have declared ListItem which looks like that: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent android:paddingLeft=10sp ImageView android:id=@+id/ImageView01 android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/pump android:padding=5sp /ImageView LinearLayout android:id=@+id/LinearLayout01 android:layout_height=wrap_content android:orientation=vertical android:paddingLeft=10sp android:layout_width=fill_parent TextView android:text=@+id/TextView01 android:id=@+id/TextView01 android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FF android:textSize=20sp android:padding=1sp /TextView TextView android:text=@+id/TextView02 android:id=@+id/TextView02 android:layout_width=wrap_content android:layout_height=wrap_content /TextView /LinearLayout /LinearLayout and my problem is to referenced fields double spotreba and Date date to two TextViews in the inner LinearLayout. I understand if I had only strings and it give to adapter. But here I don't understand how to change my ArrayListMyRecord to some ArrayAdapter and show it in the View. can you give me some advice or some tutorial page? Or can you explain me it how should I continue? thank you very much Richard Sámela -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Back Button ?what it really does?
But so when it goes back to teh original y doesnt it call onCreate()? it almost looks like its taking an activity from cache? On Feb 2, 1:34 pm, Dianne Hackborn hack...@android.com wrote: What it does is simple: if nothing in the view hierarchy consumes it, the activity in response to receiving it just calls finish() on itself. On Wed, Feb 2, 2011 at 11:40 AM, kiros88 ghui...@gmail.com wrote: Hi i was wondering what the back button really does okay so its kinda confusing but here is the problem? i have 2 tabs and another page of intent so my app acts like a music palyer basically that once u click on the song it brings u to another page. but on the first tab i have a seekbar thats like volume so i adjust taht click on a song then i use intent to go to another page which now has a volume seek bar that also is changed based off the first tab adjustment soo i tried the public static int vol then on the intent pge i adjust the volume so that i changes the value firstTab.vol = getprogress() something like this but when i click the back button it doesnt update on the oncreate like it should i know the value is changed though cuz like i said i have 2 tabs so the second tab doesnt really do anythng i just go to that tab and go back to the first tab and then the volume on the seekbar changes? so my main questions is why isnt the back button updating the oncreate i know that if u did backbutton i does changes things like when u make ur own custom arrayAdapter u can have a change on an item when u back button it but like for this example wit the seekbar its not updating??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Whats the key difference between Monkey Runner and Monkey tool?
You can send keystrokes and touch events with the MonkeyRunner API. It's available in AOSP and Android 2.3, and documented in Android 2.3. On Feb 1, 9:51 pm, Bharathi raja bharathiraja.andr...@gmail.com wrote: Hi, Can you please tell me it required any module\lib files to write python script to do keystrokes and touch event. if so, from where i will get those module files On Mon, Jan 31, 2011 at 10:45 PM, A. Elk lancaster.dambust...@gmail.comwrote: You might use Monkey to test that your app handles only certain keystrokes, handles only keystrokes sent in a certain order, and doesn't crash if it gets anything else. For touch events, you could use it to test that random touches or gestures don't do something unexpected in your application. As the Dev Guide topic says, Monkey is for stress-testing your application. MonkeyRunner provides limited scripting and control capabilities, so that you can write Python scripts to run test suites. The Froyo Dev Guide describes MonkeyRunner in some detail. You have to know Python in order to use it. You can send keystrokes and touch events to control the UI, but to send touch events you have to know the screen coordinates where you want the touch to occur. That means that you'll need to do some work by hand first, to figure out those coordinates. As far as I know, MonkeyRunner can't do gestures. Robotium is in Java only. It's like JUnit. You write something that looks like a Java program. The Robotium runner interprets it as a sequence of steps to run. There's documentation online; you should Google Robotium. Suspend/restart could mean many things. You may or may not be able to test those functions automatically. In general, you can't easily test something that requires turning off the device. File copying from the network could be done in MonkeyRunner. It really depends on what you're trying to do. Since MonkeyRunner is essentially a Python module, you can write any Python program you want and add MonkeyRunner to it. Python can do just about anything you can think of. Python can accept user input. Unfortunately, I don't have the time to teach you Python or Java. This forum really isn't appropriate for that. On Jan 31, 2:29 am, raki rakeshkart...@gmail.com wrote: Hi Alk, Thanks a lot for the reply. I had a look at Robotium. It seems it will solve my purpose. But I am still not clear on whats the difference between Monkey ad Monkey runner. Can u please give a simple scenario explaining thier main purpose and difference between each other? I would be grateful to you if you clarify the below questions as well? 1) To work with Robotium do I need to have knowledge on Java or can I manage with Python itself? 2) Power management processes like suspend/restart is a key part in our testing. Can I achieve it using Monkey runner or Robotium? 3) Can we automate the operations like file copy through network using Monkey runner/Python? 4) I would like to create scripts that accept inputs from user while running. I have no knowledge on Python. Hope I can achieve it in Python. Correct me if I am wrong. Thanks in advance. Rakesh On Jan 31, 2:40 am, A. Elk lancaster.dambust...@gmail.com wrote: I don't think that Monkey will give you the type of UI testing you want. It's mostly used to generate input while you test other things. MonkeyRunner can do functional testing, but a better use for it is to run suites of system tests and then collect the results. Remember, too, that MonkeyRunner is an API, not a program; you have to write a Python program to use it. You may also want to look at Robotium, which is similar to Selenium but with specific support for Android. UI On Jan 28, 12:06 am, raki rakeshkart...@gmail.com wrote: Hi, I want to automate UI and functional testing on Android OS. I am in dilemma whether to use Monkey or Mokeyrunner for the purpose. I will not be able to access the source code for the applications but I just need to test the applications, probably using Python/Shell scripting. Can anyone suggest me which tool I need to use for best results? I also want to include power management operations in between my UI testing processes. Any suggestions are greatly appreciated. Thanks, Rakesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To
Re: [android-developers] Re: Back Button ?what it really does?
On Wed, Feb 2, 2011 at 4:40 PM, kiros88 ghui...@gmail.com wrote: But so when it goes back to teh original y doesnt it call onCreate()? Usually not. it almost looks like its taking an activity from cache? Not exactly, but close. http://developer.android.com/guide/topics/fundamentals.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ArrayList vs ArrayAdapter
You will need to extend ArrayAdapterMyRecord with your own custom rendering logic in getView(), then create an instance of your custom adapter, associate it with your ArrayListMyRecord, and attach the adapter to your ListView. Here is a free excerpt from one of my books that walks through some of this: http://commonsware.com/Android/excerpt.pdf On Wed, Feb 2, 2011 at 4:36 PM, Richard Sámela feromak...@gmail.com wrote: HI, I have a problem with implementation. I use a ArrayListMyRecord as class MyRecord is: public class MyRecord { Date date; double spotreba; int pocet_km; double cena; String desc; MyRecord(Date date, double objem, int pocet_km, double liter, String desc){ this.date=date; this.spotreba=objem; this.pocet_km=pocet_km; this.cena=liter; this.desc=desc; } and in the ListView I have declared ListItem which looks like that: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent android:paddingLeft=10sp ImageView android:id=@+id/ImageView01 android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/pump android:padding=5sp /ImageView LinearLayout android:id=@+id/LinearLayout01 android:layout_height=wrap_content android:orientation=vertical android:paddingLeft=10sp android:layout_width=fill_parent TextView android:text=@+id/TextView01 android:id=@+id/TextView01 android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FF android:textSize=20sp android:padding=1sp /TextView TextView android:text=@+id/TextView02 android:id=@+id/TextView02 android:layout_width=wrap_content android:layout_height=wrap_content /TextView /LinearLayout /LinearLayout and my problem is to referenced fields double spotreba and Date date to two TextViews in the inner LinearLayout. I understand if I had only strings and it give to adapter. But here I don't understand how to change my ArrayListMyRecord to some ArrayAdapter and show it in the View. can you give me some advice or some tutorial page? Or can you explain me it how should I continue? thank you very much Richard Sámela -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Rotating a camera view manualy?
Is it possible to rotate the view coming in from the camera, so its, say, upside down? I thought this would be a mater of rotating the surface view its on, but nothing seems to work. I tried the advice in this thread for rotating videos; http://groups.google.com/group/android-developers/browse_thread/thread/3563cf871e45d00f/f82fb328d2c2c4c2?lnk=gstq=rotate+surface#f82fb328d2c2c4c2 But the camera just comes out black if that mode is used. So is it possible to rotate the camera image using surface? I'm aware of setDisplayOrientation(90), but that would break 2.1 compatibility and Id rather not do that unless absolutely needed. Thanks, Thomas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] In-app billing - ITEM_ID limitations
I've just finished reading the preliminary documentation for in-app billing. If I've understood correctly, as part of the billing request you can supply: * ITEM_ID which is limited to a small number of pre-registered product ids * DEVELOPER_PAYLOAD unconstrained - but with caveats? and these are the only two pieces of data you can send to identify the product being purchased. But even the DEVELOPER_PAYLOAD appears to be off-limits; the documentation contains the following (rather cryptic) advice: We recommend that you do not use this field to send data or content. I take this to mean product data/content, but that's no more than a guess, and if that's the correct interpretation, why? The result seems to be that you can't sell individuated items. I was hoping to use the in-app billing system to allow purchases of dynamically generated designs from my forthcoming Metaglow application, but this doesn't appear to be possible without operating some sort of 'credits purchase' system which I think would provide a very poor user experience and which isn't what I want to give users. Can anyone shed light on this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Updated my apps's promotional graphic, but Android Market website not showing it yet
I updated the large promotional graphic, my app's high resolution icon and promotional icon today once I saw how the website displayed. The high resolution icon shows up in searches for my app, but it's not showing yet on the apps' webpage. Also, the new large promotional graphic doesn't show on the page yet either. Just curious, wonder how long it will take for the updated image to appear? I've tried refreshing my browser, etc. -niko -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Updated my apps's promotional graphic, but Android Market website not showing it yet
It's a brand new thing so the answer is simple: Be patient. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to lookup DATA._ID for a phone number
Given a phone number, how can I look up the _id of the DATA row for that phone number? I was assuming that the following query would do it: Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber)); Cursor c = resolver.query(lookupUri, new String[] { PhoneLookup._ID }, null, null, null); if (c.moveToFirst()) { long id = c.getLong(0); // do stuff with id } ... but it is returning the contact_id, not the id of the phone record. The official api docs for PhoneLookup indicate that _ID returns the Data row ID: http://developer.android.com/reference/android/provider/ContactsContract.PhoneLookup.html ... but that appears to be incorrect. Am I missing something? How can I efficiently look up the data _id(s) for a given phone number? Thanks in advance ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Question about bug reports
Just to clarify, there is no automatic report getting sent - the user has to send a report. Not quite so with the acra implementation. With one line of code you can send a silent report of any exception - uncaught, caught or simply any piece of text. As long as you mention it nicely in your app somewhere that it might send anonymous logs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Emulator loses network connection issue
Does the emulated system think that it has no longer connectivity? I.e. no more 3G icon in the status bar, and the browser complains with a dialog if you try to use it. 3G icon is still there in the emulator. Any apps trying to perform web activity get host not found error messages. If not, what kind of error is reported by the browser when trying to access a site. In the browser I get the standard android icon with the unable to contact server message If the problem limited to DNS or not (i.e. can the browser access a site by only using its IP address?) Good question! Next time it happens, I'll try using ip addys instead and see if it works. Can you connect to the emulator console with telnet localhost 5554 or even adb shell when this happens? adb continues to perform fine. Nothing in logcat appears around the time connectivity has lost other than messages saying unable to contact host. I can still install apps via adb. Haven't tried telnet to the emu, but assumed that since adb still works fine then telnet should be. I'll check it next time. Which exact platform are your running the emulator on? Running on win xp sp3 using adt9. Similar to metal mikey, I also notice it mostly happens if the emulator has been left open for many hours (i.e. a day or more). But I did notice the connectivity stopped a few days after the emu had been running for only a couple of hours but I had been doing a lot of adb installs in that time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SmaliHook.java found on my hacked application.
I check the signature in my app. But I use reflection to do all calls to get the answer and I dynamically generate up the strings to pass into the reflection in various places throughout the app and in different orders. And even then I use reflection to further convert the signature to a hash and then throughout the app I check the odd character in the hash to make sure it matches the same character in the correct hash. This means that you can't find a mention of PackageManager, PackageInfo, Signature or 0x40 in any text or imported class and you also won't find the signature or the hash clearly visible anywhere. At the very least this isn't something that anti-lvl can currently spot. Plus, after I similarly decompiled a hacked version of my app, I added a mild tweak to the lvl code and I can see that newly hacked versions of my app haven't spotted that change so are failing constantly. :-) HTH. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Is it February yet?
Please update the Platform versions or can someone tell when Google updates them. http://developer.android.com/resources/dashboard/platform-versions.html Is it on the first of every month or at some random time. Thank you, Achie. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Can i use a BroadcastReceiver or Service to retrieve an Incoming call
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 similar apps that works on all android cell phones along with a big list of other phones.. how and why were they able to access and record phone calls ? On Feb 1, 5:47 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Feb 1, 2011 at 8:38 PM, Christian Chabtini cchapt...@gmail.com wrote: I would like to fist detect an incoming call with all the info and then retrieve the audio at will You have no access to the in-call audio in Android, sorry. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy Android Training in Atlanta:http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to tell in code the orientation
Hi so im going to make a layout for both horizontal and vertical layout but im trying to figure out right now is how u make the system know when i guess u create it? is there a way to check programmically? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Is it February yet?
They are updated intermittently. Usually, there is a tweet about it when it occurs. On Wed, Feb 2, 2011 at 6:41 PM, Achie krishna.acha...@gmail.com wrote: Please update the Platform versions or can someone tell when Google updates them. http://developer.android.com/resources/dashboard/platform-versions.html Is it on the first of every month or at some random time. Thank you, Achie. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to tell in code the orientation
If you load a layout resource via setContentView() or a LayoutInflator, Android will choose the right resource automatically based on orientation. If you are generating your UI directly in Java code, either switch to using layout resources, or use the orientation field on the Configuration object to find out what the current orientation is. On Wed, Feb 2, 2011 at 6:45 PM, kiros88 ghui...@gmail.com wrote: Hi so im going to make a layout for both horizontal and vertical layout but im trying to figure out right now is how u make the system know when i guess u create it? is there a way to check programmically? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Question about bug reports
On Wed, Feb 2, 2011 at 5:19 PM, H m...@howardb.com wrote: Just to clarify, there is no automatic report getting sent - the user has to send a report. Not quite so with the acra implementation. With one line of code you can send a silent report of any exception - uncaught, caught or simply any piece of text. As long as you mention it nicely in your app somewhere that it might send anonymous logs. Oh, yes, you're absolutely correct (I do this in fact). I was speaking in terms of the official crash reports that go to the Developer Console. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] TabHost Tabs
Hello Group, How could i find out if the user clicked on the current selected tab? If it was a different tab I could use the setOnTabChangedListener, but how do you get the current tab clicked on. I want it so if that re-click the current tab it will refresh that activity. Thanks group. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to get screen density in pixels-per-inch or equivalent
That's very interesting Dianne, and thanks for taking the time to weigh in. What you are saying makes sense too because the physical size of the screens on Android devices differ. At the very least I expect that each device does the calculations properly when displaying widgets. Or, is that assumption bad too? So, Phil is right too that my numbers would be off by some margin. I wish the OEMs would make the information from their certification and test results documents available to the public ... have you seen any talk about that? That information would help a lot in identifying different device behavior for doing QA. Nothing worse than having a tester try to line up screen captures for pixel perfect matches during a test and having to explain that it's just the device at least not without some hard data. Richard On Jan 12, 12:33 pm, Dianne Hackborn hack...@android.com wrote: The density and densityDpi is an abstract density bucket the device manufacturer has decided makes sense for their UI to run in. This is what is used to evaluate things like dp units and select and scale bitmaps from resources. The xdpi and ydpi are supposed to be the real DPI of the screen... though as you've seen, many devices don't set it correctly. :( This is our fault, it isn't actually used anywhere in the platform, so people don't realize they have a bad value, and we haven't had a CTS test to try to make sure it is sane (it's not clear how that test should work). Worse, we shipping the original Droid with a graphics driver that reports the wrong value here... in fact that reported that same damnable 96. Unfortunately, I don't have a good solution if you want to get the real exactly screen dots per inch. One thing you could do is compare xdpi/ydpi with densityDpi and if they are significantly far apart, assume the values are bad and just fall back on densityDpi as an approximation. Be careful on this, because a correctly working device may have densityDpi fairly different than the real dpi -- for example the Samsung TAB uses high density even though its screen's really density is a fair amount lower than 240. On Wed, Jan 12, 2011 at 11:31 AM, Phil Endecott spam_from_goo...@chezphil.org wrote: Hi Richard, On Jan 12, 6:54 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: Did you try fetching the scale that will allow you to convert from DPI to actual screen pixels? I found this very reliable: final scale = getContext().getResources().getDisplayMetrics().density; The description of that says: on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc. Then multiply scale by one inch of pixels in DPI resolution (depending on the screen you're on) - 120, 160, 240, 320. This API call ... int densityDpi = getContext().getResources().getDisplayMetrics().densityDpi; will tell you the density of the screen you're on. Approximately. So, this will tell you how many screen pixels equate to an inch. I'm not at all sure that it does. Then you can use that to lay out your ruler markings: int pxPerInch = 340; // default value - note it's a new density in API version 9. switch(densityDpi){ case DisplayMetrics.DENSITY_LOW: pxPerInch = 120 * scale; break; case DisplayMetrics.DENSITY_MEDIUM: pxPerInch = 160 * scale; break; case DisplayMetrics.DENSITY_HIGH: pxPerInch = 240 * scale; break; } Note that the values of those constants DENSITY_* are their numeric values, so there is no need for the case statement; you can just write: pxPerInch = densityDpi * scale; However, I really don't think that does what you believe it does. I think that densityDpi reliably gives the approximate dpi, and density just gives densityDpi/160. Multiplying them together doesn't do anything useful. But I could be wrong! Thanks, Phil. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers
[android-developers] In app billing...
Hi, I just received a mail from google that informs me that In-App Billing will be available soon. Can you explain me please what is the in app billing and what is used for? We can create buy now button now without any additional apis that redirect customers to the market, why use in app billing on android? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Dynamic way to search File directory path
Hi i was wondering if there was a way to find files dynamically through the sd card but like without using strings that i know like right now im doing File home = new File(/sdcard/); to just get taht directory is there a way to do one thats like dynamic to search through all folders in sd for files ilke .jpg and then store them in a string array -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Dynamic way to search File directory path
On Wed, Feb 2, 2011 at 8:23 PM, kiros88 ghui...@gmail.com wrote: Hi i was wondering if there was a way to find files dynamically through the sd card but like without using strings that i know like right now im doing File home = new File(/sdcard/); Use Environment.getExternalStorageDirectory() to get a File object pointing to the root of external storage. to just get taht directory is there a way to do one thats like dynamic to search through all folders in sd for files ilke .jpg and then store them in a string array Use the MediaStore content provider, since it did all that work for you. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: In app billing...
Have you read the docs at http://developer.android.com/guide/market/billing/index.html? IANAG, but my understanding from what I've read is that the new architecture allows your customers to purchase additional stuff *within an app*. Previously, redirecting customers to the Market only let them buy additional apps, and it was then up to you to kludge together additional functionality in the original app if you wanted to. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] In app billing...
Mainly for apps where buying extra services makes sense. Like a magazine application that allows you to buy and download magazine subscriptions or editions within the app. Damien sent from my HTC Desire On 03/02/2011 11:39 AM, sblantipodi perini.dav...@dpsoftware.org wrote: Hi, I just received a mail from google that informs me that In-App Billing will be available soon. Can you explain me please what is the in app billing and what is used for? We can create buy now button now without any additional apis that redirect customers to the market, why use in app billing on android? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en