[android-beginners] Re: Unable to reference custom class in xml
Did you provide the full name of the class ? Something like com.mycompany.RunningTaskGallery ? El dom, 20-09-2009 a las 09:57 -0600, Justin Anderson escribió: Making it static doesn't change anything, except that I get the following again: 09-19 22:04:09.824: ERROR/AndroidRuntime(2716): Caused by: java.lang.NoSuchMethodException: RunningTaskGallery (Context,AttributeSet) The constructor that takes a Context and an AttributeSet does indeed exist and it calls the parent's constructor. Both my class and constructors are public. However, accodring to the Dev Guide documentation it shouldn't matter if it is static or not. In fact, it gives an alternative way to reference it if it is static, but states that you can use either approach. In my particular case I do not want it to be static. Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sun, Sep 20, 2009 at 9:29 AM, John P. johnny.d.p...@gmail.com wrote: Maybe it should be static, like the NotePad example has in http://developer.android.com/guide/samples/NotePad/src/com/example/android/notepad/NoteEditor.html: public static class LinedEditText extends EditText { ... On Sep 20, 10:19 am, Justin Anderson janderson@gmail.com wrote: It is a public non-static class. Thanks, Justin On Sep 20, 2009 1:11 AM, skink psk...@gmail.com wrote: On Sep 19, 8:13 am, MagouyaWare magouyaw...@gmail.com wrote: However, this results in: java.l... and what about its visibility? is it public? pskink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: auto-enable GPS
El vie, 18-09-2009 a las 19:35 -0400, Mark Murphy escribió: niksbin wrote: Hi Everyone, I was doing some research on the web. I found this program that helps if the Android-phone is lost or stolen. However, the description indicates that automatically enabling GPS is not possible within/via the app? Here is the URL for the app I found: http://www.androlib.com/android.application.org-ajeje-locservice15-zxw.aspx Can you tell me if this is true? Yes. If so, is there a work-around to this as a feature for a GPS app? No. Sorry Mark, with all my respect I have to disagree with you. I'm not sure whether this is some deep secret (I guess not, because I borrowed this code from Settings app): String allowedProviders = LocationManager.GPS_PROVIDER + , + LocationManager.NETWORK_PROVIDER; Settings.Secure.putString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, allowedProviders); This will enable both GPS and Network providers (at least in 1.5, I haven't tried 1.6 yet). I also searched in the forums and mailing lists to find how to do that and I read some explanations like doing it automatically without user's knowledge is _forbidden_ because this effects the battery life. I think the same explanation is valid for WIFI but to enable it I just need to call WifiManager.setEnabled(true). The idea with uses-permission is good enough for me. Before installing any application the platform tells me this app requests these and those permissions. do you want to give them to it?. For me as a techy this is enough to reject access to INTERNET and SYSTEM_TOOLS for some game I was going to install. But my application has completely different purpose and everything is well described in its description and I need GPS and/or WIFI and I don't see anything wrong with requesting permissions to change their state at installation time. I was actually thinking of creating a location-based app, but am surprised to see this. If the user disables GPS, that is the user's right. If the user has GPS enabled, the GPS radio is still normally off, for battery reasons, but it will automatically turn on once you request location updates or something. Similarly, the radio will automatically turn off once you stop using it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: auto-enable GPS
El sáb, 19-09-2009 a las 04:48 -0400, Mark Murphy escribió: martin-g ml wrote: Sorry Mark, with all my respect I have to disagree with you. I'm not sure whether this is some deep secret (I guess not, because I borrowed this code from Settings app): String allowedProviders = LocationManager.GPS_PROVIDER + , + LocationManager.NETWORK_PROVIDER; Settings.Secure.putString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, allowedProviders); This will enable both GPS and Network providers (at least in 1.5, I haven't tried 1.6 yet). As Mr. Nanek pointed out, your code only should work if you somehow hold the android.permission.WRITE_SETTINGS permission. To quote from the documentation for Settings.Secure: Honestly I was expecting such kind of response from both of you :-) The secret sauce is android.permission.WRITE_SECURE_SETTINGS. Note _SECURE_. This is the only place where Android didn't tell me You need XYZ permission to do ... so far. Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications. http://developer.android.com/reference/android/provider/Settings.Secure.html Certainly, whenever I try to set a Settings.Secure permission, it fails. I demonstrate this at least once a month in my training classes. Admittedly, I demonstrate it with INSTALL_NON_MARKET_APPS and not LOCATION_PROVIDERS_ALLOWED. All that being said...any idea how your code is working for you, when by rights it shouldn't? I haven't rooted any devices, so I don't know if what you are seeing is expected behavior for a rooted device or not. Sure, my phone is rooted :-) Every respecting him/herself Linux user will do that. But I think this is not related to the problem of enabling GPS. I also searched in the forums and mailing lists to find how to do that and I read some explanations like doing it automatically without user's knowledge is _forbidden_ because this effects the battery life. Actually, I was under the impression that it as much, if not more, an issue of privacy as it was battery. Hm, sounds good to have my privacy but then I could always write an app which will register a broadcast receiver for some kind of Intent which occurs relatively often and then I could just check whether the GPS is enabled and if it is then I could send an SMS with the needed information. But then I still need SEND_SMS permission for my app, and ChompSMS or similar app for example could steal my privacy. The same is valid for PC apps - there are a lot of malware apps out there, and it is my responsibility to stay away from them. Removing the possibility to enable GPS, WIFI, ... is not a solution for me. There are apps which need this kind of functionality. For example the stolen phone app Nanek mentioned will need to send this information if the SIM card is changed. Or even worse example if a avalanche had consumed me/my girlfriend/my brother it would be good to send an SMS with a special subject to activate the GPS and send the info back. I want to say that I respect the privacy of people but the solution is not to disable functionalities. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Connect Google via WiFi
Hi, I'm experiencing a problem with the application (in HTC Hero) responsible to authenticate/authorize me against Google servers. For example when I attempt to use Market application it redirects me to Google sign in application where I need to either create a new account or sign in. I try to sign in with my gmail.com account but it fails with This could be a temporary problem or your SIM card may not be provisioned for data services. If it continues, call Customer Care. The only available item in the menu is APN settings so it looks to me that this application (Google sign in) works only with APN but not with WiFi. I am able to open my gmail account in the browser without any problems using WiFi connection. Am I doing something wrong ? Is there a way to tell that application to use WiFi ? Thanks for you help ! Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Communication API/mechanism to talk between emulator-desktop?
or plain socket connection. Desktop's localhost is reachable from the emulator at address 10.0.2.2 http://developer.android.com/guide/developing/tools/emulator.html#emulatornetworking El jue, 16-07-2009 a las 15:15 -0400, Mark Murphy escribió: Yasser wrote: Is there is any way to send a message from device/emulator to the desktop. Any API available in Android for this? URLConnection and HttpClient, if the desktop has a Web server running. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Como descargarse proyectos free de Android Market
Hola, Este groupo de conversation es para Ingleses. I hope you know English. There are several open source Android applications at Google code http://code.google.com/search/#q=android Saludos! El jue, 18-06-2009 a las 03:31 -0700, soleada escribió: Hola, estoy interesada en descargarme o ver el codigo de alguna aplicacion de Android Market (free), alguien sabe si se puede hacer eso?? Un saludo y gracias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: The selected wizard could not be started.
The same here. It seems it is a bug but I haven't checked Android's issues database. You can fix it by creating new plain File with extension .xml. Android SDK will pick it correctly. El dom, 07-06-2009 a las 10:48 -0700, Kent Loobey escribió: When I run Eclipse Ganymede with the Android android-sdk-linux_x86-1.5_r2 SDK and I click File-New-Other...-Android-Android XML File-Next I get the following message: Problem Opening Wizard The selected wizard could not be started. The selected wizard could not be started. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.editors.wizards.NewXmlFileWizard. com.android.ide.eclipse.editors.wizards.NewXmlFileWizard Any suggestions on how I can fix this will be greatly appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Trouble with HelloWorld
I am having trouble with the hello world application. My emulator starts and ultimately gets to a screen with that says android and shows the android logo. I never get to the hello world or phone startup screens. The last message I see in Eclipse is: Waiting for HOME ('android.process.acore') to be launched... I have read the other posts that say that the problem is a mix of versions. I have two computers, one running Vista, the other running XP. I have: 0.8.0 Android 3.4.2 Eclipse 6.0.120.4 JRE One post said that I needed 1.0 of the Android ADT. If so, where is that? When I look at the google site, it looks like 0.8 is the most recent version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---