[android-developers] Home and back key of device key pad
How to handle Home and Back key of a device. down vote favorite 3 share [fb] share [tw] So I have this method in one of my Android Activities: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { Log.d(Test, Back button pressed!); } else if(keyCode == KeyEvent.KEYCODE_HOME) { Log.d(Test, Home button pressed!); } return super.onKeyDown(keyCode, event); } Here this code only works with back button but not with home key.. Please help me , i want seperate functionality on Home key separate functionality on back key. -- 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: Home and back key of device key pad
On Nov 23, 9:00 am, Naveen kumarnaveen.si...@gmail.com wrote: How to handle Home and Back key of a device. down vote favorite 3 share [fb] share [tw] So I have this method in one of my Android Activities: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { Log.d(Test, Back button pressed!); } else if(keyCode == KeyEvent.KEYCODE_HOME) { Log.d(Test, Home button pressed!); } return super.onKeyDown(keyCode, event); } Here this code only works with back button but not with home key.. Please help me , i want seperate functionality on Home key separate functionality on back key. you cannot handle home key in your app, fortunatelly pskink -- 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: ChartDroid 3rd party library for dynamic graphing
Hi, I've been using AChartEngine for displaying dynamic pie chart and line chart, works really well. Never used chartDroid sorry. On 22 nov, 20:07, droid-stricken harik...@gmail.com wrote: Hi, I had posted the same question on StackOverflow y'day and it does not seem to have strung a chord with users there. So, i am hoping someone in this group might have some insights to share - My question: Have anyone of you used chartDroid for displaying dynamic graphs esp. bargraphs? The static case works great right out of the box. I noticed on AndroidPlot Feature Comparison that dynamic support is not available. Just wanted to verify if that's still true. If yes, would you recommend AchartEnngine for dynamic graph display? I am looking at open source options currently. Thanks in advance for sharing your experiences. -- 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 can I post questions here ?
I have tried posting a question, but it never got to be on the thread. What sould I do? -- 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: Home and back key of device key pad
Please give me guideline how to handle the home event and pause event in code separately. On Wed, Nov 23, 2011 at 2:03 PM, skink psk...@gmail.com wrote: On Nov 23, 9:00 am, Naveen kumarnaveen.si...@gmail.com wrote: How to handle Home and Back key of a device. down vote favorite 3 share [fb] share [tw] So I have this method in one of my Android Activities: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { Log.d(Test, Back button pressed!); } else if(keyCode == KeyEvent.KEYCODE_HOME) { Log.d(Test, Home button pressed!); } return super.onKeyDown(keyCode, event); } Here this code only works with back button but not with home key.. Please help me , i want seperate functionality on Home key separate functionality on back key. you cannot handle home key in your app, fortunatelly pskink -- 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 -- 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] Issue 9656: Library projects don't support custom XML attributes for custom classes
From what i have read about new ADT R.15, I hoped this issue is solved by now, but when I tried compiling my library project and the projects that use it, I got same error saying error: No resource identifier found for attribute. I was using a sulotion offered here: http://devmaze.wordpress.com/2011/05/22/the-case-of-android-libraries-and-custom-xml-attributes-part-2/ but it requieres the aapt.exe to be replaced, which I belive would not be good for this version. Is there any good sulotion for this ADT version ? -- 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: Home and back key of device key pad
Is there any way to handle these cases using activity life cycle. On Wed, Nov 23, 2011 at 2:31 PM, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: Please give me guideline how to handle the home event and pause event in code separately. On Wed, Nov 23, 2011 at 2:03 PM, skink psk...@gmail.com wrote: On Nov 23, 9:00 am, Naveen kumarnaveen.si...@gmail.com wrote: How to handle Home and Back key of a device. down vote favorite 3 share [fb] share [tw] So I have this method in one of my Android Activities: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { Log.d(Test, Back button pressed!); } else if(keyCode == KeyEvent.KEYCODE_HOME) { Log.d(Test, Home button pressed!); } return super.onKeyDown(keyCode, event); } Here this code only works with back button but not with home key.. Please help me , i want seperate functionality on Home key separate functionality on back key. you cannot handle home key in your app, fortunatelly pskink -- 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 -- 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
{SAP-Jobs-SAP-FAQ} www.bignlife.in--[e-mail sending Job]-- Re: [android-developers] how can I post questions here ?
On Wed, Nov 23, 2011 at 2:41 AM, gil eichenbaum gileichenb...@gmail.comwrote: I have tried posting a question, but it never got to be on the thread. What sould I do? Whatever you did *this time*. - 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 -- Go to Master Mind Web Earner Blog :- http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in Unsubscribe All Group Post :- http://j.gs/624707/unsubscribe http://q.gs/624707/unsubscribe Subscribe All Group Post :- http://j.gs/624707/subscribe http://q.gs/624707/subscribe Make Money E-mail Sending Job :- http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in -- You received this message because you are subscribed to the Google Groups SAP-Jobs-SAP-FAQ group. To post to this group, send email to sap-jobs-sap-...@googlegroups.com. To unsubscribe from this group, send email to sap-jobs-sap-faq+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sap-jobs-sap-faq?hl=en.
Re: [android-developers] Re: Architecture of mobile application
On Wed, Nov 23, 2011 at 1:51 AM, Dusk Jockeys Android Apps duskjock...@gmail.com wrote: I have no idea what you are talking about. QFE -- 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: HD Displays and JavaBinder: !!! FAILED BINDER TRANSACTION !!!
Mark, thanks for suggestion related to content provider. I made some research and content provider is not doable because I can send file reference only. My app is clock so I had to serialize bitmap every minute to SD card and it would be too much resource consuming. I finally ended up with sending smaller bitmaps and scale them up in remote view's layout. Back to original topic of this thread: Shouldn't be approach how to update bitmaps in RemoteViews changed? It is virtually impossible to make clock that is 4x4 icons wide. It would be either battery consuming or bad image quality. I have quite bad feeling from ContentProviders API. It IMHO violates good OOP design principles (why it expects file descriptors instead of streams? Why class ParcelFileDescriptor is tied to Socket, DataGramSocket and FileDescriptor classes? Should not be more generic with specific implementations for every Socket, ... in separate class?) I would love to hear from Google's engineers that they think about improvements of Widget API. Widgets are major advantages of Android (comparing to major competitors iOS and WP7). My 2 cents Tom On Nov 22, 1:50 pm, Mark Murphy mmur...@commonsware.com wrote: OK, so, use a content provider. Admittedly, it'd be nice if there were a way to serve up files from RAM via a content provider -- the only way I know to serve files via openFile() is for them to actually exist as files somewhere, meaning disk I/O for no particularly good reason. On Tue, Nov 22, 2011 at 7:27 AM, Kostya Vasilyev kmans...@gmail.com wrote: Using multiple remote views per update is a sure way to get a messed up widget after a configuration change, and sometimes sooner. 2011/11/22 Mark Murphy mmur...@commonsware.com 2011/11/21 Tomáš Hubálek tom.huba...@gmail.com: BTW: Splitting bitmap into multiple chunks does now work as undocumented limit is for whole RemoteView update. Then use multiple RemoteView updates, one per chunk. Or use a ContentProvider. 1) What Google recommends to do? - Use content provider? Most likely. Why I don't get any Exception when something fails? Why there is only LogCat message that can't be handled correctly? If I had to guess, the failure is in another process, either the OS process or the home screen's process. You will only get exceptions for failures in your own process. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1 Available! -- 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 -- 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 _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1 Available! -- 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: HD Displays and JavaBinder: !!! FAILED BINDER TRANSACTION !!!
I have the same feeling :-( On Nov 22, 1:27 pm, Kostya Vasilyev kmans...@gmail.com wrote: Using multiple remote views per update is a sure way to get a messed up widget after a configuration change, and sometimes sooner. 2011/11/22 Mark Murphy mmur...@commonsware.com 2011/11/21 Tomáš Hubálek tom.huba...@gmail.com: BTW: Splitting bitmap into multiple chunks does now work as undocumented limit is for whole RemoteView update. Then use multiple RemoteView updates, one per chunk. Or use a ContentProvider. 1) What Google recommends to do? - Use content provider? Most likely. Why I don't get any Exception when something fails? Why there is only LogCat message that can't be handled correctly? If I had to guess, the failure is in another process, either the OS process or the home screen's process. You will only get exceptions for failures in your own process. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1 Available! -- 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 -- 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] [Help] Stop Animation while navigating one activity to another activity
Hi All, This is Chandrasekhar Azad . i just new to android . actually iam facing one problem in my app that is my app is moving while navigating one activity to another activity even though i had use the following line in onClick listener intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); finish(); pl help me 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
[android-developers] Re: Home and back key of device key pad
On Nov 23, 10:01 am, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: Please give me guideline how to handle the home event and pause event in code separately. On Wed, Nov 23, 2011 at 2:03 PM, skink psk...@gmail.com wrote: On Nov 23, 9:00 am, Naveen kumarnaveen.si...@gmail.com wrote: How to handle Home and Back key of a device. down vote favorite 3 share [fb] share [tw] So I have this method in one of my Android Activities: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { Log.d(Test, Back button pressed!); } else if(keyCode == KeyEvent.KEYCODE_HOME) { Log.d(Test, Home button pressed!); } return super.onKeyDown(keyCode, event); } Here this code only works with back button but not with home key.. Please help me , i want seperate functionality on Home key separate functionality on back key. you cannot handle home key in your app, fortunatelly pskink -- 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 what do you mean: home event and pause event? pskink -- 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
{SAP-Jobs-SAP-FAQ} www.bignlife.in--[e-mail sending Job]-- Re: [android-developers] Re: Home and back key of device key pad
In case of Home and Back event both cases calls the android pause method of activity life cycle. On Wed, Nov 23, 2011 at 2:47 PM, skink psk...@gmail.com wrote: On Nov 23, 10:01 am, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: Please give me guideline how to handle the home event and pause event in code separately. On Wed, Nov 23, 2011 at 2:03 PM, skink psk...@gmail.com wrote: On Nov 23, 9:00 am, Naveen kumarnaveen.si...@gmail.com wrote: How to handle Home and Back key of a device. down vote favorite 3 share [fb] share [tw] So I have this method in one of my Android Activities: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { Log.d(Test, Back button pressed!); } else if(keyCode == KeyEvent.KEYCODE_HOME) { Log.d(Test, Home button pressed!); } return super.onKeyDown(keyCode, event); } Here this code only works with back button but not with home key.. Please help me , i want seperate functionality on Home key separate functionality on back key. you cannot handle home key in your app, fortunatelly pskink -- 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 what do you mean: home event and pause event? pskink -- 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 -- 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 -- Go to Master Mind Web Earner Blog :- http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in Unsubscribe All Group Post :- http://j.gs/624707/unsubscribe http://q.gs/624707/unsubscribe Subscribe All Group Post :- http://j.gs/624707/subscribe http://q.gs/624707/subscribe Make Money E-mail Sending Job :- http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in http://adf.ly/624707/www.bignlife.in -- You received this message because you are subscribed to the Google Groups SAP-Jobs-SAP-FAQ group. To post to this group, send email to sap-jobs-sap-...@googlegroups.com. To unsubscribe from this group, send email to sap-jobs-sap-faq+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sap-jobs-sap-faq?hl=en.
[android-developers] Re: Home and back key of device key pad
On Nov 23, 10:43 am, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: In case of Home and Back event both cases calls the android pause method of activity life cycle. i dont understand you well, but if you simply say that onPause() is called after both home and back jey is pressed, you already discovered everything, what do you need more? (except the fact you cannot handle home key in your app of course) pskink -- 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 find out why my app crashes
It's totally frustrating when an app crashes before the first breakpoint. But how do I find out what Resource ID #0x7f030001 means? 11-23 10:52:31.600: E/AndroidRuntime(3973): java.lang.RuntimeException: Unable to start activity ComponentInfo{wyo.android.contacts/wyo.android.contacts.ContactMgr}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030001 -- 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 help on menu in android
Hi friends, i have two spinner and three edit text fields in my form at top row. now i want to move these fields into menu which only pops up when you hit the menu button. is it there any way to get this? please help me. 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
Re: [android-developers] Re: Home and back key of device key pad
Please see the code @Override public void onCompletion(MediaPlayer mp) { CompleteFlag = true; video.pause(); /* */ if(checkNetworkConnection()){ try { new PostUsesData().execute(T); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } // set the message to display EncryptVideo(IDValue); alertbox.setTitle(Message); alertbox.setMessage(Do you want to delete this video ?); // set a positive/yes button and create a listener alertbox.setPositiveButton(Yes, new DialogInterface.OnClickListener() { // do something when the button is clicked public void onClick(DialogInterface arg0, int arg1) { try { new File(path).delete(); Intent myIntent = new Intent(VideoPlayer.this, WatchActivity.class); // here myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(myIntent); /* Toast.makeText(getApplicationContext(), Thanks,Inprogress.., Toast.LENGTH_SHORT).show();*/ } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); alertbox.setNegativeButton(No, new DialogInterface.OnClickListener() { // do something when the button is clicked public void onClick(DialogInterface arg0, int arg1) { showDialog(0); } }); // display box alertbox.show(); // IntroFaceBookScreen.mFacebook.dialog(this, stream.publish, parameters, this); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { activitySwitchFlag = true; try { if(!CompleteFlag) { _HomeDBHANDLING(); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } // activity switch stuff.. } return super.onKeyDown(keyCode, event); } @Override public void onPause(){ super.onPause(); Log.i(TAG, onPause ); try { EncryptVideo(IDValue); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } if(activitySwitchFlag) { Log.i(TAG, activity switch); } else{ Log.i(TAG, home button); finish(); // video.pause(); // _HomeDBHANDLING(); } activitySwitchFlag = false; } Here i am decryption video after pause method call. when my video is completely played by me then after dialog appear , canceling the dialog and pressing back button then issue else when video is not finished then back btn key woks fine but when complete video played then back issue : 11-23 16:00:46.909: D/NativeCrypto(26483): Freeing OpenSSL session 11-23
Re: [android-developers] How to find out why my app crashes
Open R.java in your project... Hit Ctrl+F... Enter the value, 0x7f03 But first of all, try cleaning the project and rebuilding. It might go away on its own. 23.11.2011 14:18, wyo пишет: It's totally frustrating when an app crashes before the first breakpoint. But how do I find out what Resource ID #0x7f030001 means? 11-23 10:52:31.600: E/AndroidRuntime(3973): java.lang.RuntimeException: Unable to start activity ComponentInfo{wyo.android.contacts/wyo.android.contacts.ContactMgr}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030001 -- Kostya Vasilyev -- 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: Architecture - Best Practice
Seek information on android architectural design patterns - evt. through this link: http://stackoverflow.com/search?q=android+design-patterns+architecture Hardy Henneberg http://www.maxikeys.com On 22 Nov., 20:33, Rajib rajibkanu...@gmail.com wrote: Hello Friends, I am new to Android. I am coming from web background. I am currently working on developing a game score recording application for android phones. The design that I am thinking of is as follows 1) View or the Activity Classes 2) Customer Controller Class which will be a middle layer between the Activity Class and the Business layer 3) Business Classes 4) SQLLite Database. As per my design, the view or activity classes will be talking to the controller layer only. So there will be an instance of controller layer created and kept alive until the application closes. The Controller layer will be talking to the business class. For example, if I have a requirement to retrieve list of players from database, the UI or activity layer will call the controller layer's getPlayerlist. The controller layer will then create an instance of the Player businesss class and call the getPlayerlistFromDB. The data will then be sent back from Business layer to controller layer and then to the UI layer in Listplayerclass. I want to understand is this the right approach or right architecture. Please help me here. Thanks, Rajib -- 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 HELP . java.lang.NullPointerException when Service uses ArrayList
Hi, I am creating service which will run in the background and contain a blocking list (implemented using ArrayList) which may be used later by other activites. My Problem:- From my activity Services Demo I pass data to my service using dataIntent.putExtra(originator, x); this is fine but when I try to store this data in my Service in an ArrayList called Items I get an exception and I cannot figure out why. The problem is in my Service code MyService : if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Please help. EXCEPTION java.lang.RuntimeException: Unable to start service .. with intent caused by: java.lang.NullPointerException Best Regards, Graham CODE Eclipse Activity - ServicesDemo Service - MyService ACTIVITY ServicesDemo package com.example; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class ServicesDemo extends Activity implements OnClickListener { private static final String TAG = ServicesDemo; Button buttonStart, buttonStop; EditText Input; String x = ; //test pass to my service @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); buttonStart = (Button) findViewById(R.id.buttonStart); buttonStop = (Button) findViewById(R.id.buttonStop); Input = (EditText) findViewById(R.id.INPUT); buttonStart.setOnClickListener(this); buttonStop.setOnClickListener(this); } public void onClick(View src) { switch (src.getId()) { case R.id.buttonStart: Log.d(TAG, onClick: starting srvice); Intent dataIntent = new Intent(ServicesDemo.this, MyService.class); x = Input.getText().toString(); dataIntent.putExtra(originator, x); startService(dataIntent); break; case R.id.buttonStop: Log.d(TAG, onClick: stopping srvice); //implicit starting stopService(new Intent(this, MyService.class)); break; } } public static String getTag() { return TAG; } } ---end ACTIVITY --Service MyService - package com.example; import java.util.ArrayList; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class MyService extends Service { ArrayListString items; public String ORIG = ; private static final String TAG = MyService; public Bundle data = new Bundle(); @Override public IBinder onBind(Intent intent) { return null; } public static String getTag() { return TAG; } @Override public void onCreate() { Toast.makeText(this, My Service Created, Toast.LENGTH_LONG).show(); Log.d(TAG, onCreate); } @Override public void onDestroy() { Toast.makeText(this, My Service Stopped, Toast.LENGTH_LONG).show(); Log.d(TAG, onDestroy); } @Override public void onStart(Intent intent, int startid) { Log.d(TAG, onStart); data = intent.getExtras(); ORIG = data.getString(originator); Toast.makeText(this, My Service Started with passed in value + ORIG, Toast.LENGTH_LONG).show(); if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Thread initBkgdThread = new Thread(new Runnable() { public void run() { //print_result(); } }); initBkgdThread.start(); } public void print_result(String orig){ Log.d(TAG, HELLO WORLD: + orig); } } --end of service--- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this 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: Programatically adding a contact issue
Hello.. Anybody there :) Please let me know if you have an answer :) On Tue, Nov 22, 2011 at 3:28 PM, Alok Kulkarni kulsu...@gmail.com wrote: Hi all, I am developing a Backup restore app for contacts.There is this device HTC Desire which has Birthday and Anniversary Fields which are not present on my devices.For each field i apply ContentProviderOperation.newInsert() and finally ContentProviderResult[] res = contentResolver.applyBatch( ContactsContract.AUTHORITY, valueArray); I need to know which fields were inserted correctly like if a Device does not have a Birthday field in Contact , i shd understand that.How do i come to know whether a certain field was inserted correctly or not. Another way is to find out at runtime which all fields of Contacts are present on a device.Is there any way to find that out ? Please let me know your thoughts. Regards, Alok -- 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: Remove Log Statements
Hi, Did any have any solution for this? proguard return exception for adding external jar file. i am not using ant script for proguard running from eclipse itself. Im getting this exception. Proguard returned with error code 1. See console Unexpected error while performing partial evaluation: Class = [org/restlet/engine/local/ ZipClientHelper] Method = [handlePut(Lorg/restlet/Request;Lorg/restlet/Response;Ljava/io/File;Ljava/lang/String;)V] Exception = [java.lang.NullPointerException] (null) java.lang.NullPointerException I did all configurations. Default.properties file proguard.config=proguard.cfg external.libs.dir=lib proguard.cfg -libraryjars /lib/ -dontwarn org.restlet.** but i got the above exception I did not use any ant build i am generate through eclipse. Thanks Mani. On Thu, Nov 17, 2011 at 3:25 PM, Jacob Nordfalk jacob.nordf...@gmail.comwrote: Den onsdag den 16. november 2011 07.42.02 UTC+1 skrev Android Developer: Before pushing application to market we need to remove Log statements. if application contains more java files then its hard to remove one by one. Its not particularly elegant, but for smaller projects I usually just declare somewhere a boolean public static final boolean DEBUG = false; and then prefix my log invocations: if (DEBUG) Log.d(TAG,blabla); As the DEBUG variable is final the Java compiler should optimize out the log statements as they are never reachable (no need for proguard to do that). So, it works essentially like a hack to get #ifdef's in your code. Jacob -- 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 -- 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 get fade effect
I am developing a custom view . How to get fade effect while moving a view towards another view ? i,e . When i push one view under another view it should fade.. -- 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] Sim is not detecting on android-x86 2.3 gingerbread
Hi, I am using an android-x86 2.3 gingerbread source code for my tablet pc. its able to compile successfully and booting . its has issues regarding GSM module.My device is having sim socket. But its not able to detect network... can any help to fix this... thanks, Venkatesh -- 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] android 3.0:Text Selection in webview
Hello Developers, I am using android 3.0 .As I select the data from webview , there comes a option menu copy to copy the data on clipboard. i wanna create own button .as i click on that button it will copy the text on clipboard. i am able to copy selected text from webview to clipboard till 2.3 version. but it's not happening in android 3.0 or above. It's measure prb.i have waste more time for it.Plz help me -- 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: PLEASE HELP . java.lang.NullPointerException when Service uses ArrayList
Can anyone help? Thanks Graham On Nov 23, 2011 11:51 a.m., Graham Bright gbwienmobil...@gmail.com wrote: Hi, I am creating service which will run in the background and contain a blocking list (implemented using ArrayList) which may be used later by other activites. My Problem:- From my activity Services Demo I pass data to my service using dataIntent.putExtra(originator, x); this is fine but when I try to store this data in my Service in an ArrayList called Items I get an exception and I cannot figure out why. The problem is in my Service code MyService : if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Please help. EXCEPTION java.lang.RuntimeException: Unable to start service .. with intent caused by: java.lang.NullPointerException Best Regards, Graham CODE Eclipse Activity - ServicesDemo Service - MyService ACTIVITY ServicesDemo package com.example; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class ServicesDemo extends Activity implements OnClickListener { private static final String TAG = ServicesDemo; Button buttonStart, buttonStop; EditText Input; String x = ; //test pass to my service @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); buttonStart = (Button) findViewById(R.id.buttonStart); buttonStop = (Button) findViewById(R.id.buttonStop); Input = (EditText) findViewById(R.id.INPUT); buttonStart.setOnClickListener(this); buttonStop.setOnClickListener(this); } public void onClick(View src) { switch (src.getId()) { case R.id.buttonStart: Log.d(TAG, onClick: starting srvice); Intent dataIntent = new Intent(ServicesDemo.this, MyService.class); x = Input.getText().toString(); dataIntent.putExtra(originator, x); startService(dataIntent); break; case R.id.buttonStop: Log.d(TAG, onClick: stopping srvice); //implicit starting stopService(new Intent(this, MyService.class)); break; } } public static String getTag() { return TAG; } } ---end ACTIVITY --Service MyService - package com.example; import java.util.ArrayList; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class MyService extends Service { ArrayListString items; public String ORIG = ; private static final String TAG = MyService; public Bundle data = new Bundle(); @Override public IBinder onBind(Intent intent) { return null; } public static String getTag() { return TAG; } @Override public void onCreate() { Toast.makeText(this, My Service Created, Toast.LENGTH_LONG).show(); Log.d(TAG, onCreate); } @Override public void onDestroy() { Toast.makeText(this, My Service Stopped, Toast.LENGTH_LONG).show(); Log.d(TAG, onDestroy); } @Override public void onStart(Intent intent, int startid) { Log.d(TAG, onStart); data = intent.getExtras(); ORIG = data.getString(originator); Toast.makeText(this, My Service Started with passed in value + ORIG, Toast.LENGTH_LONG).show(); if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Thread initBkgdThread = new Thread(new Runnable() { public void run() { //print_result(); } }); initBkgdThread.start(); } public void print_result(String orig){ Log.d(TAG, HELLO WORLD: + orig); } } --end of service--- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this 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: PLEASE HELP . java.lang.NullPointerException when Service uses ArrayList
Look below caused by in the logcat to identify where the NullPointerException occurrs. Then fix it. 23 ноября 2011 г. 15:36 пользователь Graham Bright gbwienmobil...@gmail.com написал: Can anyone help? Thanks Graham On Nov 23, 2011 11:51 a.m., Graham Bright gbwienmobil...@gmail.com wrote: Hi, I am creating service which will run in the background and contain a blocking list (implemented using ArrayList) which may be used later by other activites. My Problem:- From my activity Services Demo I pass data to my service using dataIntent.putExtra(originator, x); this is fine but when I try to store this data in my Service in an ArrayList called Items I get an exception and I cannot figure out why. The problem is in my Service code MyService : if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Please help. EXCEPTION java.lang.RuntimeException: Unable to start service .. with intent caused by: java.lang.NullPointerException Best Regards, Graham CODE Eclipse Activity - ServicesDemo Service - MyService ACTIVITY ServicesDemo package com.example; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class ServicesDemo extends Activity implements OnClickListener { private static final String TAG = ServicesDemo; Button buttonStart, buttonStop; EditText Input; String x = ; //test pass to my service @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); buttonStart = (Button) findViewById(R.id.buttonStart); buttonStop = (Button) findViewById(R.id.buttonStop); Input = (EditText) findViewById(R.id.INPUT); buttonStart.setOnClickListener(this); buttonStop.setOnClickListener(this); } public void onClick(View src) { switch (src.getId()) { case R.id.buttonStart: Log.d(TAG, onClick: starting srvice); Intent dataIntent = new Intent(ServicesDemo.this, MyService.class); x = Input.getText().toString(); dataIntent.putExtra(originator, x); startService(dataIntent); break; case R.id.buttonStop: Log.d(TAG, onClick: stopping srvice); //implicit starting stopService(new Intent(this, MyService.class)); break; } } public static String getTag() { return TAG; } } ---end ACTIVITY --Service MyService - package com.example; import java.util.ArrayList; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class MyService extends Service { ArrayListString items; public String ORIG = ; private static final String TAG = MyService; public Bundle data = new Bundle(); @Override public IBinder onBind(Intent intent) { return null; } public static String getTag() { return TAG; } @Override public void onCreate() { Toast.makeText(this, My Service Created, Toast.LENGTH_LONG).show(); Log.d(TAG, onCreate); } @Override public void onDestroy() { Toast.makeText(this, My Service Stopped, Toast.LENGTH_LONG).show(); Log.d(TAG, onDestroy); } @Override public void onStart(Intent intent, int startid) { Log.d(TAG, onStart); data = intent.getExtras(); ORIG = data.getString(originator); Toast.makeText(this, My Service Started with passed in value + ORIG, Toast.LENGTH_LONG).show(); if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Thread initBkgdThread = new Thread(new Runnable() { public void run() { //print_result(); } }); initBkgdThread.start(); } public void print_result(String orig){ Log.d(TAG, HELLO WORLD: + orig); } } --end of service--- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To
[android-developers] Re: Action Bar
There are no 3.0/3.1 -large devices. The ~7 tablet size was not supported until Android 3.2. From what I can see Google TV runs on Android 3.1, and is reacting as a large device. Not to sure on this though as there are a number of devices out and I don't know how all of them react. -- 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 connect to Facebook and publish in the wall
I need a little help with this issue. I just need to add two things to my android app, read the user facebook wall, and publish in the user facebook wall. I know that i need to make a authentification with oauth for the first time on my app to get two tokens. I'm checking a lot of oauth tutorials from google, from stackoverflow, the facebook sdk, more tutorials about the sdk, examples, and i'm just getting stuck with this. I can't find a simple and working easy example tutorial to connect to facebook programatically with a android app. Someone haves a simple tutorial or guide to achieve this? 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] Proguard returns null pointer exception while adding external restlet jar
Hi, Did any one have solution for this? proguard return exception for adding external jar file( restlet jar). Exception. Proguard returned with error code 1. See console Unexpected error while performing partial evaluation: Class = [org/restlet/engine/local/ ZipClientHelper] Method = [handlePut(Lorg/restlet/Request;Lorg/restlet/Response;Ljava/io/File;Ljava/lang/String;)V] Exception = [java.lang.NullPointerException] (null) java.lang.NullPointerException I did all configurations. Default.properties file proguard.config=proguard.cfg external.libs.dir=lib proguard.cfg -libraryjars /lib/ -dontwarn org.restlet.** but i got the above exception. It works for all other jar files. I did not use any ant build i am generate through eclipse. Thanks Mani. -- 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] Sim is not detecting on android-x86 2.3 gingerbread
Please use android-porting. On Wed, Nov 23, 2011 at 4:56 PM, venky6 venky.bab...@gmail.com wrote: Hi, I am using an android-x86 2.3 gingerbread source code for my tablet pc. its able to compile successfully and booting . its has issues regarding GSM module.My device is having sim socket. But its not able to detect network... can any help to fix this... thanks, Venkatesh -- 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 -- Raghav Sood http://www.androidactivist.org/ - Author http://www.appaholics.in/ - Founder -- 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] Facebook posting not works if any crashing in application
Hello All, I am using facebook posting in android app, if any crashing occur in app then facebook object loosed by App. then after facebook posting not work for us. Please give me guideline till app persist android facebook posting works regards, Naveen -- 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: Action Bar
On Wed, Nov 23, 2011 at 7:03 AM, tobias ecker...@gmx.de wrote: There are no 3.0/3.1 -large devices. The ~7 tablet size was not supported until Android 3.2. From what I can see Google TV runs on Android 3.1, and is reacting as a large device. Not to sure on this though as there are a number of devices out and I don't know how all of them react. Ah, true. A 720p Google TV is -large. A 1080p Google TV is -xlarge. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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] Unit Test Fragment
On Tue, Nov 22, 2011 at 5:22 AM, Stuart Turner trevsor...@gmail.com wrote: I'd like to unit test a fragment but cannot find any documentation or examples of how this can be achieved. Can anyone assist me with this please? Use the same approaches as you would for a View. Use AndroidTestCase to confirm your inflation worked (if you are inflating a layout). Use ActivityInstrumentationTestCase2, etc. to test it as used by an activity. There may be other options here as well. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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] View/onDraw(Canvas) vs. SurfaceView
Hello, Could anyone kindly explain to me what the difference is between using a SurfaceView and subclassing a View class and overriding its onDraw() mehtod? Plus I've read a thread on this mailing list that SurfaceView has problems on newer phones (and perhaps GLSurfaceView is affected as well). Can someone please give me an update on this? Thanks, John Goche -- 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] Android Monkey.
On Tue, Nov 22, 2011 at 3:51 PM, naveen raj s.naveen...@gmail.com wrote: a) How do I know, what are the events generated by android Monkey ? Add the -v switch to get a dump of the events. b) Can I define the events for android monkey ? AFAIK, no. You can describe what percentage of events to allocate to different categories. If you want scripted testing, try monkeyrunner. c) Does this android monkey tool works for all android devices (for ex: Android tablets) ? All is probably more than anyone can say, as there are some strange devices out there. Most is probably fairly accurate, though. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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] To Know Which Process/App Is Holding A Wakelock
There are no APIs for this in the Android SDK. For firmware topics, visit http://source.android.com. On Tue, Nov 22, 2011 at 4:55 AM, ♥Sreekanth♥Muralidharan♥ sreekanth.mur...@gmail.com wrote: Hi I need to write an interface in HAL layer, to expose the information about which applications/processes are holding wakelocks in Android. Could you please help me how to find out which appls/procs are holding wakelocks, programatically? Best Regards Sreekanth Muralidharan -- 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 App Developer Books: http://commonsware.com/books -- 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: Facebook posting not works if any crashing in application
I'd suggest you fix the bug that causes the app to crash. -- 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 fade effect
I am developing a custom view . How to get fade effect while moving a view towards another view ? i,e . When i push one view under another view it should fade.. Use an AnimationSet with translate and alpha components. Pent -- 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: Facebook posting not works if any crashing in application
I am playing a video by code . when video completely played by user then it;s calling @Override public void onCompletion(MediaPlayer mp) { -method Here when i am posting the wall before the video Completion then it's work fine but when calling a custom dialog when onCompletion method called. Here dialog appear typing message for post taking more time compare to previous with black screen , when pressing back btn then app crash . Please suggest me onCompletion method issue is this one or what cause of this crash when video finished then this issue occur with back btn and post to wall. I am trying to find root cause but not getting. regards. Naveen On Wed, Nov 23, 2011 at 6:06 PM, appel johan.appelg...@gmail.com wrote: I'd suggest you fix the bug that causes the app to crash. -- 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 -- 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: Facebook posting not works if any crashing in application
After crashing i am losing this value response = mFacebook.request(me); so, i am not able to post-wall, Please guide me how to save response = mFacebook.request(me); till app persist android device On Wed, Nov 23, 2011 at 6:12 PM, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: I am playing a video by code . when video completely played by user then it;s calling @Override public void onCompletion(MediaPlayer mp) { -method Here when i am posting the wall before the video Completion then it's work fine but when calling a custom dialog when onCompletion method called. Here dialog appear typing message for post taking more time compare to previous with black screen , when pressing back btn then app crash . Please suggest me onCompletion method issue is this one or what cause of this crash when video finished then this issue occur with back btn and post to wall. I am trying to find root cause but not getting. regards. Naveen On Wed, Nov 23, 2011 at 6:06 PM, appel johan.appelg...@gmail.com wrote: I'd suggest you fix the bug that causes the app to crash. -- 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 -- 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 change the RatingBar style from the code
Hey I have 2 styles for my RatingBar (difference is in the star image). I have an activity with a rating bar in it. I want the ratingbar to use one of the styles depending on the application state (e.g. flag is true/flase). Is there any way to do 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
[android-developers] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
This is really frustrating try to see/get android source code on windows. Previously this is fine with the online browsing as the repositories were available for online browsing. Anyways, I have downloaded git on windows. I dont need to compile on windows. I just want to download a repository to see the source for clarification, I will seriously appreciate if some can answer the following questions: 1. is there a new git URL that I can use the git clone on? 2. How can I see a list of repositories that could comprise android? 3. Can I clone one of these repositories with just git? Thank you so very much (Yes I did read about 50 messages on stackoverflow and here...) (I am really not prepared to install a linux to get a repository out..How may operating systems does it take to change a light bulb!!) -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.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: Help: I have git on windows. I just want to a) see b) download a speciifc android repository
Ok, I may be getting somewhere, the following seem to work git clone https://android.googlesource.com/platform/manifest.git and git clone https://android.googlesource.com/platform/frameworks/base.git will keep you posted On Wed, Nov 23, 2011 at 7:59 AM, Satya Komatineni satya.komatin...@gmail.com wrote: This is really frustrating try to see/get android source code on windows. Previously this is fine with the online browsing as the repositories were available for online browsing. Anyways, I have downloaded git on windows. I dont need to compile on windows. I just want to download a repository to see the source for clarification, I will seriously appreciate if some can answer the following questions: 1. is there a new git URL that I can use the git clone on? 2. How can I see a list of repositories that could comprise android? 3. Can I clone one of these repositories with just git? Thank you so very much (Yes I did read about 50 messages on stackoverflow and here...) (I am really not prepared to install a linux to get a repository out..How may operating systems does it take to change a light bulb!!) -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.com -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.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] Launch SoftKeyboard without view in Android
Hi All, I need the solution of following two things as early as possible:- 1)How to launch a softKeyboard even when there is no edittext or TextView present programmatically. 2)And get each character that is typed on the soft keyboard. Or wheather it is possible or not? Thanks Regards, DEEPAK KUMAR -- 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] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
On Wed, Nov 23, 2011 at 7:59 AM, Satya Komatineni satya.komatin...@gmail.com wrote: This is really frustrating try to see/get android source code on windows. Previously this is fine with the online browsing as the repositories were available for online browsing. Use Google Code Search, at least for the next five weeks. Anyways, I have downloaded git on windows. I dont need to compile on windows. I just want to download a repository to see the source for clarification, I will seriously appreciate if some can answer the following questions: 1. is there a new git URL that I can use the git clone on? There never was just a single git URL, AFAIK. You use the repo command in Cygwin to download a whole boatload of repositories. Instead, clone: https://android.googlesource.com/platform/manifest Look at default.xml. It contains a bunch of elements like: project path=packages/apps/Email name=platform/packages/apps/Email / The path appears to be relative to https://android.googlesource.com/platform, so you can then clone: https://android.googlesource.com/platform/packages/apps/Email 2. How can I see a list of repositories that could comprise android? I think that page was lost when the GitWeb interface was taken down. 3. Can I clone one of these repositories with just git? See my answer to #1. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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: Home and back key of device key pad
Reply me how to handle this issue On Wed, Nov 23, 2011 at 4:00 PM, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: Please see the code @Override public void onCompletion(MediaPlayer mp) { CompleteFlag = true; video.pause(); /* */ if(checkNetworkConnection()){ try { new PostUsesData().execute(T); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } // set the message to display EncryptVideo(IDValue); alertbox.setTitle(Message); alertbox.setMessage(Do you want to delete this video ?); // set a positive/yes button and create a listener alertbox.setPositiveButton(Yes, new DialogInterface.OnClickListener() { // do something when the button is clicked public void onClick(DialogInterface arg0, int arg1) { try { new File(path).delete(); Intent myIntent = new Intent(VideoPlayer.this, WatchActivity.class); // here myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(myIntent); /* Toast.makeText(getApplicationContext(), Thanks,Inprogress.., Toast.LENGTH_SHORT).show();*/ } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); alertbox.setNegativeButton(No, new DialogInterface.OnClickListener() { // do something when the button is clicked public void onClick(DialogInterface arg0, int arg1) { showDialog(0); } }); // display box alertbox.show(); // IntroFaceBookScreen.mFacebook.dialog(this, stream.publish, parameters, this); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { activitySwitchFlag = true; try { if(!CompleteFlag) { _HomeDBHANDLING(); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } // activity switch stuff.. } return super.onKeyDown(keyCode, event); } @Override public void onPause(){ super.onPause(); Log.i(TAG, onPause ); try { EncryptVideo(IDValue); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } if(activitySwitchFlag) { Log.i(TAG, activity switch); } else{ Log.i(TAG, home button); finish(); // video.pause(); // _HomeDBHANDLING(); } activitySwitchFlag = false; } Here i am decryption video after pause method call. when my video is completely played by me then after dialog appear , canceling the dialog and pressing back button then issue else when video is not finished then back btn key woks fine but when complete video played then back issue : 11-23 16:00:46.909: D/NativeCrypto(26483): Freeing OpenSSL session 11-23 16:00:47.655: D/dalvikvm(26483): GC_FOR_MALLOC freed 106167 objects / 3255768 bytes in 43ms 11-23 16:00:48.401: D/dalvikvm(26483): GC_FOR_MALLOC freed 104392 objects / 3097616 bytes in
[android-developers] Jimmy Wan wants to chat
--- Jimmy Wan wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-ce45e49c8c-faf72e6cef-liKSxcpfyxo9q03JfBmiNvppjXU You'll need to click this link to be able to chat with Jimmy Wan. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with Jimmy Wan, visit: http://mail.google.com/mail/a-ce45e49c8c-faf72e6cef-liKSxcpfyxo9q03JfBmiNvppjXU Gmail offers: - Instant messaging right inside Gmail - Powerful spam protection - Built-in search for finding your messages and a helpful way of organizing emails into conversations - No pop-up ads or untargeted banners - just text ads and related information that are relevant to the content of your messages All this, and its yours for free. But wait, there's more! By opening a Gmail account, you also get access to Google Talk, Google's instant messaging service: http://www.google.com/talk/ Google Talk offers: - Web-based chat that you can use anywhere, without a download - A contact list that's synchronized with your Gmail account - Free, high quality PC-to-PC voice calls when you download the Google Talk client We're working hard to add new features and make improvements, so we might also ask for your comments and suggestions periodically. We appreciate your help in making our products even better! Thanks, The Google Team To learn more about Gmail and Google Talk, visit: http://mail.google.com/mail/help/about.html http://www.google.com/talk/about.html (If clicking the URLs in this message does not work, copy and paste them into the address bar of your 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
Re: [android-developers] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
Mark, thank you very much. Really appreciate your help on this forum. The google code search doesnt seem to bring out the 4.0 code. At lease on my initial search. For instance the contact provider implementation doesnt seem to match what is there in the API docs. I will check again. may be i am missing something on code search. Also I am glad to know, if that is going to be really true, that the online browsing may be coming back soon. again thanks a bunch Satya On Wed, Nov 23, 2011 at 8:13 AM, Mark Murphy mmur...@commonsware.com wrote: On Wed, Nov 23, 2011 at 7:59 AM, Satya Komatineni satya.komatin...@gmail.com wrote: This is really frustrating try to see/get android source code on windows. Previously this is fine with the online browsing as the repositories were available for online browsing. Use Google Code Search, at least for the next five weeks. Anyways, I have downloaded git on windows. I dont need to compile on windows. I just want to download a repository to see the source for clarification, I will seriously appreciate if some can answer the following questions: 1. is there a new git URL that I can use the git clone on? There never was just a single git URL, AFAIK. You use the repo command in Cygwin to download a whole boatload of repositories. Instead, clone: https://android.googlesource.com/platform/manifest Look at default.xml. It contains a bunch of elements like: project path=packages/apps/Email name=platform/packages/apps/Email / The path appears to be relative to https://android.googlesource.com/platform, so you can then clone: https://android.googlesource.com/platform/packages/apps/Email 2. How can I see a list of repositories that could comprise android? I think that page was lost when the GitWeb interface was taken down. 3. Can I clone one of these repositories with just git? See my answer to #1. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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 -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.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] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
On Wed, Nov 23, 2011 at 8:32 AM, Satya Komatineni satya.komatin...@gmail.com wrote: The google code search doesnt seem to bring out the 4.0 code. At lease on my initial search. For instance the contact provider implementation doesnt seem to match what is there in the API docs. It at least has Gingerbread -- I just did a search on CalendarView and it popped up. Looks like it might even be something we could pull into a separate library project... But, yeah, it doesn't seem to be indexing ICS, as the new Switch widget isn't there. Nor is GridLayout. Also I am glad to know, if that is going to be really true, that the online browsing may be coming back soon. Well, I hope it does, someday. However, if Google Code Search really does get shut down, I may cry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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 find out why my app crashes
Thanks a lot. I've already found out. One of my classes was named Contacts which seems to collide with the ContactsContracts declaration. Renaming my class fixed the crash. On 23 Nov., 11:36, Kostya Vasilyev kmans...@gmail.com wrote: Open R.java in your project... Hit Ctrl+F... Enter the value, 0x7f03 But first of all, try cleaning the project and rebuilding. It might go away on its own. 23.11.2011 14:18,wyoпишет: It's totally frustrating when an app crashes before the first breakpoint. But how do I find out what Resource ID #0x7f030001 means? 11-23 10:52:31.600: E/AndroidRuntime(3973): java.lang.RuntimeException: Unable to start activity ComponentInfo{wyo.android.contacts/wyo.android.contacts.ContactMgr}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030001 -- Kostya Vasilyev -- 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: PLEASE HELP . java.lang.NullPointerException when Service uses ArrayList
Hi I am getting FATAL EXCEPTION when the ArrayList items is populated; can you help ? Thanks Graham W/dalvikvm(11235): threadid=9: thread exiting with uncaught exception (group=0x4 001e578) E/AndroidRuntime(11235): FATAL EXCEPTION: Thread-10 E/AndroidRuntime(11235): java.lang.NullPointerException E/AndroidRuntime(11235):at com.example.MyService.print_result(MyService. java:62) E/AndroidRuntime(11235):at com.example.MyService $1.run(MyService.java:54 ) E/AndroidRuntime(11235):at java.lang.Thread.run(Thread.java: 1019) W/ActivityManager( 2696): Force finishing activity com.example/.ServicesDemo I/OrientationDebug( 2696): [pwm] in updateOrientationListenerLp() V/OrientationDebug( 2696): in updateOrientationListenerLp(), Screen status=true, current orientation=1, SensorEnabled=true I/OrientationDebug( 2696): [pwm] needSensorRunningLp(), return true #4 I/Launcher( 2852): onResume(). mIsNewIntent : false screenOff: false E/( 2696): Dumpstate /data/log/dumpstate_app_error I/dumpstate(11275): begin D/KeyguardViewMediator( 2696): handleTimeout W/PowerManagerService( 2696): Timer 0x3-0x3|0x3 package com.example; import java.util.ArrayList; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class MyService extends Service { ArrayListString items = null; public String ORIG = ; private static final String TAG = MyService; public Bundle data = new Bundle(); @Override public IBinder onBind(Intent intent) { return null; } public static String getTag() { return TAG; } @Override public void onCreate() { Toast.makeText(this, My Service Created, Toast.LENGTH_LONG).show(); } @Override public void onDestroy() { Toast.makeText(this, My Service Stopped, Toast.LENGTH_LONG).show(); Log.d(TAG, onDestroy); } @Override public void onStart(Intent intent, int startid) { Log.d(TAG, onStart); data = intent.getExtras(); ORIG = data.getString(originator); Log.d(TAG, onCreate); Thread initBkgdThread = new Thread(new Runnable() { public void run() { print_result(ORIG); } }); initBkgdThread.start(); } public void print_result(String orig){ Log.d(TAG, HELLO WORLD: + orig); items.add(orig); if (items != null) { items.add(orig); String toadd = orig.toString(); if(items.contains(toadd)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(toadd); } } else { Log.d(TAG, IS NULL); } } } On 23 Nov., 12:53, Kostya Vasilyev kmans...@gmail.com wrote: Look below caused by in the logcat to identify where the NullPointerException occurrs. Then fix it. 23 ноября 2011 г. 15:36 пользователь Graham Bright gbwienmobil...@gmail.com написал: Can anyone help? Thanks Graham On Nov 23, 2011 11:51 a.m., Graham Bright gbwienmobil...@gmail.com wrote: Hi, I am creating service which will run in the background and contain a blocking list (implemented using ArrayList) which may be used later by other activites. My Problem:- From my activity Services Demo I pass data to my service using dataIntent.putExtra(originator, x); this is fine but when I try to store this data in my Service in an ArrayList called Items I get an exception and I cannot figure out why. The problem is in my Service code MyService : if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Please help. EXCEPTION java.lang.RuntimeException: Unable to start service .. with intent caused by: java.lang.NullPointerException Best Regards, Graham CODE Eclipse Activity - ServicesDemo Service - MyService ACTIVITY ServicesDemo package com.example; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class ServicesDemo extends Activity implements OnClickListener { private static final String TAG = ServicesDemo; Button buttonStart, buttonStop; EditText Input; String x = ; //test pass to my service @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); buttonStart = (Button) findViewById(R.id.buttonStart); buttonStop = (Button) findViewById(R.id.buttonStop); Input = (EditText) findViewById(R.id.INPUT); buttonStart.setOnClickListener(this); buttonStop.setOnClickListener(this); } public void onClick(View src) { switch (src.getId()) { case R.id.buttonStart: Log.d(TAG, onClick: starting srvice); Intent dataIntent = new Intent(ServicesDemo.this,
Re: [android-developers] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
Um, what's expected to change in five weeks? 23 ноября 2011 г. 17:13 пользователь Mark Murphy mmur...@commonsware.comнаписал: On Wed, Nov 23, 2011 at 7:59 AM, Satya Komatineni satya.komatin...@gmail.com wrote: This is really frustrating try to see/get android source code on windows. Previously this is fine with the online browsing as the repositories were available for online browsing. Use Google Code Search, at least for the next five weeks. -- 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: PLEASE HELP . java.lang.NullPointerException when Service uses ArrayList
It's all in the logcat: E/AndroidRuntime(11235): java.lang.NullPointerException E/AndroidRuntime(11235):at com.example.MyService.print_result(MyService. java:62) The stack trace is quite informative - learn to use it to find references to your code. 23 ноября 2011 г. 17:46 пользователь Graham Bright gbwienmobil...@gmail.com написал: Hi I am getting FATAL EXCEPTION when the ArrayList items is populated; can you help ? Thanks Graham W/dalvikvm(11235): threadid=9: thread exiting with uncaught exception (group=0x4 001e578) E/AndroidRuntime(11235): FATAL EXCEPTION: Thread-10 E/AndroidRuntime(11235): java.lang.NullPointerException E/AndroidRuntime(11235):at com.example.MyService.print_result(MyService. java:62) E/AndroidRuntime(11235):at com.example.MyService $1.run(MyService.java:54 ) E/AndroidRuntime(11235):at java.lang.Thread.run(Thread.java: 1019) W/ActivityManager( 2696): Force finishing activity com.example/.ServicesDemo I/OrientationDebug( 2696): [pwm] in updateOrientationListenerLp() V/OrientationDebug( 2696): in updateOrientationListenerLp(), Screen status=true, current orientation=1, SensorEnabled=true I/OrientationDebug( 2696): [pwm] needSensorRunningLp(), return true #4 I/Launcher( 2852): onResume(). mIsNewIntent : false screenOff: false E/( 2696): Dumpstate /data/log/dumpstate_app_error I/dumpstate(11275): begin D/KeyguardViewMediator( 2696): handleTimeout W/PowerManagerService( 2696): Timer 0x3-0x3|0x3 package com.example; import java.util.ArrayList; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class MyService extends Service { ArrayListString items = null; public String ORIG = ; private static final String TAG = MyService; public Bundle data = new Bundle(); @Override public IBinder onBind(Intent intent) { return null; } public static String getTag() { return TAG; } @Override public void onCreate() { Toast.makeText(this, My Service Created, Toast.LENGTH_LONG).show(); } @Override public void onDestroy() { Toast.makeText(this, My Service Stopped, Toast.LENGTH_LONG).show(); Log.d(TAG, onDestroy); } @Override public void onStart(Intent intent, int startid) { Log.d(TAG, onStart); data = intent.getExtras(); ORIG = data.getString(originator); Log.d(TAG, onCreate); Thread initBkgdThread = new Thread(new Runnable() { public void run() { print_result(ORIG); } }); initBkgdThread.start(); } public void print_result(String orig){ Log.d(TAG, HELLO WORLD: + orig); items.add(orig); if (items != null) { items.add(orig); String toadd = orig.toString(); if(items.contains(toadd)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(toadd); } } else { Log.d(TAG, IS NULL); } } } On 23 Nov., 12:53, Kostya Vasilyev kmans...@gmail.com wrote: Look below caused by in the logcat to identify where the NullPointerException occurrs. Then fix it. 23 ноября 2011 г. 15:36 пользователь Graham Bright gbwienmobil...@gmail.com написал: Can anyone help? Thanks Graham On Nov 23, 2011 11:51 a.m., Graham Bright gbwienmobil...@gmail.com wrote: Hi, I am creating service which will run in the background and contain a blocking list (implemented using ArrayList) which may be used later by other activites. My Problem:- From my activity Services Demo I pass data to my service using dataIntent.putExtra(originator, x); this is fine but when I try to store this data in my Service in an ArrayList called Items I get an exception and I cannot figure out why. The problem is in my Service code MyService : if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Please help. EXCEPTION java.lang.RuntimeException: Unable to start service .. with intent caused by: java.lang.NullPointerException Best Regards, Graham CODE Eclipse Activity - ServicesDemo Service - MyService ACTIVITY ServicesDemo package com.example; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class ServicesDemo extends Activity implements OnClickListener { private static final String TAG = ServicesDemo; Button buttonStart, buttonStop; EditText Input; String x = ; //test pass to my service @Override public void onCreate(Bundle savedInstanceState) {
[android-developers] Re: View/onDraw(Canvas) vs. SurfaceView
Hello, Let me rephrase my question. Given the information found at http://developer.android.com/guide/topics/graphics/2d-graphics.html which states: The aim of SurfaceView is to offer this drawing surface to an application's secondary thread, so that the application isn't required to wait until the system's View hierarchy is ready to draw. if I have just a single View on my screen (say for a game) why would the View hierarchy take a longer time to draw than if the View's Canvas is updated from a separate thread? Thanks for your feedback, John Goche On Wed, Nov 23, 2011 at 1:30 PM, John Goche johngoch...@googlemail.comwrote: Hello, Could anyone kindly explain to me what the difference is between using a SurfaceView and subclassing a View class and overriding its onDraw() mehtod? Plus I've read a thread on this mailing list that SurfaceView has problems on newer phones (and perhaps GLSurfaceView is affected as well). Can someone please give me an update on this? Thanks, John Goche -- 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] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
2011/11/23 Kostya Vasilyev kmans...@gmail.com: Um, what's expected to change in five weeks? Google Code Search was one of the Google initiatives that's on the chopping block. http://googleblog.blogspot.com/2011/10/fall-sweep.html Actually, we have until January 12, so it's closer to seven weeks, I guess. I'm hoping they change their mind. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
Ah. Well, there is still GrepCode (and possibly others). http://www.grepcode.com/search/?query=android+calendarview No 4.0 sources there yet either, it seems. 23 ноября 2011 г. 17:50 пользователь Mark Murphy mmur...@commonsware.comнаписал: 2011/11/23 Kostya Vasilyev kmans...@gmail.com: Um, what's expected to change in five weeks? Google Code Search was one of the Google initiatives that's on the chopping block. http://googleblog.blogspot.com/2011/10/fall-sweep.html Actually, we have until January 12, so it's closer to seven weeks, I guess. I'm hoping they change their mind. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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 -- 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] Launch SoftKeyboard without view in Android
Hi Deepak, Not much known about, How to launch a softkeybord. But, if your phone's UI showing some edittext field, you can definitely write there via adb shell. 1. connect the device via adb 2. touch the edittext where you want to type 3. $ adb shell 4.#input text deepak deepak will appear in edittext Thanks Anup On Wed, Nov 23, 2011 at 6:43 PM, Deepak Kumar deepak.kumar...@gmail.comwrote: Hi All, I need the solution of following two things as early as possible:- 1)How to launch a softKeyboard even when there is no edittext or TextView present programmatically. 2)And get each character that is typed on the soft keyboard. Or wheather it is possible or not? Thanks Regards, DEEPAK KUMAR -- 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 -- 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] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
2011/11/23 Kostya Vasilyev kmans...@gmail.com: Ah. Well, there is still GrepCode (and possibly others). http://www.grepcode.com/search/?query=android+calendarview No 4.0 sources there yet either, it seems. Yeah, and GrepCode seems exclusive to Java, based on light testing. No XML, no native code, etc. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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] Launch SoftKeyboard without view in Android
Yeah, that is possible. But I want to know how to launch soft Keyboard programmatically if there is no edittext or textview in layout?. Please reply anyone knows about this? On Wed, Nov 23, 2011 at 7:28 PM, anup Jaipurkar androida...@gmail.comwrote: Hi Deepak, Not much known about, How to launch a softkeybord. But, if your phone's UI showing some edittext field, you can definitely write there via adb shell. 1. connect the device via adb 2. touch the edittext where you want to type 3. $ adb shell 4.#input text deepak deepak will appear in edittext Thanks Anup On Wed, Nov 23, 2011 at 6:43 PM, Deepak Kumar deepak.kumar...@gmail.com wrote: Hi All, I need the solution of following two things as early as possible:- 1)How to launch a softKeyboard even when there is no edittext or TextView present programmatically. 2)And get each character that is typed on the soft keyboard. Or wheather it is possible or not? Thanks Regards, DEEPAK KUMAR -- 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 -- 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 -- 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 use statelistdrawable with ninepatchdrawable?
Hello. Any idea to combine StateListDrawable and NinePatchDrawable classes? to use programmatic image changer? What I want is that load some ninepatch image from external location. Is it possible? -- 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] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
Thank you very much for all the help for this question. This has been a fruitful morning after all. I used the following command git clone https://android.googlesource.com/platform/packages/providers/ContactsProvider to download the latest contacts provider that deals with personal profiles. Great. I have uploaded the manifest default.xml that Mark referenced here for a quick view http://www.satyakomatineni.com/item/3920 As stated by Mark, you can use this reference to locate the repository that you want and use the git clone feature to get the latest. Note that some repositories (such as base.git) are quite large. If you are using a laptop, plug it in. thanks again folks, perhaps now I will be able to see some internals of how personal profile in ics is integrated with the rest of the contacts Thanks again Happy Thanksgiving Satya On Wed, Nov 23, 2011 at 8:38 AM, Mark Murphy mmur...@commonsware.com wrote: On Wed, Nov 23, 2011 at 8:32 AM, Satya Komatineni satya.komatin...@gmail.com wrote: The google code search doesnt seem to bring out the 4.0 code. At lease on my initial search. For instance the contact provider implementation doesnt seem to match what is there in the API docs. It at least has Gingerbread -- I just did a search on CalendarView and it popped up. Looks like it might even be something we could pull into a separate library project... But, yeah, it doesn't seem to be indexing ICS, as the new Switch widget isn't there. Nor is GridLayout. Also I am glad to know, if that is going to be really true, that the online browsing may be coming back soon. Well, I hope it does, someday. However, if Google Code Search really does get shut down, I may cry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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 -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.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] Updating Android Product
Hi I have published a product in Android market some time back now I want to upgrade it. What should I do? Should I have to change the version in my manifest and re-register it? 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: ?Is it now possible to declare a custom attribute in a library project
It's still not resolved. Compare http://code.google.com/p/android/issues/detail?id=9656 Cheers Emanuel Moecklin 1gravity LLC On Nov 22, 6:17 am, gil eichenbaum gileichenb...@gmail.com wrote: I know this issue has been disscused in many places, but I couldn't find a good answer for it. I am developing a library project, which declares custom attributes and uses them locally, and I want to re-use these attributes on the applications which will use that library. I am now using ADT 15.0.1 (November 2011) and the most recent and updated SDK, but when I tried compiling the app, console was all full with errors about No resource identifier found for attribute... Wasn't this issue solved with ADT 15 ? -- 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] Updating Android Product
Update the version code in the manifest and upload the upgrade in the apk tab for that application in the developer console. Raghav Sood Sent from my Nexus S On Nov 23, 2011 2:52 PM, Siva Prakash siva.yuvan2...@gmail.com wrote: Hi I have published a product in Android market some time back now I want to upgrade it. What should I do? Should I have to change the version in my manifest and re-register it? 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 -- 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] Updating Android Product
Update version code and name in manifest file. And signed your application and dowload market. 23 Kasım 2011 17:22 tarihinde Raghav Sood raghavs...@androidactivist.orgyazdı: Update the version code in the manifest and upload the upgrade in the apk tab for that application in the developer console. Raghav Sood Sent from my Nexus S On Nov 23, 2011 2:52 PM, Siva Prakash siva.yuvan2...@gmail.com wrote: Hi I have published a product in Android market some time back now I want to upgrade it. What should I do? Should I have to change the version in my manifest and re-register it? 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 -- 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 -- --- Duygu Kahraman http://tr.linkedin.com/in/duygukahramann -- 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] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
Hi. Thanks for pointing out directions to the code. The next one probably is a silly question, but the answer does not seem obvious to me: Let's say I'd like to peek into ImageView implementation, or ListView, whatever. How do I find which package to download from the whole lot? E.g. starting from a known class in Android frameword, how do I figure out the package/project to download from that minifest list? Thanks all -- 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: Client/Server SSL Authentication
Thanks for the reply. However, this brings up another issue - how does the server reject users that dont have the appropriate keystore? This might be a bit off topic for the Android Developers group but a point in the right direction would be appreciated. Would this setting to only allow specific clients with the appropriate keystore on the server be an Apache setting? In general, how do apps that do not require any user credentials only allow a given app to communicate with a server and reject all others? Thanks! On Nov 22, 9:35 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: Replying back to list. On Wed, Nov 23, 2011 at 1:59 AM, Mathew Goldsborough mgoldsboro...@mg2innovations.com wrote: Sorry for the lack of detail. The client would be either HttpClient or HttpsURLConnection as I think both of these would accomplish my goals. However, if one has a simpler API or is easier to use when using client/server certificate authentication, I'm open to using one over the other. Basically what the client is going to do is issue a GET request to a specific endpoint to which the server will respond with some XML. Simple enough, right? I just want the client to be authenticated via 2-way SSL certificate authentication prior to receiving the response. For httpclient, the easiest way is to initialize this SocketFactory with your keystore, and use it create the HttpClient instance. You need to have your keystore as a raw resource in the apk. Search the list for more details, there are some examples, IIRC. http://developer.android.com/reference/org/apache/http/conn/ssl/SSLSo... For HttpsUrlConnection, the procedure is similar, initialize a socket factory and set it to your connection instance. http://developer.android.com/reference/javax/net/ssl/HttpsURLConnecti... -- 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] Help: I have git on windows. I just want to a) see b) download a speciifc android repository
On Wed, Nov 23, 2011 at 10:46 AM, Giuseppe piscopo.giuse...@gmail.com wrote: Hi. Thanks for pointing out directions to the code. The next one probably is a silly question, but the answer does not seem obvious to me: Let's say I'd like to peek into ImageView implementation, or ListView, whatever. How do I find which package to download from the whole lot? E.g. starting from a known class in Android frameword, how do I figure out the package/project to download from that minifest list? The SDK classes are in frameworks/base. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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: Client/Server SSL Authentication
On Thu, Nov 24, 2011 at 12:47 AM, mgolds02 mgold...@gmail.com wrote: Thanks for the reply. However, this brings up another issue - how does the server reject users that dont have the appropriate keystore? This might be a bit off topic for the Android Developers group but a point in the right direction would be appreciated. It's a long story :) Basically, the client signs something with it's private key, and the server validates it. That proves the client has access to the private key. http://en.wikipedia.org/wiki/Secure_Sockets_Layer#Client-authenticated_TLS_handshake Would this setting to only allow specific clients with the appropriate keystore on the server be an Apache setting? Yes. Refer to the mod_ssl documentation for details. In general, how do apps that do not require any user credentials only allow a given app to communicate with a server and reject all others? A private key and a certificate are credentials. You need to prove you have those to be authenticated. -- 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] hardware acceleration
I have a main Activity within the Manifest.xml hardware_acceleration=true activity android:name=MainActivity android:screenOrientation=landscape android:configChanges=orientation android:hardwareAccelerated=true /activity activity android:name=display android:screenOrientation=landscape android:configChanges=orientation android:hardwareAccelerated=true /activity screen = (FrameLayout) findViewById(R.id.data); is a part of the main layout Log.e(main, screen is + screen.isHardwareAccelerated() ); calling isHardwareAccelerated() returns true; Now the main Activity calls an Intent to launch a second activity This activity in the manifest.xml also has hardware_acceleration=true Intent intent = new Intent(); intent.setClass(getApplicationContext(), display.class); startActivity(intent); parent = (FrameLayout) findViewById(R.id.image); is a part of the display class layout Log.e(display, parent is + parent.isHardwareAccelerated()); however isHardwareAccelerated() returns false; Why is this ? and how do I launch an activity with hardware acceleration ? 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
[android-developers] Re: Galaxy Nexus can't go in USB Host mode, no mouse no usb stick.
nothing, it neither power the devices. On Nov 23, 12:36 am, Bret Foreman bret.fore...@gmail.com wrote: What does the logcat say? On Nov 22, 2:24 pm, sblantipodi perini.dav...@dpsoftware.org wrote: As title. Is there some android engineer here who can explain me why galaxy nexus isn't able to go into usb host mode please? I connected mouse, keyboards, usb stick, nothing works. WHy? 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
Re: [android-developers] Re: Galaxy Nexus can't go in USB Host mode, no mouse no usb stick.
They explained this already. It's because the Galaxy Nexus has no SD card. On 11/24/2011 12:37 AM, sblantipodi wrote: who can explain me why galaxy nexus isn't able to go into u -- 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 replace GLSurfaceView with TextureView in Android Ice Cream Sandwich?
The TextureView documentation states that it can be used to render OpenGL content. In the blog post announcing TextureView, it states: A TextureView can just as easily be used to embed an OpenGL scene in your application. As of Android 4.0, eglCreateWindowSurface() can be used to render into a SurfaceTexture object. Which seems to imply that to use TextureView instead of GLSurfaceView, one would have to do all the EGL setup themselves and manage the EGLContext and the threading (since GLSurfaceView maintains a GLThread). There doesn't seem to be any sample code in the Android 4.0 SDK that demonstrates how the TextureView can just as easily be used to embed an OpenGL scene. TextureView seems to plug in more cleanly to the Camera preview (setPreviewTexture) and MediaPlayer (setSurface). Is it possible to use GLSurfaceView in conjunction with TextureView by using GLSurfaceView.setEGLWindowSurfaceFactory to make it render to the TextureView's SurfaceTexture? Again, it would be nice if there were some sample code. p.s. Posted on stackoverflow.com as well. Feel free to answer: http://stackoverflow.com/questions/8231978/how-to-replace-glsurfaceview-with-textureview-in-android-ice-cream-sandwich -- 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: Galaxy Nexus can't go in USB Host mode, no mouse no usb stick.
May be you have to root it and apply the USB device patch in the kernel.Ideally Ginger Bread doesnt support the host for USB devices, I checked it with the samsung TAB..with teh USB host adapter for USB devices. Rgds, Saurabh ..pain is temporary.quitting lasts forever.. On Wed, Nov 23, 2011 at 10:09 PM, Christopher Van Kirk christopher.vank...@gmail.com wrote: They explained this already. It's because the Galaxy Nexus has no SD card. On 11/24/2011 12:37 AM, sblantipodi wrote: who can explain me why galaxy nexus isn't able to go into u -- 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.comandroid-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=enhttp://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
Re: [android-developers] How to replace GLSurfaceView with TextureView in Android Ice Cream Sandwich?
GLSurfaceView handles GL setup for you, which TextureView will not do. A TextureView can be used as the native window when you create an EGL surface. Here is an example (the interesting part is the call to eglCreateWindowSurface()): @Override public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { mRenderThread = new RenderThread(getResources(), surface); mRenderThread.start(); } private static class RenderThread extends Thread { private static final String LOG_TAG = GLTextureView; static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098; static final int EGL_OPENGL_ES2_BIT = 4; private volatile boolean mFinished; private final Resources mResources; private final SurfaceTexture mSurface; private EGL10 mEgl; private EGLDisplay mEglDisplay; private EGLConfig mEglConfig; private EGLContext mEglContext; private EGLSurface mEglSurface; private GL mGL; RenderThread(Resources resources, SurfaceTexture surface) { mResources = resources; mSurface = surface; } private static final String sSimpleVS = attribute vec4 position;\n + attribute vec2 texCoords;\n + varying vec2 outTexCoords;\n + \nvoid main(void) {\n + outTexCoords = texCoords;\n + gl_Position = position;\n + }\n\n; private static final String sSimpleFS = precision mediump float;\n\n + varying vec2 outTexCoords;\n + uniform sampler2D texture;\n + \nvoid main(void) {\n + gl_FragColor = texture2D(texture, outTexCoords);\n + }\n\n; private static final int FLOAT_SIZE_BYTES = 4; private static final int TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES; private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0; private static final int TRIANGLE_VERTICES_DATA_UV_OFFSET = 3; private final float[] mTriangleVerticesData = { // X, Y, Z, U, V -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, }; @Override public void run() { initGL(); FloatBuffer triangleVertices = ByteBuffer.allocateDirect(mTriangleVerticesData.length * FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer(); triangleVertices.put(mTriangleVerticesData).position(0); int texture = loadTexture(R.drawable.large_photo); int program = buildProgram(sSimpleVS, sSimpleFS); int attribPosition = glGetAttribLocation(program, position); checkGlError(); int attribTexCoords = glGetAttribLocation(program, texCoords); checkGlError(); int uniformTexture = glGetUniformLocation(program, texture); checkGlError(); glBindTexture(GL_TEXTURE_2D, texture); checkGlError(); glUseProgram(program); checkGlError(); glEnableVertexAttribArray(attribPosition); checkGlError(); glEnableVertexAttribArray(attribTexCoords); checkGlError(); glUniform1i(uniformTexture, texture); checkGlError(); while (!mFinished) { checkCurrent(); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); checkGlError(); glClear(GL_COLOR_BUFFER_BIT); checkGlError(); // drawQuad triangleVertices.position(TRIANGLE_VERTICES_DATA_POS_OFFSET); glVertexAttribPointer(attribPosition, 3, GL_FLOAT, false, TRIANGLE_VERTICES_DATA_STRIDE_BYTES, triangleVertices); triangleVertices.position(TRIANGLE_VERTICES_DATA_UV_OFFSET); glVertexAttribPointer(attribTexCoords, 3, GL_FLOAT, false, TRIANGLE_VERTICES_DATA_STRIDE_BYTES, triangleVertices); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) { throw new RuntimeException(Cannot swap buffers); } checkEglError(); try { Thread.sleep(2000); } catch (InterruptedException e) { // Ignore } } finishGL(); } private int loadTexture(int resource) { int[] textures = new int[1]; glActiveTexture(GL_TEXTURE0); glGenTextures(1, textures, 0); checkGlError(); int texture = textures[0];
[android-developers] Re: How secure are SharedPreferences on rooted devices?
I'm a little confused... If SharedPreferences are not safe for this, how are apps handling validation if they don't use online validation? I'm sure there are a couple who don't use online validation but have some sort of validation and they probably use SharedPreferences to control the app validation. How come they use it if it's not safe at all? Online validation is something I really wanted to avoid. I know that most people have an internet connection always on, but when they don't, I really don't want to downgrade my app or prevent them from using it. I'm not very comfortable with such policy. That doesn't leave me with any other options does it? I guess this means the coupon system I found is not that useful. It uses shared preferences to control if the app is unblocked (ie: a coupon code was inserted and validated): https://github.com/zemariamm/Coupons/blob/master/src/com/zemariamm/coupons/CouponPreferences.java Still, someone requested the link to the whole thing: http://zemariamm.posterous.com/using-coupons-to-giveaway-paid-android-apps -- 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: Issue 9656: Library projects don't support custom XML attributes for custom classes
I have the same problem and haven't found a solution yet. Instead, i query the attributes by name (note that this means that they need to be set directly on the view in the XML layout). Here is an example: // called by the custom view's constructors private void init(Context context, AttributeSet attrs) { int undoThumbId = R.drawable.seek_bar_undo_marker; int progress= -1; if (attrs != null) { String namespace = http://schemas.android.com/res/com.mycompany.myapp;; undoThumbId = attrs.getAttributeResourceValue(namespace, undoThumbResId, undoThumbId); progress= attrs.getAttributeIntValue(namespace, undoProgress, progress); } ... ... } -- 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: Issue 9656: Library projects don't support custom XML attributes for custom classes
If anyone is interested I compiled aapt.exe for ADT r15 (Windows) with the fix in question. Ask me by email if you want it. With luck it will (finally!) be part of ADT r16. -- O.L. -- 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] Running Emulators from Eclipse
Firstly apologies if this should have been asked on some Eclipse forum. I find when starting Emulators from within Eclipse that success is very hit and miss. One particular problem i find is that an emulator will appear to start OK but on attempting to run an App the following if output on the Eclispe console: Failed to install com.test.testapp.apk on device 'emulator-5554': EOF java.io.IOException: EOF Launch canceled! If I do nothing but close the emulator and start it again I may or may not get a successful launch. Once the emulator has successfully launched an app it will do so reliable thereafter. Does anyone know of a way to fix 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
Re: [android-developers] Re: How secure are SharedPreferences on rooted devices?
On Wed, Nov 23, 2011 at 12:51 PM, Ricardo Amaral mas...@ricardoamaral.net wrote: I'm a little confused... If SharedPreferences are not safe for this, how are apps handling validation if they don't use online validation? I'm sure there are a couple who don't use online validation but have some sort of validation and they probably use SharedPreferences to control the app validation. How come they use it if it's not safe at all? Because it is good enough to stop casual piracy. Little will stop a serious pirate. This is not significantly different than for any other popular platform in the history of computers -- the only platforms with no piracy are the platforms nobody uses. Online validation is something I really wanted to avoid. I know that most people have an internet connection always on, but when they don't, I really don't want to downgrade my app or prevent them from using it. I'm not very comfortable with such policy. That doesn't leave me with any other options does it? You could come up with a business model that does not depend upon defeating pirates. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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 replace GLSurfaceView with TextureView in Android Ice Cream Sandwich?
Thanks for the quick response Romain and the sample code! Will give it a try. On Nov 23, 12:17 pm, Romain Guy romain...@android.com wrote: GLSurfaceView handles GL setup for you, which TextureView will not do. A TextureView can be used as the native window when you create an EGL surface. Here is an example (the interesting part is the call to eglCreateWindowSurface()): @Override public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { mRenderThread = new RenderThread(getResources(), surface); mRenderThread.start(); } private static class RenderThread extends Thread { private static final String LOG_TAG = GLTextureView; static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098; static final int EGL_OPENGL_ES2_BIT = 4; private volatile boolean mFinished; private final Resources mResources; private final SurfaceTexture mSurface; private EGL10 mEgl; private EGLDisplay mEglDisplay; private EGLConfig mEglConfig; private EGLContext mEglContext; private EGLSurface mEglSurface; private GL mGL; RenderThread(Resources resources, SurfaceTexture surface) { mResources = resources; mSurface = surface; } private static final String sSimpleVS = attribute vec4 position;\n + attribute vec2 texCoords;\n + varying vec2 outTexCoords;\n + \nvoid main(void) {\n + outTexCoords = texCoords;\n + gl_Position = position;\n + }\n\n; private static final String sSimpleFS = precision mediump float;\n\n + varying vec2 outTexCoords;\n + uniform sampler2D texture;\n + \nvoid main(void) {\n + gl_FragColor = texture2D(texture, outTexCoords);\n + }\n\n; private static final int FLOAT_SIZE_BYTES = 4; private static final int TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES; private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0; private static final int TRIANGLE_VERTICES_DATA_UV_OFFSET = 3; private final float[] mTriangleVerticesData = { // X, Y, Z, U, V -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, }; @Override public void run() { initGL(); FloatBuffer triangleVertices = ByteBuffer.allocateDirect(mTriangleVerticesData.length * FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer(); triangleVertices.put(mTriangleVerticesData).position(0); int texture = loadTexture(R.drawable.large_photo); int program = buildProgram(sSimpleVS, sSimpleFS); int attribPosition = glGetAttribLocation(program, position); checkGlError(); int attribTexCoords = glGetAttribLocation(program, texCoords); checkGlError(); int uniformTexture = glGetUniformLocation(program, texture); checkGlError(); glBindTexture(GL_TEXTURE_2D, texture); checkGlError(); glUseProgram(program); checkGlError(); glEnableVertexAttribArray(attribPosition); checkGlError(); glEnableVertexAttribArray(attribTexCoords); checkGlError(); glUniform1i(uniformTexture, texture); checkGlError(); while (!mFinished) { checkCurrent(); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); checkGlError(); glClear(GL_COLOR_BUFFER_BIT); checkGlError(); // drawQuad triangleVertices.position(TRIANGLE_VERTICES_DATA_POS_OFFSET); glVertexAttribPointer(attribPosition, 3, GL_FLOAT, false, TRIANGLE_VERTICES_DATA_STRIDE_BYTES, triangleVertices); triangleVertices.position(TRIANGLE_VERTICES_DATA_UV_OFFSET); glVertexAttribPointer(attribTexCoords, 3, GL_FLOAT, false, TRIANGLE_VERTICES_DATA_STRIDE_BYTES, triangleVertices); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) { throw new RuntimeException(Cannot swap buffers); } checkEglError(); try { Thread.sleep(2000); } catch (InterruptedException e) { // Ignore } } finishGL(); }
Re: [android-developers] Re: Home and back key of device key pad
On Wed, Nov 23, 2011 at 06:46:07PM +0530, NaveenShrivastva wrote: Reply me how to handle this issue No. Someone already did And re-posting the same s**t is not going to get you a repeat of the answer, either, nor will it get you your first answer (where applicable) faster. Post your question ONE TIME, and WAIT PATIENTLY for an answer or find yourself a PAID SUPPORT FORUM (which this is NOT). Oh, and just a friendly suggestion: try to find a better translation program. Your questions are so garbled they are very hard to parse as English. (Sorry, no suggestions on a better one.) Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W No, I'm not going to explain it. If you can't figure it out, you didn't want to know anyway... --Larry Wall Android Apps Listing at http://www.jstrack.org/barcodes.html -- 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] reading a plain text file: java.lang.fileNotFoundException
Hello, I have a really basic question. I am trying to read the contents of a plain text file from my application. I have placed the file under MyProject/assets/foo.txt and I am trying to read it in my application with BufferedReader reader = new BufferedReader(new FileReader(fileName)); reader.read(); where fileName =assets/foo.txt but I get a java.lang.fileNotFoundException. How can I ensure that the file is found? Thanks, John Goche -- 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] reading a plain text file: java.lang.fileNotFoundException
You don't access assets/ by FileReader. You access assets/ via AssetManager, which you get from a Resources object, which you typically get via a call to getResources() on your Activity. On Wed, Nov 23, 2011 at 2:10 PM, John Goche johngoch...@googlemail.com wrote: Hello, I have a really basic question. I am trying to read the contents of a plain text file from my application. I have placed the file under MyProject/assets/foo.txt and I am trying to read it in my application with BufferedReader reader = new BufferedReader(new FileReader(fileName)); reader.read(); where fileName =assets/foo.txt but I get a java.lang.fileNotFoundException. How can I ensure that the file is found? Thanks, John Goche -- 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 App Developer Books: http://commonsware.com/books -- 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] reading a plain text file: java.lang.fileNotFoundException
Thanks, Here is how I solved it, BufferedReader reader = new BufferedReader(new InputStreamReader(ctx.getAssets().open(fileName))); Regards, John Goche On Wed, Nov 23, 2011 at 8:53 PM, Mark Murphy mmur...@commonsware.comwrote: You don't access assets/ by FileReader. You access assets/ via AssetManager, which you get from a Resources object, which you typically get via a call to getResources() on your Activity. On Wed, Nov 23, 2011 at 2:10 PM, John Goche johngoch...@googlemail.com wrote: Hello, I have a really basic question. I am trying to read the contents of a plain text file from my application. I have placed the file under MyProject/assets/foo.txt and I am trying to read it in my application with BufferedReader reader = new BufferedReader(new FileReader(fileName)); reader.read(); where fileName =assets/foo.txt but I get a java.lang.fileNotFoundException. How can I ensure that the file is found? Thanks, John Goche -- 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 App Developer Books: http://commonsware.com/books -- 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 -- 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: Dangerous audio noise while using of headphones
Thanks for the answers so far. If you can not hear the noise than be happy. For the others there is no need to explain how to hear the noise. Just mind a silent gap wile streaming an audio file. Or, if you can not hear, do a simple search in the internet. You will get a big list regarding the noise. Always the same description and no solution. I am a musician and my ears are not so bad. Perhaps one reason I recognize the noise. But again: The noise is not a slightly noise in silence. The noise is also responsible for a poor sound quality. If you prefer pop/rock with a very high sound level, you will probably not understand what I try to told. In generally you are right. One have to analyze the noise with a spectrum analyzer or at least with an oscilloscope. But, a headphone itself does not produce noise without a signal. If the sound in generally (e.g. by a call) is fine, than the trouble is only by high sampling frequencies or even by particular coding formats. I have mp3 and ACC One question to the developer of the encoding library is: How did you test the sound quality of the program? Which noise level parameter you choose? What is the best way to test encoding software? Perhaps we can fine-tune the quality? Again: Why do many androids produce noise and iPhones/iPod and other MP3 player nearly nothing to mention? Please take my question serious question! As I told I suppose a that the library can be optimized and I would like get the same sound quality as on my mp3 player. Regards Harald On 19 Nov., 19:52, Mark Murphy mmur...@commonsware.com wrote: On Sat, Nov 19, 2011 at 1:34 PM, Harald harald65.si...@googlemail.com wrote: Hi, my android and many others have a dangerous noise. And your proof of this is, what, exactly? This noise is easy recognizable in the silent parts of audio files. Then it should be easy for you to provide detailed steps to allow anyone to reproduce your experiment. Please indicate specific hardware, specific sound files (downloadable, please), specific audio players, etc. The noise is always present and at a very high level at a very high frequency! What is the frequency? You clearly must know this, as part of demonstrating that it is always present, which would require you to use a spectrum analyzer or similar technology to identify this signal from the rest of the music or other audio. If you switch off the playback and put the headphones away, you will (hopefully) recognize a pressure and and whistle in your ears. I am sure that those who attempt to reproduce your experiment will watch for such symptoms, if and when you provide reliable steps for doing so. This noise is dangerous and destroys your ears! What is the frequency? At what volume does harm occur? You clearly must know this, to have consulted with an audiologist to determine the effects of such a sound. Or are you an audiologist? You can not fully recognize the level due to the high frequency. But you previously stated that it is easy to hear and that anyone who listens to it will experience symptoms. Now, nobody can hear it. It is difficult to reconcile these mutually exclusive claims of yours. But, the noise destroys your ears! And your proof of this is, what, exactly? Does someone know something about the decoder and the developers? Yes. And if you can provide proof of your claims, we can certainly work to notify all the proper authorities about the health issue. Please write up the steps to reproduce the problem, the audio details of the signal (e.g., frequency range), and your evidence that there is a health hazard for listening to this signal. Thanks! -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- 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] Multilanguage via market
Hello friends; I want to make my application multi language. And want to set its language from market, I mean if user downloaded it from UK android market, then application should start english. Is it possible? -- 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] Launch SoftKeyboard without view in Android
I use this in a custom view. I must admit that it doesn't always seem to work - as reported by customers - but I've not had it fail for me in testing on a number of devices. I actually found this doing a lot of Google searches myself, so credit/blame goes elsewhere. While you may not need to do all of this exactly, perhaps it will get you a little closer. public class MyView extends LinearLayout { snip public View.OnLongClickListener mLongClickListener = new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { softKeyboardResults rr = new softKeyboardResults(); Configuration config = MyView.this.getResources() .getConfiguration(); if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES || config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_UNDEFINED) { InputMethodManager imm = (InputMethodManager) MyView.this.mContext .getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(MyView.this, InputMethodManager.SHOW_IMPLICIT, rr); } return false; } }; class softKeyboardResults extends ResultReceiver { public softKeyboardResults() { super(getHandler()); } @Override protected void onReceiveResult(int resultCode, Bundle resultData) { super.onReceiveResult(resultCode, resultData); switch (resultCode) { case InputMethodManager.RESULT_HIDDEN: case InputMethodManager.RESULT_SHOWN: case InputMethodManager.RESULT_UNCHANGED_SHOWN: break; case InputMethodManager.RESULT_UNCHANGED_HIDDEN: InputMethodManager imm = (InputMethodManager) MyView.this.mContext .getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(MyView.this, InputMethodManager.SHOW_FORCED); break; default: break; } } } } Best Regards, Eric -- 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: PLEASE HELP . java.lang.NullPointerException when Service uses ArrayList
Hint: When is 'items' allocated, and to what? While you're at it, you need to conform to the Java coding conventions. ORIG should be spelled in camel case with a lower-case first letter. Same with print_result(); there should not be an underscore in the method name. And do something about your indentation. Use up to four spaces (NOT TAB characters!) per level to indent Usenet posts. You are asking strangers to volunteer their time to help you; unreadable code discourages that help. -- Lew On Wednesday, November 23, 2011 5:48:23 AM UTC-8, Kostya Vasilyev wrote: It's all in the logcat: E/AndroidRuntime(11235): java.lang.NullPointerException E/AndroidRuntime(11235):at com.example.MyService.print_result(MyService. java:62) The stack trace is quite informative - learn to use it to find references to your code. 23 ноября 2011 г. 17:46 пользователь Graham Bright gbwienm...@gmail.comнаписал: Hi I am getting FATAL EXCEPTION when the ArrayList items is populated; can you help ? Thanks Graham W/dalvikvm(11235): threadid=9: thread exiting with uncaught exception (group=0x4 001e578) E/AndroidRuntime(11235): FATAL EXCEPTION: Thread-10 E/AndroidRuntime(11235): java.lang.NullPointerException E/AndroidRuntime(11235):at com.example.MyService.print_result(MyService. java:62) E/AndroidRuntime(11235):at com.example.MyService $1.run(MyService.java:54 ) E/AndroidRuntime(11235):at java.lang.Thread.run(Thread.java: 1019) W/ActivityManager( 2696): Force finishing activity com.example/.ServicesDemo I/OrientationDebug( 2696): [pwm] in updateOrientationListenerLp() V/OrientationDebug( 2696): in updateOrientationListenerLp(), Screen status=true, current orientation=1, SensorEnabled=true I/OrientationDebug( 2696): [pwm] needSensorRunningLp(), return true #4 I/Launcher( 2852): onResume(). mIsNewIntent : false screenOff: false E/( 2696): Dumpstate /data/log/dumpstate_app_error I/dumpstate(11275): begin D/KeyguardViewMediator( 2696): handleTimeout W/PowerManagerService( 2696): Timer 0x3-0x3|0x3 package com.example; import java.util.ArrayList; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class MyService extends Service { ArrayListString items = null; public String ORIG = ; private static final String TAG = MyService; public Bundle data = new Bundle(); @Override public IBinder onBind(Intent intent) { return null; } public static String getTag() { return TAG; } @Override public void onCreate() { Toast.makeText(this, My Service Created, Toast.LENGTH_LONG).show(); } @Override public void onDestroy() { Toast.makeText(this, My Service Stopped, Toast.LENGTH_LONG).show(); Log.d(TAG, onDestroy); } @Override public void onStart(Intent intent, int startid) { Log.d(TAG, onStart); data = intent.getExtras(); ORIG = data.getString(originator); Log.d(TAG, onCreate); Thread initBkgdThread = new Thread(new Runnable() { public void run() { print_result(ORIG); } }); initBkgdThread.start(); } public void print_result(String orig){ Log.d(TAG, HELLO WORLD: + orig); items.add(orig); if (items != null) { items.add(orig); String toadd = orig.toString(); if(items.contains(toadd)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(toadd); } } else { Log.d(TAG, IS NULL); } } } On 23 Nov., 12:53, Kostya Vasilyev kman...@gmail.com wrote: Look below caused by in the logcat to identify where the NullPointerException occurrs. Then fix it. 23 ноября 2011 г. 15:36 пользователь Graham Bright gbwienm...@gmail.com написал: Can anyone help? Thanks Graham On Nov 23, 2011 11:51 a.m., Graham Bright gbwienm...@gmail.com wrote: Hi, I am creating service which will run in the background and contain a blocking list (implemented using ArrayList) which may be used later by other activites. My Problem:- From my activity Services Demo I pass data to my service using dataIntent.putExtra(originator, x); this is fine but when I try to store this data in my Service in an ArrayList called Items I get an exception and I cannot figure out why. The problem is in my Service code MyService : if(items.contains(ORIG)){ Log.d(TAG, Element already exists exiting ); } else { Log.d(TAG, Adding Element); items.add(ORIG); } Please help. EXCEPTION java.lang.RuntimeException: Unable to start service .. with intent caused by: java.lang.NullPointerException Best Regards, Graham CODE Eclipse Activity - ServicesDemo Service - MyService ACTIVITY ServicesDemo package com.example;
[android-developers] Re: 3g and wifi problems
Hi, your question is not a developer question in general. Probably you will find some answers in user forums. I have a similar or even the same behave of my android 1) I setup a new wifi connection 2) Disconnect from the wifi network 3) Reconnect to the wifi network in a couple of minute -- The phone does not reconnect automatically 4) Disable Wifi 5) Reconnect (second try) and now the phone recognized the wifi network 6) Optional: Sometimes I have to re-setup the connection since the second try was also not successful. This happens only if I do disconnect/connect in a couple of minutes. Reconnect some hours later or the next day is successful after the first try. On 22 Nov., 19:52, andreju ursic.and...@gmail.com wrote: hello I am not a developer and I learn everithing about android from forums, but now I have a big problem. I talk with lenovo service in my countries and with lenovo live help but I didn't find a solution. so my problem is: when I turn of 3g connection and turn on my wifi, tablet find wifi spots, but can not connect to them, it scan and scanso I have to hard rebote and then is everithing OK. I have find out that my tablet don't find IP if it is no stacionary. Is there a possibility to make this to work well? sorry for my English and TX for your reply -- 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: wysiwug editor in eclipse?
It's WYSIWYG, as the first letter of YOU is Y, not U. On Monday, November 21, 2011 3:49:53 PM UTC-8, ga...@deanblakely.com wrote: I'm watching this video android Development tools where they show a cool wysiwug eclipse editor running on a MAC. My eclipse on my windows computer apparently has no such feature. What am I missing? Thanks Gary -- 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: Galaxy Nexus can't go in USB Host mode, no mouse no usb stick.
I'm not talking about USB Mass Storage but about the possibility to connect an usb stick or mouse to the phone. This is possible since a modder enabled a kernel options and now it works but a feature like this must be enabled by default without any modding needed. On Nov 23, 5:39 pm, Christopher Van Kirk christopher.vank...@gmail.com wrote: They explained this already. It's because the Galaxy Nexus has no SD card. On 11/24/2011 12:37 AM, sblantipodi wrote: who can explain me why galaxy nexus isn't able to go into u -- 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] Multilanguage via market
The application should run with whatever language the user has set up in their device. AFAIK, there is no UK android market. On Wed, Nov 23, 2011 at 4:43 PM, Kubilay D. Yılmaz kubilayd.yil...@gmail.com wrote: Hello friends; I want to make my application multi language. And want to set its language from market, I mean if user downloaded it from UK android market, then application should start english. Is it possible? -- 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 App Developer Books: http://commonsware.com/books -- 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] StackView of images
how to achieve stack view for number of images horizantall scroll and i shud able to see the layers background when i move left to right one by one image should move -- 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: Reconnect on ACTION_SCREEN_ON - wifi icon incorrect
I just tested the app on a 2.2 tablet and it doesn't have this problem, but 2.2. only has one connected icon. Bummer . . . this seems to be a honeycomb specific problem. Anyone out there know a way around this? On Nov 22, 10:18 pm, Keith Hill dik...@gmail.com wrote: This is actually happening with the ACTION_SCREEN_OFF part of the listener. I am turning wifi off when the screen goes off and even if I don't turn it back on when the screen comes on, when I manually turn on wifi, I still have this icon problem. I am stumped and I have tried everything that I can. On Nov 20, 11:03 pm, Keith Hill dik...@gmail.com wrote: I have a service that is using a BroadcastReceiver to watch for ACTION_SCREEN_ON. When that happens, I am using a wifimanager to turn wifi back on and reconnect. For some reason, I connect to the network just fine, but the icon in the notification bar shows that I am not connected. Instead of showing the blue icon (honeycomb), it changes to a semi white status icon, even though I have a connection. It almost looks like the status when it is in the process of connecting, but not as white. Any ideas as to why this would be happening? The only way to fix it is to reboot the device. Even turning the wifi off and back on manually won't fix the icon error. Help is greatly appreciated. -- 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] Handster
How do people download stuff thru Handster? Is there some kind of Handster app? -- 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] ArrayAdapter not updating its ListView
Thanks, but as I said, I tried that, and it didn't help. And you shouldn't have to do that anyway -- according to the API documentationhttp://developer.android.com/reference/android/widget/ArrayAdapter.html#setNotifyOnChange(boolean), notification is meant to happen automatically when you're just calling the adapter's add, remove, insert and clear methods, unless you explicitly call setNotifyOnChange(false) when you create the adapter (which I didn't). Cheers, Calum. -- 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] Opaque Binary Blob (OBB)?
Does anyone know the progress of this OBB thing? (Since now it's already late 2011). Also, if I remember correctly, in Google I/O, Google announces up to 2GB extra-data download on Android Market. Is it cancelled? Hoping to get some updated information. Thanks! Yuku -- 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