[android-developers] AccountManager wrong password or account changed error
This is a reply to: http://groups.google.com/group/android-developers/browse_thread/thread/d66ff537b04ec9a8 (which is closed for replies). I had the same issue when trying to develop an app that authenticates with the Google Docs List API. My AccountManager.blockingGetAuthToken(account, AUTH_TOKEN_TYPE, true) call would cause a notification bar warning to appear that said something like Sign-in error... and then asked me to re-enter the password. The solution turned out to be correcting the AUTH_TOKEN_TYPE string. After I set it to writely (based on the table from http://code.google.com/apis/gdata/faq.html#clientlogin), everything worked. The table is copy-pasted below in case that page goes away: A service name is a brief string that the ClientLogin authentication system uses to identify a Google service. Google Analytics Data APIs analytics Google Apps APIs (Domain Information Management) apps Google Base Data APIgbase Google Sites Data API jotspot Blogger Data APIblogger Book Search Data APIprint Calendar Data API cl Google Code Search Data API codesearch Contacts Data API cp Documents List Data API writely Finance Data APIfinance Gmail Atom feed mail Health Data API health weaver (H9 sandbox) Maps Data APIs local Picasa Web Albums Data API lh2 Sidewiki Data API annotateweb Spreadsheets Data API wise Webmaster Tools API sitemaps YouTube Data APIyoutube -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] View moves downwards after standby
Hi, I noticed that when my app is onscreen and the device goes into standby (black screen) and the device gets out of the standby the View (layout) will be moved a couple of centimeter downwards so that the last couple of centimeters of the View actually will fall offscreen.. The Activity itself is declared as being android:screenOrientation=portrait android:theme=@android:style/Theme.NoTitleBar.Fullscreen After some more in-depth research, or actually just looking at it, I noticed that the amount of movement (the height of it) actually looks a lot like the height that the statusnoticebar should take. Anyone ever experienced this and/or anyone got a solution for it ? Also how should I force a redraw of the whole screen when it comes out of the standby mode ? I tried placing a MainLayout.ForceLayout() in the onResume() method but that didnt work at all :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Activity cannot be both an Activity and a Receiver ?
Hi, I have the following situation : An Activity (let's call it main) and a Service... The Activiy get's started right away, after which it couples to the Service. I'd liek the Service to be able to send broadcasts so that my Main (but other activities as well) can capture anything the Service has to say ;) Now I noticed though, that my Main activity cannot both include activity android:name=.nowPlayingGUI android:label=@string/app_name android:screenOrientation=portrait android:theme=@android:style/ Theme.NoTitleBar.Fullscreen android:launchMode=singleTask intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity receiver android:name=.nowPlayingGUI intent-filter action android:name=development.android.service.musicServiceUpdate/ action /intent-filter /receiver thus it cannot start up as the MAIN activity AND be a receiver for a broadcast... Is this correct, and how should I approach this problem to be able to accomplish what I have described at the beginning of the post ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Activity cannot be both an Activity and a Receiver ?
btw link to my StackOverflow discussion : http://stackoverflow.com/questions/3931136/intent-filter-action-wont-work-in-androidmanifest On 14 okt, 14:38, MobDev developm...@mobilaria.com wrote: Hi, I have the following situation : An Activity (let's call it main) and a Service... The Activiy get's started right away, after which it couples to the Service. I'd liek the Service to be able to send broadcasts so that my Main (but other activities as well) can capture anything the Service has to say ;) Now I noticed though, that my Main activity cannot both include activity android:name=.nowPlayingGUI android:label=@string/app_name android:screenOrientation=portrait android:theme=@android:style/ Theme.NoTitleBar.Fullscreen android:launchMode=singleTask intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity receiver android:name=.nowPlayingGUI intent-filter action android:name=development.android.service.musicServiceUpdate/ action /intent-filter /receiver thus it cannot start up as the MAIN activity AND be a receiver for a broadcast... Is this correct, and how should I approach this problem to be able to accomplish what I have described at the beginning of the post ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Retrieve android:versionName from Library Project
Ok, I did understand that no APK at all is created by the Project Library, it doesn't even get compiled, it does get compiled when the host project is compiled... But I don't get what you mean by it is to merge stuff into the parent project... I mean, you have to redeclare all used activities/services/whatever into the hosts-project manifest, by referencing the package name of the Project's Library components... Or do you mean something else with merge stuff ? On 5 okt, 17:43, Mark Murphy mmur...@commonsware.com wrote: On Tue, Oct 5, 2010 at 11:30 AM, MobDev developm...@mobilaria.com wrote: well, actually in a Project Library a Manifest is created as well... Don't ask me what for but it's there :P It is to merge stuff into the parent project. So there *would* be a place to put it in :P No, it is not. The library's manifest is not included in the final APK, and the version information in the final APK is from the main project, not the library. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Retrieve android:versionName from Library Project
well, actually in a Project Library a Manifest is created as well... Don't ask me what for but it's there :P So there *would* be a place to put it in :P which I also did, but I noticed everything got lost within the Project importing the Project Library. But I have resolved my issue by simplyretrieving the versionCode (and versionName) from the importing Project... On 4 okt, 14:52, Mark Murphy mmur...@commonsware.com wrote: On Mon, Oct 4, 2010 at 8:27 AM, MobDev developm...@mobilaria.com wrote: /edit : I posted this on stackoverflow as well and someone responded with : As far as I know android library project manifest is ignored at the moment, manifest is not merged into end application when you reference a library. Hence you cant extract any data from the library's manifest. So my question now is : hhmmm ok, that would explain it I guess... But is there any official statement or anyone who knows this for sure ? I am fairly certain the quoted passage above is correct. At the moment, AFAIK, there is no concept of the library's version being carried forward into the application, simply because there is no place to put it. Use a string resource instead of android:versionName. -- 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] Re: Library Projects support ?
Actually, as I mentioned in my post, it's already a 1.6 project... I can only make a 1.6 project if I have the SDK that supports it rigth ? Actually my SDK has been updated up to 2.2 Anyhow, after changing the Project Library (and the project using the library) to a 2.2 project it started working out of the blue... On 2 okt, 19:58, Xavier Ducrohet x...@android.com wrote: The link you referenced shows which version of the 1.6 SDK component supports library projects (http://developer.android.com/guide/developing/eclipse-adt.html#librar...). I'm guessing you have an older version. rev 3 (for 1.6) is needed. Use the SDK updater to get an update to the 1.6 SDK component. (seehttp://developer.android.com/sdk/adding-components.htmlfor more info) Xav On Fri, Oct 1, 2010 at 12:28 AM, MobDev developm...@mobilaria.com wrote: Hi, I have been trying to work with a Library Project, just like it's mentioned in the documentation : http://developer.android.com/guide/developing/eclipse-adt.html I have created my Library Project as a Android 1.6 Project and now I have been trying to reference to it out of my second project (also an Android 1.6 project) and I am getting the following error : Target 'Android 1.6' does not support building project with libraries. The documentation states that supported platfroms are the 1.5 onwards (with exception for the 2.0 2.0.1) and that the second project should have the same platform or higher (in my case the same)... So any idea what's ahppening here ? And most importantly : any idea how to solve this ? Thx 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 -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. 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] Retrieve android:versionName from Library Project
Hi, I have created a Library Project which I import into another project. In that Library Project at some point I retrieve it's android:versionName To do that you need to supply the package name. The problem arises when that code is executed when the Library Project is included within another project, then it seems that that code throws an exception : 10-04 10:15:36.987: WARN/System.err(1407): getSoftwareVersion(), Caught Exception : android.content.pm.PackageManager$NameNotFoundException: mobilaria.android.LandenPlayerCodeBase.baseplayer Thats the package name of the package of the Project Library... it seems it cannot find it even though the same code that is executing that call is part of the Library itself... Does anyone have experienced something like this or has an idea on how to solve this ? /edit : I posted this on stackoverflow as well and someone responded with : As far as I know android library project manifest is ignored at the moment, manifest is not merged into end application when you reference a library. Hence you cant extract any data from the library's manifest. So my question now is : hhmmm ok, that would explain it I guess... But is there any official statement or anyone who knows this for sure ? For example someone who has already worked with a Library Project extensively before ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Library Projects support ?
Hi, I have been trying to work with a Library Project, just like it's mentioned in the documentation : http://developer.android.com/guide/developing/eclipse-adt.html I have created my Library Project as a Android 1.6 Project and now I have been trying to reference to it out of my second project (also an Android 1.6 project) and I am getting the following error : Target 'Android 1.6' does not support building project with libraries. The documentation states that supported platfroms are the 1.5 onwards (with exception for the 2.0 2.0.1) and that the second project should have the same platform or higher (in my case the same)... So any idea what's ahppening here ? And most importantly : any idea how to solve this ? Thx in advance ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Versioning and common code-bases with Eclipse
Hi there, I'd like to bring out an app in the near future, so I was wondering how to support a couple of funcitonalities I have got used whilst developing for J2ME and iPhone - first the versioning. With J2ME (using NetBeans as IDE) I had the option to auto-increment the softwwares version every time I compiled it. I was wondering if something like this is available for Eclipse and if so how to use it ? - secondly a common code base. Is it possible to have a common code base for several projects ? For example I might have a game which actually uses the same code but needs different graphic resources. I'd hate to have a different project for every game/app and have to manually edit every project's source every time I want to submit a new code-change. Any solution for this ? Thanks in advance for every kind of help/hints/tips ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is there a way to track my piracy rates for paid apps?
yup, that's kinda the way to do it, or otherwise have it send it's unique id first time it gets started, could be towards your server or otherwise (somewhat clumsier) an email to you directly. On 20 aug, 05:45, TreKing treking...@gmail.com wrote: On Thu, Aug 19, 2010 at 9:12 PM, Greg Siano gregmsi...@gmail.com wrote: I was wondering if there was a way to track piracy rates of my app. I think what people generally do is add analytics to their app to track unique installs then compare that to how many Google Checkout orders you get. Or something along those lines. - 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] Question regarding drawable resources usage
Hi, I have made an app which I also would like to run on smaller screens, so I have read the documentation regarding supporting multiple screens. I noticed though that I actually didn't need a completely new layout, the only thing I needed were actually smaller images which are used within the layout. Because I haven't found anywhere in the documentation if that would be possible (so just placing couple of .png's within the drawable-ldpi directory and the underlying os will pick those instead of needing a whole new layout) I just decided to give it a try... So I resized couple of Images that needed to be resized, I placed them in the drawable-ldpi and then I started up the emulator (1.6 to start with) with a small screen. It actually worked ! But because I don't have a real small screen testing device now I was wondering if it's just the emulator which will display this correctly or if I can expect it from a real device as well ? Does anyone have any experience regarding this (so just replacing a couple of images instead of creating an ew layout) ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 see the the usage of memory in the android?
hehe, I do agree from the things I have read about it, but, with all due respect, you make it sound like something that's not graspable for humans or something impossible to determine... That would mean thet the OS itself would have no clue whatsoever if it's running out of memory or not (crashing the whole device) which to me doesn't sound realistic at all... On 30 jun, 18:38, Dianne Hackborn hack...@android.com wrote: Memory usage on a modern virtual memory kernel is a dark and mysterious subject. On Wed, Jun 30, 2010 at 1:22 AM, xhy xhyg...@gmail.com wrote: 1 I want to see the usage of memory in the android through the procrank command,but throw a error error: creating kernel interface. Why/ 2 if use the top command, but the info of the %MEM is not correct. Because all the pid's info's sum will 100% ,so Why? -- xhy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Correct Redirected HTTP GET retrieval
Hi, I'd like to know how to do a HTTP GET request to a server from which I know I will get redirected at least a couple of times... I'd like to get the response (body) of the last webpage. It should come up with a code in my specific example... Or, as an alternative, I do know you can start the browser from within your Android app, is it possible to actually retrieve the body from that ? Any help, tips, source whatever would be helpfull, cause till now I have found (and tried) like 4 methods and to me it seems there is a jungle of HttpGet, HttpClient, HttpResponse etc libraries ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] HTC Hero Update 2.1 -- Broke Audio Streaming ????
Hi there, I have installed the 2.1 update on my HTC Hero yesterday, and happy as a puppy I instaleld my streaming app... Just to discover that it won't stream decently... It has to stream an mp3 stream and it works on my ADP 1.6 device, on a Samsung Galaxy S test-device (with 2.1) and on the 2.1 emulator... Logcat is gettign the follwoing errors : 06-30 10:14:18.360: INFO/AudioPolicyService(56): stopOutput(): before lock 06-30 10:14:21.259: DEBUG/dalvikvm(1906): GC freed 28 objects / 1944 bytes in 186ms 06-30 10:14:21.439: INFO/AudioHardwareMSM72XX(56): AudioHardware pcm playback is going to standby. 06-30 10:14:21.439: DEBUG/StreamProcess(56): OutputStreamProcess::ResetAOLC() 06-30 10:14:22.919: INFO/AudioPolicyService(56): startOutput(): before lock 06-30 10:14:22.987: INFO/AudioHardwareMSM72XX(56): AUDIO_START: start kernel pcm_out driver. 06-30 10:14:26.329: DEBUG/dalvikvm(287): GC freed 11 objects / 488 bytes in 268ms 06-30 10:14:47.789: INFO/AudioPolicyService(56): stopOutput(): before lock 06-30 10:14:50.879: INFO/AudioHardwareMSM72XX(56): AudioHardware pcm playback is going to standby. 06-30 10:14:50.879: DEBUG/StreamProcess(56): OutputStreamProcess::ResetAOLC() 06-30 10:14:53.911: INFO/AudioPolicyService(56): startOutput(): before lock 06-30 10:14:54.022: INFO/AudioHardwareMSM72XX(56): AUDIO_START: start kernel pcm_out driver. The result is a playing player, which stops (pauzes) every 10 seconds, the restarts... This will work for about 8-10 restarts and then will simply stop without ever thrwoing an exception or something like that... Which makes it somewhat difficult (if not impossible) to catch for us developers... So has anyone been experiencing the same problem ? Does anyone have a clue if in this update another OpenCore lib has been used ? Does anyone have any solution ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Accidentally made my paid app free
owh oke,that explains it somewhat.. Sorry it sounded kinda of strange ;) On 25 jun, 20:28, TreKing treking...@gmail.com wrote: On Fri, Jun 25, 2010 at 12:49 PM, Nathan critter...@crittermap.com wrote: Why would there be any downloads and ratings if I immediately unpublished it, so I shouldn't have any free users out there. He means the download and ratings for the app attained while it was paid (however long that was), before he made it free and immediately unpublished. - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: What are the advantages of an Android Developers Device?
that's somewhat it regarding advantages... There is no device ALL the developers are using, I guess many are using of the shelf devices... Personally I have a ADP2 in combination with a off-the-shelf Htc Hero and since a couple of days a Samsung Galaxy S... No the ADP2 cannot has no 2.1 update, it can be updated obviously because it has an unlucked bootloader but on the HTC developers site there is no update available... It's lakcing support if you ask me... It has been a good revenue-source letting developers think they needed one or that they would get betetr support : be adviced, that's NOT the case ! A droid can be a good device yes, even though personally I like to test my apps on less powerfull devices, if it runs good on a low-end or mainstream device it will run decently on any, if you only test your software on high-end devices it might run slow on low-end and mainstream devices... On 28 jun, 07:56, sagare sagar.ekb...@gmail.com wrote: Hi All, I saw thishttp://developer.android.com/guide/developing/device.html and as per what i got the advantages of Android developer device is that it is SIM unlocked and unlocked bootloader what i wanted to know is are there any other advantages than this of the Android developers Device? Also i want to know which device are all of the developers using for developing their apps are they using only Android developers device or any other device? Also i want to know whether Android developers device has Android 2.1 update? Also i want to know is motorola droid a good device to be selected for android application testing? Please help me on this. Thanks, Sagar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 fetch phone's phone number or unique ID
You might want to re-read the post of Indicator, he actually tell you which package you should use and even which method.. If those things don't ring a bell you might want to start learning OOP first (specifically Java) and the in a couple of months start programming for the mobile platform... On 27 jun, 02:08, Nando Android nando.andr...@gmail.com wrote: Exactly, I want an unique ID to it. How can I call it? Do I have to instantiate something? Thanks, On Sat, Jun 26, 2010 at 4:25 PM, Indicator Veritatis mej1...@yahoo.comwrote: First of all, you should keep in mind that in the GSM world, the phone number identifies the SIM, the user's account; it does not identify the phone. There is, however, in the android.telephony package, an method of the TelephonyManager class called getDeviceId() that returns a unique ID for the phone: IMEI for a GSM phone and MEID for CDMA. There is also a getLine1Number() that returns the phone number, which is probably not what you really want on a GSM phone. It might not even be what you want on a CDMA phone, since there are obsure models with two lines, and even more obscure models that take a SIM even on CDMA. On Jun 25, 2:36 pm, Nando Android nando.andr...@gmail.com wrote: Hello, I wonder how could I fetch the phone's phone number or an unique id to identify it? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: rtsp client?
afaik you can directly feed that trsp url to the MediaPlayer class... On 28 jun, 12:33, chas__123 charlie.nug...@gmail.com wrote: Hi could someone say if android supports an RTSP stack? We've an RTSP server that we'd like to stream video to an android rtsp client if thats possible thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Status bar leaves a black bar in my Fullscreen Activity !
Hi, I have a Fulscreen Activity (by using android:theme=@android:style/ Theme.NoTitleBar.Fullscreen). I noticed that when the device has gone into powersave mode (black screen) or when I have used the Home Button, and I get back in my Activity the whole Layout will have been moved downwards leaving a black bar of nothingness on top of the Activity :( The Activity Layout fills the screen precisely, so when this happens I am able (with the scrollball) to scroll my whole Layout upwards and downwards for the height of the aforementioned black bar (of death?)... At some point I noticed it looked like it was just as high as the stanbdard Android status bar, so I dismissed the Fullscreen from the Activity... From that point onwards the Activity would work as expected, but I actually don't want the status bar... Anyone experienced this and how can I solve this ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Percentages on ProgressDialog.STYLE_HORIZONTAL
Hi, I have been using a ProgressDialog in it's horizontal form, exactly like in this article : http://mobiledeviceprogramming.blogspot.com/2010/01/showing-progress-bar-on-android.html Now I was wondering how do I get rid of one of the two percentages ? As in I have a percentage on the left side (as 61%) and one on hte right side, and they always give the same value so I woould like to get rid on one or the other... Any ideas in how to accomplish this ? Thanks in advance ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Which android device to target for Android development?
well officially the ADP's should be able to install the newer versions of Android OS... Or at least, technically they are because they are rooted/bricked... BUT, if you check out the HTC's developers site you will notice that the downloadable OS versions don't go any higher than 1.6... This means you will not be able to test 2.0, 2.1, or 2.2 with a ADP... U'r stuck with 1.0 to 1.6... On 25 jun, 11:16, sagare sagar.ekb...@gmail.com wrote: Hi Miguel, Thx a again for you valuable response anyone please tell me on the device selection i.e. which device either ADP1, ADP2 or droid to use for testing and dev and can ADP1 or ADP 2 have android OS 2.1 in it please. Also a procedure to get an ADP1 or ADP 2 device? Is it avaliable in india? Thanks, Sagar On Jun 25, 2:00 pm, Miguel Morales therevolti...@gmail.com wrote: Android versions:http://en.wikipedia.org/wiki/Android_(operating_system)#Update_history I don't think the device is as important as the version you target. I would suggest however to get a device in which multiple versions of Android can be installed. Unfortunately I don't have much experience with this. If I were you I'd start with an older model so that it forces you to make your app very fast and responsive using the slower hardware. This way, when you move your app to a faster device, it'll run that much better. For example, the G1, comes with 1.5 but you can install 2.1. However, someone else might have a better suggestion. On Fri, Jun 25, 2010 at 1:46 AM, sagare sagar.ekb...@gmail.com wrote: Hi Migules, Thx a lot for the reply where can get features that were added in each version of the api? Also i still want to know about the device selection question please. Thanks, Sagar On Jun 25, 12:48 pm, Miguel Morales therevolti...@gmail.com wrote: I would say it largely depends on the type of app you're making. If you don't need the features introduces in 2.x, start with 1.5. Once you have all the basics in place, it'll be easier to incrementally start using higher features if they are supported in the higher versions. If you make an app that works for 1.5 it *should* work automatically with 2.x (a few layout things might need to tweaked) However, if you make an app that uses features in 2.x it won't work with 1.5. On Fri, Jun 25, 2010 at 12:31 AM, sagare sagar.ekb...@gmail.com wrote: Hi Torsten, Thanks for the reply so you mean to say i can select any device for my development or testing (it could be either Android dev Phone 1, Android dev Phone 2 or Motorola Droid) rt? Also I wanted to know which Android OS version should i target as per this link http://www.macobserver.com/tmo/article/google_reports_half_of_android... android 2.1 seems to have around 50% userbase. So what i wanted to know is if i target 1.5 my app would run without any changes on all versions uptill 2.2 rt? so is it better to target a lower OS version? Or else if I target 2.2 how would that application run on lower version also a bit of confused? Can u plz help me. Thanks, Sagar On Jun 25, 12:00 pm, Torsten torsten.l...@ixonos.com wrote: Hi Sagar, Worry less about the device and more about the content. If you download the SDK for a given version and your application runs fine, chances are it will work when the apk is transferred to a device Take a look here:http://developer.android.com/guide/practices/compatibility.html andhttp://developer.android.com/guide/practices/screens_support.html Br, -- Torsten Lund Chief Software Engineer Ixonos Denmark ApS Niels Jernes Vej 10, DK-9220 Aalborg SO, Denmark On Jun 25, 8:53 am, sagare sagar.ekb...@gmail.com wrote: I am a newBie and was just wondering which mobile device should i target first for my application after a bit googling i found Android dev phone 1 and android developer phone 2 but does this device have or support Android 2.1 ? Or can i target some other device like motorola droid for my development and testing ? What would be the pros and cons in this situation? Plz help me out. Thanks, Sagar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --http://diastrofunk.com,http://developingthedream.blogspot.com/,http:/..., ~Isaiah 55:8-9 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To
[android-developers] Re: Diapad phone red button press
I'm afraid you will have to do better in explaining your problem ? Or is it a question ? On 25 jun, 06:57, Raja Nagendra Kumar nagendra.r...@tejasoft.com wrote: Hi, Has any has success of pressing the redbutton of the dialpad, which is launched my their own application. We want to do press read button from ActivityInstrumentationTestCase2 testses on our own application. Regards, Raja Nagendra Kumar, C.T.Owww.tejasoft.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Streaming audio AAC format
thanks, I did know about rtsp but I was hoping for a lossless http version... Actually the streams I'd like to stream aren't supplied over the rtsp protocol, for example shoutcast or icecast aac streams... So unofrtunately no news, I thought you might have found some caveaut or so... On 25 jun, 06:12, Indicator Veritatis mej1...@yahoo.com wrote: If the scheme of the URL is 'rstp://', it should be straightforward. What do you need to know, that is not already covered inhttp://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol? If the scheme is not 'rstp://', then you should go for progressive download, not streaming. But if you really need streaming to protect media IP, then go for the rstp scheme and therefore RSTP protocol. On the Android phone, you would use the MediaPlayer's prepareAsync() setOnBufferingUpdateListher() etc. methods. Indeed: most of your question will be answered by searching for the word 'streaming' in the Reference tab for the android.media package, class MediaPlayer. On Jun 24, 7:57 am, MobDev developm...@mobilaria.com wrote: Actually on this same group there have been several reports of the new 2.2 Mediaplayer being a step backwards, as in many good-running apps seem to break on Froyo... Btw, might I ask how you stream aac directly from an url ? On 23 jun, 04:51, kabson kabson.andr...@gmail.com wrote: Hello all, I have developed a streaming app for Android. My app is streaming AAC audio. The app works fine on 1.5, 1.6, and 2.1. I tested it on Froyo, the android 2.2 and it does not work there. I have try everthing - Streaming directly from server url - Download incrementaly the content, store in a temp file, start reading. - Download incrementaly the content, store in a ContentProvider and start reading. No luck, I always got errors : 06-23 02:47:02.257: ERROR/MediaPlayer(266): Unable to to create media player 06-23 02:47:02.257: INFO/System.out(266): setDataSourceFD failed.: status=0x8000 Does Froyo support AAC ? Anyone happens to stream AAC ? Need some help. thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: is this a bug in android OS
Well, are you calling it after you have binded ? You are mentioning onCreate(), I just hope the code-sequence is the right one, thus something like : myServiceIntent = new Intent(this,service.class); this.bindService(myServiceIntent, mConnection, Context.BIND_AUTO_CREATE); On 25 jun, 11:40, vineet ma...@vineetyadav.com wrote: i am usign a very simple scenario. i have a remote service created and binded properly. I can access service methods as described in the aidl interface but only from the click listener, and can never access using it using onCreate or other functions. i have tried 3 different approaches as available on books or net to consume service. however result is same. for instance if i create mSercvice as my Service class variable and in the interface i have method getStatus() which returns boolean. now after binding service if i call mService.getStatus() from onClickListener or ServiceConnection Stub, ican access very easily without a error. but if i try to get from onCreate (my app fetches parameter status from service), the value of mService gets null and system exits with Force Close (due to nullpointexception as from log). Now can somone please help, as i dont think the value should be null since the variable is declared globally. so how does the stuff goes.. One of my friend on this group told, if you dont get output all times, its a bug. sorry for bad english... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Which android device to target for Android development?
Well what it means I leave up to you, I am just informing you that even though an ADP *might* seems like a good choice it depends on your needs... If you want to test on a device with Android 2.0 and higher you could as well forget completely about the ADP's... On 25 jun, 12:13, sagare sagar.ekb...@gmail.com wrote: Hi MobDev, Thx a lot so it means I cant go with using Android developers phone 1 or Android Developers phone 2 and i have to use Droid/ Milestone rt? Thanks, Sagar On Jun 25, 3:00 pm, MobDev developm...@mobilaria.com wrote: well officially the ADP's should be able to install the newer versions of Android OS... Or at least, technically they are because they are rooted/bricked... BUT, if you check out the HTC's developers site you will notice that the downloadable OS versions don't go any higher than 1.6... This means you will not be able to test 2.0, 2.1, or 2.2 with a ADP... U'r stuck with 1.0 to 1.6... On 25 jun, 11:16, sagare sagar.ekb...@gmail.com wrote: Hi Miguel, Thx a again for you valuable response anyone please tell me on the device selection i.e. which device either ADP1, ADP2 or droid to use for testing and dev and can ADP1 or ADP 2 have android OS 2.1 in it please. Also a procedure to get an ADP1 or ADP 2 device? Is it avaliable in india? Thanks, Sagar On Jun 25, 2:00 pm, Miguel Morales therevolti...@gmail.com wrote: Android versions:http://en.wikipedia.org/wiki/Android_(operating_system)#Update_history I don't think the device is as important as the version you target. I would suggest however to get a device in which multiple versions of Android can be installed. Unfortunately I don't have much experience with this. If I were you I'd start with an older model so that it forces you to make your app very fast and responsive using the slower hardware. This way, when you move your app to a faster device, it'll run that much better. For example, the G1, comes with 1.5 but you can install 2.1. However, someone else might have a better suggestion. On Fri, Jun 25, 2010 at 1:46 AM, sagare sagar.ekb...@gmail.com wrote: Hi Migules, Thx a lot for the reply where can get features that were added in each version of the api? Also i still want to know about the device selection question please. Thanks, Sagar On Jun 25, 12:48 pm, Miguel Morales therevolti...@gmail.com wrote: I would say it largely depends on the type of app you're making. If you don't need the features introduces in 2.x, start with 1.5. Once you have all the basics in place, it'll be easier to incrementally start using higher features if they are supported in the higher versions. If you make an app that works for 1.5 it *should* work automatically with 2.x (a few layout things might need to tweaked) However, if you make an app that uses features in 2.x it won't work with 1.5. On Fri, Jun 25, 2010 at 12:31 AM, sagare sagar.ekb...@gmail.com wrote: Hi Torsten, Thanks for the reply so you mean to say i can select any device for my development or testing (it could be either Android dev Phone 1, Android dev Phone 2 or Motorola Droid) rt? Also I wanted to know which Android OS version should i target as per this link http://www.macobserver.com/tmo/article/google_reports_half_of_android... android 2.1 seems to have around 50% userbase. So what i wanted to know is if i target 1.5 my app would run without any changes on all versions uptill 2.2 rt? so is it better to target a lower OS version? Or else if I target 2.2 how would that application run on lower version also a bit of confused? Can u plz help me. Thanks, Sagar On Jun 25, 12:00 pm, Torsten torsten.l...@ixonos.com wrote: Hi Sagar, Worry less about the device and more about the content. If you download the SDK for a given version and your application runs fine, chances are it will work when the apk is transferred to a device Take a look here:http://developer.android.com/guide/practices/compatibility.html andhttp://developer.android.com/guide/practices/screens_support.html Br, -- Torsten Lund Chief Software Engineer Ixonos Denmark ApS Niels Jernes Vej 10, DK-9220 Aalborg SO, Denmark On Jun 25, 8:53 am, sagare sagar.ekb...@gmail.com wrote: I am a newBie and was just wondering which mobile device should i target first for my application after a bit googling i found Android dev phone 1 and android developer phone 2 but does this device have or support Android 2.1 ? Or can i target some other device like motorola droid for my development and testing ? What would be the pros
[android-developers] Re: Accidentally made my paid app free
Well some ratings might obviously be based on the fact that the app is free, so I guess that keeping them wouldn't be very fair ? On 25 jun, 16:35, g1bb corymgibb...@gmail.com wrote: I don't assume that would keep my downloads and ratings intact, would it? Thanks again. On Jun 25, 8:21 am, Mohan Krishna mohankrishnayarragu...@gmail.com wrote: no problem.. No need to change the app name just change the package name of your app... that will work.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Will data remain after updating android os in mobile phones
Actually, in my specific case (HTC Hero with 1.5) the manufacturer (HTX) will bring out an update to 2.1 but they have already stated that everything has to backed up because it will whipe the whole system (as in installed apps, db's etc)... I can't remember exactly where I read that, it has been such a ongoing drama for the Hero update... On 24 jun, 14:20, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jun 24, 2010 at 6:41 AM, santha uday.pic...@gmail.com wrote: If i update my mobile with android 2.1 version, will the data still remains same?? Yes. What about the Preference variables information that are saved in the android phone memory if i do FACTORY RESET??? No. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Crash dumps - Market vs Homegrown
afaik not ALL existing devices will get an update to Froyo, so yes I guess there is still use for ACRA ! On 24 jun, 12:08, Tomáš Hubálek tom.huba...@gmail.com wrote: Nathan, I belive that homegrown (eg. ACRA -http://code.google.com/p/acra/) is must untl Froyo and newer become majority. Correct me if I'm wrong but on older version of Android there is no way how to get info about errors. BTW: I'm using ACRA in all my apps and it made my apps much better. Thanks to ACRA dev. Tom On 24 čvn, 02:36, Nathan critter...@crittermap.com wrote: I've been using a home grown crash dump send during a beta period. It coudl be redundant - or confusing now that the market has one. Am I right in thinking I won't need that once the app is on the market? Or is the crash dump ability in the market limited to certain devices? Any thoughts? Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Streaming audio AAC format
Actually on this same group there have been several reports of the new 2.2 Mediaplayer being a step backwards, as in many good-running apps seem to break on Froyo... Btw, might I ask how you stream aac directly from an url ? On 23 jun, 04:51, kabson kabson.andr...@gmail.com wrote: Hello all, I have developed a streaming app for Android. My app is streaming AAC audio. The app works fine on 1.5, 1.6, and 2.1. I tested it on Froyo, the android 2.2 and it does not work there. I have try everthing - Streaming directly from server url - Download incrementaly the content, store in a temp file, start reading. - Download incrementaly the content, store in a ContentProvider and start reading. No luck, I always got errors : 06-23 02:47:02.257: ERROR/MediaPlayer(266): Unable to to create media player 06-23 02:47:02.257: INFO/System.out(266): setDataSourceFD failed.: status=0x8000 Does Froyo support AAC ? Anyone happens to stream AAC ? Need some help. 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: got a problem to learn Android
you can buy a book, and even though this might be wrongly interpreted as some kind of publicity I'd like to advise you to buy Mark Murphy's books. He has a beginners version and an advanced one, and in my opinion they are very very understandable (I have read some very techincal Android books as well, but those became very boring very fast)... http://commonsware.com/ On 22 jun, 11:13, ben linus benzhe...@gmail.com wrote: Hi , Does anyone can tell me how to master android fast, i am a beginner. The official doc is so tedious, i have no clue to learn it. expect your reply and thanks for it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: got a problem to learn Android
hehe, if you earned it you earned it ;) There are other interesting books as well, but some are a little too short, a little too outdated, or less understandable... Anyways, I do advise a book because it's simple to keep on ur desk while working and look up stuff fast... Or get an Android Ipad (if it exists) full of ebook versions :P On 24 jun, 17:13, Mark Murphy mmur...@commonsware.com wrote: Thanks for the vote of confidence! On Thu, Jun 24, 2010 at 11:06 AM, MobDev developm...@mobilaria.com wrote: you can buy a book, and even though this might be wrongly interpreted as some kind of publicity I'd like to advise you to buy Mark Murphy's books. He has a beginners version and an advanced one, and in my opinion they are very very understandable (I have read some very techincal Android books as well, but those became very boring very fast)... http://commonsware.com/ On 22 jun, 11:13, ben linus benzhe...@gmail.com wrote: Hi , Does anyone can tell me how to master android fast, i am a beginner. The official doc is so tedious, i have no clue to learn it. expect your reply and thanks for 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android: Set selected icon in GridView
Not sure about GridViews, I've used this for a ListView, but you might want to look if the setTag() and getTag() methods are available for the Gridview items, so yu can set (and get) a specific name/id/ description/whatever... On 22 jun, 21:40, HJ hjenner...@gmail.com wrote: I'm trying to find a way to store the name of an icon in my database, then use that name to let a user select an icon from an ImageView. I've found various guides on ImageViews and Galleries, but none that show how to get/set the selected image by name. The list of available images won't change, but what's that best way to implement this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Service unable to call Java Class Methods
First, you debug a Service the same way you debug anything else. You set breakpoints in the appropriate lifecycle methods, or in routines called from those methods. Done that... If I recall correctly, this works even if the Service is running in a different process, but you might need to enable debugging on the specific process via DDMS. Tried that, when my app is started in the DDMS it will show my app (myprojects.android.controlCenter) and, I guess, my service (myprojects.android.controlCenter:remote)... When I try to debug that it the DDMS will throw an error : No opened project found for myprojects.android.controlCenter:remote. Debug session failed ! You don't quite say what makes you think your method isn't being called. On the face of it, this would seem to mean simply that the code that calls it doesn't run. But later you talk about It just simply seems like the Service doesn't see the Logger class, but with nothing to indicate what that means or why it seems that way. Well I have logging to the System.err.println within the Logger class method which is being called, and it doesn't print to screen, so to me it seems like that method is not being called or executed... That's why I think the service doesn't see the Logger class : it cannot call it's method otherwise I would see that in my console because of the System.err.println() call within the called method... I do know the Logger class works, it is being called by other Activities and it prints happily everything it needs to print :D After a lot of debugging I guess this is the answer who might help me out : Note that you refer to it as a singleton, but that's only meaningful within a process. It seems the Service will make it's own Logger Singleton, which makes creating an architecture with (for example) a static management layer impossible... After all that static management class would be a singleton as well, but having the service being in another Process it will create it's own management class... So is there some way to define the service to be created inside the same porcess ? On 22 jun, 21:38, Bob Kerns r...@acm.org wrote: (Yes, I've read the rest of the conversation, but I'm returning to your original message). First, you debug a Service the same way you debug anything else. You set breakpoints in the appropriate lifecycle methods, or in routines called from those methods. If I recall correctly, this works even if the Service is running in a different process, but you might need to enable debugging on the specific process via DDMS. You don't quite say what makes you think your method isn't being called. On the face of it, this would seem to mean simply that the code that calls it doesn't run. But later you talk about It just simply seems like the Service doesn't see the Logger class, but with nothing to indicate what that means or why it seems that way. There are four ways that this could happen. I doubt any of them actually apply to your situation, but it's worth listing: 1) The class isn't found at compile time. The code won't compile, you won't actually be running the current code. 2) The class isn't found at run time. Somehow it didn't get packaged up in the .apk. Since the classpath would be the same for both the Service and any Activities, you'd see the same ClassNotFound exception at runtime. 3) The class is found, but gets an error while loading. This would give a ClassNotFoundError. The class will be successfully loaded once per process/.apk pair, so you'd normally get the problem for both, if in the same process, unless there's some initialization that happens between that allows it to load the second time. If in separate processes, if there's a dependency on things happening before the class loads, it might load in one process and not the other. Note that you refer to it as a singleton, but that's only meaningful within a process. 4) The class is found, but loads, but the method itself is not found. This gets a MethodNotFoundException or other exception at runtime, depending on the exact behavior of the VM; I'm not sure it's fully specified. This situation only happens if code is successfully compiled against one version of the class, but finds a different version at runtime without the appropriate method. This would be similar to case #1 in origins. It is seldom found in practice, but usually doing a clean of the project and rebuilding will resolve it -- often by turning into case #1. Anyway, your main solution is to actually debug the problem. Step through a call to your logger and see what happens and what doesn't happen. You should actually know if your Service is running in another process -- you'd have to set it up that way in the manifest. Just because you're using IPC doesn't mean it's in a separate process -- it just means you could set it up that way and the communication would still work. On Jun 22, 6:42 am, MobDev developm...@mobilaria.com wrote
[android-developers] Re: Service unable to call Java Class Methods
ok I have taken out the android:process=:remote tag in my service tag within the androidmanifest and now it calls the Logger just fine... On 23 jun, 14:15, MobDev developm...@mobilaria.com wrote: First, you debug a Service the same way you debug anything else. You set breakpoints in the appropriate lifecycle methods, or in routines called from those methods. Done that... If I recall correctly, this works even if the Service is running in a different process, but you might need to enable debugging on the specific process via DDMS. Tried that, when my app is started in the DDMS it will show my app (myprojects.android.controlCenter) and, I guess, my service (myprojects.android.controlCenter:remote)... When I try to debug that it the DDMS will throw an error : No opened project found for myprojects.android.controlCenter:remote. Debug session failed ! You don't quite say what makes you think your method isn't being called. On the face of it, this would seem to mean simply that the code that calls it doesn't run. But later you talk about It just simply seems like the Service doesn't see the Logger class, but with nothing to indicate what that means or why it seems that way. Well I have logging to the System.err.println within the Logger class method which is being called, and it doesn't print to screen, so to me it seems like that method is not being called or executed... That's why I think the service doesn't see the Logger class : it cannot call it's method otherwise I would see that in my console because of the System.err.println() call within the called method... I do know the Logger class works, it is being called by other Activities and it prints happily everything it needs to print :D After a lot of debugging I guess this is the answer who might help me out : Note that you refer to it as a singleton, but that's only meaningful within a process. It seems the Service will make it's own Logger Singleton, which makes creating an architecture with (for example) a static management layer impossible... After all that static management class would be a singleton as well, but having the service being in another Process it will create it's own management class... So is there some way to define the service to be created inside the same porcess ? On 22 jun, 21:38, Bob Kerns r...@acm.org wrote: (Yes, I've read the rest of the conversation, but I'm returning to your original message). First, you debug a Service the same way you debug anything else. You set breakpoints in the appropriate lifecycle methods, or in routines called from those methods. If I recall correctly, this works even if the Service is running in a different process, but you might need to enable debugging on the specific process via DDMS. You don't quite say what makes you think your method isn't being called. On the face of it, this would seem to mean simply that the code that calls it doesn't run. But later you talk about It just simply seems like the Service doesn't see the Logger class, but with nothing to indicate what that means or why it seems that way. There are four ways that this could happen. I doubt any of them actually apply to your situation, but it's worth listing: 1) The class isn't found at compile time. The code won't compile, you won't actually be running the current code. 2) The class isn't found at run time. Somehow it didn't get packaged up in the .apk. Since the classpath would be the same for both the Service and any Activities, you'd see the same ClassNotFound exception at runtime. 3) The class is found, but gets an error while loading. This would give a ClassNotFoundError. The class will be successfully loaded once per process/.apk pair, so you'd normally get the problem for both, if in the same process, unless there's some initialization that happens between that allows it to load the second time. If in separate processes, if there's a dependency on things happening before the class loads, it might load in one process and not the other. Note that you refer to it as a singleton, but that's only meaningful within a process. 4) The class is found, but loads, but the method itself is not found. This gets a MethodNotFoundException or other exception at runtime, depending on the exact behavior of the VM; I'm not sure it's fully specified. This situation only happens if code is successfully compiled against one version of the class, but finds a different version at runtime without the appropriate method. This would be similar to case #1 in origins. It is seldom found in practice, but usually doing a clean of the project and rebuilding will resolve it -- often by turning into case #1. Anyway, your main solution is to actually debug the problem. Step through a call to your logger and see what happens and what doesn't happen. You should actually know if your Service is running in another process
[android-developers] Service unable to call Java Class Methods
Hi, I am using a Service to play some music. In the same project I have several Activity's but also some custom classes which are part of a framework, so nothing graphical. One of those (singleton) classes is a Logging class which send logs to my server. I noticed that even though I can call the classes methods in my service it actually won't be logging anything... In my specific example it's osmething like : Logger.getInstance().log(Whatever I want to Log); Obviously the getInstance is a static method so it can be accessed from anywhere within my project right away.. I was wondering though why this method for example isn't getting called ? Also how do I debug a Service ? Btw I am using of IPC from one of my Activities which gets bound to the service and can start/stop the music for example... Any help, hints, tips, or tricks are greatly appreciated ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Service unable to call Java Class Methods
Actuall the LogCat doesn't show anything... It's not like I am getting any errors/exceptions... I have been using System.err.println in the Service, which print out just fine in Logcat... But, yes there is always a but :P, I don't want the service to write to the System.err but to my Logger class, which btw implements Console logging (to the System.err :P) and a http logger which simply sends a buffer of logs to my server... The class is imported : import myprojects.android.loggingModule.Logger; It just simply seems like the Service doesn't see the Logger class, they are in the same project, not specifically in the same Package though... Might it be that the Service is simply a independent Process itself with no ties to any other classes/objects ? On 22 jun, 15:47, Gyan gnanesh@gmail.com wrote: Can you paste the logcat trace? Some hints 1. Have u imported the class(logger) 2. Debugging the service - sysouts 3. Creating ur own - not advisable(might hamper responsiveness) - use the existing Logger - just in case! Gyan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Extremely Simple Question
Guess you are using an ArrayAdapter ? Or did you impelment your own Filter ? If so don't forget to call notifyDataSetChanged()... Also it might simply be selecting the first element of your old list... On 21 jun, 08:29, HeyYouThere newsome...@gmail.com wrote: Here goes: I have a very simple listview going on. The list just consists of strings, when you click the string it opens a new activity blah blah. Here's the problem, I enabled settextfilter and while it did filter the list, when you click the result, it always performs the action of the string located at zero, and not the one it is supposed to. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Service unable to call Java Class Methods
unfortunately using the complete path didn't make any difference at all :( Reflection, afaik, are handy if some method's/api's are missing and thus you can fall back on another implementation.. But I'm afraid in my case it would always fall back to the other implementation, thus never using my Logger class :( After all, I can check if it recognizes my class, but if it simply doesn't then I actually wouldn't have any use in calling an alternative or whatever... On 22 jun, 16:43, Gyan gnanesh@gmail.com wrote: Try giving the entire context path all the time. myprojects.android.loggingModule.Logger.Log() Or try using reflections API built in Android!! Gyan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help on singleinstance launchmode
Actually, to me it sounds it's behaving correctly... If Activity B is standard then it might be re-used, so it's not obliged to create a new Instance... Thats what happens in ur case, first time it get's created, then you go to activity A, then when you ask for Activity B the old activity B is returned... If you don't want that as a behaviour you might declare B as singleInstance or even better singleTask... On 21 jun, 13:30, Vibhor Mahajan mahajan.vib...@gmail.com wrote: Hello, What is launch mode of an activity, which is launched from an activity with launch mode as singleinstance. I tried the following code. My application has two activities i.e. A B. Activity A has singleinstance launchmode set and activity B has standard launch mode set. Android manifest file is as follows: application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.activity_lifecycle android:label=@string/app_name android:launchMode=singleInstance intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.another android:launchMode=standard /activity /application Activity A has a button, clicking button starts Activity B using below code: public void onClick(View v) { // TODO Auto-generated method stub Intent intent = new Intent(activity_lifecycle.this,another.class); startActivityForResult(intent, 0); } Activity B has a button, clicking button starts Activity A using below code: public void onClick(View v) { // TODO Auto-generated method stub Intent intent = new Intent(another.this,activity_lifecycle.class); startActivityForResult(intent, 0); } Click button in Activity A starts B. (oncreate of B is called) Click button in Activity B re-starts A. (because A has SINGLEINSTANCE launchmode) Click button in Activity A re-starts B. (oncreate of B is NOT CALLED) After 3rd step, since activity B is standard, a new instance should be created and not previous instance to be used. Kindly suggest why when second time activity B is started, a new instance of activity B is not created, when it is declared with launchmode standard. Regards, Vibhor -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help on singleinstance launchmode
Btw, got this from documentation, concentrate on the last sentence : Every time there's new intent for a standard activity, a new instance of the class is created to respond to that intent. Each instance handles a single intent. Similarly, a new instance of a singleTop activity may also be created to handle a new intent. However, if the target task already has an existing instance of the activity at the top of its stack, that instance will receive the new intent (in an onNewIntent() call); a new instance is not created. found here : http://developer.android.com/guide/topics/manifest/activity-element.html#lmode On 21 jun, 13:30, Vibhor Mahajan mahajan.vib...@gmail.com wrote: Hello, What is launch mode of an activity, which is launched from an activity with launch mode as singleinstance. I tried the following code. My application has two activities i.e. A B. Activity A has singleinstance launchmode set and activity B has standard launch mode set. Android manifest file is as follows: application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.activity_lifecycle android:label=@string/app_name android:launchMode=singleInstance intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.another android:launchMode=standard /activity /application Activity A has a button, clicking button starts Activity B using below code: public void onClick(View v) { // TODO Auto-generated method stub Intent intent = new Intent(activity_lifecycle.this,another.class); startActivityForResult(intent, 0); } Activity B has a button, clicking button starts Activity A using below code: public void onClick(View v) { // TODO Auto-generated method stub Intent intent = new Intent(another.this,activity_lifecycle.class); startActivityForResult(intent, 0); } Click button in Activity A starts B. (oncreate of B is called) Click button in Activity B re-starts A. (because A has SINGLEINSTANCE launchmode) Click button in Activity A re-starts B. (oncreate of B is NOT CALLED) After 3rd step, since activity B is standard, a new instance should be created and not previous instance to be used. Kindly suggest why when second time activity B is started, a new instance of activity B is not created, when it is declared with launchmode standard. Regards, Vibhor -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Misplaced Layout after “home ”-button and/or powersave screen
Hi, I have an app which also includes a service with a Notification. Right now I am experiencing the foillowing problem : * I start my app which will work fine * after couple of minutes the powersave kicks in and I get a black screen * I (or hte user) click the Menu-button to dismiss the black screen and to unlock the screenlock * Now my (fullscreen) app will have moved like 30-40 pixels downwards, creating an ugly black border or hole. When I move the scrollwheel it will move up and down, and when I press the Menu button (showing my ap''s menu) it will fix the view... or * I start my app which will work fine * I press the Home button exiting the app, my service though will (correctly) keep running * when selecting my service from the notification-bar I will get once again : -Now my (fullscreen) app will have moved like 30-40 pixels downwards, creating an ugly black border or hole. When I move the scrollwheel it will move up and down, and when I press the Menu button (showing my ap''s menu) it will fix the view... Any idea what the problem is ? The app is running on a ADP2 with Android 1.6 Thanks in advance ! Ok, after some testing I noticed that if I don't run the Activity on Fullscreen, but just leave the TtileBar away this won't happen... Still this is no solution to me, I want it to be fullscreen... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Static header in ListView
Put the header outside the ListView. How do you even do that ? :D Thought the addHeaderView(v) method was specifically for the ListView ? I guess you are saying that another View should be used and placed within the same Layout where the ListView is in ? ASpecifically on top of it ? On 12 jun, 22:50, Mark Murphy mmur...@commonsware.com wrote: On 06/12/2010 04:38 PM, Bill Lumberg wrote: I have a ListView with several columns and I need a header row at the very top that labels each of these columns that *does not* scroll with the rest of the ListView. I am using addHeaderView right now, but I've ran into 2 problems: 1) The header scrolls. I need it outside of scrolling so that it's always floating on top. Put the header outside the ListView. 2) Each column in the header isn't lining up with the columns in the listview. I can make the header columns and data columns all line up perfectly if they're all in one big TableLayout, but how would I get the header to be outside of the scrollview yet also stay uniform and inline with the data columns? You'll need to set the sizes of every one of your columns -- in other words, use dimension resources instead of wrap_content for the width. If you use a RelativeLayout for the header and a RelativeLayout for the rows, you can then use those same dimensions and layout_marginLeft to have everything consistently line up. Or, use GridView. Or, write a MultiColumnListView. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Location distanceBetween()
This obviously is all true, BUT why re-invent the wheel ? I mean if there is an implemented method which should offer that functionality the most logical thing is to use that one instead of writing your own methods.. Or did you guys also rewrote all other API's as well ? Why even supply ANY API's at all then ? ;) On 14 jun, 08:40, Bob Kerns r...@acm.org wrote: I don't know if I would term anything to do with spherical trig as easy, exactly, even with my background in math. On the other hand, it's simple to program, once you know the right theorems. This is well covered in any serious textbook on nautical navigation. On Jun 13, 10:00 pm, Frank Weiss fewe...@gmail.com wrote: Why not do it yourself? The math is easy - Google is your friend: get bearing between two lat longs -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 intercept a Linkify web link ?
Hi, I have a page with two web links on them, to make it possible for the user to click on and show the webpages those link to I used the Linkify class... It works like a charm, but I'd like to know when an user clicks on it, for statistical reasons... So is there any way I actually can intercept a linkify-ed link ? TextView web1LinkView = (TextView) findViewById(R.id.weblink1); Linkify.addLinks(web1LinkView , Linkify.ALL); TextView web2LinkView = (TextView) findViewById(R.id.weblink2); Linkify.addLinks(web2LinkView , Linkify.ALL); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: PVMFFailure when using MediaPlayer for radio streams
so there is actually still no solution ? We have a new and modern platform which cannot stream mp3's or aac from the net ? Well I guess we didn't move that far from j2me at all, this is still a very frustrating MediaPlayer class... On 19 mei, 00:25, rooster 808 rich.al...@gmail.com wrote: here's a link to a file that has a correct header, but gives the PVMFailure error in the Media Player. Pretty frustrating. I find dozens of these a day that are valid files w/Android 2.1 http://www.fileden.com/files/2009/11/2/2634160/Julian%20Shah-Tayler%2... tnks, rich On Mar 29, 8:35 am, dillirao malipeddi dillir...@arijasoft.com wrote: Arijasoft developed android online radio SDK using this AOR SDK you can play shoutcast/icecast ( mp3/aac) radio streams on android for more details look in tohttp://demos.arijasoft.com/Arija_Android_Dev/aorsdkrelease.php http://demos.arijasoft.com/Arija_Android_Dev/aorsdkrelease.phpThanks On Tue, Feb 16, 2010 at 1:08 PM, Kamal Hasan kamal.hasa...@gmail.comwrote: Hi, Any one has tried with HTTPS on media player I am getting Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported Error. I am able to play the file on http but failed to play on HTTPS. Can you help me in this regard. Kamal On Feb 11, 10:42 pm, Steve steveoliv...@gmail.com wrote: I can make this work on 1.6 with this linkhttp:// www.colorado.edu/AmStudies/lewis/Design/blue.mp3 What is the url you are trying to connect to? On Jan 29, 6:08 am, David trend...@gmail.com wrote: ps-I am using version 1.5 on a HTC phone On Jan 14, 9:48 pm, Tanmay tanm...@gmail.com wrote: I tried doing this in 1.6 but still gave me the Prepare Failed 0x1 error along with thePVMFFailurein the log. Has there been any solution to this one developed yet? On Dec 14 2009, 10:13 pm, YaushiIizuka vse5...@gmail.com wrote: Hi. String url = http://your.url;; MediaPlayer mp = new MediaPlayer(); mp.setDataSource(url); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); mp.prepare(); mp.start(); On 10月23日, 午後3:28, dede dede830...@126.com wrote: Hi, In 1.6,I also try to play stream through setDataSource(http:// xxx/.mp3), but also it return IOException: prepare failed, status=0x1. If set the url into windowsmediaplayer, it can play correctly, I wanna know your problem whether be resolved? If yes, can u tell me the solution,thanks very much. On 10月7日, 上午5时41分, iwhoyt wallace...@hotmail.com wrote: In 1.5 I was able to stream an mp3 over http by passing the url to setDataSource(). However I started gettingPVMFFailures in 1.6. For me the issue was the Content-Type http header. If the header was set correctly (Content-Type: audio/mpeg), the stream played. Otherwise if failed during PLAYER_INIT. On Sep 2, 2:32 am, siliconeagle rrmu...@gmail.com wrote: Also the URl is a http (MP3) stream URL - as opposed tioo other opost where RTSP is being tried. It looks like it should just work. Has anyone else got streaming working via a streaming URL? On Sep 1, 1:24 pm, siliconeagle rrmu...@gmail.com wrote: I am trying to build streaming radio into my app, which works fines streaming files over the internet, but when i try to use a shoutcast url in get the error below, which from the soruce code looks liek the mediaPlayer is looking for the duration in the header. Does anyone know if shoutcast urls will work withthe defaultmediaplayer? Or do i have to download chunks into a ping-pong buffer sor something? The url has no porblems downloading via the browser. the error is:- 09-01 11:53:25.634 E/MediaPlayer(16972): stop called in state 1 09-01 11:53:27.324 D/BatteryWidget(15623): Updating Views 09-01 11:53:30.445 E/PlayerDriver( 35): Command PLAYER_INIT completed with an error or infoPVMFFailure 09-01 11:53:30.445 E/MediaPlayer(16972): error (1, -1) 09-01 11:53:30.504 I/NotificationService( 55): enqueueToast pkg=net.robmunro.mypod callback=android.app.ITransientNotification$Stub $pr...@4323b8f8 duration=1000 09-01 11:53:30.514 W/System.err(16972): java.io.IOException: Prepare failed.: status=0x1 09-01 11:53:30.644 W/System.err(16972): at android.media.MediaPlayer.prepare(Native Method) 09-01 11:53:30.644 W/System.err(16972): at net.robmunro.mypod.util.MediaPlayerWrapper.playMedia (MediaPlayerWrapper.java:111) the code i use is:- try {
[android-developers] Re: I've found a way to stop piracy of my apps
It took several days (almost a week) for crackers to decompile Screebl Pro and find a way to circumvent AAL. Typically it takes about 90 secs from the time that we publish to the market for the various warez sites to start tweeting the location of the download. I was wondering, after the first crack-run they obviously will have devised a crack-method, which means that every other app using AAL will be cracked within 90 seconds till a new version is released... A week of cracking will only be the case during the first attempt... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AsyncTask and progressUpdate()
thanks for the answer Mark... Well the idea of the AsyncTask was to have a place where progress would be shown to a GUI element... And the onProgressUpdate() method oviously was very tempting ;) Anyhow, everything being asynchronous and thus not possible to implement within a doInBackgournd() method I will simply scrap the AsyncTask... Also get your ass to the netherlands for some training sessions ;) On 28 apr, 13:15, Mark Murphy mmur...@commonsware.com wrote: MobDev wrote: hhmm ok... So I guess it should be possible for example to make my own class extendingAsyncTaskand implementing callaback interfaces to it from the aforementioned modules, does that sound feasable/logical at all ? You shouldn't need that. The point ofAsyncTaskis to do things in a background thread. Hence, use synchronous operations, not asynchronous ones, from calls originating *inside*AsyncTask'sdoInBackground(). The conneciton module has to be started, then the AsynTask will have to wait for a response from that module telling it it's done downloading, then theAsyncTaskshould start the parsing, wait till that's done and then finally it can write to the DB... Why, then, are you using anAsyncTask? Either write everything as synchronous and then useAsyncTaskto move it to the background, or write everything as asynchronous and get rid of theAsyncTask. Using anAsyncTaskwon't make background work be even *more* background, after all. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in NYC: 4-6 June 2010:http://guruloft.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 athttp://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: AsyncTask and progressUpdate()
hhmm ok... So I guess it should be possible for example to make my own class extending AsyncTask and implementing callaback interfaces to it from the aforementioned modules, does that sound feasable/logical at all ? I was wondering though, because its somewhat asynchronous operations how should that be implemented ? Specifically, I know that the method doInBackground will actually do the work, but in my case the work is asynchronous itself... The conneciton module has to be started, then the AsynTask will have to wait for a response from that module telling it it's done downloading, then the AsyncTask should start the parsing, wait till that's done and then finally it can write to the DB... These status callbacks can be implemented through my own interfaces, but other methods would be called and not for example the doInBackground... Am I making my problem any clearer now ? :D On 27 apr, 18:00, Mark Murphy mmur...@commonsware.com wrote: MobDev wrote: Hi, I am using an AsyncTask to start out a sequence of events to retrieve data from the net, parse this data and then write it to the Database... I have divided my code into several modules, one for networking operations (which is used for retrieving the data), one for xml- parsing, and one for DB funtionality... The first one calls the second one when it's done and so on... So now I was wondering if there is some correct way to make an AsyncTask public so that everyone of those modules is able to call the progressUpdate() method to show the user what the general progress is (like placing a horizontal progress bar on 1/3 when the data has beendonwloaded, on 2/3 when the parsing is done and 3/3 when it's done writing to the DB)... IMHO, the AsyncTask should be the driver, not be driven, so you would not need the AsyncTask to be public. The AsyncTask should know when you are 1/3 complete, 2/3 complete, etc. because it is one calling your other modules to have work be completed. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android 2.x Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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] AsyncTask and progressUpdate()
Hi, I am using an AsyncTask to start out a sequence of events to retrieve data from the net, parse this data and then write it to the Database... I have divided my code into several modules, one for networking operations (which is used for retrieving the data), one for xml- parsing, and one for DB funtionality... The first one calls the second one when it's done and so on... So now I was wondering if there is some correct way to make an AsyncTask public so that everyone of those modules is able to call the progressUpdate() method to show the user what the general progress is (like placing a horizontal progress bar on 1/3 when the data has beendonwloaded, on 2/3 when the parsing is done and 3/3 when it's done writing to the DB)... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Activity's Thread ID
ok, I have done that but the result now is that I always get the same Thread ID, I guess that's the main UI Thread.. I do have different threads, for example for http connections (or actually Runnable's), and now I'd like to get their Thread ID as well, any idea how ? So I'd like to get the Thread ID's of non-activity objects, so those shouldn't run on the main-ui thread... On 22 mrt, 16:09, Streets Of Boston flyingdutc...@gmail.com wrote: All callbacks into an Activity happen on the same thread, the main UI thread. Just call, in onCreate, the method 'Thread.currentThread().getId()' On Mar 22, 10:04 am, MobDev developm...@mobilaria.com wrote: Hi, I'd like to retrieve the Thread Priority of one or more Activity's... To do so I have found the Process.getThreadPriority() method, but as an argument you have to supply the Thread's ID... That's not that bad because in the end I also needed to have that, only I can't seem to find a method for that... I have seen a Thread.getID method or something like that, but how can this be applied to an Activity, for example the main Activity of an Android app ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Dynamic Flipping Screen(like that of iPhone) in Android
Do you mean a screen transition Animation ? On 20 apr, 09:17, Maxood maqs...@salsoft.net wrote: How can i make a dynamic flipping screen(like that of iPhone) in Android I am parsing data through the web service. I want the flipping horizontally rather than vertically. Here is a tutorial where ViewFlipper is used but it is for static data. Suppose we have 2 activities with their respective xml files: Splash Activity -splash.xml Menu activity -menu.xml Now how we can flip between these 2 activities? That is from splash to menu and vice versa. Maqsood -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: wlan.ko and tiwlan.ini ?
hhmm, isn't this kinda of topic-hijacking ? It's somewhat off-topic and even the subject of discussion has been changed completely... On 16 apr, 00:23, Emre A. Yavuz eayl...@hotmail.com wrote: Does anybody know where to find a good tutorial on wlan.ko module and tiwlan.ini configuration file ? What do they do ? How do they do it etc. ? They are associated with the Tethering process. I've searched the net, but I haven't noticed anything solid yet. Cheers, Emre _ Hotmail Messenger are available on your phone. Try now.http://go.microsoft.com/?linkid=9724461 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: Threads or ASyncTask?
I am just making a wild guess here, and I hope more experience people will support or deny it (Mark, are you awake yet ? ;) ) but this might be a good scenario for a Service ? On 6 apr, 16:21, jfbaro jfb...@gmail.com wrote: Hi, I am working on a simple application (studying purposes) which list all the files from a selected folder. On top of that I would like to have a search feature where the user can search for files (the code for that is already in place). Now, I was thinking about having the search running in the background somehow, whilst the user can still navigate, create folders, copy, sort and do other stuffs normally. When the search finishes the user would get a notification and then could click on it and go to that activity (It ideally should be the same ListView I already use for browsing the files, I would just need to update the Adapter there with the latest processed data after clicking in the notification). What's the best answer for that? Threading or AsyncTask? Could anyone help me? Cheers -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: My team is in urgent need of android developers
Lead the development of at least 2 successfully shipped Android applications you know most Android apps are made by very very little companies (2-3 employees) or by one man companies ? Mostly because a big team, which needs a project-manager/leader, is too expensive in comparison to the revenues... On 8 apr, 10:10, Jitin jitin.suryawan...@gmail.com wrote: Hi Guys, My team is in urgent need for Android Developers. Please find below the details. Job Location:Nagpur,India Android SSE – experience – 3-4 yrs, minimum 6 months experience in Android, Location – Nagpur • Android SDK • Android Building blocks (Activity, Service, Receiver, Content Provider) • Strong programming and ability to understand design. • Understanding on Android open source code • Knowledge of iterative development lifecycle management and tools • Development of at least 1 successfully shipped Android applications Android Lead – experience – 5-7 yrs, minimum 8 months experience in Android, Location – Nagpur • Android SDK • Strong with Android Building blocks (Activity, Service, Receiver, Content Provider) • Strong programming and design ability. • Good understanding on Android open source code • Delivering Quality code • Extensive knowledge of iterative development lifecycle management and tools • Able to direct the work of others, prioritize tasks and allocate resources • Must be able to lead cross-functional project teams and coordinate activities of others. • Lead the development of at least 2 successfully shipped Android applications Interested candidates can mail me there updated CV to jitin.suryawan...@gmail.com. Regards, Jitin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: How can I use VideoView to streaming without buffering?
well most of the time buffering is just part of streaming... it's there so that a user will get a more seamless playback of the video/audio... The flipside is that it starts a little later because it has to buffer beforehand, and when it has enough data to play a specific amount of time seamlessly it will start.. Cutting out the buffering might mean frequent hickups during play... The first case might be acceptable for users (buffering) the second one definitely isn't (frequent hickups)... On 12 apr, 05:33, Kelvin sukel...@gmail.com wrote: I have a question. When I use the VideoView to play the RTSP streaming, the VideoView will buffering some cache buffer. Is there any method to tell the VideoView DON'T buffer? My code: String VideoUri = rtsp://192.168.5.121:/live/h264; mVideoView = (VideoView) findViewById(R.id.video_view); mVideoView.setVideoURI(Uri.parse(VideoUri)); mVideoView.start(); Is anybody help me? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Web Apps for Dummies?
well an option is just to create your standard webpage (taking into account it's for mobile devices, which possibly means changing design/ resolution), and just open up the browser inside your app... something like : WebView web = (WebView) findViewById(R.id.webView); web.getSettings().setJavaScriptEnabled(true); web.getSettings().setJavaScriptCanOpenWindowsAutomatically(false); web.getSettings().setPluginsEnabled(false); web.getSettings().setSupportMultipleWindows(false); web.getSettings().setSupportZoom(false); web.setVerticalScrollBarEnabled(false); web.setHorizontalScrollBarEnabled(false); //Our application's main page will be loaded web.loadUrl(http://www.yourwebsite.com/mobileversion;); web.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { return false; } }); On 10 apr, 18:17, Silver_Comet bfaulkner...@googlemail.com wrote: Hi there I've been working on websites since I was a kid, and I've gotten more and more interested in mobiles as a browser over the last couple of years. I've made a website that is viewable on a mobile (android etc) but I want to take it a step further and integrate a website in to an app. I help run an online wiki, and I'd love to have it so that a mobile optimised version of the wiki appeared at the top, and the menu button merely put them on the correct categories (wiki pages like items, characters, areas, cultures etc). Unfortunately for me, android is the only thing that's really inspired me to actually start working on this sort of thing, and I have no previous java experience, just 10 or so years of html/php/mysql/css. so my question is, is there a great list of tutorials out there that I can use to get to this goal? I've looked around the web, but all I've been able to find is out dated tutorials that seem to create more errors than they actually help me. Nothing specifically out there for web that I can find either. I'm sorry if that's confusing as a request, if it helps, engadget.com have pretty much exactly what I'm looking to build. Thanks for reading, and I appreciate any help greatly. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Working with low 3G strength
well you cannot improve a low strength signal I'm afraid... So I guess the general guideline would be to tell the user the signal is weak which might result in a less smooth user experience... On 10 apr, 04:36, antiTalented anirudh.ai...@gmail.com wrote: Hello, I am developing an app that is in constant communication with a server. The app runs fine on WLAN but it kinda sucks over 3G. Can anyone please point me to a general bunch of guidelines to handle low strength scenarios? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Android Phones
Sure you can look out for a cheaper option, but you specifically asked for other places to buy a testing device outside of the market... So I guess the options would be to buy a second hand device, paying the going second hand price... If that is too much for you then I simply guess thats also the answer : you cannot afford a real testing device... Maybe an option would be, if it's possible in your country, to take on a subscription which also includes a device ? Here in the netherlands you can get a provider's subscription for 18 euro a month which will come with a HTC Tattoo for example... I am afraid that expecting to get a high-end 570$ device for like 100 bucks is up there in my wishlist next to my Ferrari for a 1000 bucks and my uber hexacore pc for 200 bucks... I guess that's what they call the market ;) High-end stuff simply is expensive, for people who cannot afford that there are loads of other options, like getting a cheaper model... There are several android devices who aren't that expensive, like the HTC Tattoo and the Samsung Galaxy (if i'm not mistaken)... Sure you won't get the biggest screen, nor the highest resolution, but hey you get what you pay for right ;) On 13 apr, 08:44, nubh bhargava nubh.bharg...@gmail.com wrote: ya thats true but can look out for cheaper option, Thats all my intention as I am a student [?] Thanks NUBH 343.gif 1 KWeergevenDownloaden -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Problem accessing Layer-List items
hhmm, are you sure they are getting a layer-id if they are not specified as layers ? I have no experience in that but I see that those already have a R-id and you are trying to use that same id as a layer-id ? On 12 apr, 15:48, Alok Kulkarni kulsu...@gmail.com wrote: Hi guys I have a Style declared as follows *XML:* ?xml version=1.0 encoding=utf-8? layer-list xmlns:android=http://schemas.android.com/apk/res/android; item android:id=@android:id/background android:drawable= @drawable/progbar2_320x480 /item item android:id=@android:id/secondaryProgress clip shape solid android:color=#4A7116 / /shape /clip /item item android:id=@android:id/progress clip shape solid android:color=#95BB1C / /shape /clip /item /layer-list I want to change the color of progressbar and secondary progressbar at runtime. How can i do that.. There is a function in LayerDrawable as * * findDrawableByLayerId(android.R.id.progress); or * * findDrawableByLayerId(android.R.id.secondaryProgress); but i am not getting how to use that.. Thanks , Alok -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Progress Dialog Status Bar
My idea would be to use asynctask... In tthis specific case you can do some lengthy task (for example in another Thread) and in the menatime show a progress bar... On 13 apr, 13:20, Sasikumar.S sasikumar.it1...@gmail.com wrote: Hi , - In my application i'm loading 40 images in background from web. - At the time i need to progress dialog or progress bar in status bar (not title bar ). - How to show it ? - I tried so much sample programs. - All are showing only images not progress. - Any one have any idea ?.. -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Huge UI
hehe, thats one answer I should give to my boss when he comes with his n-th ingenious plan which implies years of work :P On 13 apr, 15:31, Mark Murphy mmur...@commonsware.com wrote: Ajay wrote: Thanks for a super quick reply!! I doubt if I could use a ListView because it has to scroll horizontally as well as vertically. Then I hope you have staff-years of engineering time to create your own framework for efficiently handling this scenario. Or you can redesign your UI to avoid horizontal scrolling, then use ListView. -- Mark Murphy (a Commons Guy)http://commonsware.com|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: Android Phones
Well depends on what you mean with in market... Are you referring to the ADP's ? Otherwise you might want to look for a second-hand device in your country ? Via ebay or something similar... On 12 apr, 11:35, Nubh nubh.bharg...@gmail.com wrote: hey how to buy a phone for testing applications, can anyone suggest. Other phones in market are way to expensive. NUBH -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Steps to transfer a simple object from server to android using XML
Thought you actually could according to this article I read couple of weeks ago : http://www.ibm.com/developerworks/opensource/library/x-android/index.html#N1029E Says you can use the XmlSerializer object for that ? On 12 apr, 14:34, Mark Murphy mmur...@commonsware.com wrote: Anthoni wrote: Hi raqz, I saw your previous post in that you were sending lists of friends via serialization and were advised to use xml instead. Instead of XML you could also use JSON as it is more lightweight than using XML and doesn't take long to implement. I was using XML as my back end for my database to communicate with my application but I changed it all to JSON and haven't looked back since. Here is an article on parsing JSON with Java http://www.androidcompetencycenter.com/2009/10/json-parsing-in-android/ Read through that and it should give you some ideas. There is an article on getting JSON back from the server but I can't find that at moment. Will try and dig it out though. Another advantage of JSON is that there is code built into Android to generate JSON (for shipping *to* a Web server). There is no equivalent of that for XML. -- Mark Murphy (a Commons Guy)http://commonsware.com|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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Database insertion timings
do you have some code specifically showing the sequence and the syntax ? AAfaik a transaction SHOULD make it faster accroding to this documentation : http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html#transactions On 12 apr, 12:32, Alok Kulkarni kulsu...@gmail.com wrote: I have started the transaction before the 1st insert , and ended it after the last insert Thanks, Alok. On Mon, Apr 12, 2010 at 4:01 PM, Alok Kulkarni kulsu...@gmail.com wrote: Ok, @Yahel:- For the insertion of same records on a Palm device(Say Palm Pre) , its taking 3 seconds.. On an IPhone , its taking 1 or 2 seconds.. Here is an example of what i am doing.. private Boolean addAlbumDB(int AlbumId, String Name, String Label, int MultipleArtists, int ArtistId) { long result = -1; try { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_ID, AlbumId); initialValues.put(KEY_NAME, Name); initialValues.put(KEY_LABEL, Label); initialValues.put(KEY_ARTIST_ID, ArtistId); initialValues.put(KEY_MULTIPLE_ARTISTS, MultipleArtists); result = db.insert(DATABASE_TABLE, null, initialValues); } catch (Exception e) { Log.i(Exception in addAlbumDB, + e.toString()); return false; } if (result == -1) return false; return true; } The above function is called for around 2000 times.. Similarly there are 2 3 more functions for other tables. Thanks, Alok. On Mon, Apr 12, 2010 at 2:33 PM, Michael Rueger mike.rue...@gmail.comwrote: On 4/12/2010 10:59 AM, Yahel wrote: Hi Alok, Posting some logic, or some sql would help us see if you are missing something :) (excessive) use of indices comes to mind :-) Michael Yahel On 12 avr, 08:50, Alok Kulkarnikulsu...@gmail.com wrote: Hi, I am inserting around 7000 to 8000 records in my database having 4 tables each having 3 to 4 columns.Its taking me around 22 seconds to do the insertion which is i think is too long. I am using transaction while doing this without which its taking around 55 seconds. According to SQLite documentation , inserting 1 records in a database takes time around 2 to 3 seconds. Am i missing something , or is the behaviour correct? Thanks, Alok -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Database insertion timings
I don't see a specific transaction ??? Anyways transaction should only be used if you have multiple actions you are doing on your database (like several insert/update operations)... On 12 apr, 15:43, Alok Kulkarni kulsu...@gmail.com wrote: This is a standard class DatabaseHelper extending SQLiteOpenHelper... private static class DatabaseHelper extends SQLiteOpenHelper { DatabaseHelper(Context context, String databaseName) { super(context, databaseName, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { // Nothing to do } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Log .w(Upgrade, Upgrading database from version + oldVersion + to + newVersion + , which will destroy all old data); db.execSQL(DROP TABLE IF EXISTS titles); onCreate(db); } } Then i have private SQLiteDatabase db; This db object is used to perform insert operations. Thanks, Alok. // ---opens the database--- public void open() throws SQLException { db = DBHelper.getWritableDatabase(); } On Mon, Apr 12, 2010 at 6:20 PM, MobDev developm...@mobilaria.com wrote: do you have some code specifically showing the sequence and the syntax ? AAfaik a transaction SHOULD make it faster accroding to this documentation : http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html#transa...http://web.utk.edu/%7Ejplyon/sqlite/SQLite_optimization_FAQ.html#tran... On 12 apr, 12:32, Alok Kulkarni kulsu...@gmail.com wrote: I have started the transaction before the 1st insert , and ended it after the last insert Thanks, Alok. On Mon, Apr 12, 2010 at 4:01 PM, Alok Kulkarni kulsu...@gmail.com wrote: Ok, @Yahel:- For the insertion of same records on a Palm device(Say Palm Pre) , its taking 3 seconds.. On an IPhone , its taking 1 or 2 seconds.. Here is an example of what i am doing.. private Boolean addAlbumDB(int AlbumId, String Name, String Label, int MultipleArtists, int ArtistId) { long result = -1; try { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_ID, AlbumId); initialValues.put(KEY_NAME, Name); initialValues.put(KEY_LABEL, Label); initialValues.put(KEY_ARTIST_ID, ArtistId); initialValues.put(KEY_MULTIPLE_ARTISTS, MultipleArtists); result = db.insert(DATABASE_TABLE, null, initialValues); } catch (Exception e) { Log.i(Exception in addAlbumDB, + e.toString()); return false; } if (result == -1) return false; return true; } The above function is called for around 2000 times.. Similarly there are 2 3 more functions for other tables. Thanks, Alok. On Mon, Apr 12, 2010 at 2:33 PM, Michael Rueger mike.rue...@gmail.com wrote: On 4/12/2010 10:59 AM, Yahel wrote: Hi Alok, Posting some logic, or some sql would help us see if you are missing something :) (excessive) use of indices comes to mind :-) Michael Yahel On 12 avr, 08:50, Alok Kulkarnikulsu...@gmail.com wrote: Hi, I am inserting around 7000 to 8000 records in my database having 4 tables each having 3 to 4 columns.Its taking me around 22 seconds to do the insertion which is i think is too long. I am using transaction while doing this without which its taking around 55 seconds. According to SQLite documentation , inserting 1 records in a database takes time around 2 to 3 seconds. Am i missing something , or is the behaviour correct? Thanks, Alok -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http
[android-developers] Re: Database insertion timings
Actually, Im just guessing here, shouldnt you use staretTransaction and endTransaction instead of setTransactionSuccesfull() ??? Right now you as a developer are specifically marking the transaction as succesfull, is that what you want ? On 12 apr, 16:22, Alok Kulkarni kulsu...@gmail.com wrote: Each of these above functions insert records in 3 seperate tables in the same database. Thanks , Alok On Mon, Apr 12, 2010 at 7:51 PM, Alok Kulkarni kulsu...@gmail.com wrote: Before the 1st insert call i am doing db.beginTransaction(); for(i = 0 i 2000 ; i++) addAlbumDB(); for(i = 0 i 3000 ; i++) addArtistDB(); for(i = 0 i 2000 ; i++) addSongDB(); try { db.setTransactionSuccessful(); } finally { db.endTransaction(); } On Mon, Apr 12, 2010 at 7:18 PM, MobDev developm...@mobilaria.com wrote: I don't see a specific transaction ??? Anyways transaction should only be used if you have multiple actions you are doing on your database (like several insert/update operations)... On 12 apr, 15:43, Alok Kulkarni kulsu...@gmail.com wrote: This is a standard class DatabaseHelper extending SQLiteOpenHelper... private static class DatabaseHelper extends SQLiteOpenHelper { DatabaseHelper(Context context, String databaseName) { super(context, databaseName, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { // Nothing to do } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Log .w(Upgrade, Upgrading database from version + oldVersion + to + newVersion + , which will destroy all old data); db.execSQL(DROP TABLE IF EXISTS titles); onCreate(db); } } Then i have private SQLiteDatabase db; This db object is used to perform insert operations. Thanks, Alok. // ---opens the database--- public void open() throws SQLException { db = DBHelper.getWritableDatabase(); } On Mon, Apr 12, 2010 at 6:20 PM, MobDev developm...@mobilaria.com wrote: do you have some code specifically showing the sequence and the syntax ? AAfaik a transaction SHOULD make it faster accroding to this documentation : http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html#transa..http://web.utk.edu/%7Ejplyon/sqlite/SQLite_optimization_FAQ.html#transa.. .http://web.utk.edu/%7Ejplyon/sqlite/SQLite_optimization_FAQ.html#tran.. . On 12 apr, 12:32, Alok Kulkarni kulsu...@gmail.com wrote: I have started the transaction before the 1st insert , and ended it after the last insert Thanks, Alok. On Mon, Apr 12, 2010 at 4:01 PM, Alok Kulkarni kulsu...@gmail.com wrote: Ok, @Yahel:- For the insertion of same records on a Palm device(Say Palm Pre) , its taking 3 seconds.. On an IPhone , its taking 1 or 2 seconds.. Here is an example of what i am doing.. private Boolean addAlbumDB(int AlbumId, String Name, String Label, int MultipleArtists, int ArtistId) { long result = -1; try { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_ID, AlbumId); initialValues.put(KEY_NAME, Name); initialValues.put(KEY_LABEL, Label); initialValues.put(KEY_ARTIST_ID, ArtistId); initialValues.put(KEY_MULTIPLE_ARTISTS, MultipleArtists); result = db.insert(DATABASE_TABLE, null, initialValues); } catch (Exception e) { Log.i(Exception in addAlbumDB, + e.toString()); return false; } if (result == -1) return false; return true; } The above function is called for around 2000 times.. Similarly there are 2 3 more functions for other tables. Thanks, Alok. On Mon, Apr 12, 2010 at 2:33 PM, Michael Rueger mike.rue...@gmail.com wrote: On 4/12/2010 10:59 AM, Yahel wrote: Hi Alok, Posting some logic, or some sql would help us see if you are missing something :) (excessive) use of indices comes to mind :-) Michael Yahel On 12 avr, 08:50, Alok Kulkarnikulsu...@gmail.com wrote: Hi, I am inserting around 7000 to 8000 records in my database having 4 tables each having 3 to 4 columns.Its taking me around 22 seconds to do the insertion which is i think is too long. I am using transaction while doing this without which its taking around 55 seconds. According to SQLite
[android-developers] Re: Flashing the android device
HTC got a page for developers on which they also have some versions of the Android OS... On that same page a whole procedure is explained regarding the flashing of those Android OS versions... It might be helpfull in your case ? For example : http://developer.htc.com/google-io-device.html On 6 apr, 17:58, emna zeddini zeddini.e...@gmail.com wrote: Hello everybody, After dowloading the source code of the android OS, I have made some modifications on it. Now I want to flash my device with the new system. How to proceed? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Retrieving OS Version
Hi, I am trying to retrieve the Android OS Version (like 1.5 or 1.6 or 2.1) and I am using this code : TelephonyManager mTelephonyMgr = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); String softwareVer = mTelephonyMgr.getDeviceSoftwareVersion(); When I try this on a ADP2 (Google Ion with Android OS 1.6) it will return 02... Is there any table or something that relates such a return value to a specific OS ? Is there any other way to actually retrieve the OS version directly, as in returns directly 1.6 ? Thanks in advance ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Retrieving OS Version
Thanks, that did the job beautifully !!! This one should be added to the FAQ or something like that :D On 6 apr, 13:59, Lance Nanek lna...@gmail.com wrote: http://developer.android.com/reference/android/os/Build.VERSION.html On Apr 6, 5:35 am, MobDev developm...@mobilaria.com wrote: Hi, I am trying to retrieve the Android OS Version (like 1.5 or 1.6 or 2.1) and I am using this code : TelephonyManager mTelephonyMgr = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); String softwareVer = mTelephonyMgr.getDeviceSoftwareVersion(); When I try this on a ADP2 (Google Ion with Android OS 1.6) it will return 02... Is there any table or something that relates such a return value to a specific OS ? Is there any other way to actually retrieve the OS version directly, as in returns directly 1.6 ? Thanks in advance ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] http POST message
Hi. I ahve been trying to send a http POST message towards my server, I have been using this code : HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(sUrl); // Add your data ListNameValuePair nameValuePairs = new ArrayListNameValuePair(1); String userAgent = Management.getInstance().getUserAgent(); nameValuePairs.add(new BasicNameValuePair(User-Agent, Test_User_Agent)); nameValuePairs.add(new BasicNameValuePair(Data, data)); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); Honestly, to me it all seems overly complicated To start off, how do I actually add a body (for example a custom XML) to the post ? Is the nameValuePairs the only option ? I'd like to ismply add a POST body with data without having to name it with a key... Any help or tips would be greatly appreciated... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] MP3 Audio Tag in MediaPlayer
Hi there, I was wodnerign if there is any way to retrieve an MP3 tag through the MediaPlayer, just like in J2ME ? Or if there is some kind of other Interface or class for that ? Thanks in advance ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] Re: Displaying a PDF file in android application
Well obviously not all J2SE functionality (and thus libraries) are compatible... You could have a look in the Reference (http://developer.android.com/ intl/fr/reference/packages.html) which of those classes (the one you were mentioning like JPanel tec) are available.. If those aren't then I'd simply say it's not compatible... You also might want to contact the distributor of that pdf library and ask which platforms are supported... On 24 mrt, 07:28, Parse paritosh6...@gmail.com wrote: Hi.. I have a pdf library to render pdf file in desktop application. I want to use it in android application. Can you help me, which layout should I use to display pdf file?? P.S. : The library displays the pdf page on JPanel, Container for desktop application. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] Activity's Thread ID
Hi, I'd like to retrieve the Thread Priority of one or more Activity's... To do so I have found the Process.getThreadPriority() method, but as an argument you have to supply the Thread's ID... That's not that bad because in the end I also needed to have that, only I can't seem to find a method for that... I have seen a Thread.getID method or something like that, but how can this be applied to an Activity, for example the main Activity of an Android app ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] Re: Help regarding Logging
well preferably I wouldn't use a 3rd party library, simply because I don't want to be dependable from someone else.. As in, if the service ceases to exist, and obviously it is a possible security leak... After all I am sending my debugging logs to them... On 16 mrt, 19:51, chris harper ch393...@gmail.com wrote: Oh and it's free. :-) On Tue, Mar 16, 2010 at 12:50 PM, chris harper ch393...@gmail.com wrote: Guys I had the same request. I wanted to monitor my app after it was out on the market to fix bugs etc. Someone pointed me to this: http://www.flurry.com/ I am incorporating it into my app now. I have not launched my app yet but I seems like what we need. It's has capabilities to report exceptions and events in your app that you want to track among other things. -Chris On Tue, Mar 16, 2010 at 7:07 AM, MobDev developm...@mobilaria.com wrote: Hi, for my application I would like to be able to incorporate some good Logging capabilities... I would also like to use the networiking capabilitites for two purposes : - first I should be able to send a Logging Level from my server to my client (Android app)... So the Logging Level should be adjustable client-side - secondly I must be able to read out the Log to send it to my server through http... I have seen there are two options in Android : java.util.Log and java.util.Logging The first one seems pretty straight forward but there are two issues with that : - can I programmatically read out the Log ? And if so how ? - I have read that specific Logging Levels are automatically ignored once an app has been deployed (like the verbose level)... Because of the fact that I might want to have verbose-level logging from the server I was wondering if it's able to actually de-ignore those Levels ? Also are there any tutorials reagrding these two packages ? And what woul you, as an experienced developer, advise me to use of those two methods ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: I don't HATE apple, but I found these interesting things yesterday, poor iphone developers.
hehe, another music app developer here, with no decent streaming app possibilities :( It's nice to have a MediaPlayer which streams MP3, but thats way way too limited.. I want it to be compatible with AAC to begin with (because of the bandwidth), and I definitely would want more control (and maybe somewhat lessi nterfaces??)... I mean you are saying it was an advanced platform in 2008, but what you want to say that it hasn't evolved since 2004, since J2ME MIDP... A class like MediaPlayer is actually based on that one (which is old and has never been updated nor up par) with the same functionality ! Even worse actually, the SE devices had a better MediaPlayer implementation 4 years ago... My personal experience, after working in J2ME and objective C, has been of utter dissapointment... On 17 mrt, 15:23, Gabriel Simões gsim...@gmail.com wrote: I do agree with you that the Apple app publishing restriction is pushing developpers too far, far enough to see some great developers give the plataform up not for technical reasons, but for their principles. On the other side, as a music app developer I don´t know how you are happy with Android. First, a lot of developers (including me) can´t even figure out how to acquire audio streams from AudioRecord and play them using AudioTrack without problems such audio chopping, sample rate differences, distortion, ... (see how many posts without solutions we have here on this group). We can´t syncronize audio input and ouput, or audio output and video, so it gets hard to develop apps that need to handle those events precisely, such as samplers, music games, music makers based on gestures, etc. We don´t have a low latency audio interface to access (ALSA would be great and it´s already working on Android ... but we can´t access it), so give up virtual instruments and low latency audio apps (small buffers aren´t available too). We don´t have native audio interfaces officially supported by Google and AudioRecord (at least running on the emulator) warns buffer overflows if you just receive audio from it and play using AudioTrack on the same thread, it doesn´t matter which buffer sizes you use. The behavior of the apps running on different devices is unpredictable while on iPhone, since the archtecture and hardware is a lot more closely related on different devices and thought to be compatible, it ´s a lot easier to predict, test and publish apps that you know that will run as great as you intended them to be. On Android this is not something up to the developers to do, but to Google and the device developers that should garantee compatibility with the OS and what runs on top of it. I´m working on Android mostly because of Apple´s restrictions on it´s plataform, on publication, on development, on resources usage... But yes, I think Android still needs to play ball, and play a lot to catch iPhone + IphoneOS. And I hope it doest it! On 17 mar, 10:04, niko20 nikolatesl...@yahoo.com wrote: First off I like to write music apps, so I keep an eye on the music apps that are out for iPhone. Two of these really popular apps are BeatMaker and Noise.IO. Beatmaker is a sample driven sequencer MPC style, and Noise.IO is a full featured FM synth. I read something disturbing in the app info yesterday that shows just how much power Apple has over developers. In the past Beatmaker and Noise.IO had formed a way to share data - the ability to export a synth sound out of Noise.IO and import it into Beatmaker. It looks like Apple now forced them to change how this sharing works - in fact so much so that currently the export feature in Noise.IO is GONE! And the lastest reviewers of the app aren't happy about it LOL. And the Beatmaker app indicates that import is gone in the current update. Imagine LOSING functionality in an update! Wouldn't that piss off a customer! Anyway the Beatmaker page mentions something about having to switch over to Apple's copy/paste functionality instead of the way they were using before, and that this was requested by Apple. So that makes me feel much better about Android, I think it sucks when a product that has been out for a long while already, and now Apple comes in and bullies the developers to break their software basically for no good reason except they want some control over how stuff is done. How obnoxious. Also, I dont see how Apple is so groundbreaking. I was looking up specs on the iPhone OS 3.0 yesterday, and it didn't come out until June/July 2009, this is when it finally got copy/paste, MMS, and Push notifications. By the way Push notifications are where an app can get notified to start when it receives some data, even though the app isn't running. Well, Android was well along the way already back in 2008 and it had Widgets and Intents, which do this already. Push notification is just a widget with an intent basically, and it came out much later. I
[android-developers] Help regarding Logging
Hi, for my application I would like to be able to incorporate some good Logging capabilities... I would also like to use the networiking capabilitites for two purposes : - first I should be able to send a Logging Level from my server to my client (Android app)... So the Logging Level should be adjustable client-side - secondly I must be able to read out the Log to send it to my server through http... I have seen there are two options in Android : java.util.Log and java.util.Logging The first one seems pretty straight forward but there are two issues with that : - can I programmatically read out the Log ? And if so how ? - I have read that specific Logging Levels are automatically ignored once an app has been deployed (like the verbose level)... Because of the fact that I might want to have verbose-level logging from the server I was wondering if it's able to actually de-ignore those Levels ? Also are there any tutorials reagrding these two packages ? And what woul you, as an experienced developer, advise me to use of those two methods ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Which Android device is best, cheapest for 2.1?
Well if you are guessing it might be a complete rewrite you might want to try the emulator first ? Just make your software and test it thorough the several emulator- configurations ? That might save you money (and time, you can get ahead right away) at the beginning and it might buy you a couple of months for the next-gen android phones to get available (HTC Desire/Legend) or even an older HTC Hero with the new update (to 2.1) which will be coming somewhere next month... On 12 mrt, 22:10, DemonDuck kwarner...@verizon.net wrote: I will need an Android device (phone, netbook, whatever) eventually. I'm a Java programmer and use Eclipse and will be *trying* to develop a panorama viewer based on the work I've done on my Java panorama viewer -- http://pancyl.com/BloodMountain.htm I understand the Android version will be almost a complete rewrite but I would like to have some sort of idea of what capabilities my target device should have. I guess some sort of phone would be a good target device but I don't have a clue as to which one or where to get it. I don't particularly want to activate it. I just want it for development purposes. GPS is a definite must as is compass and accelerometers. Any suggestions about which device(s) I should look at? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: New Android SDK Tools, Eclipse plug-in and NDK
hhmm, any idea if there will be some low level support through NDK for MediaPlayer or any more direct about audio-buffers and codecs ? Anyways, good work ! It's good to see there is still a good amount of progression ! On 9 mrt, 03:17, Mario Zechner badlogicga...@gmail.com wrote: Awesome! OpenGL ES 2.0 support in the NDK! Any eta for the Java bindings? On 9 Mrz., 00:27, Xavier Ducrohet x...@android.com wrote: Hello everyone, As you may have seen on our blog this morning, we have released a new version of the NDK (revision 3). Release notes are available athttp://developer.android.com/sdk/ndk/index.html We have also released revision 5 of the Android SDK Tools. This is available through the SDK updater. Release notes:http://developer.android.com/sdk/tools-notes.html To go with these new tools, we have released a new version of the Eclipse plug-in (0.9.6). Release notes:http://developer.android.com/sdk/eclipse-adt.html The new tools and new plug-in are required to access the SDK repository. If you are using rev 4 you can update the tools through the SDK updater normally before seeing the rest of the repository. If you have a prior revision of the tools (rev 3 or earlier), please download the main package fromhttp://developer.android.com/sdk/index.html Xav -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. 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] Android Library
Hi, I'd like to create a own Android Library, as in a JAR file with specific functionality which I can later re-use in future projects... This Library will also include basic Archtiecture components... Now I was wondering what type of Project should I be using for this in Eclipse ? Should it be a specific Android Project (thus having all res/gen/ R.java/AndroidManifest etc) or just a normal plain Java project ? The first option would obviously be specific for Android, including and importing Andorid-specific api's... But to me it seems that such a project is only usable for an application and not a library ? The second option would make it more like a simple clean Api/Library, but might obviously try to use specific Java libraries which aren't accessible in Android... So my question woul be : is an Android Project usable for creating a Library (JAR) ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Piracy, almost 50% of my new users - Seriously Google?
I was just curious, for those 29 who asked a refund will hou just refund the app-price or will you refund 4 GBP per single app ? Thanks in advance On 28 feb, 10:26, Al Sutton a...@funkyandroid.com wrote: We put Purchase Checking in at AndAppStore for exactly this kind of reason (http://andappstore.com/AndroidApplications/ purchase_checking.jsp). Google, and particularly the Market team, seem to be very slow at taking things on board an delivering what developers want, so I'd suggest using the market feedback forum instead of this group because I'm not sure if any of the Market team actually subscribe to this group, and thus may never see your comments. Al. On Feb 27, 3:56 am, Xavier jxlar...@gmail.com wrote: I published my first (and apparently last) Android application Wednesday 10pm. By now Google Checkout reports 203 orders (29 of those refunded). My app also includes the Furry analytic library. So far it reports 377 new users. A discrepancy of almost a 50% of users which only led me to believe its piracy related. Is it really so easy to pirate Android applications sold through the Android Market even though they have a copy protection feature? This is unbelievable. My app is also available for the iPhone since November, have sold almost 40.000 copies with a piracy % of less that 5%. What the hell Google? If this continues I'd have no choice but remove the app from the Android Market since the app heavily relies on a server back-end which costs me bandwidth and resources. Why on earth can't you implement a simple callback when the purchase is done with the device UID so we can check for this when the app runs? This would solve everything. Pirates would have to crack the app itself to disable this protection but its infinitely harder than just copy the apk file and upload it to rapidshare. I hope I can get an answer from a Google engineer. Regards, Xavier -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Retrieve Log
Hi, I am logging within my app through Log.d() calls, now I was wondering though : - if there is a Log (as in a file) being created whilst using these calls ? - if there is a way, and if so how, to retrieve this File/information so that I could (for example) send it to my server ? Thanks in advance ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Singleton Service ???
actually I had a question regarding this... I made a service which plays an MP3, so it uses a single instance (in the whole service) of MediaPlayer.. Still I noticed (by mistake because the Service didn't get closed while exiting my main Activity) that the Service obviously kept running, but when I restarted my app it created another Service which also could play the MP3, thus creating a mixing effect, having the same MP3 playing double... The second one I could stop through my App but the first lost one couldn't be stopped... To me this doesn't look like a Singleton's behaviour, I actually have two seperate entities of a Service running in the system... Also, a little question, I use the onBind() method and the .aidl interface methology to create my Service... Is there a correct way to stop a Service ? And if so where should this be implemented (for example unBind() in the onDestroy() method of my main Activity) ? Thanks in advance Mark (or anyone who might shed some light on my issue) ! On 11 feb, 17:11, Mark Murphy mmur...@commonsware.com wrote: I'd like to know if it's possible to create a Singelton Service throughout an application ? Services are singletons by their very nature. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Singleton Service ???
Lol, I see I actually forgot to place the question in the first part of my previous post :D That is : if a Service already is running, is there some way to bind to it when my app starts up, and/or programmatically check if it's already running ? So that I won't be having 2 separate Service entities that do exactly the same... On 23 feb, 11:44, MobDev developm...@mobilaria.com wrote: actually I had a question regarding this... I made a service which plays an MP3, so it uses a single instance (in the whole service) of MediaPlayer.. Still I noticed (by mistake because the Service didn't get closed while exiting my main Activity) that the Service obviously kept running, but when I restarted my app it created another Service which also could play the MP3, thus creating a mixing effect, having the same MP3 playing double... The second one I could stop through my App but the first lost one couldn't be stopped... To me this doesn't look like a Singleton's behaviour, I actually have two seperate entities of a Service running in the system... Also, a little question, I use the onBind() method and the .aidl interface methology to create my Service... Is there a correct way to stop a Service ? And if so where should this be implemented (for example unBind() in the onDestroy() method of my main Activity) ? Thanks in advance Mark (or anyone who might shed some light on my issue) ! On 11 feb, 17:11, Mark Murphy mmur...@commonsware.com wrote: I'd like to know if it's possible to create a Singelton Service throughout an application ? Services are singletons by their very nature. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Menu throughout Application
Hi, I have implemented a Menu within an Activity, but I'd like this Menu to exist throughout my whole application... How can thsi be achieved ? Should I be placing the public boolean onCreateOptionsMenu(Menu menu) method within every single Activity or is there some way to share the menu ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Images are unsharp/blurry
Hi, I have been developing on a ADP2 (Google Ion) with a standard screen size (with a resolution of 320x480)... Our designer made some pretty neat Images with which to create the GUI, and when placing everything within the layout XML files it looks pretty good... That is, on the Eclipse renderer, the one who shows you how it will look like on the device... Thus not the emulator itself... Unfortunately when run on the real device the supercrisp and beatifull images become blurry and unsharp... I actually do'nt see why this should happen ? Everything has been designed whilst keeping the target devices resolution into account... Is this because most probably the dpi of the screen on which the Images were (big 24 inch screen) is different that the devices ? And if so how can this be corrected (maybe within the designers application as well, I think he uses Photoshop)... Thanks in advance for any 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
[android-developers] Re: Images are unsharp/blurry
oki I soved this myself :P Had to place my images and resources under the drawable-mdpi folder... when I created the project for some reason the IDE itself created and placed nearly everything under the drawable-hdpi folder... On 11 feb, 10:16, MobDev developm...@mobilaria.com wrote: Hi, I have been developing on a ADP2 (Google Ion) with a standard screen size (with a resolution of 320x480)... Our designer made some pretty neat Images with which to create the GUI, and when placing everything within the layout XML files it looks pretty good... That is, on the Eclipse renderer, the one who shows you how it will look like on the device... Thus not the emulator itself... Unfortunately when run on the real device the supercrisp and beatifull images become blurry and unsharp... I actually do'nt see why this should happen ? Everything has been designed whilst keeping the target devices resolution into account... Is this because most probably the dpi of the screen on which the Images were (big 24 inch screen) is different that the devices ? And if so how can this be corrected (maybe within the designers application as well, I think he uses Photoshop)... Thanks in advance for any 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
[android-developers] passing values from Activity to Activity
Hi, I have an app which makes use of several layout-views...Every layout- view also got a class for it, which extend the Activity class... One class for example retrieves some database values whilst offering a search form to the user... Afterwards the user can select one of those values and he gets presented with another screen which gives similar options as the one selected... Anyways, I'd like for the first Activity to be able to send an array with data (Strings for example) to the second one... Right now I show an activity by using : Intent i = new Intent(this, activitysName.class); startActivity(i); I have no idea whilst using this construction how I can initialize the new object with the String array I want to pass to it... So how should this be achieved ? Should I be using something else instead of an Intent-Activity combination ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: passing values from Activity to Activity
Call getStringArrayExtra() on the Intent in the receiving Activity to get it back. I have no Intent in the receiving Activity ? Or is that the Bundle which comes with public void onCreate(Bundle savedInstanceState) ? On 11 feb, 13:46, Mark Murphy mmur...@commonsware.com wrote: Anyways, I'd like for the first Activity to be able to send an array with data (Strings for example) to the second one... Right now I show an activity by using : Intent i = new Intent(this, activitysName.class); startActivity(i); I have no idea whilst using this construction how I can initialize the new object with the String array I want to pass to it... So how should this be achieved ? Should I be using something else instead of an Intent-Activity combination ? Call putExtra() on the Intent after construction to attach the String array. Call getStringArrayExtra() on the Intent in the receiving Activity to get it back. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: passing values from Activity to Activity
aha ! look at that ! thanks a lot for the answer it helped me out :D I have to say that It's all pretty confusing, you got your Java class, your XML layout, your activity, your Intent, your Context, your bundles etc... Inter-object communication isn't very easy (or at least not as transparant as in J2ME), just passign a reference and using its get/ set methods or whatever... Well I did get your book (together with other 4 books!), and after this first hacked demo for our app I will be investing much more time into this complex hierarchy of classes and methologies... On 11 feb, 14:10, Mark Murphy mmur...@commonsware.com wrote: Call getStringArrayExtra() on the Intent in the receiving Activity to get it back. I have no Intent in the receiving Activity ? Call getIntent() to get the Intent that launched the Activity. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Singleton Service ???
Hi, I'd like to know if it's possible to create a Singelton Service throughout an application ? Let's say I'd like to cerate a Service to play some mp3... I'd like it to be a Singleton, we don't want two mp3 tracks playing through each other (well maybe some would want that, but in my case I'm not making a DJ app) :P Also this Service should be somewhat dynamic as in there should be some interface so that I can stop, pauze and play the mp3 file/ stream... Now I have a couple of questions : - is this feasable ? - should I be using a Service or something else ? - how can an interface be set up inbetween an application and a service so that I can start, stop, pauze stuff ? - can there be something like a Singleton Service ? Thanks in advance for any 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
[android-developers] Re: Singleton Service ???
well, thats a good thing especially in my situation :D Now my next most prioritized question, can I communicate with a Service ? Are there some kind of interfaces for that ? Btw, you are a fast responder Mark ;) Thanks for your interest and time :D On 11 feb, 17:11, Mark Murphy mmur...@commonsware.com wrote: I'd like to know if it's possible to create a Singelton Service throughout an application ? Services are singletons by their very nature. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Help Needed With Some Layout - UI Problems
well the idea of a tablelayout with just one row is that I want to place two items, one on the left side of the screen and one centered within the screen... so if you have any idea how to achieve this ? Or will a horizontal linearlayout fix that ? I am having a lot of trouble, I love the fact that it's all so customizable but it's somewhat TOO customizable.. I mena if I place a Widget onscreen afterwards I got like 40 fields with options to set... Some are completely criptic, many have a Gravity AND a Layout_Gravity.. what's up with that ? If I place the gravity on horizontal_centered it won't work but if I set the property layout center horizontal to true it will... So I got 3 options, who all seem to do the same but some will work the others won't and God help us there is no good explanation/documentation about it... Anyone up to finding the needle in the haystack ? ;) On 8 feb, 19:38, TreKing treking...@gmail.com wrote: On Mon, Feb 8, 2010 at 8:56 AM, MobDev developm...@mobilaria.com wrote: A vertical LinearLayout, which contains first a TableLayout with just one TableRow What's the point of having a TableLayout with just one row? Why not just use a horizontal LinearLayout? - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Involuntary Scrolling, help !
Hi, I have created a somewhat complex RelativeLayout, in which I also have specified it's width and height as fill_parent.. Now I noticed that even though all my extra widgets within this Layout won't get bigger than the height of my test-device (480px) the whole Layout will scroll somewhat to the bottom... When this happens a black void will apear on top (obviously, the whole thing scrolls downwards), and when scrolling back up it won't close the whole gap and will look like it actually is still scrolled somewhat downwards... Actually, I'd like this Layout to be able NOT TO scroll AT ALL... Any ideas on how this can be achieved ? Also I don't use any scrollviews nor have I set any of the Widgets as Scrollable... Als, whilst I'm typing :P, is there some way to completely negate the moving the phone from portrait to landscape mode ? I am just setting up a first demo of my app and because of time-contraints I only want it to be able to handle portrait mode... Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Question regarding Threads and Services
Hi, I'd like to create some sort of Thread which can be accessed by my main program.. Specifically I'd like two classes, both with their own thread, one for parsing XML data and one for doing database operations, without actually interfering with the main UI-thread (slowdowns for example)... I was wondering if those should just extend Runnable, and maybe make them some sort of Singleton, or if these should be implemented as a Service ? Or maybe they shouldnt be implemented at all as an individual Thread ? Are there any known better approaches ? Also I'd like to know how to communicate data (for example requesting or saving some data from the database Service) inbetween my nain app and a Service, and if this is a smart idea in it's whole ? Thanks in advance for any tips, pointers, help or code :D -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Question regarding Threads and Services
Hi Mark, first of all thanks for your answer :D I come from a J2ME background in which I had the same problem, i.e I need to have a always-existent database interface and a always- existent xml-parser which (in J2ME) I placed in a singleton Thread, so that they could be paused when needed and they could get to work when, well, they needed to parse data and/or write/retrieve data :D My knowledge atm is pretty lacking regarding all those things of Android (like activities, tasks, Context or the mentioned asyncTask and intentService) but having a marketing peep as a boss I have a very strict deadline (next monday) to set up a first demo of the app... For me this means I cannot dig too deep into the subjects and most probably I could use the simplest possible implementation... The problem with Threads in the form of a SIngletong(as I undertsood from the selective reading I have done) is that those can be closed anytime by the underlying OS, which in my case would block the whole app :P Also the quesiton remains about inter-class (or in this case interprocess) communication ? How can this be done safely but most importantly as fast as possible in regards to studying theory for it ? Thanks again Mark... On 9 feb, 13:53, Mark Murphy mmur...@commonsware.com wrote: Hi, I'd like to create some sort of Thread which can be accessed by my main program.. Specifically I'd like two classes, both with their own thread, one for parsing XML data and one for doing database operations, without actually interfering with the main UI-thread (slowdowns for example)... Use AsyncTask for each of these. I was wondering if those should just extend Runnable, and maybe make them some sort of Singleton, or if these should be implemented as a Service ? Use AsyncTask, perhaps mediated by a Service. I'd probably use a Service, only because I like a stable foundation where I can get it, and activities tend to be twitchy (e.g., user presses BACK, and they get destroyed). But, since you're asking this in a very abstract fashion, I have no idea if a Service is necessarily right for your case. Another possibility, instead of AsyncTask, is to use an IntentService. They both allow you to do work in the background without your own thread management. I tend to use IntentService more for totally asynchronous stuff (e.g., app widget updates, alarms with AlarmManager, etc.), where I want the service to go away when there's no outstanding work to do. Or maybe they shouldnt be implemented at all as an individual Thread ? Forking your own threads should only be taken after you have investigated AsyncTask. AsyncTask doesn't handle every scenario where you might use threads. However, since AsyncTask lets you do background work without your own thread-management code, it is definitely worth looking into. At the risk of sounding self-serving, you might want to look into getting a book that covers threads and services in Android. The questions that you are asking are rather involved -- I've barely scratched the surface of the subject in this reply. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Sending some data when requesting XML
Hi, I have been using this code to parse some XML data from a specific server : URL url = new URL(http://myserver.com/someXMLScript;); URLConnection conn = url.openConnection(); InputStream is = conn.getInputStream(); Xml.parse(is, Xml.Encoding.ISO_8859_1, new ExampleHandler(myAdapter, this)); Now I was wondering can I add a String or something to this request so that, for example, I might be supplying the device's unique ID to this request for the XML file ? So I don't just want to parse the XML but I also want to send along a String... Thanks in advance ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Sending some data when requesting XML
hhmm oke, I was hoping in something more POST-like instead of GET-like :D Is that possible ? On 9 feb, 17:22, Frank Weiss fewe...@gmail.com wrote: Simple. Add query parameter to the URL. Example:http://myserver.com/someXMLScript?IME=A7G -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Question regarding Threads and Services
owh mostly for being more memory efficient ? :D I have tried with the AsyncTask, which seemed like a great option for me (especially being able to do an updateProgress) but unfortunately my situation is somewhat more complex :( In my situation I have a main class (with the main UI Thread obviously), then I have the piece of code I pasted at the beginning which starts the parsing (which I placed within a AsyncTask) and then obviously I have my ExampleHandler for the actual XML parsing... So i'd like to show on the UI how far the parsing is, especially because atm while debugging my device takes 3 whole minutes to debug around 1800 XML Elements ! The problem obviously relies in the fact that the call to the parsing is in the AsyncTask, NOT the ExampleHandler itself, and it's the ExampleHandler who knows how far it is with parsing... So my question would be : Is there some way for me to keep the Xml.parse() code in a AsyncTask class and actually get the updates from within the Handler ? Also, does a Handler actually spawn it's own Thread, btw my ExampleHandler extends DefaultHandler ? Should I be placing the ExampleHandler (or extending it) within a AsyncTask instead of the call to Xml.parse() ? I am actually somewhat confused atm :( On 9 feb, 17:32, Frank Weiss fewe...@gmail.com wrote: The AsyncTask pattern already provides a thread (from a pool) that you can use anytime you need one. It's not at all clear why you need a singleton XML parser. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 some data when requesting XML
well maybe out of security reasons ? mostly because of the fact that the used server already reads out POST requests instead of GET... hhmm, I guess that with httpClient I cannot use the uber-simple code I am using at the moment :P for parsing that is :D On 9 feb, 17:45, Frank Weiss fewe...@gmail.com wrote: Why post instead of get? I think you may need to use HttpClient then, but I'm not sure. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en