[android-beginners] Re: Camera Button Broadcast Receiver Problem...
Works like a charm! I have another question now. For devices that don't have a camera button (e.g. T-Mobile MyTouch and others) would it be feasible/ok to use the SEARCH_LONG_PRESS broadcast and do the same thing with that button instead? This is what I currently have but I can't test it... receiver android:enabled=true android:name=.CameraLaunchReceiver intent-filter android:priority=1 action android:name=android.intent.action.CAMERA_BUTTON / action android:name=android.intent.action.SEARCH_LONG_PRESS / /intent-filter /receiver Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Thu, Sep 17, 2009 at 2:26 PM, Justin Anderson janderson@gmail.comwrote: Awesome! I will try it tonight. Not very foolproof but it should work in most cases. Apparently all I was missing was the priority. Thanks for the help, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Wed, Sep 16, 2009 at 12:07 AM, Pradeep Kaushik pra...@gmail.comwrote: Hi Tikoze, You can very easily implement this feature. Just have a simple receiver to receive the same intent as the camera that is: android.intent.action.CAMERA_BUTTON In that receiver class start your required activity as required. And, in the corresponding AndroidManifest.xml of your application declare the receiver as below: receiver android:name=*.TestReceiver* intent-filter android:priority=*1* action android:name=*android.intent.action.CAMERA_BUTTON */ /intent-filter /receiver The priority field tells Android to first choose the activity with the higher priority. I have used a very large value. Maybe even a smaller value will work. Also, in your receiver in the first line of your onReceive itself add the following line: abortBroadcast(); This will set a flag to abort the broadcast so nobody else will receive it after you. So, by setting the priority you are telling Android to choose your receiver first and by abortBroadcast you are cancelling the broadcast for Camera so it wont open at all. Hope this helps. Thanks and Regards, Pradeep Kaushik Thanks and Regards Pradeep.N.Kaushik. Sent from New Delhi, DL, India On Wed, Sep 16, 2009 at 9:36 AM, Tikoze janderson@gmail.com wrote: Obviously I understand that the ability to do that could cause some developers to abuse it... And of course I would not like another application to unregister things that my app listens for (if it occurred without the user's knowledge). As an example, I have used an application called Task Switcher. I don't know how the developer does it, but he provides a setting that makes his app (and only his app) launch when the camera button is pressed. He lets the user know what will happen and verifies they want to proceed. I found this ability very useful and handy. I am developing an application very similar to Task Switcher and want to provide the same option to launch my app from the camera button. I would just prefer that the default camera didn't launch before my app... It makes it look like my app launched the camera and then itself and is very unprofessional-looking. Again, if any one knows how to do this, I would be very grateful. On Sep 15, 5:11 pm, Jeffrey Blattman jeffrey.blatt...@gmail.com wrote: seems unlikely (but i have no idea really). you wouldn't think you would have control over the intents that other apps can listen for / act upon. how would you like it if some other app came along and unregistered your app from that intent? On 9/15/09 3:40 PM, Tikoze wrote: Since there is no guarantee as to the order that applications will be notified, it is almost like I would have to find some way to unregister everything else that is listening for the camera button... Given Android's security measures, is that even possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Gallery View performance
Ok, thanks! -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Wed, Sep 23, 2009 at 8:09 PM, QTB QTB qtb@gmail.com wrote: I think Romaine mentioned this a while back. Recycling views doesn't work with the Gallery. Fix targeted for Eclair. On 9/23/09, MagouyaWare magouyaw...@gmail.com wrote: Anyone? On Sep 21, 1:12 pm, MagouyaWare magouyaw...@gmail.com wrote: I have an application on the market (AppSwipe!) that displays three Gallery views with icons of running apps, recent apps, and running processes. I have subclassed Gallery and modified the onFling method to add in the ability to swipe up on any given view in the gallery. Some users have been complaining about the Galleries being sluggish. After looking into it a little bit it, this is what is happening: - The app launches - On any of the gallery views, swiping left or right initially has some hiccups (it is not a smooth scroll) - After every item has been displayed on the screen at least once the hiccups are gone I assume this is because the Gallery View only stores information for what is currently displayed on the screen and that it also caches the information for items that have been viewed but are not currently visible (hence the smoothness after scrolling through everything). I could not find anything in the SDK docs or the Dev Guide. The adapter is a very simple extension of BaseAdapter... Not very different from the Gallery example in the Dev Guide. Is there any way to improve this? Thanks in advance, Justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Strange message during opening stream at InputSource
Hi! i'm trying to execute next code: [code] //URL url comming from input Document doc; DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); doc = docBuilder.parse(new InputSource(url.openStream())); [/code] and have an exception with message : Permission denied (maybe missed INTERNET permission) As i understand, android doesn't give access to Internet for my app? or something else i must know? note : -android emulator have connection to internet (tested at browser) -(new InputSource(url.toString)); was with another message, but under win-console-compilation it works --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Strange message during opening stream at InputSource
-(new InputSource(url.toString)); was with another message InputSource needs either stream or reader On Sep 24, 10:09 am, kiro cih.exe...@gmail.com wrote: Hi! i'm trying to execute next code: [code] //URL url comming from input Document doc; DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); doc = docBuilder.parse(new InputSource(url.openStream())); [/code] and have an exception with message : Permission denied (maybe missed INTERNET permission) As i understand, android doesn't give access to Internet for my app? or something else i must know? note : -android emulator have connection to internet (tested at browser) -(new InputSource(url.toString)); was with another message, but under win-console-compilation it works --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Empty EditText Causing force closes
Well, I got it working but I'm pretty sure there is an easier way to do it. I basically just add a string variable containing 0, check to make sure the string coming from the EditText isn't equal to 0, and then parseInt the string and divide it by 10 to get the original number. If anyone knows of an easier way to get this done that would be great! On Sep 24, 12:08 am, Jeffrey jeffisagen...@gmail.com wrote: I'm trying to make an error message pop up if the user leaves an entry field blank instead of a force close. Right now I've got this: if (NumCanShootValue == null) { String Failure = Please Fill In required Fields.; Toast.makeText(QuickShoot.this, Failure, Toast.LENGTH_SHORT).show(); } else {blah blah blah} This doesn't work, and I tried a .hasNext() but I don't know what to attach it to. .hasNext() doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Get active context dynamically of an application
bump. Thanks :) -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar atif.gul...@gmail.com wrote: Hi, How can get the active context of an application? The scenario is, I have an AsyncTask inside an activity_A. And on successful completion (means in onPostExecute) of this AsyncTask I want to show a dialog (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);) But in the meanwhile(before completing this AsyncTask) if the application is moved to another activity_B. The above dialog context will not be the current Context so it will through an Exception. So is it possible to get the active Context dianamically? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Sense UI
'Where do i get the sense UI theme? Is it opensourced? It is not open source, and AFAIK the theme is not distributed to third parties. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Please Help Urgent: Get active context dynamically of an application
I posted this questions twice. I will really appreciate your help. Am I asking very basic or vice versa? Or it is not possible in Android. Please help. On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar atif.gul...@gmail.comwrote: Hi, How can get the active context of an application? The scenario is, I have an AsyncTask inside an activity_A. And on successful completion (means in onPostExecute) of this AsyncTask I want to show a dialog (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);) But in the meanwhile(before completing this AsyncTask) if the application is moved to another activity_B. The above dialog context will not be the current Context so it will through an Exception. So is it possible to get the active Context dianamically? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Please Help Urgent: Get active context dynamically of an application
I posted this questions twice. I will really appreciate your help. Am I asking very basic or vice versa? Or it is not possible in Android. Please help. I cannot speak for anyone else, but I saw and skipped your previous messages because you insist upon cross-posting to multiple lists, and I get tired of it. Please only post to one list at a time. You also reposted this twice within the past few hours. If you want that fast of a response, please hire a consultant. The scenario is, I have an AsyncTask inside an activity_A. And on successful completion (means in onPostExecute) of this AsyncTask I want to show a dialog (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);) But in the meanwhile(before completing this AsyncTask) if the application is moved to another activity_B. The above dialog context will not be the current Context so it will through an Exception. Bear in mind that there may not be a current Context. The user might have exited your activity, for example. I am not aware of a 100% reliable way to raise a dialog triggered asynchronously, such as in onPostExecute(). One approximate answer is to have the activity register a listener object with the service (e.g., in onCreate()) and unregister itself later (e.g., in onDestroy()). The service would call a method on the listener object (if it is not null) to have the listener/activity raise the dialog. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Please Help Urgent: Get active context dynamically of an application
Thanks Murphy , I really appreciate your help. I posted this questions about two weeks ago on developers list. But when I did not get any response. I posted it on both lists. Sorry if I lost my patient and posted it twice but you response (If you want that fast of a response, please hire a consultant.) is bit harsh. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Thu, Sep 24, 2009 at 3:58 PM, Mark Murphy mmur...@commonsware.comwrote: I posted this questions twice. I will really appreciate your help. Am I asking very basic or vice versa? Or it is not possible in Android. Please help. I cannot speak for anyone else, but I saw and skipped your previous messages because you insist upon cross-posting to multiple lists, and I get tired of it. Please only post to one list at a time. You also reposted this twice within the past few hours. If you want that fast of a response, please hire a consultant. The scenario is, I have an AsyncTask inside an activity_A. And on successful completion (means in onPostExecute) of this AsyncTask I want to show a dialog (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);) But in the meanwhile(before completing this AsyncTask) if the application is moved to another activity_B. The above dialog context will not be the current Context so it will through an Exception. Bear in mind that there may not be a current Context. The user might have exited your activity, for example. I am not aware of a 100% reliable way to raise a dialog triggered asynchronously, such as in onPostExecute(). One approximate answer is to have the activity register a listener object with the service (e.g., in onCreate()) and unregister itself later (e.g., in onDestroy()). The service would call a method on the listener object (if it is not null) to have the listener/activity raise the dialog. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Game Development sample code
Hi,I am planning to develop the car game, so if any body having sample code to start with,please let me know -- Thank You, Pruthvi Raj G.R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Please Help Urgent: Get active context dynamically of an application
Sorry if I lost my patient and posted it twice but you response (If you want that fast of a response, please hire a consultant.) is bit harsh. Perhaps. Bear in mind that there are other resources besides these lists for getting help: http://www.androidguys.com/2009/06/22/youve-got-questions-thats-understandable/ If you do not think your questions are getting sufficient attention here, try StackOverflow, for example. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Please Help Urgent: Get active context dynamically of an application
On Thu, Sep 24, 2009 at 11:23 AM, Atif Gulzar atif.gul...@gmail.com wrote: Thanks Murphy , I really appreciate your help. I posted this questions about two weeks ago on developers list. But when I did not get any response. I posted it on both lists. Sorry if I lost my patient and posted it twice but you response (If you want that fast of a response, please hire a consultant.) is bit harsh. I think considering the response harsh really depends on how you read it. If you were in fact urgently seeking an answer, and needed it within hours, then hiring a consultant would have improved your situation. It's also always good to point out best practices to a poster that violates them, because they are otherwise left wondering why they get no answers to their questions. Mark is definitely not the only subscriber on this list who ignores cross-posters or people who re-post the same question within hours of the last one. Anyway, another option in addition to Mark's suggestion would be to block the startActivity call whilst your AsyncTask is running. Set a boolean flag that indicates that your task is busy, and use a Activity.postDelayed() callback to poll for the flag to become false before changing activity. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Can i fetch the latest image from gallery taken from camera ?
HI ! I want to fetch the latest image taken from camera into my code and then can do manipulation on it. Being a newbie i dont know how to get hold of that image .. and secondly how to read that image into my code. I guess i have to use content providers but how?? plz guide me with a sample code. I'll be so thankful to u ppl. Regards, wahib --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Xzing Barcodescanner without Intent
I have successfully run the docode function on a barcode image stored in res folder and it worked fine. I am now searching for any .apk file for barcode scanning app to test it with Intents as well. I hope it goes to some success. well, thanks for reply Regards, wahib On 9/24/09, Joe nisyp...@gmail.com wrote: So well, yess, people preffer using intents because it is much easier! but the google barcodescanner must be installed, otherwise you have to handle the exeptions (when you start the intent put it into a try and if it does not work let a dialog pop up or so...) and yesss, something you should know about intents, sometimes it doesn't handle the orientation changes right! ok, i just found out, that the emulator does not support the android market, so what you can do is look in some filesharing sites and download the apk and then upload it to some website, and then install it via the webbrowser onto your emulator. thats the only thing, i could think of. to your problem of the barcode scanner, it is going to be hard to get that to work isn't there something black and white, when you start the camera on the emulator? couldn't you maybee just change that picture to a barcode one? but i have now idea how you would do that... sorry if i couldn't help you as much as you would prefer... regards joe On 22 Sep., 20:57, wahib haq wahib.t...@gmail.com wrote: hi joe. I am also working on a simple barcode scanning app and being a newbie i am stuck for a long time. Up to my research all people preffer using intent for barcode scanning. I really need your little help. How have u done using intents? I found the code using intents but i am confused as i am working on emulator only. so how can i text it using emulator only? how to install barcode scanning app on emulator? and share link of .apk file if you have. First i was working on decoding a stored barcode image but it wasnt working so i just want to move on to finalizing it. Your help can just solve my problem. Well, to your issue i can come up to only one solution. If you just take snap of the barcode image and store it in gallery and after it your app read the latest added image from gallery and decode it. Dont laugh if its a very childish solution :) waiting for ur reply. Regards, wahib On 9/22/09, Joe nisyp...@gmail.com wrote: Hey everyone... how can i integrate the barcodescanner, whithout unsing an intent? my app, is now working with an intent, but i sort of disklile it for many reasons (one needs to have the barcodescanner installed, i don't want it full screen... ) i would like it similar to compare everywhere or shopsavy... but i am totally lost... i would very much appreciate help in any form. Regards johannes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Can i install 'barcode scanning app' on emulator ???
Hi !! I want to make a simple barcode scanning app using Intents. The problem is that i dont have a phone and i have to test all thing on emulator. Can anyone share how i can get 'barcode scanning .apk file' ?? so that i can install it on my emulator. I am really stuck with it. plz help. Regards, wahib --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] join here
join this group http://groups.google.com/group/mobile-application-developers -- Thanks Regards Sasikumar.S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: onKeyboardActionListener vs onKeylistener
Another thought. How are you copying and pasting from A to B ? I was able to do it using this snippet. CharSequence c = ((EditText)v).getText(); edittext2.setText(c); Balwinder Kaur ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 9:54 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: hmm..I don't know what is going in your environment. For me (using SDK 1.5) Your code as is, works too. When I hit the back button on the emulator, the virtual keyboard exits, HELLO gets copied to the EditTextA. Balwinder Kaur ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 1:10 pm, Android_n00b nikhil...@gmail.com wrote: I apologize about the last part of that message. I meant that I read online about KeyboardView.OnKeyboardActionListener, but do not know how it works. On Sep 23, 4:08 pm, Android_n00b nikhil...@gmail.com wrote: Thanks for the reply. If I type HELLO and hit the back button, only O gets copied into box B. It's weird. Here is the relevant part of my code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.virtualkeyboard); final EditText boxA= (EditText) findViewById(R.id.boxA); final EditText boxB= (EditText) findViewById(R.id.boxB); boxA.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { // TODO Auto-generated method stub if(event.getAction() == KeyEvent.ACTION_UP) { //copy text from box A to B } return false; } }); Now just to repeat my problem, the above code works perfectly when I use a physical keyboard, or the emulators hard keyboard. It is only when I use the virtual(soft) keyboard does it not work. I saw some posts online about using setOnKeyListener instead. But I do not know how that works since it is not a method for EditText. On Sep 23, 3:54 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: Did you try hitting the backbutton on the emulator ( that would remove virtual keyboard) and see if EditBox B gets updated or not ? I think it should. If not, please past your code here, so folks can take a look at it. Thanks, Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 11:13 am, Android_n00b nikhil...@gmail.com wrote: Hi, I am new to Android, and am writing an app which has 2 EditTexts (Let's call them A and B) and whenever I hit any key in A, it is automatically copied to B. For example, if I type HELLO in A, it will copy each letter into B. I managed to get this to work perfectly with the setOnKeyListener(). However, in the emulator I found that the virtual keyboard did not respond to this listener the same way. For some weird reason, the number keys in the Virtual Keyboard (0-9) responded to the onKeyListener but none of the others did. After doing a Google search of my issue, I found some people with similar problems, but no real solution. I realized there is a KeyboardView.OnKeyboardActionListener which listens for inputs from the virtual keyboard. However, I have no idea how to use this in my edittext field. I would appreciate some sort of help with this matter. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Microphone disabled by audio adapter?
Just started using my ADP1 in the car; with an HTC audio adapter, I can connect a line from the phoen to the car stereo. Works great for music, but when I tried to use the phone in speakerphone mode, the internal microphone was disabled. Is there any work around for this? The HTC pinout has a microphone input, so I guess plugging an audio adapter in automatically disables it. When I use the HTC headphones that came with the phone, I am still able to use the phone as a phone, without unplugging them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Unable to stop Emulator from commandline in linux
On Thu, Sep 24, 2009 at 2:40 PM, Smruti smruti...@gmail.com wrote: [r...@localhost tools]# emulator -avd test_avd unknown option: -avd Android Emulator usage: emulator [options] [-qemu args] options: -system dir read system image from dir -datadir dir write user data into dir Hi Smruti, Your problem may be related to the audio functionality in the emulator: http://www.mail-archive.com/android-beginners@googlegroups.com/msg09605.html. Although this person was able to kill -9 his emulator. Still, it might be different symptoms for the same bug... Is there a particular reason why you're using such an outdated version of the SDK? I'm a tad suspicious of the reliability running a 1.5 AVD against a 1.1 emulator, it might be fine, but if you're having problems it might be worth downloading the latest SDK to eliminate the possibility of compatibility problems. Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Poor performance on my file loader (code optimization help!)
Is there a reason to why you use a LineNumberReader? I would instead use a BufferedReader, that will probably improve your performance. I don't know anything about the dataformat in the file, but there probably is a much faster way to parse it than using all those StringTokenizers (or regexp even if that might be faster). I would also try to parse the file without mark and reset. On 20 Sep, 20:28, Glen Kimsey gkim...@gmail.com wrote: Hello! I'm fairly new to both Android and Java (pretty experienced in C/C++), and (stupidly, perhaps) took on a big project. In it, I need to load information about 3D models and their respective animations from a text file (proprietary file format based on PSK/PSA). The loading process on a sample (1000+ line) file is abysmally slow (more than 4 minutes). The good news is that there are lots and lots of ways I can improve it. What I'm hoping to find out here is if there's anything in *particular* in my code that is very inefficient that I can change. Don't worry about offending me, I know this is amateur code here. Some possible causes for the slowness: - Extensive use of parseFloat() - Creating new StringTokenizer for every line - Inefficiencies in for() loops (not caching as necessary?) - Repeated use of the acos() and sqrt() functions I'd like to find out from you gentlemen (ladies) what you think is the major thing eating up my time here. If there's some tool I can use to find out what lines of code are taking up the most time that'd be ideal. I'm open to any possible solutions. The file format can change (and probably will). I could even do something as drastic as performing this load in a separate app (before distribution) and somehow exporting the resulting object (KdfAnimation) that could more easily be picked back up (this would work in C, but I'm doubtful Java would allow such low-level memory copying). One final note is that the action loading section of this code occupies about 3/4 of the files being loaded (so this section may be more important to optimize). Loader Code public class KdfLoader { public static KdfAnimation load(String file) throws IOException { KdfAnimation anim = new KdfAnimation(); FileInputStream fis = new FileInputStream(file); String line = [start]; LineNumberReader lnr = new LineNumberReader(new InputStreamReader (fis)); int boneNum = 0; try { for (line = lnr.readLine(); line != null; line = lnr.readLine()) { if (line.length() 0) { if (line.startsWith(numbones)) { // Ignore it for now } else if (line.startsWith(bone)) { // Bone define StringTokenizer tok = new StringTokenizer(line); KdfBone bone = new KdfBone(); // Toss out bone tok.nextToken(); // Set name bone.boneName = tok.nextToken(); if (boneNum == 0) { // Root bone. Ignore children and parent id in file bone.parentId = 0; bone.parent = null; // ignore numchildren x // ignore parentid x } else { // ignore numchildren x tok.nextToken(); tok.nextToken(); // ignore parentid text tok.nextToken(); bone.parentId = Integer.parseInt(tok.nextToken()); bone.parent = anim.allBones.get(bone.parentId); } // get loc and rot line = lnr.readLine(); bone.loc = parseLocLine(line); line = lnr.readLine(); bone.rot = parseRotLine(line); // Handle explicit linkage while(true) {
[android-beginners] Re: onKeyboardActionListener vs onKeylistener
Hi Balwinder, That is pretty much what I'm doing. I'm running 1.6. I guess it's working for me as well that way, but why do I have to hit the back button on the emulator for the text to be copied? On a real device this would be kind of frustrating. On Sep 24, 8:52 am, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: Another thought. How are you copying and pasting from A to B ? I was able to do it using this snippet. CharSequence c = ((EditText)v).getText(); edittext2.setText(c); Balwinder Kaur ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 9:54 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: hmm..I don't know what is going in your environment. For me (using SDK 1.5) Your code as is, works too. When I hit the back button on the emulator, the virtual keyboard exits, HELLO gets copied to the EditTextA. Balwinder Kaur ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 1:10 pm, Android_n00b nikhil...@gmail.com wrote: I apologize about the last part of that message. I meant that I read online about KeyboardView.OnKeyboardActionListener, but do not know how it works. On Sep 23, 4:08 pm, Android_n00b nikhil...@gmail.com wrote: Thanks for the reply. If I type HELLO and hit the back button, only O gets copied into box B. It's weird. Here is the relevant part of my code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.virtualkeyboard); final EditText boxA= (EditText) findViewById(R.id.boxA); final EditText boxB= (EditText) findViewById(R.id.boxB); boxA.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { // TODO Auto-generated method stub if(event.getAction() == KeyEvent.ACTION_UP) { //copy text from box A to B } return false; } }); Now just to repeat my problem, the above code works perfectly when I use a physical keyboard, or the emulators hard keyboard. It is only when I use the virtual(soft) keyboard does it not work. I saw some posts online about using setOnKeyListener instead. But I do not know how that works since it is not a method for EditText. On Sep 23, 3:54 pm, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: Did you try hitting the backbutton on the emulator ( that would remove virtual keyboard) and see if EditBox B gets updated or not ? I think it should. If not, please past your code here, so folks can take a look at it. Thanks, Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 23, 11:13 am, Android_n00b nikhil...@gmail.com wrote: Hi, I am new to Android, and am writing an app which has 2 EditTexts (Let's call them A and B) and whenever I hit any key in A, it is automatically copied to B. For example, if I type HELLO in A, it will copy each letter into B. I managed to get this to work perfectly with the setOnKeyListener(). However, in the emulator I found that the virtual keyboard did not respond to this listener the same way. For some weird reason, the number keys in the Virtual Keyboard (0-9) responded to the onKeyListener but none of the others did. After doing a Google search of my issue, I found some people with similar problems, but no real solution. I realized there is a KeyboardView.OnKeyboardActionListener which listens for inputs from the virtual keyboard. However, I have no idea how to use this in my edittext field. I would appreciate some sort of help with this matter. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more
[android-beginners] name of the event which gets trigger when i push/pull the file in FS
Hi, Media Scanner doesn't get activate when i push/pull the file using DDMS. Media Scanner gets called only when the phone boots up and also when SD card is removed / inserted. Does anyone know, 1. How to activate the media scanner ? 2. What is the name of the event which gets trigger when i push/pull the file in File System ? Thanks Regards, S.Sriniamul From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: join here
On Thursday 24 September 2009 05:02:02 Sasikumar.S wrote: join this group http://groups.google.com/group/mobile-application-developers Why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to start an Android project in Eclipse?
Make sure that you have set the path to the Android SDK under Window- Preferences-Android See configurin eclipse at: http://developer.android.com/sdk/1.6_r1/installing.html#InstallingADT Sudheesh On Sep 23, 5:43 pm, Jaakko matikkaja...@netti.fi wrote: I tried to install Android in Eclipse. I followed instructions from the sites http://www.howtoforge.com/installing-google-android-sdk1.0-on-ubuntu8... andhttp://developer.android.com/guide/tutorials/hello-world.html. Now, as I start Eclipse and an Android project, it says that An SDK Target must be specified. But in the window, the whole Built Target - box is inactive so I can't activate the Target Name. How can I fix the problem? I installed today the latest version of Java available in Xubuntu and downloaded Eclipse and Android from the web so I guess my tools are not out of date. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Setting a view to be sqare without hardcoding dimensions
I'm trying to create a layout using XML where there is a view that is a square that fills the width of the activity in portrait mode without setting any values that assume the screen will always be a certain resolution or aspect ratio. The remainder of the space available will have additional views just below. The only way I can find to do this uses the android:layout_weight attribute, but to make one control a square the fills the width of the activity in this way assumes that the aspect ratio of all devices will be the same. Is the a solution to this without hardcoding any dimensions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Error Creating AVD
I think you don't have JDK installed (http://java.sun.com/javase/ downloads/index.jsp). Or if you have already installed it, make sure that the bin directory is in the PATH. On Sep 23, 4:35 pm, Highmastdon albertgroothe...@gmail.com wrote: Hi, I've been trying to run a default application in netbeans, but there is no AVD to select. So i found this command to install it. Go to the Tools folder and run this command android create avd -n name -t 2 In my case i did this in my Commandline: cd C:\Program Files\Java\android-sdk-windows-1.6_r1\tools\ android create avd -n androidAVD -t 2 I get the following error: 'java' is not recognized as an internal or external command, operable program or batch file. SWT folder '' does not exist. Please set ANDROID_SWT to point to the folder containing swt.jar for your platform. I hope you can help me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Selecting a city location
I have an app in which I want to be able to select a location from a list of cities, and find out the latitude / longitude for that city. Now surely I don't need to store all that data in the app myself? There must be an intent or similar available already to get that info? Certainly the clock weather apps (on my htc hero) already have a list of cities - can I somehow access that? bevis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to..
Hi, I'm writting an application that has to interact with an external hardware using USB. As emulator doesn't support USB port connection. Is there any workaround for this?? Thanks Sourabh Pandit --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to launch android emulator
I followed the instruction to load Android in (http:// source.android.com/download). I am using Ubuntu ver9.03. I am having trouble to launch emulator. Message I got: emulator:cannot excute binary file. Anyone has ideas why? Thanks Androidbeginner. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Selecting a city location
I have an app in which I want to be able to select a location from a list of cities, and find out the latitude / longitude for that city. Now surely I don't need to store all that data in the app myself? There must be an intent or similar available already to get that info? Certainly the clock weather apps (on my htc hero) already have a list of cities - can I somehow access that? The clock and weather apps (widgets?) on your Hero are proprietary and, AFAIK, have no documented Intents for anything, let alone getting latitude and longitude of a city from a list. I am not aware of anything built into Android that offers such an Intent. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: name of the event which gets trigger when i push/pull the file in FS
What's with hijacking this thread? On Sep 24, 11:20 am, Sriniamul Senthil srinia...@yahoo.com wrote: Hi, Media Scanner doesn't get activate when i push/pull the file using DDMS. Media Scanner gets called only when the phone boots up and also when SD card is removed / inserted. Does anyone know, 1. How to activate the media scanner ? 2. What is the name of the event which gets trigger when i push/pull the file in File System ? Thanks Regards, S.Sriniamul From cricket scores to your friends. Try the Yahoo! India Homepage!http://in.yahoo.com/trynew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to launch android emulator
You have to be more specific. Did you create an avd? On Sep 24, 12:31 pm, Androidbeginner phitr...@gmail.com wrote: I followed the instruction to load Android in (http:// source.android.com/download). I am using Ubuntu ver9.03. I am having trouble to launch emulator. Message I got: emulator:cannot excute binary file. Anyone has ideas why? Thanks Androidbeginner. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to launch android emulator
You can run the emulator using the Eclipse IDE or via command line. Follow the instructions on http://developer.android.com/sdk/1.6_r1/index.html for the latest SDK version. Make sure that you download the Android package for the correct platform. If you add more information what exactly you are doing, this would be helpful! -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 24, 11:21 am, Android_n00b nikhil...@gmail.com wrote: You have to be more specific. Did you create an avd? On Sep 24, 12:31 pm, Androidbeginner phitr...@gmail.com wrote: I followed the instruction to load Android in (http:// source.android.com/download). I am using Ubuntu ver9.03. I am having trouble to launch emulator. Message I got: emulator:cannot excute binary file. Anyone has ideas why? Thanks Androidbeginner. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to launch android emulator
At the command line you can start the emulator like this - emulator -avd android1.5_maps -logcat v:* In this case, I first created an AVD named android1.5_maps. Read how to create an AVD in the Dev Guide. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Selecting a city location
I don't know about getting a list of cities, but android.location.Geocoder#getFromLocationName will give you an address with latitude and longitude for strings like Boston, MA. On Sep 23, 2:54 pm, bevis bev...@gmail.com wrote: I have an app in which I want to be able to select a location from a list of cities, and find out the latitude / longitude for that city. Now surely I don't need to store all that data in the app myself? There must be an intent or similar available already to get that info? Certainly the clock weather apps (on my htc hero) already have a list of cities - can I somehow access that? bevis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] TARGET_PRODUCT for 1.6 build
I want to build 1.6 for GoogleIO phone. Should i build TARGET_PRODUCT as generic OR HTC_DREAM ? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Failed to start monitoring
I sometimes get this error. For me just disconnecting and reconnecting my phone to my PC fixes it. On Sep 23, 2009 12:10 PM, Terje Hitsoey thomerta...@gmail.com wrote: I do not know your problem.Send a message to your programmer.Nice day. 2009/9/23 Pruthvi Raj pruthvi...@gmail.com Hi, If i plug in my device its showing as Failed to start monitoring HT851GZ44724. But it w... -- Alle utgående meldinger er godkjent av meg. Sender aldri ting som kan skade andre personer. --~--~-~--~~~---~--~~ You received this message because you are su... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Setting a view to be sqare without hardcoding dimensions
Create a custom View and implement onMeasure to achieve what you want. On Sep 24, 2009 11:03 AM, Daniel daniel.corm...@gmail.com wrote: I'm trying to create a layout using XML where there is a view that is a square that fills the width of the activity in portrait mode without setting any values that assume the screen will always be a certain resolution or aspect ratio. The remainder of the space available will have additional views just below. The only way I can find to do this uses the android:layout_weight attribute, but to make one control a square the fills the width of the activity in this way assumes that the aspect ratio of all devices will be the same. Is the a solution to this without hardcoding any dimensions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Gallery View performance
The fix will probably not hppen for Eclair, sorry :( On Sep 23, 2009 11:47 PM, Justin Anderson janderson@gmail.com wrote: Ok, thanks! -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Wed, Sep 23, 2009 at 8:09 PM, QTB QTB qtb@gmail.com wrote:I think Romaine mention... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Gallery View performance
Hmm well that's a bummer. Is there anything that could possibly make it run smoother? Perhaps using a different type of adapter? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Thu, Sep 24, 2009 at 2:30 PM, Romain Guy romain...@google.com wrote: The fix will probably not hppen for Eclair, sorry :( On Sep 23, 2009 11:47 PM, Justin Anderson janderson@gmail.com wrote: Ok, thanks! -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Wed, Sep 23, 2009 at 8:09 PM, QTB QTB qtb@gmail.com wrote: I think Romaine mention... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] java.util.prefs.Preferences doesn't work on device?
Hi! My simple app needs to permanantly save its state before being destroyed. I use something like this: private static final Preferences prefs = Preferences.userNodeForPackage (WordChoice.class); Now it seems that after experimenting a while on my g1 device, it seems that preferences are sometimes cleared when the application stops, from my experience this happens at random and there is a roughly a 50% chance that preferences will be cleared. This does not happen in the emulator, and certainly should not in the Java world as far as I know since preferences are permanent type of storing data. Is there a way to use java.util.prefs.Preferences on Android platform without risking clearing the prefs every time the app is stopped? I don't want to use a file or database. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] bring up display setting in my activity
I want to adjust display settings in my activity. Intent intent=new Intent(Settings.ACTION_DISPLAY_SETTINGS); startActivity(intent); got exception: 09-24 21:24:35.901: ERROR/AndroidRuntime(5892): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.settings.DISPLAY_SETTINGS } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] HELP
this is the problem: there are 5 EDITTEXT boxes. the value that the user enters into FIELD1 needs to be retrieved in to a variable called FIELD1_RETRIEVED. if the user enters 135.98, that number is used in the calculation process. once FIELD1 is entered, the CALCULATE button is pressed. WHATEVER those value might be the remaining fields(FIELD2, FIELD3, FIELD4 AND FIELD5) need to take on those values. all the R.id.FIELDX are an INTEGER. so how to do this is getting abit overwhelming, i realize that it isn't all that hard to do, but at this time, very frustrating. anyone who could lend so code samples of how to read what a value is, and put a result into a EDITTEXT field would be appreciated. thanks to all, rc3375 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] ImageAdapter Help
I'm working on a program that generates dice, lots of dice. I finally found out how to make an adapter to display an image dynamically, but now I have a new problem. The dice that are generated/displayed by the Adapter change if they scroll off the screen. Basically every time each die image moves into view it is re-randomizing what die it needs to show. I also need it to log the die results to a separate file, but I don't know where to stick that code, seeing as it would add dice to the list every time a die is re-drawn. This is my current code: public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView; if (convertView == null) { imageView = new ImageView(mContext); imageView.setLayoutParams(new GridView.LayoutParams(75, 75)); imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); imageView.setPadding(1, 1, 1, 1); } else { imageView = (ImageView) convertView; } Random RollDie = new Random(); Die1 = RollDie.nextInt(6); Die1Copy = Die1; if(((Die1Copy += QuickShoot.BSFinal) 6)) { Die1 += 6; } imageView.setImageResource(DieResult[Die1]); return imageView; } // references to our images private Integer[] DieResult = { R.drawable.die1, R.drawable.die2, R.drawable.die3, R.drawable.die4, R.drawable.die5, R.drawable.die6, R.drawable.die1under, R.drawable.die2under, R.drawable.die3under, R.drawable.die4under, R.drawable.die5under, R.drawable.die6under }; } If anyone knows how I can make it generate a Die for a set position and then not redraw please let me know you will save my life! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Segmentation Fault
http://groups.google.co.uk/group/android-beginners/browse_thread/thread/3ab9158c71788c0d/e8c2acd6737cfcbc? Following on from the above post I thought I would make a new topic (as it does open up a new subject) I get the following text when trying to execute the emulator via eclipse: [2009-09-20 00:08:15 - HelloAndroid]-- [2009-09-20 00:08:15 - HelloAndroid]Android Launch! [2009-09-20 00:08:15 - HelloAndroid]adb is running normally. [2009-09-20 00:08:15 - HelloAndroid]Performing com.example.helloandroid.HelloAndroid activity launch [2009-09-20 00:08:15 - HelloAndroid]Automatic Target Mode: launching new emulator with compatible AVD 'my_avd' [2009-09-20 00:08:15 - HelloAndroid]Launching a new emulator with Virtual Device 'my_avd' Yet after waiting 20 minutes, still no emulator.. Running the emulator via command line results in this message: [h...@shirley tools]$ emulator -avd my_avd Segmentation fault Any ideas? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Scroll image like a WebView
The idea is that I want to use standard UI designs for things. I have a large scrollable area, and I want people to know it's scrollable because there's the same scrollbars that they see in other applications. It feels silly to have to rebuild the scrolling functionality from scratch. It already exists in another component, and really should exist in a primitive form, but if I have to rebuild that functionality from scratch, well, I guess that's what I have to do. I just hope that in a future SDK release, someone will realize that not having this particular bit of functionality outside of the WebView widget is unnecessarily limiting. On Sep 23, 9:32 pm, Mark Murphy mmur...@commonsware.com wrote: Scaling will not work, and yes, I need to scroll in both directions. This is for an Android port of Nethack: http://www.nethack.org/ For reference, here's an image of the WinCE port: http://images.google.com/imgres?imgurl=http://freewareppc.com/images/... There's a large map, the tiles are 16x16 pixels, and scrolling in both directions is absolutely required. This is really something that should be easy in Android, but I have no idea how to do it. Try using the 2D graphics API (Canvas and SurfaceView). I suspect there are few, if any, games on Android akin to Nethack that attempt to use the widget API (ImageView and scrolling containers). I know that Ed Burnette's book _Hello, Android_ covers this API, albeit for a Sudoku game rather than something like Nethack. One of these days, I'll have to learn this stuff myself... -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Java heap outofmemory during dex
Hi all, I've met this problem: When using ant to package my program, at the dex step, it crash as below: dex: [echo] Converting compiled files and external libraries into release/classes.dex... [apply] UNEXPECTED TOP-LEVEL ERROR: [apply] java.lang.OutOfMemoryError: Java heap space [apply]at java.util.Arrays.copyOf(Unknown Source) [apply]at java.util.Arrays.copyOf(Unknown Source) [apply]at java.util.ArrayList.ensureCapacity(Unknown Source) [apply]at java.util.ArrayList.add(Unknown Source) [apply]at com.android.dx.ssa.SCCP.addUsersToWorklist (SCCP.java: 106) [apply]at com.android.dx.ssa.SCCP.simulatePhi(SCCP.java:188) [apply]at com.android.dx.ssa.SCCP.simulateBlock(SCCP.java: 199) [apply]at com.android.dx.ssa.SCCP.run(SCCP.java:402) [apply]at com.android.dx.ssa.SCCP.process(SCCP.java:84) [apply]at com.android.dx.ssa.Optimizer.runSsaFormSteps (Optimizer.java:161) [apply]at com.android.dx.ssa.Optimizer.optimize (Optimizer.java: 101) [apply]at com.android.dx.ssa.Optimizer.optimize (Optimizer.java: 74) [apply]at com.android.dx.dex.cf.CfTranslator.processMethods (CfTranslator.java:269) [apply]at com.android.dx.dex.cf.CfTranslator.translate0 (CfTranslator.java:131) [apply]at com.android.dx.dex.cf.CfTranslator.translate (CfTranslator.java:85) [apply]at com.android.dx.command.dexer.Main.processClass (Main.java:297) [apply]at com.android.dx.command.dexer.Main.processFileBytes (Main.java:276) [apply]at com.android.dx.command.dexer.Main.access$100 (Main.java: 56) [apply]at com.android.dx.command.dexer.Main$1.processFileBytes (Main.java:228) [apply]at com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:134) [apply]at com.android.dx.cf.direct.ClassPathOpener.processDirectory (ClassPathOpener.java:190) [apply]at com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:122) [apply]at com.android.dx.cf.direct.ClassPathOpener.processDirectory (ClassPathOpener.java:190) [apply]at com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:122) [apply]at com.android.dx.cf.direct.ClassPathOpener.processDirectory (ClassPathOpener.java:190) [apply]at com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:122) [apply]at com.android.dx.cf.direct.ClassPathOpener.processDirectory (ClassPathOpener.java:190) [apply]at com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:122) [apply]at com.android.dx.cf.direct.ClassPathOpener.process (ClassPathOpener.java:108) [apply]at com.android.dx.command.dexer.Main.processOne (Main.java: 245) [apply]at com.android.dx.command.dexer.Main.processAllFiles (Main.java:183) [apply]at com.android.dx.command.dexer.Main.run(Main.java: 139) BUILD FAILED F:\build.xml:30: The following error occurred while executing this line: F:\\android_build.xml:185: apply returned: 3 I'm wondering if the heap of packaging is too small? My program (in .class files) totally about 1m (and use about 1.7m) space. How much is the biggest size of program? Thanks very much --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: join here
To share ideas about the mobile application development... On Sep 24, 9:30 pm, Kent Loobey k...@uoregon.edu wrote: On Thursday 24 September 2009 05:02:02Sasikumar.S wrote: join this group http://groups.google.com/group/mobile-application-developers Why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Scroll image like a WebView
The idea is that I want to use standard UI designs for things. I have a large scrollable area, and I want people to know it's scrollable because there's the same scrollbars that they see in other applications. Games don't usually have scrollbars, so I fail to see how adding scrollbars to a game fits standard UI designs for things. But, I'm probably just missing something. It feels silly to have to rebuild the scrolling functionality from scratch. It already exists in another component, and really should exist in a primitive form, but if I have to rebuild that functionality from scratch, well, I guess that's what I have to do. You assume WebKit's scrolling is handled like the scrolling of other widgets. I strongly suspect that is not the case -- WebKit itself probably handles its scrolling, and reports events to the rendering layer to indicate characteristics of the scrollbar (thumb position, thumb size) to be drawn. This is very much not in the spirit of ScrollView, but it would be necessary for WebKit, since that works on a variety of environments, from desktops to non-Android phones. It also may not be terribly reusable. I just hope that in a future SDK release, someone will realize that not having this particular bit of functionality outside of the WebView widget is unnecessarily limiting. If you can point to code in http://source.android.com that demonstrates the code is, indeed, separable into a reusable component, please do. If you find it, log an issue to http://b.android.com requesting that such code be pulled out into such a reusable component. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Scroll image like a WebView
HI http://bazaar.launchpad.net/~pjv/androidsfortune/trunk/annotate/head%3A/src/net/lp/androidsfortune/utils/FullScrollView.java.http://bazaar.launchpad.net/%7Epjv/androidsfortune/trunk/annotate/head%3A/src/net/lp/androidsfortune/utils/FullScrollView.java. this will work smoothly only not like webview both horizontal and vertical scroll will happen here On Fri, Sep 25, 2009 at 10:06 AM, Mark Murphy mmur...@commonsware.comwrote: The idea is that I want to use standard UI designs for things. I have a large scrollable area, and I want people to know it's scrollable because there's the same scrollbars that they see in other applications. Games don't usually have scrollbars, so I fail to see how adding scrollbars to a game fits standard UI designs for things. But, I'm probably just missing something. It feels silly to have to rebuild the scrolling functionality from scratch. It already exists in another component, and really should exist in a primitive form, but if I have to rebuild that functionality from scratch, well, I guess that's what I have to do. You assume WebKit's scrolling is handled like the scrolling of other widgets. I strongly suspect that is not the case -- WebKit itself probably handles its scrolling, and reports events to the rendering layer to indicate characteristics of the scrollbar (thumb position, thumb size) to be drawn. This is very much not in the spirit of ScrollView, but it would be necessary for WebKit, since that works on a variety of environments, from desktops to non-Android phones. It also may not be terribly reusable. I just hope that in a future SDK release, someone will realize that not having this particular bit of functionality outside of the WebView widget is unnecessarily limiting. If you can point to code in http://source.android.com that demonstrates the code is, indeed, separable into a reusable component, please do. If you find it, log an issue to http://b.android.com requesting that such code be pulled out into such a reusable component. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---