[android-developers] Installing a x86 image in new sdk tools v12
I've upgraded to android sdk tools 12. As a release note google says: The AVD manager and emulator can now use system images compiled for ARM v7 and x86 CPUs. Has anyone tried to run a x86 image? If so, can you provide some instructions on how I can do it? Are there any 3.0+ images? -- 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] Aidl Error : couldn't find import for class org.json.JSONObject
Hi, I have written an aidl file in the path android/framwork/base/core/ java/com/, which has a import statement - import org.json.JSONObject. But the build is failing with an error - 'couldn't find import for class org.json.JSONObject'. According to my study I found that for import statements in aidl we should define LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) in the Android.mk file. In my source code, Android.mk in framework/ base/ already contains the above definition. Please let me know how to resolve the import JSON error in aidl. 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: Sony Ericsson EDK for Timescape
Hi there, Thanks for downloading the EDK, we hope you will find it useful. In our 2011 Android products the deep integration of Timescape was changed so that it is a standalone app, and in the same time we decided to specialise Timescape a little bit more also. Therefore, the email extensions were not part of this Timescape version. However, if you or any other developer would like to develop an extension for email client extensions, you are welcome! Feel free to submit any further questions about the EDK here. Best regards, Johan On Jul 4, 10:16 pm, Rahul Popuri rahulpop...@gmail.com wrote: Hi Johan, I just downloaded the EDK today and played around with the RSS extension, looks really good! I was wondering, how come Sony Ericsson didn't include an email extension like they did with the 2010 Timescape? -- 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: Image scaling on Sony Ericsson Xperia phone
Hi, I am glad you liked the article, Andreas has done a really great job. I will forward your thoughts into the customer service organisation. Thanks for letting us know. Kind regards /Johan On Jul 6, 8:37 pm, Martin Sall maris.seiman...@gmail.com wrote: Really nice article. It is great to see development related tutorials fromSonyEricssonlately. But I would like to ask about font scaling. I myself am visually impaired since birth (but still a software developer) and I know many people who wish to use Android devices but cannot do that comfortably because there is no font scaling built into the core of Android. This is also bad for people over 50 who do not have a perfect vision anymore. There is a 2 years old feature request on Android issue tracker, but it seems abandoned by developers:http://code.google.com/p/android/issues/detail?id=4547 Of course, each developer can make the fonts scalable, but they do so not often. The worst is that the basic phone functions (menu, contacts, SMS, mail) have too tiny texts. I myself am looking forward to buy SonyEricsson Neo, but I am afraid I won't be able to use it comfortably, I need a little bit bigger fonts everywhere and I would like avoid rooting the device just to do some hacky font replacement which would look ugly anyway. So if someone could bringSonyEricsson'sattention and ask them to develop more accessible software (just a basic home screen, contacts, SMS, menus), I guess,SonyEricssonwould get buyers from all the 50 old people range + some bunch of people with impaired vision. I promise you,SonyEricsson: on the day you develop and release some software update which allows to scale fonts bigger on aSonyEricsson Neo phone, I'll buy it. For now I'll just read articles about Android development and use SDK/VirtualBox Android emulators. Please,SonyEricsson(and other developers, too), give a helping hand to visually impaired and not-so-young people. Good luck to all developers, Martin and some other visually impaired people. On 27 Jūn., 12:13, Johan Abramsson johan.abrams...@sonyericsson.com wrote: Hi, This article does, of course, apply to any android phone. Since we updated the blog post with a link to tis article the link to the blog post has changed. The new link is here, http://blogs.sonyericsson.com/wp/2011/06/27/how-to-scale-images-for-y... We apologize for any inconviniance. Kind regards /Johan On Jun 22, 10:07 am, Johan Abramsson johan.abrams...@sonyericsson.com wrote: Hi, Hard to get images scaled correctly for your application? Are your images too large and causing memory problems? Or are they scaled incorrectly with a poor user experience as a result? To find a good solution for this, we asked Andreas Agvard from the SonyEricssonsoftware department to help shed some light on this topic. More data and a good sample project are found here:http://blogs.sonyericsson.com/wp/2011/06/13/how-to-scale-images-for-y... Comments and question ? Please direct them to this news thread. Kind regards /Johan -- 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: Sending GPS coordinate to emulator reboots it
Bbbrrr, looks scary. I've been working extensively with GPS signal and have been sending GPS coordinates to the emulator. The target AVDs I created are version 2.1 (updated) and 2.2 and I've never faced any issue. Some coordinates I worked with are: geo fix 5.4780 51.4480 geo fix 9.9975 48.3945 geo fix 2.3511 48.8577 Could it be the case that there is a bug in the logic of your code which handles the GPS signal? Do you get the same problem when you send the GPS coordinates while running the 'Hello World' example? -- Ali Chousein Geo-Filtered Assistant http://geo-filtered-assistant.blogspot.com/ Cisco Android marketplace (Chosen) https://marketplace.cisco.com/apphq/products/510 -- 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: ScrollBar in Android not working ???
The following, both in XML and code, work like a charm for me. Should work for you also :-) ScrollView xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=wrap_content LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical /LinearLayout /ScrollView Or in code LinearLayout linLayout = new LinearLayout(this); linLayout.setOrientation(LinearLayout.VERTICAL); ScrollView scroll = new ScrollView(this); scroll.addView( linLayout, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT) ); addContentView(scroll, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); -- Ali Chousein Geo-Filtered Assistant http://geo-filtered-assistant.blogspot.com/ Cisco Android marketplace (Chosen) https://marketplace.cisco.com/apphq/products/510 -- 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: Building a commercial app that uses maps
Hi, There is other options as well - You could use both of google native web based. Other map provider libraries/api eg: http://www.openstreetmap.org/ http://resources.arcgis.com/content/arcgis-android/api plus the online offering from microsoft, ovi http://msdn.microsoft.com/en-us/library/dd877180.aspx http://api.maps.ovi.com/devguide/overview.html usgs - http://store.usgs.gov/ etc, etc Regards On Jul 7, 2:06 pm, TreKing treking...@gmail.com wrote: On Wed, Jul 6, 2011 at 7:50 AM, David da...@teamrobots.net wrote: 1) Looking at the native map api, there seems to be functionality missing that we would need, such as finding directions between two points and geocoding. You can use the online Google Directions API and the built-in GeoCoder class(es). Has this functionality been intentionality missed out due to Terms of Service restrictions? or is it in the road map for future api releases? That would require insider Google knowledge into the maps library, development of which has been fairly stagnant - you're unlikely to get an answer to that. 2) We understand that we could make the app as a browser based app and use the functionality of the javascript v3 libs or even just use the web services to get the data we need to keep the app in line with the desktop version. But reading around the forums, it has been speculated that mobile apps are going to fall into rate limiting problems due to mobile providers ip masking for individual phones (ie lots of phones on one ip, as far as google maps is concerned). Does anyone know what the state of play is here? What state of play? I am a little confused about the recommended direction App developers are meant to take when building Android map based apps. The options seem to be, make a native app with missing functionality / workarounds or make a browser based app that has all the functionality of the desktop version, but the interaction experience and visual quality of the app is poor in the browser compared to the native solution; any suggestions here? Yup, that about sums it up. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: signing my apk file for distribution. keystores, certificates, signing ??..
If you follow the tutorial it should work like a charm. Probably the paths you give in your commands are not correct. Have a closer look. Try using absolute paths, instead of relative paths in your commands. -- Ali Chousein Geo-Filtered Assistant http://geo-filtered-assistant.blogspot.com/ Cisco Android marketplace (Chosen) https://marketplace.cisco.com/apphq/products/510 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: android nfc tech API help
Michael Roland mi.roland at gmail.com writes: Hello Micheal, I am trying to read data from a NfcB card but I get NoClassDefFound exception if I try to get an object of NfcB using: NfcB myTag = NfcB.get(t) Can you please tell me how can read data from this type of card? Also, is there any way to find the type of card from coding? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Library and Resources
On Jul 6, 5:36 pm, David Olsson zooklu...@gmail.com wrote: Clean, refresh more times and test by creating a new copy of the workspace. I have run into this problem several times, TheKing's solution works most of the time but the latest time this happened to me I had to create a new project and then it worked like a charm. I already have done all of that. But I found out that it's an incompatibility problem between the resources. Using the library from another application works. Hard coding library's xml values resolve the problem. But I don't have any idea of why it's incompatible. Thanks for your help. Guillaume Regards, David On Wed, Jul 6, 2011 at 4:47 PM, Guillaume guillaume.dele...@gmail.com wrote: Thanks but I wouldn't have post here if it had worked. Other idea ? Why are the R.java merged into the same file ? On Jul 5, 7:23 pm, TreKing treking...@gmail.com wrote: On Tue, Jul 5, 2011 at 7:55 AM, Guillaume guillaume.dele...@gmail.comwrote: Please offer any ideas you might have to help! Clean, refresh, and rebuild both projects ... several times. --- -- 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 -- 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 need to pull and eventually send a value via webview
Do you need to display the webpage? Or you are just interested in the value if the hidden input? How is the other value supposed to be sent back to the server, is it via javascript, is it a html form or something else? 2011/7/6 sabanim rickd...@gmail.com OK so it does not need to be webview but that's the closest I have gotten to solving my problem. (going on 2 weeks now). ok so right now I am using a webview to go and see a page. On that page is a hidden input tag with an id and value. I need to pull that value and use it in java. Eventually I need to send something also. I have this all working in a blackberry webworks app using javascript and ajax. I think I'm close but I cant seem to modify my code to get the right result. with this code I can get all the html on the page but not just the one thing I want. This is put into an alert. How do I get just the value and then how do I get it so the java will read it. client code: ~~~ public class button3 extends Activity{ WebView wb = null; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.buttons); wb = new WebView(this); wb.setWebViewClient(new HelloWebViewClient()); wb.getSettings().setJavaScriptEnabled(true); wb.addJavascriptInterface(new MyJavaScriptInterface(), HTMLOUT); /* WebViewClient must be set BEFORE calling loadUrl! */ wb.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { /* This call inject JavaScript into the page which just finished loading. */ wb.loadUrl(javascript:window.HTMLOUT.showHTML(document.getElementsByTagName('html').innerHTML);); } }); wb.loadUrl(http://www.whateverurl.com;); setContentView(wb); } private class HelloWebViewClient extends WebViewClient { public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } final Context myApp = this; class MyJavaScriptInterface { public void showHTML(String html) { new AlertDialog.Builder(myApp) .setTitle(Value of Hidden ID) .setMessage(html) .setPositiveButton(android.R.string.ok, null) .setCancelable(false) .create() .show(); } } ~~~ html code: ~~~ Lunchbrimg src='http://www.?/mimages/image002.jpg' style=width: 300px; brpinput type='hidden' id='sendtextcoupon' value='0' Do You SEE THIS/p ~~~ Any help would be great! -- 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: android loop problem
But It doesn't display the screen that I display in the loop. I don't think it had executed the loop part. Mark 2011/7/6 saurabh chatterjee chattsaur...@gmail.com may be your code is getting entangled in an infinite loop. have you tried using break ? On Jul 6, 4:51 pm, mark2011 androidmark2...@gmail.com wrote: Dear All : I met a strange event. I write a simple code to display a screen once the user click a button to start. In the screen, the user can click some button to set up the factors that I use onclicklistener to accept the onclick. But the start button is that I use onclick to start. Once I use a loop using the for/while command to loop the display the screen. The start button doesn't work. Can anyone help me? Thanks. BR, mark -- 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] MapView and terms of service
Hi all! I use the Google API in my app and I have a question about the logo on the map. I don't modify it when I display the map, but If I display the route between two points, I paint two buttons onto the map. One of this buttons is drawn over the logo (left corner on the bottom of the screen) and this button is only visible if I'm displaying a route. Do you think this a violation of the terms of service (http:// code.google.com/apis/maps/terms.html)? Exactly, this point: 9.4 Attribution. (a) Content provided to you through the Service may contain the trade names, trademarks, service marks, logos, domain names, and other distinctive brand features of Google, its partners, or other third party rights holders of content indexed by Google. When Google provides this attribution, you must display it as provided through the Service or as described in the Maps APIs Documentation and may not delete or in any manner alter these trade names, trademarks, service marks, logos, domain names, and other distinctive brand features 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: android loop problem
Based on what you've explained so far, I think you are running your loop on the main (UI) thread, and are thus blocking it from doing anything else, which includes updating the UI. Have you read this: http://developer.android.com/guide/topics/fundamentals/processes-and-threads.html#Threads http://developer.android.com/resources/articles/painless-threading.html -- Kostya 07.07.2011 12:12, wu mark ?: But It doesn't display the screen that I display in the loop. I don't think it had executed the loop part. Mark 2011/7/6 saurabh chatterjee chattsaur...@gmail.com mailto:chattsaur...@gmail.com may be your code is getting entangled in an infinite loop. have you tried using break ? On Jul 6, 4:51 pm, mark2011 androidmark2...@gmail.com mailto:androidmark2...@gmail.com wrote: Dear All : I met a strange event. I write a simple code to display a screen once the user click a button to start. In the screen, the user can click some button to set up the factors that I use onclicklistener to accept the onclick. But the start button is that I use onclick to start. Once I use a loop using the for/while command to loop the display the screen. The start button doesn't work. Can anyone help me? Thanks. BR, mark -- 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
RE: [android-developers] SIP + BT Doesn't work
This is probably an issue with the phone. I have the same model phone and it's never worked for me either, on 2.0, 2.2 or 2.3.3. -Original Message- From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of Guye Sent: Wednesday, July 06, 2011 2:44 PM To: Android Developers Subject: [android-developers] SIP + BT Doesn't work Hi, I'm running HTC Desire (GSM) with Android 2.3.4 When having SIP call with just the phone - it works fine. When trying to have a SIP + BT (Car kit or headset) call it fails. Any ideas? -- 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 - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1388 / Virus Database: 1516/3734 - Release Date: 06/29/11 Internal Virus Database is out of date. -- 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] Dalvik VM Java Annotations has very poor Performance
On Tue, Jul 5, 2011 at 9:06 PM, Bruno Vinicius bruno.vinicius...@gmail.com wrote: Hi, I've been using annotations on a Android project for a parsing XML data into a VO object, and I came to notice that retrieving Annotation info from a class or field is very slow. On a 1k iterations loop it gives me a 100x fold performance drop vesus a specific parsing algorithm version. Caching the annotation data on the first run, gave me results very close (~10ms diference) on the specific algorithm version. Bruno, any chance to see the code of all 3 versions (annotated, annotated cached, and specific parsing) ? If the parsing is specific to your problem, then it is bound to be quicker, as otherwise you pay for universality. Annotations per se should not hit the performance, the same way that static class members or methods don't hit the performance. It is what happens to those annotations. They annotate various parts of your code, so that some processing based on that metadata can be done. They are essentially markers helping to find code, for whatever reason and whatever processing. They can be processed at compile time, which is probably what you should do with your parser, but it will depend on the parsing technology you use. How are the annotations that you use defined (each annotation has retention policy). Have a look at Annotation Processing Tool (apt), that comes with Java JDK 5. In JDK 6 it is a part of the compiler. It should help you generate the code at compile time, so you would not be hit by runtime reflection and introspecting. ...but it's all speculations as the problem of performance is quite complex and multi-layered as you can imagine The best solution to XML parsing is to use parsers that are geared towards mobile platforms. Daniel -- 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 my mobile service provider using android
hi all , i want to know how to get my mobile servie provider using android code ? 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: App not visible from Android Market on the device
@ Kostya I don't think it's that. It worked with that title after we published it and up to this week. Manuel On Jul 7, 12:26 am, Kostya Vasilyev kmans...@gmail.com wrote: I don't see it from my devices either. Might this be caused by the single quote or the vertical bar in the name? -- Kostya 07.07.2011 2:08, Mark Murphy пишет: On Wed, Jul 6, 2011 at 5:48 PM, Manuel R. Ciosici manuelrcios...@gmail.com wrote: Thanks for the reply and sorry for double posting. The app is called All operators' APN | Tweakker. Beats me. At first, I thought you might be defeated by on-device auto-correct-style assistance. But you don't even seem to show up in searches for things like Banglalink, when only one other app does. -- 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] Android Accelerometer Sensor
Hi, I am trying to work with Accelerometer Sensor. So i tried this example: http://blog.androgames.net/85/android-accelerometer-tutorial/ It work perfectly. But when i change AccelerometerManager activity to a service, it doesn't work and i got an error. //this is the activity that i want change public class Accelerometer extends Activity implements AccelerometerListener { private static Context CONTEXT; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); CONTEXT = this; } protected void onResume() { super.onResume(); if (AccelerometerManager.isSupported()) { AccelerometerManager.startListening(this); } } protected void onDestroy() { super.onDestroy(); if (AccelerometerManager.isListening()) { AccelerometerManager.stopListening(); } } public static Context getContext() { return CONTEXT; } /** * onShake callback */ public void onShake(float force) { Toast.makeText(this, Phone shaked : + force, 1000).show(); } /** * onAccelerationChanged callback */ public void onAccelerationChanged(float x, float y, float z) { ((TextView) findViewById(R.id.x)).setText(String.valueOf(x)); ((TextView) findViewById(R.id.y)).setText(String.valueOf(y)); ((TextView) findViewById(R.id.z)).setText(String.valueOf(z)); } } //this is my service when i change it, my error is hir public class Accelerometer extends Service implements AccelerometerListener{ private static Context CONTEXT; @Override public IBinder onBind(Intent intent) { // TODO Put your code here return null; } @Override public void onCreate() { System.out.println(”start listening”); // if (AccelerometerManager.isSupported()) { AccelerometerManager.startListening(this); // } } @Override public void onDestroy() { System.out.println(”start listening”); // if (AccelerometerManager.isListening()) { AccelerometerManager.stopListening(); // } } public static Context getContext() { return CONTEXT; } /** * onShake callback */ public void onShake(float force) { Toast.makeText(this, “Phone shaked niktilha omha ya 3ammi el7ag: ” + force, 1000).show(); } /** * onAccelerationChanged callback */ public void onAccelerationChanged(float x, float y, float z) { System.out.println(”x = “+x+” y = “+y+” z = “+z); } } Thanks for help. -- 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 Accelerometer Sensor
Well could you post the error? Also did you change the activity declaration in your manifest to declare a service? The class you posted is also extending activity, not service. On Thu, Jul 7, 2011 at 2:35 PM, souissi haythem haythe...@gmail.com wrote: Hi, I am trying to work with Accelerometer Sensor. So i tried this example: http://blog.androgames.net/85/android-accelerometer-tutorial/ It work perfectly. But when i change AccelerometerManager activity to a service, it doesn't work and i got an error. //this is the activity that i want change public class Accelerometer extends Activity implements AccelerometerListener { private static Context CONTEXT; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); CONTEXT = this; } protected void onResume() { super.onResume(); if (AccelerometerManager.isSupported()) { AccelerometerManager.startListening(this); } } protected void onDestroy() { super.onDestroy(); if (AccelerometerManager.isListening()) { AccelerometerManager.stopListening(); } } public static Context getContext() { return CONTEXT; } /** * onShake callback */ public void onShake(float force) { Toast.makeText(this, Phone shaked : + force, 1000).show(); } /** * onAccelerationChanged callback */ public void onAccelerationChanged(float x, float y, float z) { ((TextView) findViewById(R.id.x)).setText(String.valueOf(x)); ((TextView) findViewById(R.id.y)).setText(String.valueOf(y)); ((TextView) findViewById(R.id.z)).setText(String.valueOf(z)); } } //this is my service when i change it, my error is hir public class Accelerometer extends Service implements AccelerometerListener{ private static Context CONTEXT; @Override public IBinder onBind(Intent intent) { // TODO Put your code here return null; } @Override public void onCreate() { System.out.println(”start listening”); // if (AccelerometerManager.isSupported()) { AccelerometerManager.startListening(this); // } } @Override public void onDestroy() { System.out.println(”start listening”); // if (AccelerometerManager.isListening()) { AccelerometerManager.stopListening(); // } } public static Context getContext() { return CONTEXT; } /** * onShake callback */ public void onShake(float force) { Toast.makeText(this, “Phone shaked niktilha omha ya 3ammi el7ag: ” + force, 1000).show(); } /** * onAccelerationChanged callback */ public void onAccelerationChanged(float x, float y, float z) { System.out.println(”x = “+x+” y = “+y+” z = “+z); } } Thanks for help. -- 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.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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 get my mobile service provider using android
Take a look at http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkOperatorName() On Thu, Jul 7, 2011 at 2:16 PM, Ahmed Shoeib ahmedelsayed.sho...@gmail.comwrote: hi all , i want to know how to get my mobile servie provider using android code ? 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 -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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 Accelerometer Sensor
And what is the error? 2011/7/7 souissi haythem haythe...@gmail.com Hi, I am trying to work with Accelerometer Sensor. So i tried this example: http://blog.androgames.net/85/android-accelerometer-tutorial/ It work perfectly. But when i change AccelerometerManager activity to a service, it doesn't work and i got an error. //this is the activity that i want change public class Accelerometer extends Activity implements AccelerometerListener { private static Context CONTEXT; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); CONTEXT = this; } protected void onResume() { super.onResume(); if (AccelerometerManager.isSupported()) { AccelerometerManager.startListening(this); } } protected void onDestroy() { super.onDestroy(); if (AccelerometerManager.isListening()) { AccelerometerManager.stopListening(); } } public static Context getContext() { return CONTEXT; } /** * onShake callback */ public void onShake(float force) { Toast.makeText(this, Phone shaked : + force, 1000).show(); } /** * onAccelerationChanged callback */ public void onAccelerationChanged(float x, float y, float z) { ((TextView) findViewById(R.id.x)).setText(String.valueOf(x)); ((TextView) findViewById(R.id.y)).setText(String.valueOf(y)); ((TextView) findViewById(R.id.z)).setText(String.valueOf(z)); } } //this is my service when i change it, my error is hir public class Accelerometer extends Service implements AccelerometerListener{ private static Context CONTEXT; @Override public IBinder onBind(Intent intent) { // TODO Put your code here return null; } @Override public void onCreate() { System.out.println(”start listening”); // if (AccelerometerManager.isSupported()) { AccelerometerManager.startListening(this); // } } @Override public void onDestroy() { System.out.println(”start listening”); // if (AccelerometerManager.isListening()) { AccelerometerManager.stopListening(); // } } public static Context getContext() { return CONTEXT; } /** * onShake callback */ public void onShake(float force) { Toast.makeText(this, “Phone shaked niktilha omha ya 3ammi el7ag: ” + force, 1000).show(); } /** * onAccelerationChanged callback */ public void onAccelerationChanged(float x, float y, float z) { System.out.println(”x = “+x+” y = “+y+” z = “+z); } } Thanks for help. -- 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: how to get my mobile service provider using android
thanks for reply i tested this code TelephonyManager telephonyManager =((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)); String operatorName = telephonyManager.getNetworkOperatorName(); Log.e(service provider , operatorName); and the output in simulator = Android is this a correct result on simulator or not On Jul 7, 12:15 pm, Raghav Sood raghavs...@gmail.com wrote: Take a look athttp://developer.android.com/reference/android/telephony/TelephonyMan...() On Thu, Jul 7, 2011 at 2:16 PM, Ahmed Shoeib ahmedelsayed.sho...@gmail.comwrote: hi all , i want to know how to get my mobile servie provider using android code ? 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 -- Raghav Soodhttp://www.raghavsood.com/http://www.androidappcheck.com/http://www.telstop.tel/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how to get my mobile service provider using android
Yes that is correct. The emulator has no actual network and uses Android as its carrier name. On Thu, Jul 7, 2011 at 3:23 PM, Ahmed Shoeib ahmedelsayed.sho...@gmail.comwrote: thanks for reply i tested this code TelephonyManager telephonyManager =((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)); String operatorName = telephonyManager.getNetworkOperatorName(); Log.e(service provider , operatorName); and the output in simulator = Android is this a correct result on simulator or not On Jul 7, 12:15 pm, Raghav Sood raghavs...@gmail.com wrote: Take a look athttp:// developer.android.com/reference/android/telephony/TelephonyMan...() On Thu, Jul 7, 2011 at 2:16 PM, Ahmed Shoeib ahmedelsayed.sho...@gmail.comwrote: hi all , i want to know how to get my mobile servie provider using android code ? 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 -- Raghav Soodhttp:// www.raghavsood.com/http://www.androidappcheck.com/http://www.telstop.tel/ -- 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.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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] Audio
Hi all is there any way we can our own voice for the button click . I want some .mp3 file to be played when a button is clicked . Can anyone please help me do it ? -- ThanksRegards Kaushik Pendurthi http://kaushikpendurthi.blogspot.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] MapView and terms of service
This is a fine question to ask your attorney. On Thu, Jul 7, 2011 at 4:18 AM, Fina Perez fina.pere...@gmail.com wrote: Hi all! I use the Google API in my app and I have a question about the logo on the map. I don't modify it when I display the map, but If I display the route between two points, I paint two buttons onto the map. One of this buttons is drawn over the logo (left corner on the bottom of the screen) and this button is only visible if I'm displaying a route. Do you think this a violation of the terms of service (http:// code.google.com/apis/maps/terms.html)? Exactly, this point: 9.4 Attribution. (a) Content provided to you through the Service may contain the trade names, trademarks, service marks, logos, domain names, and other distinctive brand features of Google, its partners, or other third party rights holders of content indexed by Google. When Google provides this attribution, you must display it as provided through the Service or as described in the Maps APIs Documentation and may not delete or in any manner alter these trade names, trademarks, service marks, logos, domain names, and other distinctive brand features 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Aidl Error : couldn't find import for class org.json.JSONObject
Visit http://source.android.com for assistance in building your custom firmware. This list is for Android SDK development. On Thu, Jul 7, 2011 at 2:41 AM, rashmi rashmi@gmail.com wrote: Hi, I have written an aidl file in the path android/framwork/base/core/ java/com/, which has a import statement - import org.json.JSONObject. But the build is failing with an error - 'couldn't find import for class org.json.JSONObject'. According to my study I found that for import statements in aidl we should define LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) in the Android.mk file. In my source code, Android.mk in framework/ base/ already contains the above definition. Please let me know how to resolve the import JSON error in aidl. 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Closing AppWidget when force closing an application
You are not informed of when the user force-stops your application. And you have no way to remove app widgets from the home screen. On Tue, Jul 5, 2011 at 1:38 PM, Marcos Fábio mfpere...@gmail.com wrote: Hi All, I'm trying to close (remove from home) my AppWidget when the user goes to (Settings - Applications - Manage applications) and click on 'Force Stop' button of my application. The application closes, but the AppWidget keeps on Home and doesn't work. BR, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: MapView and terms of service
Just in case, I moved the buttons to the top of the screen, so the logo is always visible. But, yes...I guess the one with the best answer is a lawyer On Jul 7, 12:16 pm, Mark Murphy mmur...@commonsware.com wrote: This is a fine question to ask your attorney. On Thu, Jul 7, 2011 at 4:18 AM, Fina Perez fina.pere...@gmail.com wrote: Hi all! I use the Google API in my app and I have a question about the logo on the map. I don't modify it when I display the map, but If I display the route between two points, I paint two buttons onto the map. One of this buttons is drawn over the logo (left corner on the bottom of the screen) and this button is only visible if I'm displaying a route. Do you think this a violation of the terms of service (http:// code.google.com/apis/maps/terms.html)? Exactly, this point: 9.4 Attribution. (a) Content provided to you through the Service may contain the trade names, trademarks, service marks, logos, domain names, and other distinctive brand features of Google, its partners, or other third party rights holders of content indexed by Google. When Google provides this attribution, you must display it as provided through the Service or as described in the Maps APIs Documentation and may not delete or in any manner alter these trade names, trademarks, service marks, logos, domain names, and other distinctive brand features 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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 dictionary database.
Hello All, Am in the middle of implementing one application which includes dictionary feature(English). Can anyone help me in finding a dictionary database for my application? Thanks in Advance Aditya. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android TextView Style
Thnx, that was helpfull, I managed to do it. :) On Jul 5, 7:25 pm, TreKing treking...@gmail.com wrote: On Tue, Jul 5, 2011 at 8:51 AM, MG matic.goropev...@gmail.com wrote: I want this TextView to have semi-transparent background and rounded edges. How would I accomplish this? http://developer.android.com/guide/topics/ui/themes.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Hide TextView after some time
Hi! I have a problem. I am developing an app where I get some message (html text) and display it in TextView. Comunication is based on JADE and JADE-Android, but problem is not here. I can send and recieve messages OK. I need my TextView to disapear after some time (let say 10s) if there is no new messages recieved. I tried Thread.sleep() but that stops the whole thing and I don't want that. I also tried Handler.postDelayed() and it works to some extent. Problem is, it hides TextView in any case, even if new message is recieved before 10s is over. I need it to hide only if there is no new message. How can I accomplish this? Thanks for any help! Here is the part of the code that is relevant. In my main Activity, I create method updateText(String) - public void updateText(String text) { t = (TextView) findViewById(R.id.textView1); t.setVisibility(0); t.setText(Html.fromHtml(text)); // textViewHandler.removeCallbacksAndMessages(textViewHandler); textViewHandler.postDelayed(new Runnable() { public void run() { t.setText(Handler); t.setVisibility(4); } }, 1); } In another class I call this method, when new message is recieved - public void onMessageReceived(ACLMessage msg) { // TODO Auto-generated method stub MyUpdater up = new MyUpdater(act, msg); handl.post(up); } private class MyUpdater implements Runnable { ACLMessage msg; CaptureActivity act; public MyUpdater(CaptureActivity sm, ACLMessage msg) { this.msg = msg; this.act = sm; } public void run() { act.updateText(b**Sporočilo agenta + msg.getSender().getLocalName() + :**/bbr/br/ + msg.getContent()); } } -- 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] record incoming and outgoing calls?
Hi, Just want to know that how to record incoming and outgoing calls on wide varity of devices? I am using the mediarecorder and with this i am able to record incoming and outgoing calls with sony xperia x10 mini. mediaRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL); and same code doesnt work on galaxt tab. I have googling a lot but from that it seems its not possible to record the calls. But i have found this link https://market.android.com/details?id=com.killermobile.totalrecall.market and tested it with samsung galaxy tab and sony xperia x10mini.It works fine for both the devices. so can anybody tell me how it can be possible to record calls with wide variaty of devices? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Hide TextView after some time
Use removeCallbacks() to get rid of your posted Runnable when it is no longer valid, and schedule a fresh one. On Thu, Jul 7, 2011 at 7:37 AM, MG matic.goropev...@gmail.com wrote: Hi! I have a problem. I am developing an app where I get some message (html text) and display it in TextView. Comunication is based on JADE and JADE-Android, but problem is not here. I can send and recieve messages OK. I need my TextView to disapear after some time (let say 10s) if there is no new messages recieved. I tried Thread.sleep() but that stops the whole thing and I don't want that. I also tried Handler.postDelayed() and it works to some extent. Problem is, it hides TextView in any case, even if new message is recieved before 10s is over. I need it to hide only if there is no new message. How can I accomplish this? Thanks for any help! Here is the part of the code that is relevant. In my main Activity, I create method updateText(String) - public void updateText(String text) { t = (TextView) findViewById(R.id.textView1); t.setVisibility(0); t.setText(Html.fromHtml(text)); // textViewHandler.removeCallbacksAndMessages(textViewHandler); textViewHandler.postDelayed(new Runnable() { public void run() { t.setText(Handler); t.setVisibility(4); } }, 1); } In another class I call this method, when new message is recieved - public void onMessageReceived(ACLMessage msg) { // TODO Auto-generated method stub MyUpdater up = new MyUpdater(act, msg); handl.post(up); } private class MyUpdater implements Runnable { ACLMessage msg; CaptureActivity act; public MyUpdater(CaptureActivity sm, ACLMessage msg) { this.msg = msg; this.act = sm; } public void run() { act.updateText(b**Sporočilo agenta + msg.getSender().getLocalName() + :**/bbr/br/ + msg.getContent()); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Puzzling crash report. Location app doesn't work if the GPS is on
Hi all I wrote an app that gets and displays your location on a map. I am using the Google Maps service to render the map. The app has been live for less than two hours and I have received 33 crash reports (using ACRA). I have been able to recreate the problem. The app works fine if the GPS is off but if it is switched on the app force closes. The stack trace reads: java.lang.NullPointerException at com.raghavsood.findme.MyPositionOverlay.draw(MyPositionOverlay.java:37) at com.google.android.maps.Overlay.draw(Overlay.java:179) at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45) at com.google.android.maps.MapView.onDraw(MapView.java:494) at android.view.View.draw(View.java:6818) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6821) at android.widget.FrameLayout.draw(FrameLayout.java:354) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6821) at android.widget.FrameLayout.draw(FrameLayout.java:354) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1944) at android.view.ViewRoot.draw(ViewRoot.java:1432) at android.view.ViewRoot.performTraversals(ViewRoot.java:1174) at android.view.ViewRoot.handleMessage(ViewRoot.java:1752) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4632) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) I don't know why there is a NullPointerException exception at MyPositionOverlay on line 37. The line in question reads: Double latitude = location.getLatitude()*1E6; The same code works fine if GPS is off. The app is https://market.android.com/details?id=com.raghavsood.findme Does anyone know what could be causing this and how to fix it? Thanks -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: [android] app does not show up after wake up
add the launcher intent filter in your activity which receive broadcast notifications... -- 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: Array Adapter Problem
Adapter always accept a String array or a List not just String . So your String items=--- must be like String[] items={ m_addItemText.getText().toString()}; Enjoy and never forget to say '*Jai Hind*'. -- 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] Honeycomb (3.1) adjustResize behavior inconsistent with 2.1?
My activity has android:windowSoftInputMode=adjustResize and, in 2.1, the softKeyboard will resize the layout accordingly. In 3.1, however, I have not been able to get the same behavior: the soft keyboard will push EditText views, but not Button views. Same behavior on both the 10 inch Galaxy tab and the Motorola Xoom. I've reworked my layout several times trying to get it to be compatible with Honeycomb, to no avail. The soft keyboard will push up an EditText view, but not the buttons. Here are a couple variations I've tried for the layout: Using just LinearLayout - http://pastebin.com/qRh6xgM7 Using RelativeLayout - http://pastebin.com/94YinSZy The only related issue I've found is this: http://groups.google.com/group/android-developers/browse_thread/thread/59c7a97bb4569e3a/77facea6ccc94b3f?lnk=gstq=overlayed%20the%20edit%20area%20in%20webview%20when%20the%20hardware%20accelerate%20is%20enabled#77facea6ccc94b3f But disabling hardware acceleration had no effect for me. I also read the Android blog guide on making your app compatible with input methods, but didn't recognize any solution there. Am I doing something obviously wrong? Or is this a bug anyone has more info on? This is a crosspost for a Stack Overflow question: http://stackoverflow.com/questions/6599341/honeycomb-3-1-adjustresize-no-longer-working -- 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] Puzzling crash report. Location app doesn't work if the GPS is on
How are you getting that Location that is null? On Thu, Jul 7, 2011 at 8:18 AM, Raghav Sood raghavs...@gmail.com wrote: Hi all I wrote an app that gets and displays your location on a map. I am using the Google Maps service to render the map. The app has been live for less than two hours and I have received 33 crash reports (using ACRA). I have been able to recreate the problem. The app works fine if the GPS is off but if it is switched on the app force closes. The stack trace reads: java.lang.NullPointerException at com.raghavsood.findme.MyPositionOverlay.draw(MyPositionOverlay.java:37) at com.google.android.maps.Overlay.draw(Overlay.java:179) at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45) at com.google.android.maps.MapView.onDraw(MapView.java:494) at android.view.View.draw(View.java:6818) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6821) at android.widget.FrameLayout.draw(FrameLayout.java:354) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6821) at android.widget.FrameLayout.draw(FrameLayout.java:354) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1944) at android.view.ViewRoot.draw(ViewRoot.java:1432) at android.view.ViewRoot.performTraversals(ViewRoot.java:1174) at android.view.ViewRoot.handleMessage(ViewRoot.java:1752) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4632) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) I don't know why there is a NullPointerException exception at MyPositionOverlay on line 37. The line in question reads: Double latitude = location.getLatitude()*1E6; The same code works fine if GPS is off. The app is https://market.android.com/details?id=com.raghavsood.findme Does anyone know what could be causing this and how to fix it? Thanks -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: Need help with a Spinner
HI just do following: Create an ArrayList say list when Add button is click call list.add(editext content); and then create An ArrayAdapter with items taken from list then call spinner.setAdapter... For Clear call list.clear(); and then create An ArrayAdapter with items taken from list then call spinner.setAdapter... Enjoy and never forget to say *JAI HIND* -- 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] Installing a x86 image in new sdk tools v12
On Thu, Jul 7, 2011 at 8:32 AM, Bogdan Muresan hy.yours...@gmail.comwrote: I've upgraded to android sdk tools 12. As a release note google says: The AVD manager and emulator can now use system images compiled for ARM v7 and x86 CPUs. Has anyone tried to run a x86 image? If so, can you provide some instructions on how I can do it? Are there any 3.0+ images? They're not publicly available yet. If you want to play with x86 emulation, build the AOSP source tree using the full_x86-eng product, then launch emulator. Warning: this is currently *not* faster than ARM emulation (but we're working on 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 -- 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: App not visible from Android Market on the device
http://www.google.com/support/androidmarket/developer/bin/static.py?page=known_issues.cs See Can't Find App (and Applications Missing From Android Market - though not exactly your use case). These reeks of another Android Market Screw Up™ - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on
Exactly my point. When the GPS is on it returns null for the location, but if the GPS is off then the cell phone tower location works fine. Is there any way that I can set my app to triangulate using only the cellphone network? Thanks On Thu, Jul 7, 2011 at 5:58 PM, Mark Murphy mmur...@commonsware.com wrote: How are you getting that Location that is null? On Thu, Jul 7, 2011 at 8:18 AM, Raghav Sood raghavs...@gmail.com wrote: Hi all I wrote an app that gets and displays your location on a map. I am using the Google Maps service to render the map. The app has been live for less than two hours and I have received 33 crash reports (using ACRA). I have been able to recreate the problem. The app works fine if the GPS is off but if it is switched on the app force closes. The stack trace reads: java.lang.NullPointerException at com.raghavsood.findme.MyPositionOverlay.draw(MyPositionOverlay.java:37) at com.google.android.maps.Overlay.draw(Overlay.java:179) at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45) at com.google.android.maps.MapView.onDraw(MapView.java:494) at android.view.View.draw(View.java:6818) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6821) at android.widget.FrameLayout.draw(FrameLayout.java:354) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6821) at android.widget.FrameLayout.draw(FrameLayout.java:354) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1944) at android.view.ViewRoot.draw(ViewRoot.java:1432) at android.view.ViewRoot.performTraversals(ViewRoot.java:1174) at android.view.ViewRoot.handleMessage(ViewRoot.java:1752) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4632) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) I don't know why there is a NullPointerException exception at MyPositionOverlay on line 37. The line in question reads: Double latitude = location.getLatitude()*1E6; The same code works fine if GPS is off. The app is https://market.android.com/details?id=com.raghavsood.findme Does anyone know what could be causing this and how to fix it? Thanks -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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] Audio
On Thu, Jul 7, 2011 at 5:06 AM, kaushik p kaushiks...@gmail.com wrote: I want some .mp3 file to be played when a button is clicked . Can anyone please help me do it ? What have you tried so far? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Need dictionary database.
On Thu, Jul 7, 2011 at 5:46 AM, Aditya dabhaga...@gmail.com wrote: Can anyone help me in finding a dictionary database for my application? What help do you want, besides the obvious of searching the internets, which you can obviously do for yourself? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on
In brief, Mark wanted to see the code of the null Location acquisition using GPS. 2011/7/7 Raghav Sood raghavs...@gmail.com Exactly my point. When the GPS is on it returns null for the location, but if the GPS is off then the cell phone tower location works fine. Is there any way that I can set my app to triangulate using only the cellphone network? Thanks On Thu, Jul 7, 2011 at 5:58 PM, Mark Murphy mmur...@commonsware.comwrote: How are you getting that Location that is null? On Thu, Jul 7, 2011 at 8:18 AM, Raghav Sood raghavs...@gmail.com wrote: Hi all I wrote an app that gets and displays your location on a map. I am using the Google Maps service to render the map. The app has been live for less than two hours and I have received 33 crash reports (using ACRA). I have been able to recreate the problem. The app works fine if the GPS is off but if it is switched on the app force closes. The stack trace reads: java.lang.NullPointerException at com.raghavsood.findme.MyPositionOverlay.draw(MyPositionOverlay.java:37) at com.google.android.maps.Overlay.draw(Overlay.java:179) at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45) at com.google.android.maps.MapView.onDraw(MapView.java:494) at android.view.View.draw(View.java:6818) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6821) at android.widget.FrameLayout.draw(FrameLayout.java:354) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6821) at android.widget.FrameLayout.draw(FrameLayout.java:354) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1944) at android.view.ViewRoot.draw(ViewRoot.java:1432) at android.view.ViewRoot.performTraversals(ViewRoot.java:1174) at android.view.ViewRoot.handleMessage(ViewRoot.java:1752) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4632) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) I don't know why there is a NullPointerException exception at MyPositionOverlay on line 37. The line in question reads: Double latitude = location.getLatitude()*1E6; The same code works fine if GPS is off. The app is https://market.android.com/details?id=com.raghavsood.findme Does anyone know what could be causing this and how to fix it? Thanks -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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
Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on
On Thu, Jul 7, 2011 at 7:18 AM, Raghav Sood raghavs...@gmail.com wrote: Does anyone know what could be causing this and how to fix it? Are you waiting for the GPS to actually report that it found a valid location ... ? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App not visible from Android Market on the device
@TreKing Thank you for the reply. Interesting read, but doesn't apply in my case. In the meantime also sent an email to Android market support, maybe they have a explanation. Manuel On Jul 7, 2:45 pm, TreKing treking...@gmail.com wrote: http://www.google.com/support/androidmarket/developer/bin/static.py?p... See Can't Find App (and Applications Missing From Android Market - though not exactly your use case). These reeks of another Android Market Screw Up™ --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Custom GridView with ArrayAdapter out of sync with backing data
Hi every one, im developing one program for android gridview and displaying images from getting images in sdcard and displayed. when i click one image need to add one images in that gridview child. its working fine.. bit my problem is when im scrolling down the un selected images was highlighted. here im post my code.. package com.SdcardIma; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.content.Context; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import android.os.AsyncTask; import android.os.Bundle; import android.view.Display; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; /** * Loads images from SD card. * * @author Mihai Fonoage * */ public class SdcardIma extends Activity implements OnItemClickListener { /** * Grid view holding the images. */ private ListString pathlist=new ArrayListString(); private ListObject viewList=new ArrayListObject(); private ListInteger checkList=new ArrayListInteger(); private int count =0; private GridView sdcardImages; // private boolean isVisble = false; /** * Image adapter for the grid view. */ private ImageAdapter imageAdapter; /** * Display used for getting the width of the screen. */ private Display display; /** * Creates the content view, sets up the grid, the adapter, and the click listener. * * @see android.app.Activity#onCreate(android.os.Bundle) */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Request progress bar requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.main); display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); setupViews(); setProgressBarIndeterminateVisibility(true); loadImages(); } /** * Free up bitmap related resources. */ protected void onDestroy() { super.onDestroy(); final GridView grid = sdcardImages; final int count = grid.getChildCount(); ImageView v = null; for (int i = 0; i count; i++) { v = (ImageView) grid.getChildAt(i); ((BitmapDrawable) v.getDrawable()).setCallback(null); } } /** * Setup the grid view. */ private void setupViews() { sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setNumColumns(display.getWidth()/95); sdcardImages.setClipToPadding(false); sdcardImages.setOnItemClickListener(SdcardIma.this); imageAdapter = new ImageAdapter(getApplicationContext()); sdcardImages.setAdapter(imageAdapter); } /** * Load images. */ private void loadImages() { final Object data = getLastNonConfigurationInstance(); if (data == null) { new LoadImagesFromSDCard().execute(); } else { final LoadedImage[] photos = (LoadedImage[]) data; if (photos.length == 0) { new LoadImagesFromSDCard().execute(); } for (LoadedImage photo : photos) { addImage(photo); } } } /** * Add image(s) to the grid view adapter. * * @param value Array of LoadedImages references */ private void addImage(LoadedImage... value) { for (LoadedImage image : value) { imageAdapter.addPhoto(image); imageAdapter.notifyDataSetChanged(); } } /** * Save bitmap images into a list and return that list. * * @see android.app.Activity#onRetainNonConfigurationInstance() */ @Override public Object onRetainNonConfigurationInstance() { final GridView grid = sdcardImages; final int count = grid.getChildCount(); final LoadedImage[] list = new LoadedImage[count]; for (int i = 0; i count; i++) { final ImageView v = (ImageView) grid.getChildAt(i); list[i] = new LoadedImage(((BitmapDrawable) v.getDrawable()).getBitmap()); } return list; } /** * Async task for loading the images from the SD card. * * @author Mihai Fonoage * */ class LoadImagesFromSDCard extends AsyncTaskObject, LoadedImage, Object { /** * Load images from SD Card in the background, and display each image on the screen. *
[android-developers] EventQueue.peekMessage
Hi folks, why there is no a way to poll or peek the message from the event queue? I want it to implement the break for the routine running on the UI thread. private void longRoutine() { while (flag){ if (queue.peekMessage() != null) { return; } whatever the code is } } Or am I missing something and actually a way exists? Thanks, Andrei -- 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: Hide TextView after some time
Solved. Created new Runnable with t.setVisibility(4). Then as suggested, added removeCallbacks() and it works perfectly. Thank you! M On Jul 7, 1:55 pm, Mark Murphy mmur...@commonsware.com wrote: Use removeCallbacks() to get rid of your posted Runnable when it is no longer valid, and schedule a fresh one. On Thu, Jul 7, 2011 at 7:37 AM, MG matic.goropev...@gmail.com wrote: Hi! I have a problem. I am developing an app where I get some message (html text) and display it in TextView. Comunication is based on JADE and JADE-Android, but problem is not here. I can send and recieve messages OK. I need my TextView to disapear after some time (let say 10s) if there is no new messages recieved. I tried Thread.sleep() but that stops the whole thing and I don't want that. I also tried Handler.postDelayed() and it works to some extent. Problem is, it hides TextView in any case, even if new message is recieved before 10s is over. I need it to hide only if there is no new message. How can I accomplish this? Thanks for any help! Here is the part of the code that is relevant. In my main Activity, I create method updateText(String) - public void updateText(String text) { t = (TextView) findViewById(R.id.textView1); t.setVisibility(0); t.setText(Html.fromHtml(text)); // textViewHandler.removeCallbacksAndMessages(textViewHandler); textViewHandler.postDelayed(new Runnable() { public void run() { t.setText(Handler); t.setVisibility(4); } }, 1); } In another class I call this method, when new message is recieved - public void onMessageReceived(ACLMessage msg) { // TODO Auto-generated method stub MyUpdater up = new MyUpdater(act, msg); handl.post(up); } private class MyUpdater implements Runnable { ACLMessage msg; CaptureActivity act; public MyUpdater(CaptureActivity sm, ACLMessage msg) { this.msg = msg; this.act = sm; } public void run() { act.updateText(b**Sporočilo agenta + msg.getSender().getLocalName() + :**/bbr/br/ + msg.getContent()); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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] EventQueue.peekMessage
On Thu, Jul 7, 2011 at 9:11 AM, andrei-dmitriev andrei-dmitr...@yandex.ru wrote: why there is no a way to poll or peek the message from the event queue? I want it to implement the break for the routine running on the UI thread. private void longRoutine() { while (flag){ if (queue.peekMessage() != null) { return; } whatever the code is } } Or am I missing something and actually a way exists? It's called a background thread. All the cool programmers use them. Why do you think that you need longRoutine() to be on the main application thread? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: Hide TextView after some time
On Thu, Jul 7, 2011 at 9:16 AM, MG matic.goropev...@gmail.com wrote: Solved. Created new Runnable with t.setVisibility(4). Then as suggested, added removeCallbacks() and it works perfectly. It would be even better if you called setVisibility(View.INVISIBLE), rather than hard-coding in some magic number. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Puzzling crash report. Location app doesn't work if the GPS is on
On Thu, Jul 7, 2011 at 9:28 AM, Raghav Sood raghavs...@gmail.com wrote: I have a app that triangulates the users location and displays it on a map without using the GPS. As long as the GPS is off the app does its job perfectly. The moment someone turns the GPS on the app force closes and gives a NullPointerException on line 37 of MyPositionOverlay which is given above. If needed I am willing to share the source code for the entire project as there is nothing special in it. It is attached with this mail. I would like this group's help on the fact as to why the app force closes when the GPS is turned on and how do I fix it. The app does not use the GPS at all. First, your overlay's location data member will be null sometimes, the way this is written. getLastKnownLocation() can return null at any time, and in that case, you don't have a Location to work with. You will need to either add intelligence to the overlay to handle this case, or not set up the overlay until you have a Location. Second, you are using GPS, the way this is written. More specifically, you are using the Criteria system, which will return GPS as a possible provider. Given your specific Criteria setup, if GPS is available, it probably is the best provider. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Puzzling crash report. Location app doesn't work if the GPS is on
On Thu, Jul 7, 2011 at 8:28 AM, Raghav Sood raghavs...@gmail.com wrote: I would like this group's help on the fact as to why the app force closes when the GPS is turned on and how do I fix it. The app does not use the GPS at all. Are you sure about that? When GPS is on, what does getBestProvider return? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on
I am aware of the last know location returning null. As for my code using GPS, the book that I learnt geo services said that this shouldn't happen. Seems they were wrong. Coming back to the point. Is there any way to make sure that the app does not use GPS? That is even if GPS is on the app only uses the cell network? The whole point of my app was to provide the location without the GPS being used. Can I set the provider of the location? Thanks On Thu, Jul 7, 2011 at 7:06 PM, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 7, 2011 at 9:28 AM, Raghav Sood raghavs...@gmail.com wrote: I have a app that triangulates the users location and displays it on a map without using the GPS. As long as the GPS is off the app does its job perfectly. The moment someone turns the GPS on the app force closes and gives a NullPointerException on line 37 of MyPositionOverlay which is given above. If needed I am willing to share the source code for the entire project as there is nothing special in it. It is attached with this mail. I would like this group's help on the fact as to why the app force closes when the GPS is turned on and how do I fix it. The app does not use the GPS at all. First, your overlay's location data member will be null sometimes, the way this is written. getLastKnownLocation() can return null at any time, and in that case, you don't have a Location to work with. You will need to either add intelligence to the overlay to handle this case, or not set up the overlay until you have a Location. Second, you are using GPS, the way this is written. More specifically, you are using the Criteria system, which will return GPS as a possible provider. Given your specific Criteria setup, if GPS is available, it probably is the best provider. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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] Puzzling crash report. Location app doesn't work if the GPS is on
@TreKing: getBestProvider(); returns GPS but as my app is perfectly functional without the GPS I would like to use the cell network even when GPS is available. Is there any way to do so? Thanks On Thu, Jul 7, 2011 at 7:13 PM, Raghav Sood raghavs...@gmail.com wrote: I am aware of the last know location returning null. As for my code using GPS, the book that I learnt geo services said that this shouldn't happen. Seems they were wrong. Coming back to the point. Is there any way to make sure that the app does not use GPS? That is even if GPS is on the app only uses the cell network? The whole point of my app was to provide the location without the GPS being used. Can I set the provider of the location? Thanks On Thu, Jul 7, 2011 at 7:06 PM, Mark Murphy mmur...@commonsware.comwrote: On Thu, Jul 7, 2011 at 9:28 AM, Raghav Sood raghavs...@gmail.com wrote: I have a app that triangulates the users location and displays it on a map without using the GPS. As long as the GPS is off the app does its job perfectly. The moment someone turns the GPS on the app force closes and gives a NullPointerException on line 37 of MyPositionOverlay which is given above. If needed I am willing to share the source code for the entire project as there is nothing special in it. It is attached with this mail. I would like this group's help on the fact as to why the app force closes when the GPS is turned on and how do I fix it. The app does not use the GPS at all. First, your overlay's location data member will be null sometimes, the way this is written. getLastKnownLocation() can return null at any time, and in that case, you don't have a Location to work with. You will need to either add intelligence to the overlay to handle this case, or not set up the overlay until you have a Location. Second, you are using GPS, the way this is written. More specifically, you are using the Criteria system, which will return GPS as a possible provider. Given your specific Criteria setup, if GPS is available, it probably is the best provider. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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] Puzzling crash report. Location app doesn't work if the GPS is on
On Thu, Jul 7, 2011 at 9:43 AM, Raghav Sood raghavs...@gmail.com wrote: Coming back to the point. Is there any way to make sure that the app does not use GPS? That is even if GPS is on the app only uses the cell network? The whole point of my app was to provide the location without the GPS being used. Can I set the provider of the location? Don't use Criteria. Use LocationManager.NETWORK_PROVIDER. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Puzzling crash report. Location app doesn't work if the GPS is on
On Thu, Jul 7, 2011 at 8:47 AM, Mark Murphy mmur...@commonsware.com wrote: Don't use Criteria. Use LocationManager.NETWORK_PROVIDER. To add to this, this is because by using Criteria and, more importantly, specifying ACCURACY_FINE and POWER_HIGH, you are pretty much saying gimme GPS if available. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Active Installs doing (still) strange things....
I'm just wondering if anyone else is seeing this There's still something strange going on in the Market, and it is a bit too much a a coincidence to believe. For the last several days, EVERY time my total installs goes up by some number (regardless of what that number is), active installs goes DOWN by exactly the same number. Not just once, not just twice, EVERY time, exactly the same amounts. Strange, huh? Has anyone else been seeing anything like this? Later, --jim -- 73 DE N5IAL (/4)| DMR: So fsck was originally called spooky1...@gmail.com| something else. Running FreeBSD 7.0 | Q: What was it called? ICBM / Hurricane: | DMR: Well, the second letter was different. 30.44406N 86.59909W |-- Dennis M. Ritchie, Usenix, June 1998. Point Lobos Photography Set 1 (Photo-posters): http://jdgapps.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] Android Charting dll for plotting Graphs
Thanks Fred, very well said Rgds, -Saurabh ..pain is temporary.quitting lasts forever.. On Wed, Jul 6, 2011 at 8:59 PM, Fred Niggle fred.nig...@googlemail.comwrote: Hello. Try to drop the windows mindset when coding for android, in Linux there is no such thing as a dll (as for as I know). There are API's for creating graphs: http://android.arnodenhond.com/components/graphview and http://androidplot.com/wiki/Home are just two I found with a very quick google search... Hope this helps, Fred On 06/07/2011, s.rawat imsaurabhra...@gmail.com wrote: yeah Mark even less than 10 secs..Thanks.. I will use it nd post the code once done.. Rgds, Saurabh ..pain is temporary.quitting lasts forever.. On Tue, Jul 5, 2011 at 6:56 PM, Mark Murphy mmur...@commonsware.com wrote: ChartDroid AndroidPlot AChartEngine There are probably others, but those were what showed up in the first 10 seconds of searching on Google. On Tue, Jul 5, 2011 at 9:21 AM, s.rawat imsaurabhra...@gmail.com wrote: HI All, is there any charting dll or library for android with the sample code which can be used for plotting charts.I have used dotnetcharting dlls for plotting the graphs in the C# where you can get the sampe code for different forms of charts as well. Is there any such library for android wth the sample codes. Rgds, Saurabh ..pain is temporary.quitting lasts forever.. -- 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 _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 -- 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
Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on
Thanks Mark, TreKing and Filip. The problems gone away and will not be coming back. LocationManager.NETWORK_PROVIDER works like a charm. Thanks On Thu, Jul 7, 2011 at 7:32 PM, TreKing treking...@gmail.com wrote: On Thu, Jul 7, 2011 at 8:47 AM, Mark Murphy mmur...@commonsware.comwrote: Don't use Criteria. Use LocationManager.NETWORK_PROVIDER. To add to this, this is because by using Criteria and, more importantly, specifying ACCURACY_FINE and POWER_HIGH, you are pretty much saying gimme GPS if available. - 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 -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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 the Hw-Tablet configuration??
Hi Is there a way/any android api which can give us the system configuration(hw configuration -memory, cpu config, speed, processor version and other accelerator information) or do we have to log cat the /proc/meminfo and /proc/cpuinfo into the file in c fucntion and dump the file to the android application using the jni calls.Plz suggest or any other alternative Rgds Saurabh ..pain is temporary.quitting lasts forever.. -- 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] Share a message with Facebook does not work..
Hello, I am trying to share a message with Facebook to be posted on my facebook wall. I am using the following code, but it gets stuck off at http://m.facebook.com/sharer.php?u= Code: private void openFaceBook(){ Intent facebookIntent = new Intent(Intent.ACTION_SEND); facebookIntent.putExtra(Intent.EXTRA_TEXT, Have a nice day..!); facebookIntent.setType(text/*); boolean resolved = false; for(ResolveInfo ri: lRInfo) { if(ri.activityInfo.name.endsWith(.ShareLinkActivity)) // Facebook { facebookIntent.setClassName(ri.activityInfo.packageName, ri.activityInfo.name); resolved = true; break; } } startActivity(resolved ? facebookIntent : Intent.createChooser(facebookIntent, Choose one)); } I would appreciate for any quick help . Thanks in advance.. DK -- 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] DexFile Error meaning
Hi, In a project that i'm working, in some point of development i found this Exception in DexFile.class, before the application running my Laucher Activity... I go to Google and search some articleshttp://stackoverflow.com/questions/4502445/dexfile-class-error-in-eclipsethat help search the error in source codehttp://android.opensourceror.org/2010/01/18/android-source/, but none of lit my doubts about where my/debugging error comes: what's the meaning of the Exception in DexFile.class/DexFile.java? This is my error trace: Thread [3 main] (Class load: gml.android.mixdroid.MixDroidUtils) dalvik.system.DexFile.defineClass(java.lang.String, java.lang.ClassLoader, int, java.security.ProtectionDomain) line: not available [native method] dalvik.system.DexFile.loadClassBinaryName(java.lang.String, java.lang.ClassLoader) line: 209 dalvik.system.PathClassLoader.findClass(java.lang.String) line: 203 dalvik.system.PathClassLoader(java.lang.ClassLoader).loadClass(java.lang.String, boolean) line: 573 dalvik.system.PathClassLoader(java.lang.ClassLoader).loadClass(java.lang.String) line: 532 *gml.android.mixdroid.StartActivity.onCreate(android.os.Bundle) line: 89 *// this is my Laucnher android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) line: 1047 android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityRecord, android.content.Intent) line: 2459 android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityRecord, android.content.Intent) line: 2512 android.app.ActivityThread.access$2200(android.app.ActivityThread, android.app.ActivityThread$ActivityRecord, android.content.Intent) line: 119 android.app.ActivityThread$H.handleMessage(android.os.Message) line: 1863 android.app.ActivityThread$H(android.os.Handler).dispatchMessage(android.os.Message) line: 99 android.os.Looper.loop() line: 123 android.app.ActivityThread.main(java.lang.String[]) line: 4363 java.lang.reflect.Method.invokeNative(java.lang.Object, java.lang.Object[], java.lang.Class, java.lang.Class[], java.lang.Class, int, boolean) line: not available [native method] java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 521 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() line: 860 com.android.internal.os.ZygoteInit.main(java.lang.String[]) line: 618 dalvik.system.NativeStart.main(java.lang.String[]) line: not available [native method] Thanks! -- -- GUILHERME -- 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: DexFile Error meaning
Can't say much without seeing the code of your StartActivity. Do you link to a library (JAR)? Maybe this JAR refers to the ProtectionDomain class of another java-implementation that's not quite compatible with the Android SDK's one. -- 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: RE: [android-developers] Re: Patent Infringement notice by Lodsys.
Question is: Are you ready to spend time and money battling over %6 of US sales? I don't expect that you live in Texas. And Apple hasn't really stepped in more than Google has, don't be fooled by that letter. BTW: Google has the same license Apple has. They both acquired the license from Intellectual Ventures. -- 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: RE: [android-developers] Re: Patent Infringement notice by Lodsys.
Question is: Are you ready to spend time and money battling over %6 of US sales? Is this what Lodsys is asking for? -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: RE: [android-developers] Re: Patent Infringement notice by Lodsys.
I'm curious too, where are you getting the 6% figure? BTW: We have no way of knowing that Google has the same license Apple has. All we know is that Google and Apple each obtained *a* license from Intellectual Ventures. It may be a reasonable assumption that the licenses have similar terms, but it's by no means definite. Those of us posting on this forum don't really know anything about the details of *either* license. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: DexFile Error meaning
Strange... now works :) I tried delete my emulator images once (yesterday), to verify if was problem in Debugger machine but not worked... I tried again (deleted ALL Emulators images) and create one new, and now my Launcher Activity works how expected... (The DexFile Exception ocurred only when i tried debug my App)... One Idea about this? On Jul 7, 12:02 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Can't say much without seeing the code of your StartActivity. Do you link to a library (JAR)? Maybe this JAR refers to the ProtectionDomain class of another java-implementation that's not quite compatible with the Android SDK's one. -- 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: RE: [android-developers] Re: Patent Infringement notice by Lodsys.
I read yesterday it wasn't 6%, its 0.575% which, principle aside, is a paltry amount. Here's one reference: http://9to5mac.com/2011/05/16/lodsys-were-not-patent-trolls-heres-why-were-entitled-to-royalties-over-in-app-purchasing/ - I think there's more info at Groklaw about exactly what they're asking. -- 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: DexFile Error meaning
in any case, this is my on Create, when my code crash... /* (non-Javadoc) * @see android.app.Activity#onCreate(android.os.Bundle) */ @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); Log.i(TAG, *** Creating MixDroid ***); setContentView(R.layout.start_activity); boolean b = NetworkConnection.isOnline(this); setSharedPreferences(b, false, true, null, null); Log.w(TAG, getIntent().getExtras()==null?Running for first time, no SharedPreferences setted, using default values: Have an saved state, checking SharedPreferences...); if(getIntent().getExtras()==null){ boolean connected = sharedPreferences.getBoolean(ONLINE, false); boolean firstTime = sharedPreferences.getBoolean(FIRST_TIME_USE, true); if(!connected){ NetworkConnection.startNetworkAlertDialog(this); } if(firstTime){ MixDroidUtils.startErrorAlertDialog(this, MixDroidUtils.RUNNING_FIRST_TIME); } } //set layout Log.d(TAG, Setting list adapter); ButtonsAdapter adapter = new ButtonsAdapter(this, Order.generateOrders(Order.TYPE_BUTTON, 5)); Log.d(TAG, putting adapter on list adapter); setListAdapter(adapter); } On Jul 7, 12:25 pm, droidGUI gcravi...@gmail.com wrote: Strange... now works :) I tried delete my emulator images once (yesterday), to verify if was problem in Debugger machine but not worked... I tried again (deleted ALL Emulators images) and create one new, and now my Launcher Activity works how expected... (The DexFile Exception ocurred only when i tried debug my App)... One Idea about this? On Jul 7, 12:02 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Can't say much without seeing the code of your StartActivity. Do you link to a library (JAR)? Maybe this JAR refers to the ProtectionDomain class of another java-implementation that's not quite compatible with the Android SDK's one. -- 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] rounded corner // Shape Drawable (via xml) vs. PNG
Hi, On stackoverflow I found a question about creating a rounded corner graphic. http://stackoverflow.com/questions/1683185/android-listview-with-rounded-corners The solution was to create a shape drawable via xml file. My question: Why he/she recommends a shape drawable xml file and not a png file (9-patch)? Why is a shape drawable better? Ralph -- 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: RE: [android-developers] Re: Patent Infringement notice by Lodsys.
I read yesterday it wasn't 6%, its 0.575% From what I understand from that link, that's what they are CURRENTLY receiving from Apple, not what they want from us as developers. Does anyone who received THE LETTER have any detail as to what Lodsys is demanding? -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] rounded corner // Shape Drawable (via xml) vs. PNG
On Thu, Jul 7, 2011 at 11:58 AM, Ralph Bergmann ra...@dasralph.de wrote: My question: Why he/she recommends a shape drawable xml file and not a png file (9-patch)? Why is a shape drawable better? A ShapeDrawable is neither better nor worse than a nine-patch PNG, any more than a hammer is better or worse than a wrench. They are two tools that can be used in the same places sometimes. ShapeDrawable is great for simple shapes when the developer is not a Photoshop expert. ShapeDrawable is excellent for resizeable simple shapes with gradient fills, for which a nine-patch PNG is unsuitable. A nine-patch PNG has far richer possibilities, as you are not limited to the handful of elements and attributes of the ShapeDrawable XML syntax. Use whichever you like. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: Installing APK + DB
your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... YEAH ! it is still crashing but i don't know exactly when :-( but ot works fine by pressing HOME, or returning to the app via the icon. it sounds rare but is there a light sensor some where in the phone? On Jul 6, 12:11 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: no kostya, by the moment it thasn't crash for that ... know i am geting conflicts with single and double click on a button .. :-( it looks like when i make a double click also tryes to execute some associates methods to single click ... plase help :-) hector On Jul 5, 1:33 pm, Kostya Vasilyev kmans...@gmail.com wrote: That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- 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] ftdio_sio stop receive bytes on pandaboard
Hi I have connected usb to serial dongle to pandaboard. I wrote an application which open ttyUSB0 port and print the information to the screen, after a while it stop receiving data, in order to solve the problem i have to reopen the port, i used usbmon tool and saw that after a while it stop polling the bulk endpoint, (this is the reason i stop receiving data) How can i solve this issue ( i tried to disable usb suspend but it didn't help) Regards, Dani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Charting dll for plotting Graphs
I have used TeeCharts for Windows for a number of years. I'm porting some of my applications to Android so I am evaluating TeeCharts for Android. I'm hoping it will make porting a bit easier. http://www.steema.com/entry/63/h4/TeeChart_Java_for_Android_now_available Marty On Jul 7, 8:20 am, s.rawat imsaurabhra...@gmail.com wrote: Thanks Fred, very well said Rgds, -Saurabh ..pain is temporary.quitting lasts forever.. On Wed, Jul 6, 2011 at 8:59 PM, Fred Niggle fred.nig...@googlemail.comwrote: Hello. Try to drop the windows mindset when coding for android, in Linux there is no such thing as a dll (as for as I know). There are API's for creating graphs: http://android.arnodenhond.com/components/graphview andhttp://androidplot.com/wiki/Home are just two I found with a very quick google search... Hope this helps, Fred On 06/07/2011, s.rawat imsaurabhra...@gmail.com wrote: yeah Mark even less than 10 secs..Thanks.. I will use it nd post the code once done.. Rgds, Saurabh ..pain is temporary.quitting lasts forever.. On Tue, Jul 5, 2011 at 6:56 PM, Mark Murphy mmur...@commonsware.com wrote: ChartDroid AndroidPlot AChartEngine There are probably others, but those were what showed up in the first 10 seconds of searching on Google. On Tue, Jul 5, 2011 at 9:21 AM, s.rawat imsaurabhra...@gmail.com wrote: HI All, is there any charting dll or library for android with the sample code which can be used for plotting charts.I have used dotnetcharting dlls for plotting the graphs in the C# where you can get the sampe code for different forms of charts as well. Is there any such library for android wth the sample codes. Rgds, Saurabh ..pain is temporary.quitting lasts forever.. -- 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 _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 -- 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
Re: [android-developers] EventQueue.peekMessage
The longRoutine is the drawing procedure which may take up to several seconds. Yep, I tried to relay that onto another thread and draw into the SurfaceView but the problem I've faced is that the original view(s) are still repainted with onDraw() thus the content (the background thread is rendering all the time) is missing. It's called from the deep android internals so I don't believe I trigger it somehow - it's just a reaction on the invalidate(). Well, it is covered with blank rectangle but I can see the actual content under that rectangle. BTW that looks like a thread condition over there as sometimes (very rarely) I can see the content for a few moments which then becomes covered with background color. So far I also tried to: a) setWillNotDraw(true); b) unset the background color of the view Interestingly that in a sample application (a SurfaceView in a RelativeView) the b) approach does help and since that we don't have such a problem there. So the problem now could be read like this (I'm starting to think there is no way to peek events from the queue, right? :) : How to switch the SurfaceView's onDraw() method off? Any cluea of what can make it been called also appreciated. Thanks, Andrei 07.07.2011 17:18, Mark Murphy пишет: On Thu, Jul 7, 2011 at 9:11 AM, andrei-dmitriev andrei-dmitr...@yandex.ru wrote: why there is no a way to poll or peek the message from the event queue? I want it to implement the break for the routine running on the UI thread. private void longRoutine() { while (flag){ if (queue.peekMessage() != null) { return; } whatever the code is } } Or am I missing something and actually a way exists? It's called a background thread. All the cool programmers use them. Why do you think that you need longRoutine() to be on the main application thread? -- 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] EventQueue.peekMessage
You can use a Canvas to draw an image into a Bitmap on a background thread. Then when that's finished, draw the Bitmap into the View (in onDraw) on the main thread. I'd be worried about a drawing function that takes several seconds to run. We like to keep drawing well under 16ms in order to ensure a good framerate and smooth animations. Jeff. On Thu, Jul 7, 2011 at 9:53 AM, andrei-dmitriev andrei-dmitr...@yandex.ru wrote: The longRoutine is the drawing procedure which may take up to several seconds. Yep, I tried to relay that onto another thread and draw into the SurfaceView but the problem I've faced is that the original view(s) are still repainted with onDraw() thus the content (the background thread is rendering all the time) is missing. It's called from the deep android internals so I don't believe I trigger it somehow - it's just a reaction on the invalidate(). Well, it is covered with blank rectangle but I can see the actual content under that rectangle. BTW that looks like a thread condition over there as sometimes (very rarely) I can see the content for a few moments which then becomes covered with background color. So far I also tried to: a) setWillNotDraw(true); b) unset the background color of the view Interestingly that in a sample application (a SurfaceView in a RelativeView) the b) approach does help and since that we don't have such a problem there. So the problem now could be read like this (I'm starting to think there is no way to peek events from the queue, right? :) : How to switch the SurfaceView's onDraw() method off? Any cluea of what can make it been called also appreciated. Thanks, Andrei 07.07.2011 17:18, Mark Murphy пишет: On Thu, Jul 7, 2011 at 9:11 AM, andrei-dmitriev andrei-dmitr...@yandex.ru wrote: why there is no a way to poll or peek the message from the event queue? I want it to implement the break for the routine running on the UI thread. private void longRoutine() { while (flag){ if (queue.peekMessage() != null) { return; } whatever the code is } } Or am I missing something and actually a way exists? It's called a background thread. All the cool programmers use them. Why do you think that you need longRoutine() to be on the main application thread? -- 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: RE: [android-developers] Re: Patent Infringement notice by Lodsys.
If I get that letter, I'll reply to them to kindly... I did that exactly once in my life and it took two years and a lot of pain and suffering (and legal bills) to get passed that one outburst. I was young and foolish at the time. Just remember, never respond to any legal letter with anything less than another legal letter. Not heading this advice will just feed the sender with things they can put in front of a judge. If you want to have fun with the legal system, then by all means do so. For me, there is nothing fun about lawyers, judges or judgements. The saying The person who legally defends themselves has a fool for a client. is appropriate. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ftdio_sio stop receive bytes on pandaboard
Visit http://source.android.com and click on the Community tab to find a suitable group for your question. On Thu, Jul 7, 2011 at 12:35 PM, dani maoz maoz.d...@gmail.com wrote: Hi I have connected usb to serial dongle to pandaboard. I wrote an application which open ttyUSB0 port and print the information to the screen, after a while it stop receiving data, in order to solve the problem i have to reopen the port, i used usbmon tool and saw that after a while it stop polling the bulk endpoint, (this is the reason i stop receiving data) How can i solve this issue ( i tried to disable usb suspend but it didn't help) Regards, Dani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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 typecast String data to Object data type java/Android
String epdata=sdfsad; Object epArry= (Object) epdata; facing issues 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] NullPointerException when checking for orientation
I am using the recommended method to check orientation when using frames in 3.0 or higher: if(((ViewByRoom.controls CAN_DISPLAY_QUEUE) == CAN_DISPLAY_QUEUE) getActivity() .findViewById(R.id.queueframe)==null) { but sometimes I get a nullpointer exception on the line with .findViewById(R.id.queueframe) = null in it. I put it in a separate line from the getActivity() to make sure the exception was referring to that line. This code is in one fragment and is checking to see if the other fragment exists (is in portrait mode). Shouldn't that line just return false (causing the if statement to fail)? it does work most of the time, only occasionally giving the exception when I change orientation. Kim -- 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: Patent Infringement notice by Lodsys.
We received the letter today. Can you detail what Lodsys is demanding of you? -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: RE: [android-developers] Re: Patent Infringement notice by Lodsys.
So, I have to find somebody to find a nice, legal way to say 'suck my balls, your patent doesn't apply to my app?' Ok. Sorry, but I'm not going to let these suit retards try to get any money from me. Then again, I live in a shitty apartment and the most expensive thing I own is my do, I ride my bike to places, and I buy everything with cash. I don't give two shits if they want to try and sue me. Good luck trying to find me physically. I'll just re-register my app from my home country of El Salvador. I've done this with medical and towing bills and it costs them a lot more to try to get the money from you constantly then any profit they hoped to gain. Eventually they gave up. I guess if you want to be a wuss and cave in, go ahead. But you're further perpetuating the situation. On Thu, Jul 7, 2011 at 10:12 AM, John Coryat cor...@gmail.com wrote: If I get that letter, I'll reply to them to kindly... I did that exactly once in my life and it took two years and a lot of pain and suffering (and legal bills) to get passed that one outburst. I was young and foolish at the time. Just remember, never respond to any legal letter with anything less than another legal letter. Not heading this advice will just feed the sender with things they can put in front of a judge. If you want to have fun with the legal system, then by all means do so. For me, there is nothing fun about lawyers, judges or judgements. The saying The person who legally defends themselves has a fool for a client. is appropriate. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx -- 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] Comparing getLatitude() and getLongitude() to null
Hi all, In my app I have to compare getLatitude() and getLongitude() with null in an if statement to check, well, if they are null. My statement looks like this: if (location.getLatitude() != null || location.getLongitude() != null) location is a Location variable. I am getting an error that I can not compare these values as they are Doubles in nature and null is not valid here with ||. How can I compare these? Thanks -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Raghav+Sood -- 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: NullPointerException when checking for orientation
Is it possible that the exception is actually caused by the getActivity(), even though the LogCat is pointing to the .findViewByID line? -- 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 typecast String data to Object data type java/Android
On Thu, Jul 7, 2011 at 12:13 PM, naveen kumar kumarnaveen.si...@gmail.comwrote: String epdata=sdfsad; Object epArry= (Object) epdata; This is a basic Java questions and has nothing to do with Android development. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Comparing getLatitude() and getLongitude() to null
On Thu, Jul 7, 2011 at 12:22 PM, Raghav Sood raghavs...@gmail.com wrote: I am getting an error that I can not compare these values as they are Doubles in nature and null is not valid here with ||. How can I compare these? As the error indicates, they are not object that are comparable to null. They are guaranteed to have *some* value. What are you trying to guard against? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Comparing getLatitude() and getLongitude() to null
I am trying to guard against them being null. I am getting error reports from users via ACRA that these are returning null sometimes. Hence the safeguard. On Thu, Jul 7, 2011 at 11:05 PM, TreKing treking...@gmail.com wrote: On Thu, Jul 7, 2011 at 12:22 PM, Raghav Sood raghavs...@gmail.com wrote: I am getting an error that I can not compare these values as they are Doubles in nature and null is not valid here with ||. How can I compare these? As the error indicates, they are not object that are comparable to null. They are guaranteed to have *some* value. What are you trying to guard against? - 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 -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Raghav+Sood -- 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] Comparing getLatitude() and getLongitude() to null
On Thu, Jul 7, 2011 at 12:38 PM, Raghav Sood raghavs...@gmail.com wrote: I am trying to guard against them being null. I am getting error reports from users via ACRA that these are returning null sometimes. That's not possible. Double-check your logs and what variable they point to. The Location object may be null, but it's double type variables cannot. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Comparing getLatitude() and getLongitude() to null
TreKing I had this in a previous thread to but that problem was fixed. This is another one causing the same error/ java.lang.NullPointerException at com.raghavsood.findme.MyPositionOverlay.draw(MyPositionOverlay.java:37) at com.google.android.maps.Overlay.draw(Overlay.java:179) at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45) at com.google.android.maps.MapView.onDraw(MapView.java:494) at android.view.View.draw(View.java:6740) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6743) at android.widget.FrameLayout.draw(FrameLayout.java:352) at android.view.ViewGroup.drawChild(ViewGroup.java:1640) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.ViewGroup.drawChild(ViewGroup.java:1638) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) at android.view.View.draw(View.java:6743) at android.widget.FrameLayout.draw(FrameLayout.java:352) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1847) at android.view.ViewRoot.draw(ViewRoot.java:1407) at android.view.ViewRoot.performTraversals(ViewRoot.java:1163) at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) at dalvik.system.NativeStart.main(Native Method) And MyPositionOverlay.java:37 is: Double latitude = location.getLatitude()*1E6; It is a NullPointerException so I suppose it is returning null. On Thu, Jul 7, 2011 at 11:10 PM, TreKing treking...@gmail.com wrote: On Thu, Jul 7, 2011 at 12:38 PM, Raghav Sood raghavs...@gmail.com wrote: I am trying to guard against them being null. I am getting error reports from users via ACRA that these are returning null sometimes. That's not possible. Double-check your logs and what variable they point to. The Location object may be null, but it's double type variables cannot. - 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 -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Raghav+Sood -- 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] Comparing getLatitude() and getLongitude() to null
Your location variable is null. On Thu, Jul 7, 2011 at 1:45 PM, Raghav Sood raghavs...@gmail.com wrote: Double latitude = location.getLatitude()*1E6; It is a NullPointerException so I suppose it is returning null. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Question about the values of the Audio Buffer
Hello Developers, In an application that I am developing, I am using the AudioRecord class to detect sounds from the microphone. The minimum Buffer Size that I am allowed to use is 4096. So, I get the values from the microphone buffer and put them in a short[] array that has the same size as the microphone buffer. The range of those values are from -2^15=-32768 up to 2^15, which makes sense since I am using PCM_16_ENCODING and the size of a short element is 16 bits. When I test the app, I notice that it is quiet, the buffer values tend to 0. On the other hand, when there is noise, both the positive and the negative buffer values tend to their maximum( 32768 and -32768 respectively). My question is what those buffer values represent... Are they quantization levels or something else?? Can anybody help me? It is really important.. Thank you in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Comparing getLatitude() and getLongitude() to null
On Thu, Jul 7, 2011 at 12:45 PM, Raghav Sood raghavs...@gmail.com wrote: Double latitude = location.getLatitude()*1E6; It is a NullPointerException so I suppose it is returning null. NullPointerExceptions are cause by *objects* that are set to null. The only *object* in that statement is location. Thus, that's what is null. You can verify this by using your debugger and breaking at that line. I'd recommend you brush up on Java and the different between Object types and Value types to understand the differences between the two. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Comparing getLatitude() and getLongitude() to null
But the thing is location can't be null. If it was the app wouldn't have reached here. I check for location being null in my main activity: if (location != null) { // Update my location marker positionOverlay.setLocation(location); Only the does MyPositionOverlay receive location. On Thu, Jul 7, 2011 at 11:23 PM, TreKing treking...@gmail.com wrote: On Thu, Jul 7, 2011 at 12:45 PM, Raghav Sood raghavs...@gmail.com wrote: Double latitude = location.getLatitude()*1E6; It is a NullPointerException so I suppose it is returning null. NullPointerExceptions are cause by *objects* that are set to null. The only *object* in that statement is location. Thus, that's what is null. You can verify this by using your debugger and breaking at that line. I'd recommend you brush up on Java and the different between Object types and Value types to understand the differences between the two. - 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 -- Raghav Sood http://www.raghavsood.com/ http://wiki.androidappcheck.com/ http://www.telstop.tel/ https://market.android.com/developer?pub=Raghav+Sood -- 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: NullPointerException when checking for orientation
A complex expression like this can cause a bit of confusion with line numbers. You can watch it in the debugger, while single-stepping, the current line can jump down and up. I suppose it's the same with getting the stack trace. To pinpoint what's going on, rewrite this section of code to use local temporary objects, something along these lines: if((ViewByRoom.controls CAN_DISPLAY_QUEUE) == CAN_DISPLAY_QUEUE) { { Activity activity = getActivity(); View view = activity.findViewById(R.id.queueframe); if (view == null) { // old code here } } -- Kostya 07.07.2011 21:28, Kim пишет: Is it possible that the exception is actually caused by the getActivity(), even though the LogCat is pointing to the .findViewByID line? -- 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
Re: [android-developers] Comparing getLatitude() and getLongitude() to null
On Thu, Jul 7, 2011 at 2:00 PM, Raghav Sood raghavs...@gmail.com wrote: But the thing is location can't be null. If it was the app wouldn't have reached here. I check for location being null in my main activity: if (location != null) { // Update my location marker positionOverlay.setLocation(location); Only the does MyPositionOverlay receive location. As I indicated in your previous thread, if you try to use the overlay and YOU HAVE NOT RECEIVED A LOCATION YET (caps to ensure you pay attention), your location variable will be null simply because you haven't ever had any valid Location to use. So, as I wrote before, you either need to not set up the overlay until you actually have a Location, or you need to have more smarts in the overlay to deal with the null location case. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: Installing APK + DB
Hector, What I was hinting at (sorry if I was being too oblique) is that: 1 - There is a bug in your code when the activity gets recreated for configuration changes; 2 - The most frequent case of a configuration change is the screen orientation change; 3 - There are other cases configuration change cases, and I provided the steps for one of them; 4 - Rather than putting lipstick over the bug with your manifest change, treat it as an opportunity to easily find and fix the bug; 5 - Once that's done, and your code survives an orientation change, add back the manifest changes as an optimization, if needed. -- Kostya 07.07.2011 20:31, hectordu...@yahoo.com пишет: your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... YEAH ! it is still crashing but i don't know exactly when :-( but ot works fine by pressing HOME, or returning to the app via the icon. it sounds rare but is there a light sensor some where in the phone? On Jul 6, 12:11 pm, hectordu...@yahoo.comhectordu...@yahoo.com wrote: no kostya, by the moment it thasn't crash for that ... know i am geting conflicts with single and double click on a button .. :-( it looks like when i make a double click also tryes to execute some associates methods to single click ... plase help :-) hector On Jul 5, 1:33 pm, Kostya Vasilyevkmans...@gmail.com wrote: That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- Kostya Vasilyev -- 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