[android-developers] Re: AudioTrack lag
Things like ring buffers are still the same idea, but I won't explain how they're the same, because it would make the explanation more confusing. Just hold onto the core idea -- the receiver and sender of data each have their own buffers. Heartfelt thanks for this great explanation. I am a driver guy and i fully understand the concept of ring buffer mechanism and how it used in ALSA.What i don't understand is that sometimes write(){called by audioflinger} function call takes some time to return(probably because of driver bug or latency) and sometimes it doesn't return at all causing problem as shown below: obtainBuffer timed out (is the CPU pegged?) in audiotrack.cpp Is this buffer same as what is being allocated in the case of streaming(sharebuffer = 0) in audioflinger.cpp file(constructor of trackbase) mCblkMemory = client-heap()-allocate(size); If not then which buffer is this and where was it allocated.How can i avoid getting this error other than solving it in driver?I don't mind dropping some frames. In the static case i guess when we call write() of audioflinger the java pointer is directly passed to audiodriver by copying and we don't maintain any buffers in this case? And what is this track(audioflinger point of view)?How many tracks are going to be created if i am playing music and what will be it's size?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Market Changed ranking
same here - last time I checked my free app didn't even make make top 100 in its category despite 4.5* and 40k DLs, and now it's around #60. There are still apps with 2x lower rating and DL count sitting some 20-40 places above mine, but it's a nice change On Feb 19, 11:44 am, Mr Pants pantssoftw...@googlemail.com wrote: Hi Erm did something happen to the ranking system today? My app seems to have shot up a bunch of places in it's category. Obviously I'm not complaining - just curious:) Anyone else noticed anything? Thanks Ps - I'm in UK (not sure if this makes a difference) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Android Market Changed ranking
Can I develope advertisement screen in app. Anyone knows will google allow to advertise with my app. Regards, Narendra On Sun, Feb 21, 2010 at 3:05 PM, Vladimir vladimir.funti...@gmail.comwrote: same here - last time I checked my free app didn't even make make top 100 in its category despite 4.5* and 40k DLs, and now it's around #60. There are still apps with 2x lower rating and DL count sitting some 20-40 places above mine, but it's a nice change On Feb 19, 11:44 am, Mr Pants pantssoftw...@googlemail.com wrote: Hi Erm did something happen to the ranking system today? My app seems to have shot up a bunch of places in it's category. Obviously I'm not complaining - just curious:) Anyone else noticed anything? Thanks Ps - I'm in UK (not sure if this makes a difference) -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Regards, Narendra B 9632382960, Bangalore. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: (TabActivity) How to switch tab from within a sub activity
I'm sorry, but I don't understand what you mean :( Actually, my sub activities are one MapActivity and one ListActivity... Thank you for your help On 17 fév, 17:47, Mark Murphy mmur...@commonsware.com wrote: ColletJb wrote: How can I access that method (setCurrentTab()) from a classic activity ? This method is only defined for TabActivity... Simple: get rid of the other activities. I really wish developers would stop doing that -- all you do is make your life more difficult. Just make the tabs be views in the TabActivity. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.9 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] Downloadable apks
Hi, I have noticed that some apk's that cost money on android market are available to download from some torrent sites for free. I don't think many of the developers here enjoys that very much. So my question is if there are ways in Android to get around this so that you can't copy a program from device to device? regards André -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layout resource: FWVGA vs. WVGA
Alright, thanks for the info, I'll go with a custom layout manager then. Cheers! On Sun, Feb 21, 2010 at 3:47 AM, Dianne Hackborn hack...@android.comwrote: The long qualifier is for something significantly longer than the original standard HVGA screen, nothing more than that. Absolutely positively do not use the old raw screen size qualifiers; this simply do no work, and you can pretty much assume that you will not get what you want in some specific device configurations. Honestly, resource qualifiers are just not the level at which to work for oh there might be 50 more pixels available for me to put an extra row of buttons. I think you would be better of designing a single layout the gracefully adjusts when there is less space. You may want to write your own layout manager for doing that kind of logic (we don't really have a layout manager that can do include this view if there is space stuff), but that's not hard to do. On Sat, Feb 20, 2010 at 4:24 PM, freezy phree...@gmail.com wrote: Thanks for the fast reply Dianne. I think I understood the whole density/size vs pixels approach, but this is an issue about aspect ratios. Android already *has* that distinction with the long/notlong qualifier, just that the WVGA/FWVGA distinction is not made. My layout is maybe a special case. It is a presentation of a remote control[1] that simply would contain an additional row of buttons on FWGA (or let's say 1.78 vs 1.66 aspect ratio) resolutions. There is no keyboard whatsoever. So am I right that in this case all I have is the deprecated 123x456 qualifier? [1] http://android-xbmcremote.googlecode.com/svn/trunk/Documentation/Images/v0.5.0/remote_portrait.png On Sun, Feb 21, 2010 at 1:04 AM, Dianne Hackborn hack...@android.comwrote: No, there deliberately isn't. At that level, you really shouldn't be creating distinct layouts -- I'd strongly encourage you to design a layout that can resize appropriately to adjust for the screen. (long is to distinguish between HVGA and large screens like WVGA/FWVGA). Larger picture, you really should avoiding having layouts for different screen sizes as much as possible. You can already see with the number of sizes we have that this is just not scalable: QVGA, HVGA, WVGA (both med and high density), FWVGA (both med and high density), and of course both portrait and landscape versions of all of those. And in the future you should expect even more varieties (wider screens, larger screens, maybe even smaller screens). Also for a given size -- say FWVGA -- there is not a guarantee of exactly how much space you may have. For example a device may have a slightly smaller or larger status bar that impacts the space you have. And then if you are taking user input, there is the whole impact of the soft keyboard being displayed and thus reducing the space available for your UI during that time. So we strongly encourage that developers make use of the dynamic layout manager in the framework to design their UI to adjust for the exact space they have available. On Sat, Feb 20, 2010 at 3:51 PM, freezy phree...@gmail.com wrote: Hello there, This seems like a simple problem to me, but I can't figure it out. I have a fullscreen layout that displays differently if the screen is taller (854 instead of 800 pixels). I've tried putting the xml into layout-notlong-hdpi and layout-long-dpi respectively, but both my WVGA and FWVGA emulators go for the long version (as described in the doc). Is there any way to distinguish between the two besides using the deprecated -800x480/-854x480 qualifiers? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.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
Re: [android-developers] How to start application after pressing particular key?
pramod.deore wrote: How can I start my android application after pressing particular key? After pressing a particular key...where? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in US: 14-18 June 2010: http://bignerdranch.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] How to start another application from my activity.
I want to know if there is any way to start another application from within my application. Specifically i am trying to a have a shortcut (button) to Google Maps Application within my application. Also is there any way to start another process from within my android appplication? Regards, Aishwarya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Non-parallel construction of DatePicker and TimePicker
DonFrench wrote: I was surprised and dismayed to discover that the DatePicker and TimePicker classes, which are of parallel construction in almost every way, differ in one significant way. There is no setOnDateChangedListener(...) method in DatePicker while there is a setOnTimeChangedListener(...) method in TimePicker. For two classes that parallel one another in every other way, including the appearance and operation of their corresponding Views, why do they diverge in this fairly important aspect? I eventually discovered that there is a way to set the OnDateListener through the init(...) method, but COME ON! Was this just an oversight on Google's part? I hope that they fix this in a coming release. This was requested as an enhancement request about a year ago: http://code.google.com/p/android/issues/detail?id=2006 If it is important to you, you are welcome to make a patch and submit it for inclusion in an upcoming release. Or, perhaps just star that issue, since at present, virtually nobody else seems to care about it, so it is not likely to be dealt with any time soon. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in US: 14-18 June 2010: http://bignerdranch.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: Trouble: Windows XP detecting Nexus One by USB
Same problem here. XP32 SP3. Here's what I did/see: - I took same care to make sure no instances of older driver files were on my computer. - I then manually installed the new R3 driver that was downloaded by the SDK Manager. - I plugged in both my ADP1 and my Nexus One. Both have USB Debugging enabled. - In the Windows Device Manager I see 2 x Android Composite ADB interface - adb shell lists the ADP1, but not the Nexus One. - When mounting the SD card, I can see files on the ADP1, but not on the Nexus One. On Feb 11, 7:31 pm, DonFrench dcfre...@gmail.com wrote: Are you by any chance using XP-64? If there is a way to make the phone visible on that platform I haven't found it but I have no problems on Windows 7. On Feb 10, 7:10 pm, Coltin ultran...@gmail.com wrote: 'adb devices' returns 'List of devices attached' followed by nothing, and eclipse doesn't pick up myNexusOne. I've installed the drivers for 'Android Composite ADB Interface'. I've set myNexusOneto 'Development:USBdebugging'. I've connected the device to my computer. It's listed under the 'Safely removed' devices interface, but still nothing. Am I missing something? I used this to set up theUSBdriver:http://d.android.com/sdk/win-usb.html And I followed instructions here:http://d.android.com/guide/developing/device.html I can access the SD Card easily enough, but I'm looking to test my app with eclipse. I've been looking for an answer for a couple of hours, but I haven't had any luck. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Downloadable apks
André wrote: I have noticed that some apk's that cost money on android market are available to download from some torrent sites for free. I don't think many of the developers here enjoys that very much. So my question is if there are ways in Android to get around this so that you can't copy a program from device to device? A person with a rooted device can copy whatever (s)he wants. You need some form of DRM to prevent such copies from (readily) working on other devices, such as: http://andappstore.com/AndroidApplications/licensing.jsp -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in US: 14-18 June 2010: http://bignerdranch.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] Unexplained error from MediaPlayer
My code tries to play an MP3 file from res/raw. FileDescriptor fd = appContext.getResources().openRawResourceFd(R.raw.ringtone) .getFileDescriptor(); player = new MediaPlayer(); try { player.setAudioStreamType(AudioManager.STREAM_RING); player.setDataSource(fd); player.prepare(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); player = null; return; } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); player = null; return; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); player = null; return; } player.setLooping(true); player.start(); The log shows: 02-21 15:18:18.360: ERROR/PlayerDriver(51): Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported 02-21 15:18:18.380: ERROR/MediaPlayer(693): error (1, -4) 02-21 15:18:18.390: WARN/PlayerDriver(51): PVMFInfoErrorHandlingComplete After player.prepare() is called. I really don't have a hint. I won't use MediaPlayer.create() because I need player.setAudioStreamType(AudioManager.STREAM_RING); Would appreciate any help on 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: How to start another application from my activity.
Thanks a lot. It worked. Can i provide some more specific intents to the maps application? I am trying the geo: _lat _long So what other parameters can it take apart from latitude and longitude. can i send a search query (say a pointer to all the medical stores in the vicinity) to the map application. And also how to set the default zoom level? I know one can implement all this using Google MAPS API, but then i arrive at a serious trouble, The trouble is that i cannot use the features such as Call, adding the query result to my contact book. I do not want to reimplement all the functionality offered by the google map application inside my own application. I just want to use the Google map application from within my app,and do not want to rewrite it. On Feb 21, 6:08 pm, Mark Murphy mmur...@commonsware.com wrote: aishwarya shukla wrote: I want to know if there is any way to start another application from within my application. Specifically i am trying to a have a shortcut (button) to Google Maps Application within my application. Also is there any way to start another process from within my android appplication? Call startActivity() on an appropriate Intent. Here is an example app that launches Google Maps: http://github.com/commonsguy/cw-android/tree/master/Activities/Launch/ -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in US: 14-18 June 2010:http://bignerdranch.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to start another application from my activity.
aishwarya wrote: Thanks a lot. It worked. Can i provide some more specific intents to the maps application? I am trying the geo: _lat _long So what other parameters can it take apart from latitude and longitude. can i send a search query (say a pointer to all the medical stores in the vicinity) to the map application. And also how to set the default zoom level? http://developer.android.com/intl/de/guide/appendix/g-app-intents.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Get the user name associated with the device?
Hi, How I can get the user name associated with the device? For example when you comment on market it aromatically use the name that is associated with the default gmail account. Is it possible to get that name? Thanks and regards, Atif -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Downloadable apks
Thats a good solution! Thanks! On Feb 21, 2:13 pm, Mark Murphy mmur...@commonsware.com wrote: Andr wrote: I have noticed that some apk's that cost money on android market are available to download from some torrent sites for free. I don't think many of the developers here enjoys that very much. So my question is if there are ways in Android to get around this so that you can't copy a program from device to device? A person with a rooted device can copy whatever (s)he wants. You need some form of DRM to prevent such copies from (readily) working on other devices, such as: http://andappstore.com/AndroidApplications/licensing.jsp -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in US: 14-18 June 2010:http://bignerdranch.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: using charts in android applications
The best charting component at this time is aiCharts (http:// www.artfulbits.com/Android/aiCharts.aspx). On Feb 18, 9:16 pm, Ilya ulyanov...@gmail.com wrote: Hi all! How can I build a pie chart in my application? Thank you! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Building a copy of a native Android system app
I need to create a slightly modified version of one of the native Android apps (to be precise: of packages/apps/Mms). For the sake of this discussion, please ignore the fact that this is a bad thing to do; that it will be version-dependent and fragile; etc. I'm aware of these issues and need to ignore them for the now. I simply want to build a copy of the app that I can install on a device. My first attempt was to copy the code into my standard Eclipse environment. This might work eventually, but I hit a huge spiral of dependencies... each time I copied code, it would bring in dependencies which forced me to copy more system code bringing in more dependencies. Second attempt was to build within the OS source framework (lunch, mmm, etc). I copied the Mms tree and made the obvious changes to package name, etc., to create a duplicate of the app. This installed and mostly runs! But, I am getting crashes in a couple of cases; looks like static lookup is failing on some system methods. The one I've seen so far is probably a red herring... for silly temporary reasons, I built from the 1.5 sources and tested on a 1.6 device. I'll be testing on the correct device in a day or two. But, before I dive too deeply down this rat-hole of ugly kludging 1) Will this really work? Or will I just hit another known trap soon? 2) Is this the best/only way to rebuild a system app? Thanks, David -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: user agent of the device ..
I wanted to the browser ua string. i am writing an app to programmatically verify the uastring to see if the oem has changed it from the standard android ua string. -Dan On Sat, Feb 20, 2010 at 11:31 PM, Bob Kerns r...@acm.org wrote: If you're using a WebView, the answer is yes. WebView webview = ...; WebSettings settings = webview.getSettings(); String uastring = settings.getUserAgentString(); I don't know of a way to ask the Browser application itself -- but if you're doing this level of stuff, you may be wanting more control anyway, and want to use a WebView. What would you do with this information in an app? I guess you could run a little web server in your app, direct the browser to it, pick up the UA string, and redirect to somewhere else. Bleh. A whole lot of hackery for something that hardly ever changes. On Feb 19, 11:21 pm, Dan Raaka danra...@gmail.com wrote: is there a way to get the User Agent of the Browser on the android device pro grammatically from within an app ? -Dan -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: question regarding pv player
No. MediaPlayer.java uses PV Player internally. On Feb 20, 2:32 am, zeeshan genx...@gmail.com wrote: Hi Dear, is PV player API available at Android application level? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: getContextMenuInfo() returns null on sub-menu MenuItems
Are you using this code? AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo(); For ExpandableListView, you have to use ExpandableListContextMenuInfo. On Feb 20, 9:06 am, TreKing treking...@gmail.com wrote: Folks, I have an ExpandableListView with a registered context menu (loaded from an resource file). When an item is selected I use the getMenInfo() function to get the ContextMenuInfo associated with the context menu for the clicked item to determine the index of the group and / or child that was clicked. Now, this works great if the item selected is part of the main context menu. However, if the item selected is part of a sub-menu, getMenuInfo() returns null. This seems wrong. Why wouldn't you be able to get the menu info from a sub-menu? I am getting around this by saving the menu info off when it's created, but this seem hacky. Is this a bug, intended behavior, or am I just missing something obvious? Has anyone gotten this to work like this? Thanks. - 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
Re: [android-developers] Re: user agent of the device ..
dan raaka wrote: I wanted to the browser ua string. i am writing an app to programmatically verify the uastring to see if the oem has changed it from the standard android ua string. Step #1: Write a rudimentary HTTP server in Android. Step #2: Point the browser to your HTTP server's port (e.g., http://127.0.0.1:8080) Step #3: Read the User-Agent header Step #4: Shut your HTTP server down before somebody gets hurt -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Using ContentResolver to add a contact in the mobile
Hi, thanks for your help, but unfortunatelly it dones't work... in this line: Uri uri = Contacts.People.createPersonInMyContactsGroup(getContentResolver(), values); I get a Security Exception on the ViewRoot.HandleMessage line 1593 The odd thing is that I have the uses-permission android:name=android.permission.WRITE_CONTACTS/ I'm missing something? On 18 feb, 04:19, ivar innovativer...@gmail.com wrote: Try this. ContentValues values = new ContentValues(); values.put(Contacts.People.NAME, Dummy Contact+i); Uri uri = Contacts.People.createPersonInMyContactsGroup(getContentResolver(), values); Uri newContact = Uri.withAppendedPath(uri, People.Phones.CONTENT_DIRECTORY); values.clear(); values.put(People.Phones.TYPE, People.Phones.TYPE_MOBILE); values.put(People.Phones.NUMBER, String.valueOf(baseNumber + i)); getContentResolver().insert(newContact, values); Hope this helps. Thanks, Ravi On Feb 18, 12:43 am,LeGeNDuSlegen...@gmail.com wrote: Ok, sorry, in the first case I have wrottenI don't get an error: ContentValues values = new ContentValues(); values.put(People.NAME, etname.toString()); Uri uri = getContentResolver().insert(People.CONTENT_URI, values); Uri numberUri = Uri.withAppendedPath(uri, People.Phones.CONTENT_DIRECTORY); values.clear(); values.put(People.NUMBER, etphonenumber.toString()); getContentResolver().insert(numberUri, values); But after that, I don't see the contact on the mobile... I'm using Eclipse SDK on Windows 7 and the version of the SDK is 1.5. All of this is being tested in a HTC Hero. On 17 feb, 19:21, Dmitri Plotnikov dplotni...@google.com wrote: Please make sure that whenever you post a question regarding a force close, you copy/paste the exception stack trace into the post and also mention what environment you are using, what version of the SDK, what device. On Wed, Feb 17, 2010 at 11:15 AM,LeGeNDuSlegen...@gmail.com wrote: Thanks...I have added this permission: uses-permission android:name=android.permission.WRITE_CONTACTS/ And now..it doens't stop, but I don't see the contact anywhere... here's the code: this one: ContentValues values = new ContentValues(); values.put(People.NAME, etname.toString()); Uri uri = getContentResolver().insert(People.CONTENT_URI, values); Uri numberUri = Uri.withAppendedPath(uri, People.Phones.CONTENT_DIRECTORY); values.clear(); values.put(People.NUMBER, etphonenumber.toString()); getContentResolver().insert(numberUri, values); other one, but this stops: ContentValues values = new ContentValues(); values.put(People.NAME, etname.toString()); values.put(People.PRIMARY_EMAIL_ID, etemail.toString()); values.put(People.NUMBER, etphonenumber.toString()); Uri uri = getContentResolver().insert(People.CONTENT_URI, values); On 17 feb, 16:59, Dmitri Plotnikov dplotni...@google.com wrote: Does your app request permission to write to contacts? On Feb 17, 2010 4:11 AM, LeGeNDuS legen...@gmail.com wrote: Hello, I'm trying this code and it's getting stopped in the getContentResolver statement ContentValues values = new ContentValues(); values.put(People.NAME, hola); Uri uri = getContentResolver().insert(People.CONTENT_URI, values); What am I doing bad? 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%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@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.comandroid-developers%2Bunsubs cr...@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
[android-developers] Help with speech recognition
Hi all, Is there any one who has used the RecognizerIntent API to recognize speech??? Is it available only in certain phones??? Can it be tested in the emulator??? If yes which target version should be used? Thanks, Sujay -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Add Self-Define view into layout
I have a self-define view class, I would like to add this view into the layout , but there is a problem 02-21 17:23:07.843: ERROR/AndroidRuntime(1253): Uncaught handler: thread main exiting due to uncaught exception 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.helloandroid/ com.example.helloandroid.HelloAndroid}: java.lang.NullPointerException 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2401) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2417) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.os.Handler.dispatchMessage(Handler.java:99) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.os.Looper.loop(Looper.java:123) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.app.ActivityThread.main(ActivityThread.java:4203) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at java.lang.reflect.Method.invokeNative(Native Method) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at java.lang.reflect.Method.invoke(Method.java:521) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at dalvik.system.NativeStart.main(Native Method) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): Caused by: java.lang.NullPointerException 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at com.example.helloandroid.HelloAndroid.onCreate(HelloAndroid.java:16) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1123) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2364) 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): ... 11 more Here is my code, I want the SelfView to be under the TextView. public class HelloAndroid extends Activity { private SelfView mSelfView; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout mlayout = (LinearLayout)findViewById(R.id.mylayout); mSelfView = new SelfView(this); mlayout.addView(mSelfView); setContentView(R.layout.main); } } public class SelfView extends View { public SelfView(Context context) { super(context); // TODO Auto-generated constructor stub } protected void onDraw(Canvas canvas) { canvas.drawColor(Color.BLUE); } } ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:id=@+id/mylayout TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/hello / /LinearLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ContentProvider design question!
I provide a free and paid version of my app. I'm planning to have a 3rd app which is able to use the data from any of the two. I want to create a content provider to allow other apps to access their data. Now how can I handle the case when the user has the two apps free and paid installed? What are the side effects when declaring the same contentProvider uri? Also, how can I tell if ContentProvider is available/exists? Any design patterns would help! Thanks! -Moto -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Non-parallel construction of DatePicker and TimePicker
Well there is no functionality missing in the way it was implemented but it IS ugly. And it cost me a couple hours of head scratching and digging to figure out how to set up a DatePicker after having successfully set up a TimePicker using setOnTimeChangedListener. As to making the change myself, I 't have no experience submitting patches and don't know what it means to star an issue. And since I have working code I will probably do what everyone else has done and forget about it. But maybe in the interest of design consistency and aesthetics, Google will dedicate the 15 minutes it would take to implement DatePicker.setOnDateChangedListener(...). They do have a well-tested model to work from, after all. On Feb 21, 5:11 am, Mark Murphy mmur...@commonsware.com wrote: DonFrench wrote: I was surprised and dismayed to discover that the DatePicker and TimePicker classes, which are of parallel construction in almost every way, differ in one significant way. There is no setOnDateChangedListener(...) method in DatePicker while there is a setOnTimeChangedListener(...) method in TimePicker. For two classes that parallel one another in every other way, including the appearance and operation of their corresponding Views, why do they diverge in this fairly important aspect? I eventually discovered that there is a way to set the OnDateListener through the init(...) method, but COME ON! Was this just an oversight on Google's part? I hope that they fix this in a coming release. This was requested as an enhancement request about a year ago: http://code.google.com/p/android/issues/detail?id=2006 If it is important to you, you are welcome to make a patch and submit it for inclusion in an upcoming release. Or, perhaps just star that issue, since at present, virtually nobody else seems to care about it, so it is not likely to be dealt with any time soon. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in US: 14-18 June 2010:http://bignerdranch.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Add Self-Define view into layout
CMF wrote: I have a self-define view class, I would like to add this view into the layout , but there is a problem snip 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): Caused by: java.lang.NullPointerException 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at com.example.helloandroid.HelloAndroid.onCreate(HelloAndroid.java:16) You have a NullPointerException in line 16 of HelloAndroid.java. Here is my code, I want the SelfView to be under the TextView. public class HelloAndroid extends Activity { private SelfView mSelfView; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout mlayout = (LinearLayout)findViewById(R.id.mylayout); mSelfView = new SelfView(this); mlayout.addView(mSelfView); setContentView(R.layout.main); } } You are calling findViewById() before calling setContentView(). That will never work. Call setContentView(), then call findViewById(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 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
Re: [android-developers] Re: Non-parallel construction of DatePicker and TimePicker
DonFrench wrote: and don't know what it means to star an issue. Step #1: Click on the link I supplied Step #2: Click on the star towards the upper-left corner of the page -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 email with attachment
Hi. I send an email from my app with this code: final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType(plain/text); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {m...@gmail.com}); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, Subject); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Body); emailIntent.putExtra(android.content.Intent.EXTRA_STREAM, uri); I'm trying to send an attachment (the 'uri' variable refers to a file on the SDCard). When the email activity starts up, the attachment is listed. But when I receive the email, it's not there. I've tried various mime types, filenames, etc, but cannot solve this... is there anything obvious I need to do? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: getContextMenuInfo() returns null on sub-menu MenuItems
On Sun, Feb 21, 2010 at 10:30 AM, NoraBora noranb...@gmail.com wrote: Are you using this code? AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo(); For ExpandableListView, you have to use ExpandableListContextMenuInfo. Yup. Here's a sample: @Override public void onCreateContextMenu(ContextMenu m, View v, ContextMenuInfo i) { ... ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) i; ... } This part works great when the context menu is created. I get the ExpandableListContextMenuInfo object and get get the index of the group or child that was selected for the context menu. However this: @Override public boolean onContextItemSelected(MenuItem item) { ... ContextMenuInfo i = item.getMenuInfo(); ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) i; ... } only works when the item coming in is one of the main items in the context menu. If it is a sub-menu item, the variable i is null. - TreKing - Chicago transit tracking app for Android-powered devices http://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
Re: [android-developers] How to save variables, even when I close the APP
On Sun, Feb 21, 2010 at 11:03 AM, LeGeNDuS legen...@gmail.com wrote: Last one's settings are defined by user, and when he finish it close the activity going back to the main. But when he wants to go again to the other activity, the settings are not like the user chosen. Sounds like you should be storing these in the SharedPreferences. Look it up in the documentation to see how it's used. - TreKing - Chicago transit tracking app for Android-powered devices http://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] [java.lang.OutOfMemoryError: bitmap size exceeds VM budget] Help?
I got this issue that after changing orientation about 7 times I get the OutOfMemoryError. :( What's wrong!? I stripped my app to the point were it only does setContentView(...) and still I can reproduce the issue. I do use all custom graphics. Now this tells me there is a leak and a big one somewhere, but it seems not in my code! Where than!? a bug on the OS? Can a xml layout have leaks? Please any help finding the issue would help! Thanks, -Moto! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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?
You might want to try calling System.gc() manually somewhere in there, like in onCreate. It has worked for me in the past to avoid that exception when recreating heavy weight activities. It's kind of an ugly hack, though. The call is documented as not even guaranteed to do anything. Also, you aren't supposed to be able to run out of memory if there is garbage to be collected that would prevent it. A wild off the wall guess as to why it works in some cases could be that the manual GC call triggers some finalizers which free up some memory not directly under the garbage collector's control, resulting in more free memory than the system thought it could get from garbage collecting. Or it could just be a bug, like you said. Last time I asked someone about the issue, they said to make sure I was calling recycle on all my Bitmap instances when I was done with them and things like that. I already was in my case, and it sounds like you've eliminated that in your test, but that's another thing to check in similar situations. On Feb 21, 2:04 pm, Moto medicalsou...@gmail.com wrote: I got this issue that after changing orientation about 7 times I get the OutOfMemoryError. :( What's wrong!? I stripped my app to the point were it only does setContentView(...) and still I can reproduce the issue. I do use all custom graphics. Now this tells me there is a leak and a big one somewhere, but it seems not in my code! Where than!? a bug on the OS? Can a xml layout have leaks? Please any help finding the issue would help! Thanks, -Moto! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Knowing current country
Hi all, Is there any way at all where you can find in which country the phone is currently in, let's say if I travel to Spain can I in code know this information somehow. Using GPS is not good for me, but I know the phone reconizes where it is, but I dont know if I can access that info in code. Cheers, Alberto -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 pv player
Thanks for the reply dear. actually i am interested in DRM layer over Android Media player and according to specification doc of PV player, it supports OMA. so if default MediaPlayer uses PV player, does that mean it will play OMA DRM media files? On Feb 21, 4:12 pm, NoraBora noranb...@gmail.com wrote: No. MediaPlayer.java usesPVPlayerinternally. On Feb 20, 2:32 am, zeeshan genx...@gmail.com wrote: Hi Dear, isPVplayerAPI available at Android application level? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AudioTrack lag
I haven't read the code (not even the Java side). I can only guess that in streaming mode it allocates a buffer it manages as a ring buffer, or something like that. But I'd expect that to only happen at startup. Any delays in write() calls I'd expect to be simply waiting for room to copy the data, rather than driver issues. You should be able to save away the times the write calls return in an array, and see if they're approximately one buffer time apart. If you're seeing significant variance, then you have reason to wonder why. GC would be one possibility. I don't know the details of the dalvik GC, but it may need to do some operations in a separate thread, or some operations of significant size (an an audio time scale), which might be happening in other threads, making it impossible to return to your thread in as timely a way as you'd like. I can't think of why a driver, directly, would cause spurious delays, but it might have to wait on a lock somewhere, for which there's contention. If you want to know, I'd start with collecting the timing data, and seeing what you can correlate any anomalies with. I'd take a look at the code, but I don't have my hands on it. My first attempt ran afoul of it expecting to create symlinks, which weren't supported on the filesystem I set up for the purpose, so I'll have to come back to that when I clear higher-priority items from my queue. Sometimes I google up this or that bit of system source code, but that doesn't exactly make for good reading. So you shouldn't take anything I say as being based on deep knowledge of the system. I have deep historical knowledge of a wide array of systems, which helps orient me, but that has its limits. It's easy to seem smarter than you are on the Internet, by just keeping your mouth shut when you don't know anything, and speaking up when you do. I try to take a slightly riskier approach, and risk overstepping my knowledge occasionally. You learn a lot more that way! On Feb 21, 1:19 am, ani anish198519851...@gmail.com wrote: Things like ring buffers are still the same idea, but I won't explain how they're the same, because it would make the explanation more confusing. Just hold onto the core idea -- the receiver and sender of data each have their own buffers. Heartfelt thanks for this great explanation. I am a driver guy and i fully understand the concept of ring buffer mechanism and how it used in ALSA.What i don't understand is that sometimes write(){called by audioflinger} function call takes some time to return(probably because of driver bug or latency) and sometimes it doesn't return at all causing problem as shown below: obtainBuffer timed out (is the CPU pegged?) in audiotrack.cpp Is this buffer same as what is being allocated in the case of streaming(sharebuffer = 0) in audioflinger.cpp file(constructor of trackbase) mCblkMemory = client-heap()-allocate(size); If not then which buffer is this and where was it allocated.How can i avoid getting this error other than solving it in driver?I don't mind dropping some frames. In the static case i guess when we call write() of audioflinger the java pointer is directly passed to audiodriver by copying and we don't maintain any buffers in this case? And what is this track(audioflinger point of view)?How many tracks are going to be created if i am playing music and what will be it's size?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Market Changed ranking
I see the same thing (I'm in the US). Some of my apps went up in the rankings. My top paid app fell 50 places. Previoulsy it seemed that the length of install and the amount of time the apps were available in the market played a lot of importance in their rankings. Now can't figure out what it is. My top paid app has a lot more installs than other apps that I had published at the same time, yet it has fallen below them. On Feb 19, 1:44 am, Mr Pants pantssoftw...@googlemail.com wrote: Hi Erm did something happen to therankingsystem today? My app seems to have shot up a bunch of places in it's category. Obviously I'm not complaining - just curious:) Anyone else noticed anything? Thanks Ps - I'm in UK (not sure if this makes a difference) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] problem with LocationManager
I am designing a location based program for Android and I am having a problem. Right now I am just trying to retrieve the GPS coordinates and display them to the screen. I put the following code in my program and now whenever try to run it in the emulator the program crashes and I have to force quit. LocationManager mylocation = (LocationManager)getSystemService(Context.LOCATION_SERVICE) mylocation.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); If i comment out the second line the program runs, but obviously i can't retrieve the data I need without it. Any suggestions? help would be much appreciated. 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: Android Market Changed ranking
Every app of mine saw a significant change in ranking in the last 24 hours. I'm also seeing duplicate apps in some categories. Something definitely changed. On Feb 19, 1:44 am, Mr Pants pantssoftw...@googlemail.com wrote: Hi Erm did something happen to the ranking system today? My app seems to have shot up a bunch of places in it's category. Obviously I'm not complaining - just curious:) Anyone else noticed anything? Thanks Ps - I'm in UK (not sure if this makes a difference) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Abridged summary of android-developers@googlegroups.com - 100 Messages in 66 Topics
Building the google CalendarAPI sample code causing error for this line: *import com.google.android.gdata.client.AndroidXmlParserFactory;* Error: *The import com.google cannot be solved* I know I need to install the google data library to my android-sdk-window directory, but I don;t know where to get the .jav code. Jingyu Li -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] WakeLock finalized while still held?
I am a student of degree class. I am working for special works Look me and my partner in hills. And tell me how I am looking with my ………for more detail visit here http://visitmy.webs.com On Fri, Feb 19, 2010 at 10:34 AM, Nick Owens nicow...@gmail.com wrote: For the experts listening... I have a background service running and I sometimes, but not always, receive the following error when clicking on a notification, which opens the main App activity. WakeLock finalized while still held In my search for an answer, I read the post below: http://www.mail-archive.com/android-beginn...@googlegroups.com/msg16051.html While it appears to make sense technically, it doesn't work for this app. Like scanning for voicemail, this background service needs to constantly, and forever, stay alert - checking the server every few minutes for notifications. So my questions are: 1.) Why is GC coming after my WakeLock (or is after my service?), just b/c someone clicked on a notification it launched? 2.) Can I prevent GC from messing w/ my PowerManager object and my service? 3.) is there a way to have the service running indefinitely w/ an indefinite WakeLock? I understand the answer, if there is a sutiable one, probably doesn't fit most apps out there. For that reason, it may not even make sense to provide the answer, since every user from here on out will be able to find it and leave their services running indefinitely. But I need to, so please email me privately if you can. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Soft Keyboard Shrinks Dialog Buttons
I have a full screen dialog that has a relative layout that contains a TableLayout. Whenever the soft keyboard is displayed on the screen, it shrinks these buttons. Instead of filling the bottom of the screen, they only fill a third of it. How can I keep the size of the buttons the same similar to the Contact app? ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:fitsSystemWindows=true android:layout_width=fill_parent android:layout_height=fill_parent TableLayout android:id=@+id/recipeButtons android:background=#B0B0B0 android:padding=3dip android:stretchColumns=0,1 android:layout_alignParentBottom=true android:layout_width=fill_parent android:layout_height=wrap_content TableRow android:gravity=center Button android:id=@+id/editOtherAdditionButton android:text=Save / Button android:id=@+id/removeOtherAdditionButton android:text=Delete / /TableRow /TableLayout ScrollView android:layout_alignParentTop=true android:layout_marginBottom=55dip android:layout_width=fill_parent android:layout_height=wrap_content TableLayout android:layout_width=fill_parent android:layout_height=wrap_content android:padding=3dip android:stretchColumns=0,1 TableRow android:gravity=center android:background=#382E17 TextView android:text=@string/app_name android:textSize=16dip android:typeface=sans android:layout_span=2 android:textStyle=bold android:gravity=center android:layout_width=fill_parent android:textColor=@color/text_color / /TableRow TableRow android:gravity=center TextView android:text=Edit Other android:textSize=30dip android:typeface=sans android:layout_span=2 android:layout_width=fill_parent android:textColor=@color/ text_color / /TableRow TableRow android:gravity=center TextView android:text=Name: android:textColor=@color/ text_color android:textSize=16dip android:textStyle=bold / Spinner android:id=@+id/addOtherNameSpinner android:layout_width=200dip / /TableRow TableRow android:gravity=center TextView android:text=Amount: android:textColor=@color/ text_color android:textSize=16dip android:textStyle=bold / EditText android:id=@+id/addOtherAmount android:gravity=top android:inputType=numberDecimal android:layout_width=200dip / /TableRow TableRow android:gravity=center TextView android:text=When: android:textColor=@color/ text_color android:textSize=16dip android:textStyle=bold / Spinner android:id=@+id/addOtherNameSpinner android:layout_width=200dip / /TableRow /TableLayout /ScrollView /RelativeLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Confused about activity lifecycle usage in the notepad example
Hi all,I am confused about activity lifecycle usage in the notepad example,notepad example use edit in place user model(NoteEditor.java),inserting new record in onCreate method, saving persistent state in onPause method,and save away the original text in onSaveInstanceState method. I am a J2EE programer,I can not understand the logic described above. why not make things simple as following: 1.Not inserting new record in onCreate method. 2.When user pressing BACK,it is equal as pressing save button in the editorform,so execute inserting or updating in onPause method if activity.isFinishing() is true. don't persiste use data if activity.isFinishing() is not true. 3.Not save the original text in onSaveInstanceState method,It is no necessary.If the activity is killed and back,restore user inputing data in the editorForm is adequately. I think this logic is more traditional and natural. Maybe I not understand the essence of the activity lifecycle.Please air your's opinion. Thanks L.J.W -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Expanding the status bar from an app (android . permission . EXPAND_STATUS_BAR?)
Hi all, (I'm new to posting questions on Google Groups. Suggestions on good posting behaviour are appreciated. :) ) Hi, for good usability in an app that I'm developing I would like to expand the status bar to show the user the first time that there is more information to be found on the expanded status bar. (The user will run several apps at the same time, and background services will post notifications. The expanded notifications link back to several the apps/activities that the user is running. ) I've been searching for a while now, but the only thing I could find was: http://developer.android.com/reference/android/Manifest.permission.html#EXPAND_STATUS_BAR. I'm looking for a code example on how to expand the status bar. I hope somebody would be able to enlighten me by providing some answers or pointers on where to look. Thanks in advance, a2ronus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: In-app payment options
One benefit is that people would get to try your app... I've downloaded and paid for tens of apps from Android Market and had no idea that you could get a 24 hour version of any paid app for free. :) On Feb 19, 10:32 am, Carlo ca...@hyperdevbox.com wrote: can somebody explain the benefit of a lite version in a market where there is 24h trial of the full version for everybody ? On Feb 19, 11:19 pm, Mark Murphy mmur...@commonsware.com wrote: Carl Whalley wrote: Instead of having 2 versions on the market for apps, one lite (free) and one paid, is it possible to have just the lite one but offer a payment page in the app which upgraded it once the payment is received? If you can find a way to do that while staying within the bounds of the Android Market Developer Distribution Agreement, yes. It's those pesky agreement terms that have been the issue to date when this topic has come up. IANALNDIPOOTV (I am not a lawyer, nor do I play one on TV), TINLA (this is not legal advice), and so forth...but my personal interpretation is that the only way you could do in-app payments under the Agreement is if Google offers that feature, the way Apple does. You're certainly welcome to distribute the app outside of the Market, in which case you will have fewer impediments to your model. And, you are certainly welcome to seek qualified legal counsel and try to come up with some other loophole. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print!- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Talking to wpa_supplicant for TTLS / PEAP / TLS (Runtime+wpa_cli / JNI / LocalSocket(Unix domain socket) / wpa_supplicant.conf?)
Hi, (I'm new to posting questions on Google Groups. Suggestions on good posting behaviour are appreciated. :) ) This is what I'm trying to achieve: I would like to write an Android app that is capable of talking to wpa_supplicant. More specifically, I would like to connect to a WPA2-EAP secured network (with authentication methods TTLS / PEAP / TLS), but since the device will be used by several users, the user credentials will be supplied by the user in my app, instead of by wpa_suplicant.conf. I don't want to write my own supplicant software, I would like to be able to communicate with it. (I am able to connect to the network when I provide the user credentials as well in the /data/misc/wifi/ wpa_supplicant.conf file) I've looked at several solutions and their problems, and I would like some advice on them. Maybe I've overlooked something: - Solution 1: Using the Android Wifi API. Problem: The Android WiFi API doesn't seem to support TTLS / PEAP / TLS. Strange other thing is: It appears to support LEAP, but I can't find a way to supply the user credentials to the WifiConfiguration. - Solution 2: Letting the app write to /data/misc/wifi/ wpa_supplicant.conf and then reassociating. Problem: I understand from the API that apps can only write to their own private space or the external SD store. I've also tried writing to a file with the Terminal Emulator app. This doesn't work. I can only write wpa_supplicant.conf in the adb shell with root acces. - Solution 3: Talking directly to the control interface of wpa_suplicant using Unix domain sockets. I found that the Android API supplies us with the LocalSocket class for this. However, I have no idea how to cummunicate with the wpa_supplicant control interface domain socket. (I will also post this on a wpa_supplicant forum). - Solution 4: Using java.lang.Runtime and .Process for running wpa_cli and communicating with it. Problem: I expect there will be Manifest.permission conflicts. - Solution 5: Another option might be to use Android NDK / JNI to be able to use the helper functions in c that wpa_supplicant provides. Problem: This might be a solution, but it seems to me that it complicates matters a lot. And I also wonder if there might be some Manifest.permission conflicts. - Solution 6: Finding some open source Java supplicant code and adapting this. Problem: I haven't found it yet. (My C skills aren't so good). I really need some help on this. Is there somebody with some more experience on this topic? I hope somebody would be able to enlighten me by providing some answers or pointers on where to look. Any help would be greatly appreciated. Thanks in advance, a2ronus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Code example on possibilities of android . permission . STATUS_BAR?
Hi, The following page seems to imply that it's possible to hide icons on the status bar, but I can't seem to find information or examples that show which icons you can disable, and what is meant by opening or closing the status bar. http://developer.android.com/reference/android/Manifest.permission.html#STATUS_BAR: Allows an application to open, close, or disable the status bar and its icons.. I'm looking for code examples to use this permission. I hope somebody would be able to enlighten me by providing some answers or pointers on where to look. Thanks in advance, a2ronus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 disable the Android device (android.permission.BRICK?)
Hi, (I'm new to posting questions on Google Groups. Suggestions on good posting behaviour are appreciated. :) ) I would like to achieve the following: I would like to temporarily disable the Android device when the user performs 3 wrong logins in a row. The login is another issue I'm not interested in here. I'm interested in blocking the phone. I've been searching for some time now. I found some messages on disabling buttons, but they seem to be bad usability. On top of that, it might not be supported anymore in future APIs. So I kept looking and found: http://developer.android.com/reference/android/Manifest.permission.html#BRICK. This seems to suggest something in the API that I can use, but can't find it. I'm interested in how to use this permission, and I'm also interested in what the consequences are. Does using some bricking method imply that the phone is permanently bricked, or is there still a way to restore the phone, so you don't have to throw it away? I hope somebody would be able to enlighten me by providing some answers or pointers on where to look. Thanks in advance, a2ronus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Rebuilding just a single external project (wpa_supplicant) - toolchain problems
I'm wanting to rebuild wpa_supplicant from source (http:// hostap.epitest.fi/wpa_supplicant/) and I'm having problems getting the android toolchains set up so that I can properly cross-compile with the ARM compiler and link with the proper Bionic libraries. Ideally, I'd like to only have to build wpa_supplicant, without having to build the platform or any other part of the android system. I would then just push it onto the /system partition in place of the existing / system/bin/wpa_supplicant and be able to use a modified version of the supplicant. I've googled around quite a bit and am surprised that I haven't been able to find instructions on how to build only a specific external project. Therefore, I have a couple of questions: 1) Is there any reason to think that this isn't a fairly straightforward process? Should there be any reason that I couldn't just use the posted hostapd/wpa_supplicant source and have it fairly effortlessly link into android? 2) How do I set the build environment with the proper cross-compilers and include paths? I've looked at /build/envsetup.sh, but I don't know how to get this truly configured properly. I must be missing something. My dev machine is ubuntu 9.04, and I'm running a modified, rooted NexusOne with 2.6.32. Thanks for any help - hopefully this is a trivial task and there's documentation somewhere that I accidentally overlooked. Joe -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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?
Thanks Lance! Your tip about System.gc() doesn't seem to make a difference. :( Just so anyone that has this issue: I started with a stripped activity no allocations just loading my template seemed to resolve issues. From there I slowly started adding things and optimizing couple things that seem to leak. In any case using a G1 and opening and closing the keyboard fast does lead to the memory exception. So it seems that it does not clear memory fast enough. Now you might think who is going to open and close the keyboard that fast? Well it just helps put the phone in extremes situations where the CPU is slow and it can't free memory fast enough... It really sucks that this happens and I got many users complaining about this issue... :( Any other ideas tips, possibly catching this exception giving the CPU some time to clear memory and than start the activity? That would be perfect! Thanks, Moto! On Feb 21, 3:14 pm, Lance Nanek lna...@gmail.com wrote: You might want to try calling System.gc() manually somewhere in there, like in onCreate. It has worked for me in the past to avoid that exception when recreating heavy weight activities. It's kind of an ugly hack, though. The call is documented as not even guaranteed to do anything. Also, you aren't supposed to be able to run out of memory if there is garbage to be collected that would prevent it. A wild off the wall guess as to why it works in some cases could be that the manual GC call triggers some finalizers which free up some memory not directly under the garbage collector's control, resulting in more free memory than the system thought it could get from garbage collecting. Or it could just be a bug, like you said. Last time I asked someone about the issue, they said to make sure I was calling recycle on all my Bitmap instances when I was done with them and things like that. I already was in my case, and it sounds like you've eliminated that in your test, but that's another thing to check in similar situations. On Feb 21, 2:04 pm, Moto medicalsou...@gmail.com wrote: I got this issue that after changing orientation about 7 times I get the OutOfMemoryError. :( What's wrong!? I stripped my app to the point were it only does setContentView(...) and still I can reproduce the issue. I do use all custom graphics. Now this tells me there is a leak and a big one somewhere, but it seems not in my code! Where than!? a bug on the OS? Can a xml layout have leaks? Please any help finding the issue would help! Thanks, -Moto! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Code example on possibilities of android . permission . STATUS_BAR?
I'm interested on this topic too! Particularly changing the color of the status bar On Feb 19, 6:02 pm, a2ronus aaron.jan...@gmail.com wrote: Hi, The following page seems to imply that it's possible to hide icons on the status bar, but I can't seem to find information or examples that show which icons you can disable, and what is meant by opening or closing the status bar. http://developer.android.com/reference/android/Manifest.permission.ht... Allows an application to open, close, or disable the status bar and its icons.. I'm looking for code examples to use this permission. I hope somebody would be able to enlighten me by providing some answers or pointers on where to look. Thanks in advance, a2ronus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Abridged summary of android-developers@googlegroups.com - 100 Messages in 66 Topics
Jingyu Li wrote: Building the google CalendarAPI sample code causing error for this line: /import com.google.android.gdata.client.AndroidXmlParserFactory;/ Error: /The import com.google cannot be solved/ I know I need to install the google data library to my android-sdk-window directory, but I don;t know where to get the .jav code. There is no CalendarAPI (that I am aware of), and you cannot build the Calendar application's source code using just the SDK -- it can only be built as part of the firmware. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 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
Re: [android-developers] Expanding the status bar from an app (android . permission . EXPAND_STATUS_BAR?)
On Fri, Feb 19, 2010 at 3:59 PM, a2ronus aaron.jan...@gmail.com wrote: Hi, for good usability in an app that I'm developing I would like to expand the status bar to show the user the first time that there is more information to be found on the expanded status bar. I doubt you can do this and I personally don't think this is good usability. As a user, I want to determine when to expand the status bar, not you. You can post a notification with an alert and vibration to let me know there's something to check, but I will check when I'm good and ready, not when you tell me to. If I had an app that randomly expanded the status bar when I was in the middle of something, I would probably promptly uninstall it. - TreKing - Chicago transit tracking app for Android-powered devices http://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: problem with LocationManager
The exception shown in logcat after the crash will tell you more information about why your app is crashing. If you are trying to use a system service before onCreate, for example, it will let you know, etc.. One way to get to logcat is to go to Logcat view in the DDMS Perspective in Eclipse. On Feb 19, 3:55 pm, korben...@gmail.com korben...@gmail.com wrote: I am designing a location based program for Android and I am having a problem. Right now I am just trying to retrieve the GPS coordinates and display them to the screen. I put the following code in my program and now whenever try to run it in the emulator the program crashes and I have to force quit. LocationManager mylocation = (LocationManager)getSystemService(Context.LOCATION_SERVICE) mylocation.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); If i comment out the second line the program runs, but obviously i can't retrieve the data I need without it. Any suggestions? help would be much appreciated. 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: Help?
This might be helpful. http://developer.android.com/intl/fr/resources/articles/avoiding-memory-leaks.html On Feb 21, 2:04 pm, Moto medicalsou...@gmail.com wrote: I got this issue that after changing orientation about 7 times I get the OutOfMemoryError. :( What's wrong!? I stripped my app to the point were it only does setContentView(...) and still I can reproduce the issue. I do use all custom graphics. Now this tells me there is a leak and a big one somewhere, but it seems not in my code! Where than!? a bug on the OS? Can a xml layout have leaks? Please any help finding the issue would help! Thanks, -Moto! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to disable the Android device (android.permission.BRICK?)
I dont think I fully understand your question... Are you looking for something in the public API that will render a user's Android device useless for a period of time? Just how far do you expect this bricking to go? Will they still be able to use their phone for other purposes, e.g. making emergency calls? If you're looking for your app to be invasive to the user, you're unlikely to find it in the public API. Perhaps take a look at how the various lock screen apps work. On Fri, Feb 19, 2010 at 9:49 PM, a2ronus aaron.jan...@gmail.com wrote: Hi, (I'm new to posting questions on Google Groups. Suggestions on good posting behaviour are appreciated. :) ) I would like to achieve the following: I would like to temporarily disable the Android device when the user performs 3 wrong logins in a row. The login is another issue I'm not interested in here. I'm interested in blocking the phone. I've been searching for some time now. I found some messages on disabling buttons, but they seem to be bad usability. On top of that, it might not be supported anymore in future APIs. So I kept looking and found: http://developer.android.com/reference/android/Manifest.permission.html#BRICK. This seems to suggest something in the API that I can use, but can't find it. I'm interested in how to use this permission, and I'm also interested in what the consequences are. Does using some bricking method imply that the phone is permanently bricked, or is there still a way to restore the phone, so you don't have to throw it away? I hope somebody would be able to enlighten me by providing some answers or pointers on where to look. Thanks in advance, a2ronus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: android play youtube
Is there example to upload video from android to YouTube? How we can achieve in Android to upload a video on YouTube? On Feb 12, 8:23 am, David Toledo dtole...@gmail.com wrote: I used this url for view video youtube in android. It is OK. startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(http://www.youtube.com/watch?v=xxx;))); I need open the video by default in Youtube app I don't select before between Browser or Youtube app Thanks 2010/2/11 DAVIDT dtole...@gmail.com Hi All Is possible play video from youtube with url using MediaPlayer Thanks David -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] PopupWindow on activity start
I am trying to make a PopupWindow show straight away when an activity has started. when calling public void showAtLocation (View parent, int gravity, int x, int y) I get the exception ERROR/AndroidRuntime(2500): Caused by: android.view.WindowManager $BadTokenException: Unable to add window -- token null is not valid; is your activity running? At the moment I am calling from onCreate, but when calling from onStart or onResume it still gives the same error. The activity api says the activity is supposed to be running after onResume is called. Where is the best place to load up the PopupWindow if it needs to be done straight away? At the moment It looks like Activity.onWindowFocusChanged() is the best place. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SQLiteDiskIOException happens when querying 4000 rows data with order by japanese kanji
I found another resolution for my problem. If I create an index for orderbyed column, my problem will get gone. After reading some docs about sqlite, it seems that using index to order by will remove the necessary of creating journal file. So I think creating index is a better 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
Re: [android-developers] PopupWindow on activity start
You could simply post (to a View or a Handler) a Runnable from onCreate() to do this. You can also try to do it from onStart(). Activity.onWindowFocusChanged() is definitely NOT the right place. On Sun, Feb 21, 2010 at 5:00 PM, Chopcsu st...@kilsby.com.au wrote: I am trying to make a PopupWindow show straight away when an activity has started. when calling public void showAtLocation (View parent, int gravity, int x, int y) I get the exception ERROR/AndroidRuntime(2500): Caused by: android.view.WindowManager $BadTokenException: Unable to add window -- token null is not valid; is your activity running? At the moment I am calling from onCreate, but when calling from onStart or onResume it still gives the same error. The activity api says the activity is supposed to be running after onResume is called. Where is the best place to load up the PopupWindow if it needs to be done straight away? At the moment It looks like Activity.onWindowFocusChanged() is the best place. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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] Chronometer with Android 2.1 issue
I have an app that plays Podcasts for AndroidGuys.com. I have released it to the public via Google Code (http://code.google.com/p/android- guys/) and I have received complaints from Nexus One owners and have even confirmed myself in the 2.1 emulator, that whenever I click Play Podcast I get a Force Close. Works perfectly fine on any other device. I have narrowed down the issue to these two lines of code involving the Chronometer. chrono_elapsed.setBase(SystemClock.elapsedRealtime()); chrono_elapsed.start(); The two other things that happen when you click Play Podcast is the creation of a notification in the notification slide window, and plays a streaming mp3 file. What could cause this to force close in specifically Android 2.1? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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?
Was it actually your app that was getting the error? The Launcher suffered from this problem in 2.1 on a Nexus One if you had a lot of applications; it seems fixed in 2.1 Update 1. If it's your app, you can investigate this from the DDMS perspective. Select your app, hit the Update Heap button at the top, and then the Cause GC button, and you'll see usage by type of object on the right in the Heap window. Select a type, and you'll see a histogram of object sizes / counts. If you add the Memory Analyzer features (there are two, add them both; one provides the basics, and the other adds charts), to your Eclipse environment from the Ganymede update site, you can see a great deal more detail. Just click th Download HPROF File button. I won't even try to describe all the nice bits of analysis it can do. You may find you need to temporarily give your app WRITE_TO_EXTERNAL_STORAGE permission so that the .hprof file can be written to the sdcard. Once you've done this, you probably don't need it again, though I did have to re-add it for one session after I downloaded the Memory Analyzer. On Feb 21, 12:14 pm, Lance Nanek lna...@gmail.com wrote: You might want to try calling System.gc() manually somewhere in there, like in onCreate. It has worked for me in the past to avoid that exception when recreating heavy weight activities. It's kind of an ugly hack, though. The call is documented as not even guaranteed to do anything. Also, you aren't supposed to be able to run out of memory if there is garbage to be collected that would prevent it. A wild off the wall guess as to why it works in some cases could be that the manual GC call triggers some finalizers which free up some memory not directly under the garbage collector's control, resulting in more free memory than the system thought it could get from garbage collecting. Or it could just be a bug, like you said. Last time I asked someone about the issue, they said to make sure I was calling recycle on all my Bitmap instances when I was done with them and things like that. I already was in my case, and it sounds like you've eliminated that in your test, but that's another thing to check in similar situations. On Feb 21, 2:04 pm, Moto medicalsou...@gmail.com wrote: I got this issue that after changing orientation about 7 times I get the OutOfMemoryError. :( What's wrong!? I stripped my app to the point were it only does setContentView(...) and still I can reproduce the issue. I do use all custom graphics. Now this tells me there is a leak and a big one somewhere, but it seems not in my code! Where than!? a bug on the OS? Can a xml layout have leaks? Please any help finding the issue would help! Thanks, -Moto! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Market Changed ranking
Our recent game did also drop by from 40 to 70 rank in one night reducing the impact of our launch effort, when you work hard to bring quality and the result is a drop of 30 rank, this message is hard to understand by the customers, that is really a bad luck timing for us : ( Hope it will not change too often as this is one of the most annoying point in the iPhone appstore , would not like to see replicated in the android market. On Feb 20, 8:45 am, Michael mich...@socratica.com wrote: Every app of mine saw a significant change in ranking in the last 24 hours. I'm also seeing duplicate apps in some categories. Something definitely changed. On Feb 19, 1:44 am, Mr Pants pantssoftw...@googlemail.com wrote: Hi Erm did something happen to the ranking system today? My app seems to have shot up a bunch of places in it's category. Obviously I'm not complaining - just curious:) Anyone else noticed anything? Thanks Ps - I'm in UK (not sure if this makes a difference) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Any way a WebView can show s context menu when not on a link
I thought it would be something like that but what sort of event - is there a long press event to detect? On Feb 19, 8:07 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: You could add a listener to the page, just like you would do with any web page and then send a request to the Java part of the app to display a menu on some sort of event. Shouldn't be that tricky. -John Coryat Radar Now! What Zip Code? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: In-app payment options
At this point, most of customers appear to refund based on their taste of the app/game and just a few on the fact that it did not work on their device (thanks to the filtering system implemented in the market and developers bringing more stable app), so it might have not been trial at the beginning but now really sounds like a trial experience to me;) On Feb 20, 4:15 am, DB dougbrea...@gmail.com wrote: One benefit is that people would get to try your app... I've downloaded and paid for tens of apps from Android Market and had no idea that you could get a 24 hour version of any paid app for free. :) On Feb 19, 10:32 am, Carlo ca...@hyperdevbox.com wrote: can somebody explain the benefit of a lite version in a market where there is 24h trial of the full version for everybody ? On Feb 19, 11:19 pm, Mark Murphy mmur...@commonsware.com wrote: Carl Whalley wrote: Instead of having 2 versions on the market for apps, one lite (free) and one paid, is it possible to have just the lite one but offer a payment page in the app which upgraded it once the payment is received? If you can find a way to do that while staying within the bounds of the Android Market Developer Distribution Agreement, yes. It's those pesky agreement terms that have been the issue to date when this topic has come up. IANALNDIPOOTV (I am not a lawyer, nor do I play one on TV), TINLA (this is not legal advice), and so forth...but my personal interpretation is that the only way you could do in-app payments under the Agreement is if Google offers that feature, the way Apple does. You're certainly welcome to distribute the app outside of the Market, in which case you will have fewer impediments to your model. And, you are certainly welcome to seek qualified legal counsel and try to come up with some other loophole. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print!- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] User name against the default email account of Device?
Hi, How can I get the user name against the default gmail account on device. For example when you comment on some application in market it automatically shows the name of commenter. Is there any way to get that name. Actually, I want to present this name while submitting the high score in my game, ofcourse user can edit it before submitting the score. Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Is the javax.tools and javax security available
When I try to use code similar to that in http://www.javablogging.com/dynamic-in-memory-compilation/ I find the classes will compile but get a java.lang.VerifyError on execution - the class uses javax.tools.JavaCompiler and javax.tools.ToolProvider and one supporting class uses javax.tools.ForwardingJavaFileManager and java.security.SecureClassLoader - Any bright ideas - is it OK to use a class loader extending java.security.SecureClassLoader? Are these packages unavailable on the android and if so is there a list of unavailable packages -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Hide address bar while launching native browser
Thanks Mark. Yes using webView is possible as I am doing for other mobile OS(BREW/ Symbian).We considered this option before. but the issue is then I need to provide data communication layer and handling. Also I cannot provide each and every operations in Webview like Cookie/Favorites and all other features native browser is giving. Thanks Sam On Feb 19, 5:44 pm, Mark Murphy mmur...@commonsware.com wrote: SAM wrote: thanks for the confirmation. Also is there a way to launch the browser in the background from my application. Requirement: 1: Launch myapplication 2: Tell browser to launch in background and get xyz.com (which is heavy site and takes time to load). 3. Show splash/terms page in my app. 4. After 5-6 seconds tell browser to come in front so that user see 'xyz.com' without delay. If you write your own browsing activity using WebView, sure. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ToggleButton image
I found a way that works perfectly! 1. Use a regular ToggleButton 2. Set your desired drawable on the toggle button using either drawable_top or drawable_bottom. Don't use left or right as the image won't be centered. 3. Now, you have both the text and an image. I just wanted the image so I needed a way to remove the text. I tried many different techniques like setting the font size to 0 or the text on and off to empty string, but there was always something wrong. The option that works is to set the lines=0 causing the text to take up 0 lines (making it disappear) leaving just the nicely centered image! On Jan 20, 9:19 pm, Sasikumar S sasikumar.it1...@gmail.com wrote: see this http://www.androidpeople.com/category/button/ On Jan 21, 1:12 am, Eric Crump synesthe...@gmail.com wrote: I want to put animageon a ToggleButton. If I use android:background to set theimagethen it doesn't look like abuttonany more, just the image. What am I missing? 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: headset button
For a media application you need to register a broadcast receiver for Intent.ACTION_MEDIA_BUTTON and then when the callback is called you want to handle the following key codes: These key codes are sent from Bluetooth devices such as headphones and in car stereos: KEYCODE_MEDIA_PLAY_PAUSE KEYCODE_MEDIA_NEXT KEYCODE_MEDIA_PREVIOUS KEYCODE_MEDIA_FAST_FORWARD KEYCODE_MEDIA_REWIND KEYCODE_MEDIA_STOP This key code is sent from the wired headset call button: KEYCODE_HEADSETHOOK Good luck! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Fixed Top and Bottom
Hi, I have a large view. I have to show constant top and bottom in the screen. Which contain ImageView and TextView. On the screen this two remain at their position. FOY I am not using ListView. How can I do that so the the portion between the top and bottom only movable? Please reply. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android GPS Location Problem
Hi Frank Thanks for your inputs. I dont know much about DSP processing in here. Can you send me some sample code that I can use to get exact location. Thank you Sunny On Feb 19, 11:50 pm, Frank Weiss fewe...@gmail.com wrote: AFAIK sensors have some noise. I have seen a similar issue with the accelerometer. See this thread:http://groups.google.com/group/android-developers/browse_thread/threa... I suggest you try a low-pass digital filter approach, similar to what I used for the accelerometer, and see if that works for you. On Fri, Feb 19, 2010 at 5:34 AM, Sunny25 hi2sunn...@gmail.com wrote: Hi All, I'm developing very basic application to get location usnig, LocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 1,this); and displaying the longitude and lattitude information on the screen, Now the problem is whenever I deploy this application on HTC Magic and keep it stationary. The readings i.e. longitude and lattitude are changing from time to time. Can you please help me with this. Thank you, Sunny -- You received this message because you are subscribed to the Google Groups Android Developers group. 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%2Bunsubs cr...@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] Is there a way to call Android Scripting Environment from Java Code
I am trying to implement a Java Interface with key functionality provided by a script read in at run time - Android Scripting Environment would be great if there were a way to create an Interpreter and pass it text to eval ASE looks great but I see no samples of how to call it from Java code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 set break points when developing Eclipse with an actual device
hi, i am developing using Eclipse and MyTouch phone, while i can run the application fine on the device, i can't seem to set break points for debugging. is there some settings/tools i am missing? 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] What does the prefix 'm' stand for ?
Hi guys, I saw many sample codes that each variable contains the 'm' prefix. I don't know what this m means. I have two-year experience in MFC. Each variable has 'm' prefix to tell you that I'm the one variable of MFC component. (m stands for MFC). So...can anybody answer me this question? Regards, Christ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Setting Application-wide Themes
I have created several files in a res/values/styles.xml file. Here's one of them: style name=BlueOnWhite parent=@android:style/TextAppearance item name=android:textColor#FF/item item name=android:background#0033FF/item /style I can apply the style to a single element in the xml by setting the style element like this: TextView android:text=@string/size_label android:id=@+id/sizeLabel android:layout_width=wrap_content android:layout_height=wrap_content style=@style/BlueOnWhite android:layout_gravity=center_vertical/ So, that works, and I notice that change. But what I really want to do is use the style above to apply to my entire application. I thought I'd be able to use this line: this.getApplicationContext().setTheme(R.style.BlueOnWhite); before the super.onCreate of the first activity. But it doesn't work. Should it? What am I missing? I need the ability to set the style programatically and I really don't want to have to set each element individually. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Add Self-Define view into layout
I got it works however, when I change the LinearLayout to RelativeLayout the Self view cover the textview, how can I set the selfview at the bottom of the textview? On Feb 22, 1:30 am, Mark Murphy mmur...@commonsware.com wrote: CMF wrote: I have a self-define view class, I would like to add this view into the layout , but there is a problem snip 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): Caused by: java.lang.NullPointerException 02-21 17:23:07.853: ERROR/AndroidRuntime(1253): at com.example.helloandroid.HelloAndroid.onCreate(HelloAndroid.java:16) You have a NullPointerException in line 16 of HelloAndroid.java. Here is my code, I want the SelfView to be under the TextView. public class HelloAndroid extends Activity { private SelfView mSelfView; /** Called when the activity is first created. */ �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout mlayout = (LinearLayout)findViewById(R.id.mylayout); mSelfView = new SelfView(this); mlayout.addView(mSelfView); setContentView(R.layout.main); } } You are calling findViewById() before calling setContentView(). That will never work. Call setContentView(), then call findViewById(). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 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] about setting WindowManager.LayoutParams.screenBrightness
We noticed some devices(not android's) support such feature:black out screen and turn bright when someone touches it. Our custom want us to simulate such function with android. We trid to set WindowManager.LayoutParams.screenBrightness to make screen dark enough but still knowing touch motion but failed. lp.screenBrightness = 0.039f; //dark enough and looks dead lp.screenBrightness = 0.04f; //not dark enough but knowing touch motion It turns out that there is no way to make our customer happy. I think Android has nothing to do with our problem and it should be the problem of LED screen maker. If they can make such LED, Android will support it also. Am I right? Best Regards. James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: relation between ViewRoot and View
Some comments in ViewRoot.java ViewRoot: The top of a view hierarchy, implementing the needed protocol between View and the WindowManager. BRs Guobin On Feb 20, 4:53 pm, sheng wang banxia...@gmail.com wrote: Hi , Can any one give more information about ViewRoot and what's the relation between viewroot and view? I found a Viewroot create a surface at its' constructor, which I think is the real bitmap data goes to. So I guess every view has it own viewroot, every view has a surface for drawing and the surfaceflinger will finally blend all surfaces together, but I found it's definitely wrong. How view and viewroot cooperate is quite ambiguous to me. Any information will be 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
Re: [android-developers] What does the prefix 'm' stand for ?
It stands for member. I believe the use of an m prefix with MFC has nothing to do with the name MFC either, but rather to identify variables that are class members as opposed to local variables for instance. On Sun, Feb 21, 2010 at 9:52 PM, Christ wutie...@gmail.com wrote: Hi guys, I saw many sample codes that each variable contains the 'm' prefix. I don't know what this m means. I have two-year experience in MFC. Each variable has 'm' prefix to tell you that I'm the one variable of MFC component. (m stands for MFC). So...can anybody answer me this question? Regards, Christ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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
Re: [android-developers] Re: relation between ViewRoot and View
There's only one ViewRoot for an entire view hierarchy (one ViewRoot per window for instance.) There's certainly not one ViewRoot per View, and it's actually pretty clear when reading the code of ViewRoot and/or View. On Sun, Feb 21, 2010 at 10:03 PM, Guobin zzg...@gmail.com wrote: Some comments in ViewRoot.java ViewRoot: The top of a view hierarchy, implementing the needed protocol between View and the WindowManager. BRs Guobin On Feb 20, 4:53 pm, sheng wang banxia...@gmail.com wrote: Hi , Can any one give more information about ViewRoot and what's the relation between viewroot and view? I found a Viewroot create a surface at its' constructor, which I think is the real bitmap data goes to. So I guess every view has it own viewroot, every view has a surface for drawing and the surfaceflinger will finally blend all surfaces together, but I found it's definitely wrong. How view and viewroot cooperate is quite ambiguous to me. Any information will be 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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
Re: [android-developers] Running tests in main
I don't know of a way to run all tests on the main thread. But you can annotate test methods of an InstrumentationTestCase with @UIThreadTest to force them to run on main thread. http://developer.android.com/reference/android/test/UiThreadTest.html Regards, Brett. On Fri, Feb 19, 2010 at 4:46 AM, Ewan Benfield e...@telesense.co.uk wrote: Hi Can someone advise the am command (for adb shell) to run junit tests in the main thread please? The following shows onStart etc running in the test runner thread... am instrument -w -e class co.uk.telesense.tests.MyTest co.uk.telesense.tests/android.test.InstrumentationTestRunner Thanks! Ewan -- Ewan Benfield http://www.telesense.co.uk tel: 0845 643 5691 (+44 845 643 5691) mob: +44 (0) 77859 26477 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: java.security.NoSuchAlgorithmException: SSLContext SSL implementation not found
If anybody know about this issue,give me a solution. Thanks, kums. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to set break points when developing Eclipse with an actual device
Do you have USB debugging enabled on the device? Press Home, Menu, Settings, Applications, Development. On Sun, Feb 21, 2010 at 9:48 PM, Michael Lam mmingfei...@gmail.com wrote: hi, i am developing using Eclipse and MyTouch phone, while i can run the application fine on the device, i can't seem to set break points for debugging. is there some settings/tools i am missing? 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
Re: [android-developers] What does the prefix 'm' stand for ?
I'm one of those guys who think scope prefixes, like m, are more trouble than they're worth. The fact that you had to explain it to a newbie makes me smile. On Sun, Feb 21, 2010 at 10:04 PM, Romain Guy romain...@android.com wrote: It stands for member. I believe the use of an m prefix with MFC has nothing to do with the name MFC either, but rather to identify variables that are class members as opposed to local variables for instance. On Sun, Feb 21, 2010 at 9:52 PM, Christ wutie...@gmail.com wrote: Hi guys, I saw many sample codes that each variable contains the 'm' prefix. I don't know what this m means. I have two-year experience in MFC. Each variable has 'm' prefix to tell you that I'm the one variable of MFC component. (m stands for MFC). So...can anybody answer me this question? Regards, Christ -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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.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
Re: [android-developers] Re: Android GPS Location Problem
I posted the code for the Accelerometer digital band-pass filter. There should have been a link in my reply. I'm starting work on a Location/GPS sample filtering app, but my fulltime job is getting hectic because we're going to QA. But I'm sure I'll get to it eventually. On Sun, Feb 21, 2010 at 9:36 PM, Sunny25 hi2sunn...@gmail.com wrote: Hi Frank Thanks for your inputs. I dont know much about DSP processing in here. Can you send me some sample code that I can use to get exact location. Thank you Sunny On Feb 19, 11:50 pm, Frank Weiss fewe...@gmail.com wrote: AFAIK sensors have some noise. I have seen a similar issue with the accelerometer. See this thread: http://groups.google.com/group/android-developers/browse_thread/threa... I suggest you try a low-pass digital filter approach, similar to what I used for the accelerometer, and see if that works for you. On Fri, Feb 19, 2010 at 5:34 AM, Sunny25 hi2sunn...@gmail.com wrote: Hi All, I'm developing very basic application to get location usnig, LocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 1,this); and displaying the longitude and lattitude information on the screen, Now the problem is whenever I deploy this application on HTC Magic and keep it stationary. The readings i.e. longitude and lattitude are changing from time to time. Can you please help me with this. Thank you, Sunny -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2Bunsubs cr...@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.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
Re: [android-developers] What does the prefix 'm' stand for ?
On Sun, Feb 21, 2010 at 10:20 PM, Frank Weiss fewe...@gmail.com wrote: I'm one of those guys who think scope prefixes, like m, are more trouble than they're worth. The fact that you had to explain it to a newbie makes me smile. Well you probably need to explain many other things to a newbie as well. Some prefix for member variables is very useful to avoid hiding them with locales and making it easier to read code to understand how it can impact state outside of its local scope. The trouble it adds is so small (just put an m before the member variable name) that I'd find it hard to consider it not worth it. :} -- 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
Re: [android-developers] What does the prefix 'm' stand for ?
On 2/22/10 2:20 PM, Frank Weiss wrote: I'm one of those guys who think scope prefixes, like m, are more trouble than they're worth. The fact that you had to explain it to a newbie makes me smile. I use m_ purely so I don't have to think up different names for my method parameters and to avoid things like this.foo = foo...it also avoids the accidental reference to a local variable when the member was intended (or vice versa). Is it awesome? No. But for me, it serves its purpose. The fact that it needs explaining is beside the point. In the end it is just a name and whether you understand the convention being used or not is irrelevant, it still just functions like a normal name. No different than someone naming methods or variables with _ to indicate something special. For the unaware, it's just a name. No understanding is necessary. - richard p.s. Yeah, I know IDEs will color code member variables, but I'm not always in an IDE and generally I don't even notice syntax highlighting when I am programming. :-) On Sun, Feb 21, 2010 at 10:04 PM, Romain Guy romain...@android.com mailto:romain...@android.com wrote: It stands for member. I believe the use of an m prefix with MFC has nothing to do with the name MFC either, but rather to identify variables that are class members as opposed to local variables for instance. On Sun, Feb 21, 2010 at 9:52 PM, Christ wutie...@gmail.com mailto:wutie...@gmail.com wrote: Hi guys, I saw many sample codes that each variable contains the 'm' prefix. I don't know what this m means. I have two-year experience in MFC. Each variable has 'm' prefix to tell you that I'm the one variable of MFC component. (m stands for MFC). So...can anybody answer me this question? Regards, Christ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com mailto:romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: relation between ViewRoot and View
It's also something that should not be semantically visible from the SDK; it is just an implementation detail, which should be possible to change in the future without impacting the SDK. On Sun, Feb 21, 2010 at 10:05 PM, Romain Guy romain...@android.com wrote: There's only one ViewRoot for an entire view hierarchy (one ViewRoot per window for instance.) There's certainly not one ViewRoot per View, and it's actually pretty clear when reading the code of ViewRoot and/or View. On Sun, Feb 21, 2010 at 10:03 PM, Guobin zzg...@gmail.com wrote: Some comments in ViewRoot.java ViewRoot: The top of a view hierarchy, implementing the needed protocol between View and the WindowManager. BRs Guobin On Feb 20, 4:53 pm, sheng wang banxia...@gmail.com wrote: Hi , Can any one give more information about ViewRoot and what's the relation between viewroot and view? I found a Viewroot create a surface at its' constructor, which I think is the real bitmap data goes to. So I guess every view has it own viewroot, every view has a surface for drawing and the surfaceflinger will finally blend all surfaces together, but I found it's definitely wrong. How view and viewroot cooperate is quite ambiguous to me. Any information will be 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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.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] Re: Zooming on android - google maps becomes slower
hi , thank you for the response, i tried the above mentioned method but it dint find much changes in the drawing on the maps . if u can fwd any worked example project , it would be more helpful .. we are drawing the tracks/routes on the map after the completion of the track . Problem exists when their is large amount of data collected ( atleast after 10mi data drawn on map) and on every zoom this is re-drawn and hence takes time to display . thank u again , regards Sheik On Feb 15, 6:43 pm, TreKing treking...@gmail.com wrote: One easy thing you could do is early out on the shadow pass. Draw gets called twice, one for the shadow layer and then again for the real drawing. So unless you're doing something with the shadow pass you can exit early: draw(, boolean shadow) { super.draw(..., shadow); if (shadow) return; } mapView.postInvalidateDelayed(6000); Also, why are you doing this? Invalidate is used to force a re-draw ... why would you do this in the draw method? - 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] Software keyboard effecting my layout View
Hi folks, How to design a layout when a soft keyboard is opened?? Am having a requirement that when a keyboard is opened my layout view is to be automatically changed according to the screen size. Currently in my application when soft keyboard is opened it is hiding some buttons.. so how do i overcome 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
[android-developers] Stop Scrolling Gallery
Hi, I'm trying to use gallery as tab bar in my application. So i will add only 5 images to gallery. How to stop scrolling in gallery ? How to make gallery in center ? Any suggestion ? -- 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
Re: [android-developers] Select wallpaper from..
Hi Dianne et al, Can any one help me on this?? regards, Manju On Thu, Feb 18, 2010 at 10:34 PM, Manjunatha M man...@gmail.com wrote: Hi, To hide my activity from the list in Select wallpaper from I have actually written a BroadcastReceiver which on boot completed, does the following. @Override public void onReceive(Context context, Intent intent) { ComponentName componentName = new ComponentName( com.android.manju, com.android.manju.MyActivity.class); int component_state = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; if (toEnable) { component_state = PackageManager.COMPONENT_ENABLED_STATE_ENABLED; } else { component_state = PackageManager.COMPONENT_ENABLED_STATE_DISABLED; } if (context.getPackageManager().getComponentEnabledSetting( componentName) == component_state) return; PackageManager pm = context.getPackageManager(); pm.setComponentEnabledSetting(componentName, component_state, PackageManager.DONT_KILL_APP); } Though the activity is disabled, I could still see my activity in the Select wallpaper from menu.. Please help on this.. On Sun, Feb 14, 2010 at 1:30 AM, Dianne Hackborn hack...@android.comwrote: Use PackageManager.setComponentEnabledSetting() to disable that activity when you don't want it displayed. On Sat, Feb 13, 2010 at 1:44 AM, Manjunatha M man...@gmail.com wrote: yes.. I want that to be configurable. sometimes to show and sometimes not to show in the list of select wallpaper from On Sat, Feb 13, 2010 at 12:07 PM, venkat ranjit ranjit0...@gmail.comwrote: Hi manjuntha ur question is not clear , tell me clearly, in my understanding u want shortcut of ur activity (custom activity). in wallpaper , i want clarity k Regards, Ranjit On Sat, Feb 13, 2010 at 10:03 AM, Manjunatha M man...@gmail.comwrote: Hi Folks, I want to show my Activity in HomeScreen-Menu Press-Wallpapers. This should be dynamic, so that, for some check this should show, and otherwise it should not show. Could anyone please help on this?? -- Regards, Manjunatha -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Manjunatha -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Manjunatha -- Regards, Manjunatha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Abridged summary of android-developers@googlegroups.com - 80 Messages in 34 Topics
I have to parse an html file. Could anyone please tell me which parser to use and how to go about the whole process of parsing ? -- take care, bye. Alisha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Broadcast intent for USB power?
Is there a Broadcast Intent that gets sent out when the device is plugged in for power? I want to create a BroadcastReceiver to detect the device's plugged in state. I've looked everywhere in the Developer's resources and reference, but I can't find anything that resembles what I'm trying to do. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] great way to make money
anyway i found a great way to do just what you want to do work from home and make money just copy this link http://ramzijovan.tycsh001.hop.clickbank.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] No credit card needed on the internet
First on net, Bargain your products in online through our * http://www.shoppingreps.com?SourceId=1159*http://shoppingrepsblog.blogspot.com/ and buy it from your local shop. *No credit card needed on the internet.* It is an innovative shopping model. For more details Visit *http://www.shoppingreps.com?SourceId=1159*http://shoppingrepsblog.blogspot.com/ * --- * Shop online without credit card. It’s only @ http://www.shoppingreps.com?SourceId=1159http://www.shoppingreps.com/?SourceId=1159. Membership is absolutely free. Join and enjoy your shopping. For more details visit www.way2eshopping.0fees.net * --- * -- deva -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 upload an image
Hi to all, I am new to android ,i want upload an image from my gallery in my device,so how can i get that images from my application. Thanks in Advance . Please help me. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem playing audio on android
The following code crashes when I try to play it on my droid. The error message given in the log is Command PLAYER_INIT completed with an error or info PVMFErrNoResources. Then an IOExecption is raised. There is a file res/raw/bell.mp3 in my project directory, which I assume corresponds to R.raw.bell in the code below. I am building with ant debug. In case it's relevant, when I created the project directory with android create, I set the target number to 4, corresponding in my system to android 2.0. What am I doing wrong, here? import java.io.IOException; import android.app.Activity; import android.os.Bundle; import android.media.MediaPlayer; import android.util.Log; public class testapp extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { MediaPlayer mp = MediaPlayer.create(this, R.raw.bell); mp.prepare(); mp.start(); } catch (IOException e) { Log.v(getString(R.string.app_name), e.getMessage()); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en