[android-developers] HAPPY NEW YEAR
HELLO ALL, WISH U ALL A VERY HAPPY PROSPEROUS NEW YEAR. THANKS, NAINA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Memory leak in BitmapFactory/Gallery?
I take that back... I looked a lot more into the issue, and it seems that the leak only occurs when a debugger is attached. Here is something to try when you're plagued by OOMs -- run your app directly through the emulator without a debugger attached. Is the memory situation any better? I notice that I'm leaking lots of memory, even when doing something as primitive as throwing an exception. Without a debugger attached, things seem stable. Not that this means that all my memory woes are solved, but I've just made this discovery and will now need to re- evaluate all OOM problems I had. -Mike On Dec 31 2008, 10:39 am, EboMike ebom...@gmail.com wrote: There is clearly something wrong. I've tried to plug a leak in BitmapFactory.decodeStream() (which is called internally by BitmapFactory.decodeFile() ), and that indeed fixed a memory leak whenever you create a bitmap (seehttp://review.source.android.com/6418), but after Romain reviewed it, I realized that the problem is possibly much deeper in the gc itself. BitmapFactory.decodeStream() sometimes creates a BufferedInputStream() and doesn't close it but in theory, that shouldn't cause a memory leak. The GC should realize that nobody references the BufferedInputStream(), collect it, and thereby realize that nobody holds its enclosing stream and collect that too. Except that this doesn't happen. (Unless I missed something secret that links the FilteredInputStream to the other stream on a lower level.) I've made a simple test app that creates a Bitmap using BitmapFactory.decodeFile() every 10ms. It doesn't even store the return value, and lo and behold, the app runs out of memory unless I modify the Android OS to close the BufferedInputStream. I'll take a peek at the mark and sweep mechanism itself, but it would be more productive if somebody at Android could do that since they're a lot more familiar with all this. Btw, Jose - I too got OOMs when I was nowhere close to 16MB, although my suspicion is that the JNI memory usage is not easily accessible in the DDMS (even though somebody said it is supposedly taken from the app's heap as well). -Mike On Dec 31, 5:35 am, qvark joseluishuertasfernan...@gmail.com wrote: We have also been noticing this kind of behaviour in our application. What is worse, many of the OOM problems (but not all) have been solved using explicits System.gc() calls before the operation that caused the OOM. IMHO this means we were doing our homework releasing all the references to unused objects, but Dalvik was not freeing the memory until we have 'forced' it. This morning have been the last example: take a picture with the camera and display it in a new activity, finish that activity and when you try to capture a new picture you will get an OOM. You could thing we are doing something wrong and there is some reference to the image that prevents it from being garbage collected, but then I modify the activity that takes the pictures and put a System.gc(); before the takePicture() call and... it works! now you can take a picture, visualize it, go back and take another picture as many times as you want. I have always considered an explicit call to System.gc() a bad practice because that should be the VM's work not the programmer one, so I was very puzzled when I tried this and it worked... is this the intended behaviour in Dalvik? should we populate our code with System.gc() calls? BTW, Romain, please believe us when we say there are OOM exceptions when you are not even close to the theoretical 16 MB limit and you try to reserve a significant amount of memory (say 1 MB for example). Thanks, Jose Luis. On Dec 30, 6:42 pm, blindfold seeingwithso...@gmail.com wrote: I wonder if there could be some bug in this intended VM-like behaviour, because my app continuously uses about 3 to 4 MB on the dev phone 1 according to DDMS (with similar figures reported by freeMemory ()), and DDMS reports a heap size of about 6 MB (not a typo, not 16 MB). And yet my app occasionally crashes due to an OutOfMemoryError exception when its peak usage gets close to that fixed 6 MB (not 16 MB), either in my own (modest, few hundred KB) memory allocations - for which I can add try-catch blocks as a crude workaround to keep the app alive, or due an out-of-memory error in the low-level camera preview code, which then inevitably causes a crash. Never do I see the heap (in DDMS) gradually climb up from 6 MB towards 16 MB. Basically it looks like the heap does not always grow even when memory allocations require it? Or has the system already reserved 10 MB of the 16 MB for things that I am not aware of such that the reported heap cannot grow above 6 MB? Thanks On Dec 4, 9:36 am, Romain Guy romain...@google.com wrote: The heap works pretty much like in a regular VM. As your app needs more memory the heap grows accordingly
[android-developers] Re: Could Chinese developper register Android market?
Dan, The article says the remaining amount goes to carriers and billing settlement fees, what about taxes? In the UK we have V.A.T. which is currently chargeable at 15% on services supplied via the Internet. If this is included in the 30% Google deduct then this is great, if this is added then it means the developer will only see 55%. The 15% can be claimed back by VAT registered businesses under certain circumstances, but for non-VAT registered businesses or individuals the 15% can no be claimed back. Can you clarify this point. Thanks, Al. Dan Morrill wrote: This is false. As we've said, developers will receive 70% of the Android Market revenue for their apps, when billing is available. http://android-developers.blogspot.com/2008/10/android-market-now-available-for-users.html - Dan On Fri, Jan 2, 2009 at 5:58 PM, Shane Isbell shane.isb...@gmail.com mailto:shane.isb...@gmail.com wrote: You guys should really take a look at SlideME: http://slideme.org. We are rolling out paid app support next week and SlideME is much more favorable to the developer than the Android Market. For example, excluding taxes, a $2 app sold from the Android Market, after carrier cut and the Google Checkout transaction, you would retain only 58% of the sale price. With SlideME, you will retain 92.5% of the sale. Shane On Fri, Jan 2, 2009 at 4:13 PM, Margaret mawei...@gmail.com mailto:mawei...@gmail.com wrote: I am Chinese and I register Android market with my CMB credit card mawei...@gmail.com mailto:mawei...@gmail.com 13585201588 2009/1/2 EvgenyV evgen...@gmail.com mailto:evgen...@gmail.com: I'm Israeli developer. I completed registration as well. But the question is whether we could upload chargable application and get the income from Google market? Thanks On Dec 12 2008, 5:44 pm, cpedia cpe...@gmail.com mailto:cpe...@gmail.com wrote: Yes. Of course. I registered and successed. I use MasterCard of chinamerchantbank. On Dec 11, 9:02 am, honglian...@gmail.com mailto:honglian...@gmail.com honglian...@gmail.com mailto:honglian...@gmail.com wrote: hi all I Chinese developper have a MasterCard and want to register Android market. But I found the location item has not China. Would you like to let me know if I can ignore this item and use Chinese MasterCard (Bank of China) Android Market successfully? Thank you very much.- Hide quoted text - - Show quoted text - -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: imeem and buffering audio with MediaPlayer
How does the HTTP proxy approach perform as compared to saving to flash and then playing from there? Is there any sample code for trying this proxy server workaround for playing audio? Thanks On Jan 2, 6:32 pm, Dave Sparks davidspa...@android.com wrote: I haven't looked at imeem, but one way to get around the issue is using an HTTP proxy on the device. The proxy server could be buffering up the next stream while the current stream is playing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Which component for image/* mimetype
Hi I use this code to view/play different files: Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); File file = new File(my file); intent.setDataAndType(Uri.fromFile(file), mimetype); startActivity(intent); Using mp3 and audio/* mimetype it works OK for jpg and image/* I get: E/AndroidRuntime( 414): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.camera/ com.android.camera.View Image}: java.lang.IllegalAccessException: access to class not allowed E/AndroidRuntime( 414):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2068) ... I guess I need to know which applications are assigned to each mimetype and how can I change their permission. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Authentication and retrieving problem with Calendar API
hi. I have some problems with android apps using Calendar API. I want to authenticate to google Data API (Calendar API) and retrieve my calendars and calendar's events. I have downloaded the gdata(gdata-src.java-1.28.0.java.zip ) from http://code.google.com/p/gdata-java-client/downloads/list I found the source similar to Calendar Apps, and some examples. But these use the previous version of gdata so, i can't understand where to go some important classes or packages. Here is my test code. private boolean authentication(String user, String pass) { mCalendarService = new CalendarService(fue-WAI-1); // Create the necessary URL objects. try { mUserCalendarUrl = new URL(CalendarService.CALENDAR_ROOT_URL+ Uri.encode(USERNAME)); // USERNAME = shlee3...@gmail.com } catch (MalformedURLException e) { // Bad URL e.printStackTrace(); return false; } catch (Exception e) { e.printStackTrace(); } try { mCalendarService.setUserCredentials(USERNAME, PASSWORD); mAuthTokenFactory = mCalendarService.getAuthTokenFactory(); mAuthToken = mAuthTokenFactory.getAuthToken(); mRequest = mCalendarService.createFeedRequest(mUserCalendarUrl); = error occurs in here. = mRequest.execute(); mParserSource = mRequest.getParseSource(); mCalFeed = ParseUtil.readFeed(mParserSource); } catch (AuthenticationException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } catch (ServiceException e) { // TODO Auto-generated catch block if(e.equals(RedirectRequiredException.class)){ RedirectRequiredException eRRx = (RedirectRequiredException) e.getCause(); String loc = eRRx.getRedirectLocation(); } e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return true; } and there are some codes that i referenced below two link. 1 http://www.koders.com/info.aspx?c=ProjectInfopid=ZUCKKP7CXQN7EMN6UPP15HZTZGs=calendar 2 http://code.google.com/p/androidlbs/source/browse/SampleCalendar/src/org/sample/CalendarDemo/CalendarTest.java?r=21 and last is error log I encountered. 01-03 08:11:38.578: WARN/System.err(193): com.google.gdata.util.RedirectRequiredException: Moved Temporarily 01-03 08:11:38.578: WARN/System.err(193): HTML 01-03 08:11:38.578: WARN/System.err(193): HEAD 01-03 08:11:38.578: WARN/System.err(193): TITLEMoved Temporarily/ TITLE 01-03 08:11:38.587: WARN/System.err(193): /HEAD 01-03 08:11:38.587: WARN/System.err(193): BODY BGCOLOR=#FF TEXT=#00 01-03 08:11:38.587: WARN/System.err(193): H1Moved Temporarily/H1 01-03 08:11:38.587: WARN/System.err(193): The document has moved A HREF=http://www.google.com/calendar/feeds/shlee3469%40gmail.com? gsessionid=ZZePBQtLYXHw7wKpcRkzzAhere/A. 01-03 08:11:38.587: WARN/System.err(193): /BODY 01-03 08:11:38.587: WARN/System.err(193): /HTML 01-03 08:11:38.607: WARN/System.err(193): at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse (GoogleGDataRequest.java:553) 01-03 08:11:38.607: WARN/System.err(193): at com.google.gdata.client.http.HttpGDataRequest.checkResponse (HttpGDataRequest.java:502) 01-03 08:11:38.617: WARN/System.err(193): at com.google.gdata.client.http.HttpGDataRequest.execute (HttpGDataRequest.java:481) 01-03 08:11:38.617: WARN/System.err(193): at com.google.gdata.client.http.GoogleGDataRequest.execute (GoogleGDataRequest.java:527) ... 01-03 08:11:38.627: WARN/System.err(193): at android.view.View.performClick(View.java:2109) 01-03 08:11:38.637: WARN/System.err(193): at android.view.View.onTouchEvent(View.java:3523) 01-03 08:11:38.637: WARN/System.err(193): at android.widget.TextView.onTouchEvent(TextView.java:4410) 01-03 08:11:38.637: WARN/System.err(193): at android.view.View.dispatchTouchEvent(View.java:3178) 01-03 08:11:38.637: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.648: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.648: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.658: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.658: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.658: WARN/System.err(193): at com.android.internal.policy.impl.PhoneWindow
[android-developers] Authentication and retrieving problem with Calendar API
hi. I have some problems with android apps using Calendar API. I want to authenticate to google Data API (Calendar API) and retrieve my calendars and calendar's events. I have downloaded the gdata(gdata-src.java-1.28.0.java.zip ) from http://code.google.com/p/gdata-java-client/downloads/list I found the source similar to Calendar Apps, and some examples. But these use the previous version of gdata so, i can't understand where to go some important classes or packages. Here is my test code. private boolean authentication(String user, String pass) { mCalendarService = new CalendarService(fue-WAI-1); // Create the necessary URL objects. try { mUserCalendarUrl = new URL (CalendarService.CALENDAR_ROOT_URL+ Uri.encode(USERNAME)); // USERNAME = shlee3...@gmail.com } catch (MalformedURLException e) { // Bad URL e.printStackTrace(); return false; } catch (Exception e) { e.printStackTrace(); } try { mCalendarService.setUserCredentials(USERNAME, PASSWORD); mAuthTokenFactory = mCalendarService.getAuthTokenFactory(); mAuthToken = mAuthTokenFactory.getAuthToken(); mRequest = mCalendarService.createFeedRequest (mUserCalendarUrl); = error occurs in here. = mRequest.execute(); mParserSource = mRequest.getParseSource(); mCalFeed = ParseUtil.readFeed(mParserSource); } catch (AuthenticationException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } catch (ServiceException e) { // TODO Auto-generated catch block if(e.equals(RedirectRequiredException.class)){ RedirectRequiredException eRRx = (RedirectRequiredException) e.getCause(); String loc = eRRx.getRedirectLocation(); } e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return true; } and there are some codes that i referenced below two link. 1 http://www.koders.com/info.aspx?c=ProjectInfopid=ZUCKKP7CXQN7EMN6UPP... 2 http://code.google.com/p/androidlbs/source/browse/SampleCalendar/src/... and last is error log I encountered. 01-03 08:11:38.578: WARN/System.err(193): com.google.gdata.util.RedirectRequiredException: Moved Temporarily 01-03 08:11:38.578: WARN/System.err(193): HTML 01-03 08:11:38.578: WARN/System.err(193): HEAD 01-03 08:11:38.578: WARN/System.err(193): TITLEMoved Temporarily/ TITLE 01-03 08:11:38.587: WARN/System.err(193): /HEAD 01-03 08:11:38.587: WARN/System.err(193): BODY BGCOLOR=#FF TEXT=#00 01-03 08:11:38.587: WARN/System.err(193): H1Moved Temporarily/H1 01-03 08:11:38.587: WARN/System.err(193): The document has moved A HREF=http:// www.google.com/~ ... here/A. 01-03 08:11:38.587: WARN/System.err(193): /BODY 01-03 08:11:38.587: WARN/System.err(193): /HTML 01-03 08:11:38.607: WARN/System.err(193): at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse (GoogleGDataRequest.java:553) 01-03 08:11:38.607: WARN/System.err(193): at com.google.gdata.client.http.HttpGDataRequest.checkResponse (HttpGDataRequest.java:502) 01-03 08:11:38.617: WARN/System.err(193): at com.google.gdata.client.http.HttpGDataRequest.execute (HttpGDataRequest.java:481) 01-03 08:11:38.617: WARN/System.err(193): at com.google.gdata.client.http.GoogleGDataRequest.execute (GoogleGDataRequest.java:527) ... 01-03 08:11:38.627: WARN/System.err(193): at android.view.View.performClick(View.java:2109) 01-03 08:11:38.637: WARN/System.err(193): at android.view.View.onTouchEvent(View.java:3523) 01-03 08:11:38.637: WARN/System.err(193): at android.widget.TextView.onTouchEvent(TextView.java:4410) 01-03 08:11:38.637: WARN/System.err(193): at android.view.View.dispatchTouchEvent(View.java:3178) 01-03 08:11:38.637: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.648: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.648: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.658: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.658: WARN/System.err(193): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) 01-03 08:11:38.658: WARN/System.err(193): at com.android.internal.policy.impl.PhoneWindow $DecorView.superDispatchTouchEvent(PhoneWindow.java:1561) 01-03 08:11:38.658: WARN/System.err(193): at
[android-developers] Re: Change active AlarmManager event
if anyone has the solution then please let me know.. On Nov 6 2008, 2:51 pm, hve.dk henrik.v.eriks...@gmail.com wrote: Can you provide me with a small code sample on how to unschedule the old alarm and schedule a new one inside the onReceive event? - TIA. On 6 Nov., 08:52, hackbod hack...@gmail.com wrote: Well you can unschedule the old alarm and schedule a new one. On Nov 5, 6:46 pm, hve.dk henrik.v.eriks...@gmail.com wrote: Is it possible to change a repeating AlarmManager event - after the Activity, that scheduled the intent has finished. I like to change both the time for next event and the intervals between repeats. Is it possible to do it inside the onReceive of the BroadcastReceiver? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Change active AlarmManager event
ApiDemos shows how to schedule and unschedule alarms. You can do it anywhere. On Sat, Jan 3, 2009 at 12:48 AM, ena enu1...@gmail.com wrote: if anyone has the solution then please let me know.. On Nov 6 2008, 2:51 pm, hve.dk henrik.v.eriks...@gmail.com wrote: Can you provide me with a small code sample on how to unschedule the old alarm and schedule a new one inside the onReceive event? - TIA. On 6 Nov., 08:52, hackbod hack...@gmail.com wrote: Well you can unschedule the old alarm and schedule a new one. On Nov 5, 6:46 pm, hve.dk henrik.v.eriks...@gmail.com wrote: Is it possible to change a repeating AlarmManager event - after the Activity, that scheduled the intent has finished. I like to change both the time for next event and the intervals between repeats. Is it possible to do it inside the onReceive of the BroadcastReceiver? -- 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. 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: Receive notification for onDestroy, onStop, and onPause etc in other applications?
Please don't write an app that depends on parsing stuff out of the logs. This is not a defined part of the SDK, and your app will surely break in the future. On Fri, Jan 2, 2009 at 2:20 PM, focuser linto...@gmail.com wrote: Thanks Alistair and Dianne, Now I understand that a notification is not possible, But how does an app with READ_LOGS permission access system log? I couldn't find any documentation about this either. I'm guessing if one could read the log, the app could pretty much know when an app is killed because the ActivityManager write a line into the log when this happens. On Jan 2, 11:29 am, Dianne Hackborn hack...@android.com wrote: No, sorry. On Fri, Jan 2, 2009 at 8:26 AM, focuser linto...@gmail.com wrote: anyone please? On Jan 1, 10:26 am, focuser linto...@gmail.com wrote: Just to clarify: by this I meant to receive notification when onDestroy, onStop etc in other applications are called, i.e. somehow monitor the life cycle of apps running on the phone. On Dec 31 2008, 5:01 pm, focuser linto...@gmail.com wrote: Hi, Is there a way to programmatically receive notification onDestroy, onStop, and onPause etc in other applications on the phone? I see there's a READ_LOGS permission and guess this might be achieved by reading the system log. But I couldn't find anything to access the system logs. Thanks and Happy New Year! -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- 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. 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: suggestion. replace onActivityResult(), Request Code and Result Codes with flexible callbacks
This is not a problem. The calling activity supplies the request code, and the called activity supplies the result code. This is why they are two distinct values, so there can be no overlap or ambiguity in the assigned values. On Sun, Dec 28, 2008 at 9:40 PM, brnzn brendon.mathe...@gmail.com wrote: Something like Anil is suggesting is probably eventually going to be essential for the platform as without it re-using 3rd party activities is problematic. Imagine a case where from your activity you want to invoke two different 3rd party activities to do some particular tasks and give you back results. It's possible both those activities might use the same requestCode and resultCode values, meaning that in your onActivityResult() method, you're going to have a hard time figuring out what actually happened. There's a post on the developerLife blog where the author basically implemented what Anil is suggesting in his own Activity sub-class: http://developerlife.com/tutorials/?p=302 While this works, it re-purposes the requestCode parameter which should represent the verb (Add, delete, whatever) to instead be a unique identifier for the request. It would be better if the framework provided direct support for this. On Dec 15, 11:24 am, Anil anil.r...@gmail.com wrote: I am willing to collaborate with anyone interested to implement this. I don't have the ability, knowledge or desire to implement it alone. BTW, are you the Dianne in the Android video here? http://www.youtube.com/watch?v=3aUjukCdPyQ On Dec 12, 3:01 pm, Dianne Hackborn hack...@android.com wrote: Whoops, sorry I missed that you were talking about having the callback be a method name. That would indeed be more possible to implement... but still, this is not nearly as high a priority as many other things, so the way to get this done is to contribute a patch. On Fri, Dec 12, 2008 at 12:59 PM, Dianne Hackborn hack...@android.com wrote: (This would be more appropriate for the android-framework group to talk about changes to the platform.) There is currently no plan for doing this kind of thing, because it is extremely problematic to deal with the case when the activity's process is killed and restarted between startActivityForResult() and eventually receiving the result. If this is something you really want, you are welcome to work on a patch you can contribute to add the feature. On the priority list of the people currently working on the platform, though, it is very low because: (1) Given the processing killing issue, an API as simple as being described is impossible to do, so it would need to be more complicated, making its utility unclear. (2) Whatever desired API there is can just as easily be implemented by the application, it doesn't need to be done in the framework. There is very little additional capabilities the framework has to do this, except possibly the chance to change the result from an int to a string (and so being able to make it say a class name that it dynamically instantiates when delivering the result). On Fri, Dec 12, 2008 at 9:39 AM, Anil anil.r...@gmail.com wrote: Objective: simpler and arguably more elegant design by making object oriented and remove the mass of switch statements that result using only one fixed callback method - onActivityResult(), Request Code and Result Codes. Suggestion: modify API so that calling startActivityForResult() will be instead startActivityForResult(callbackMethodName). where callbackMethodName is a method. We could simply use a String rather than Method, to keep things simple. callbackMethodName(Bundle result) { } If an error happens in the sub activity, then the exception that is thrown, is delivered to callbackMethodName() which must contain an empty try block at the beginning. try{ } catch(e1){ handle exception e1 thrown in the call to the sub activity } catch(e2) { handle exception e2 thrown in the call to the sub activity } now other normal code in callbackMethodName() Any other result information is communicated by the Bundle result parameter. (I have submitted it as a suggestion in issue tracker. http://code.google.com/p/android/issues/detail?id=1520) -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- 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. All such questions should be posted on public forums, where I and others
[android-developers] Re: Pass state from Activity to Service
Thanks, my code works fine now! It was a typo... On Jan 2, 1:47 pm, Brad Gies rbg...@gmail.com wrote: You haven't really given enough information for a definitive answer. Are you calling the following somewhere? public void startService(){ super.onStart(); But, I would also put an if (b != null) in as the third line to stop the next exception. Can you post your Stack trace or logcat? It should have enough information to figure out what the problem is. Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076www.bgies.com www.truckerphone.comwww.EDI-Easy.com www.pricebunny.com - Moderation in everything, including abstinence -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of mobilek...@googlemail.com Sent: Friday, January 02, 2009 6:28 AM To: Android Developers Subject: [android-developers] Re: Pass state from Activity to Service Can anyone help me pls? On Jan 1, 3:59 pm, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, I'm having hard time working out how to accomplish that. In my activity I call my service as follows: private void startService(){ Intent myIntent = new Intent(this, MyService.class); Bundle b = new Bundle(); b.putSerializable(userBean, user); myIntent .putExtra(MainActivity, b); startService(myIntent ); } Than I try to retrieve the state from the onStart(Intent, int) method from my service like that: public void onStart(Intent intent, int startId) { Bundle b = intent.getBundleExtra(MainActivity); User user = (User) b.getSerializable(userBean); Log.i(User Name:, user.getName()); } Everytime the service gets called, the compiler throws a NullPointerException from the onStart(Intent, int) method. Pls help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to start the standard MusicBrowserActivity?
Ok I found out how to do so: Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); File file = new File(your mp3); intent.setDataAndType(Uri.fromFile(file), audio/*); startActivity(intent); On Dec 23 2008, 1:16 am, geoff.stromb...@gmail.com wrote: Hello, From within my application, I'd like to start the standard MusicBrowserActivity (found in Music.apk) which is built into Android. I want to start it programmatically, just as if the user had picked Music from the application launcher. The class for this Activity is: com.android.music.MusicBrowserActivity However, I can't create an Intent explicitly referencing this class because I can't import the package com.android.music (at least not with the default ADT eclipse setup). Any ideas on how I can programmatically start MusicBrowserActivity? Thanks for any pointers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 write code to uninstall apk from device/emulator?
This answer makes me sad, my boss ordered me to do that. - Original Message - From: Shane Isbell To: android-developers@googlegroups.com Sent: Saturday, January 03, 2009 3:36 PM Subject: [android-developers] Re: How to write code to uninstall apk from device/emulator? On Fri, Jan 2, 2009 at 11:23 PM, Dr. Tingrong Lu lutingr...@hotmail.com wrote: Hi, Thanks for your reply. I mean how to write code to uninstall apk from device/emulator, not in an interactive commander line or shell. With SDK0.9, there's a method, packagemanager.deletePackage(), but with SDK1, that method is removed. I wonder how to uninstall apk with SDK1. You can't do it. Thanks - Original Message - From: kiran raj To: android-developers@googlegroups.com Sent: Saturday, January 03, 2009 2:33 PM Subject: [android-developers] Re: How to write code to uninstall apk from device/emulator? Hi , this is the coding for uninstall the apk file. *adb uninstall apk_filename in command mode *using emulator Go to the dev tools go to package browser then unistall the package name now ur emulator delelte that package Thank u --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Could Chinese developper register Android market?
Would be better if some Android market/Google official person will respond at least one time. Thanks On Sat, Jan 3, 2009 at 10:34 AM, Al Sutton a...@funkyandroid.com wrote: Dan, The article says the remaining amount goes to carriers and billing settlement fees, what about taxes? In the UK we have V.A.T. which is currently chargeable at 15% on services supplied via the Internet. If this is included in the 30% Google deduct then this is great, if this is added then it means the developer will only see 55%. The 15% can be claimed back by VAT registered businesses under certain circumstances, but for non-VAT registered businesses or individuals the 15% can no be claimed back. Can you clarify this point. Thanks, Al. Dan Morrill wrote: This is false. As we've said, developers will receive 70% of the Android Market revenue for their apps, when billing is available. http://android-developers.blogspot.com/2008/10/android-market-now-available-for-users.html - Dan On Fri, Jan 2, 2009 at 5:58 PM, Shane Isbell shane.isb...@gmail.com mailto:shane.isb...@gmail.com wrote: You guys should really take a look at SlideME: http://slideme.org. We are rolling out paid app support next week and SlideME is much more favorable to the developer than the Android Market. For example, excluding taxes, a $2 app sold from the Android Market, after carrier cut and the Google Checkout transaction, you would retain only 58% of the sale price. With SlideME, you will retain 92.5% of the sale. Shane On Fri, Jan 2, 2009 at 4:13 PM, Margaret mawei...@gmail.com mailto:mawei...@gmail.com wrote: I am Chinese and I register Android market with my CMB credit card mawei...@gmail.com mailto:mawei...@gmail.com 13585201588 2009/1/2 EvgenyV evgen...@gmail.com mailto:evgen...@gmail.com : I'm Israeli developer. I completed registration as well. But the question is whether we could upload chargable application and get the income from Google market? Thanks On Dec 12 2008, 5:44 pm, cpedia cpe...@gmail.com mailto:cpe...@gmail.com wrote: Yes. Of course. I registered and successed. I use MasterCard of chinamerchantbank. On Dec 11, 9:02 am, honglian...@gmail.com mailto:honglian...@gmail.com honglian...@gmail.com mailto:honglian...@gmail.com wrote: hi all I Chinese developper have a MasterCard and want to register Android market. But I found the location item has not China. Would you like to let me know if I can ignore this item and use Chinese MasterCard (Bank of China) Android Market successfully? Thank you very much.- Hide quoted text - - Show quoted text - -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 a RTSP connection
exactly,opencore dose not support mp3 rtp playback, whatever it's rfc3119 or rfc2250. On Dec 20 2008, 3:37 am, kamil kamit...@gmail.com wrote: Hi, I've encountered the very same error as described above. I'm using VLC as MP3/RTSP streaming server, and this looks exactly like Android didn't like something he got in DESCRIBE SDP response. SDP looks like: v=0 o=- 2819777490 2 IN IP4 192.168.100.108 c=IN IP4 0.0.0.0 t=0 0 a=tool:vlc 0.9.8a a=range:npt=0-176.091 m=audio 0 RTP/AVP 14 a=rtpmap:14 MPA/9 a=control:rtsp://192.168.100.108:5554/Test/trackID=0 VLC is streaming single MP3 file. Debug shows MediaPlayer's error (-1,0) and I haven't manage to find any explanation of this message. Does anyone have any idea? Thanks in advance Kamil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 a RTSP connection
http://code.google.com/p/android/issues/detail?id=1513 On Jan 3, 6:33 pm, Paranoia zheny...@gmail.com wrote: exactly,opencore dose not support mp3 rtp playback, whatever it's rfc3119 or rfc2250. On Dec 20 2008, 3:37 am, kamil kamit...@gmail.com wrote: Hi, I've encountered the very same error as described above. I'm using VLC as MP3/RTSP streaming server, and this looks exactly like Android didn't like something he got in DESCRIBE SDP response. SDP looks like: v=0 o=- 2819777490 2 IN IP4 192.168.100.108 c=IN IP4 0.0.0.0 t=0 0 a=tool:vlc 0.9.8a a=range:npt=0-176.091 m=audio 0 RTP/AVP 14 a=rtpmap:14 MPA/9 a=control:rtsp://192.168.100.108:5554/Test/trackID=0 VLC is streaming single MP3 file. Debug shows MediaPlayer's error (-1,0) and I haven't manage to find any explanation of this message. Does anyone have any idea? Thanks in advance Kamil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 write code to uninstall apk from device/emulator?
Dr. Lu, Don't be sad, I believe there must be a way:) PackageManager.installPackage is still there in cupcake branch. Maybe it's just not exposed in public sdk. On Sat, Jan 3, 2009 at 6:30 PM, Dr. Tingrong Lu lutingr...@hotmail.comwrote: This answer makes me sad, my boss ordered me to do that. - Original Message - *From:* Shane Isbell shane.isb...@gmail.com *To:* android-developers@googlegroups.com *Sent:* Saturday, January 03, 2009 3:36 PM *Subject:* [android-developers] Re: How to write code to uninstall apk from device/emulator? On Fri, Jan 2, 2009 at 11:23 PM, Dr. Tingrong Lu lutingr...@hotmail.comwrote: Hi, Thanks for your reply. I mean how to write code to uninstall apk from device/emulator, not in an interactive commander line or shell. With SDK0.9, there's a method, packagemanager.deletePackage(), but with SDK1, that method is removed. I wonder how to uninstall apk with SDK1. You can't do it. Thanks - Original Message - *From:* kiran raj mkkiran...@gmail.com *To:* android-developers@googlegroups.com *Sent:* Saturday, January 03, 2009 2:33 PM *Subject:* [android-developers] Re: How to write code to uninstall apk from device/emulator? Hi , this is the coding for uninstall the apk file. *adb uninstall apk_filename in command mode *using emulator Go to the dev tools go to package browser then unistall the package name now ur emulator delelte that package Thank u --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Problem with list.setOnItemSelectedListener (new OnItemSelectedListener() {});
Hi, somebody knows why when nothing is selected on the list LIST the variable TextView ADNAME doesn't set the text toto in the code above? But the first String in position 0 of the String[]name? Why this code works only when a row of the list is selected? LIST.setOnItemSelectedListener (new OnItemSelectedListener() { public void onItemSelected( AdapterView? parent, View view, int position, long id) { String[] name= mStrings.get(position); ADNAME.setText(name[1].toString()); } public void onNothingSelected(AdapterView? parent) { ADNAME.setText(toto); } }); 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: How To Start a RTSP connection
thanks. you mean pv will not support mp3 rtp in opencore. right? or it is some value-add feature? i heard that it's not opencore in G1, but core. On Jan 3, 9:45 pm, Ravi Yenduri yend...@pv.com wrote: http://code.google.com/p/android/issues/detail?id=1513 On Jan 3, 6:33 pm, Paranoia zheny...@gmail.com wrote: exactly,opencore dose not support mp3 rtp playback, whatever it's rfc3119 or rfc2250. On Dec 20 2008, 3:37 am, kamil kamit...@gmail.com wrote: Hi, I've encountered the very same error as described above. I'm using VLC as MP3/RTSP streaming server, and this looks exactly like Android didn't like something he got in DESCRIBE SDP response. SDP looks like: v=0 o=- 2819777490 2 IN IP4 192.168.100.108 c=IN IP4 0.0.0.0 t=0 0 a=tool:vlc 0.9.8a a=range:npt=0-176.091 m=audio 0 RTP/AVP 14 a=rtpmap:14 MPA/9 a=control:rtsp://192.168.100.108:5554/Test/trackID=0 VLC is streaming single MP3 file. Debug shows MediaPlayer's error (-1,0) and I haven't manage to find any explanation of this message. Does anyone have any idea? Thanks in advance Kamil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Receive notification for onDestroy, onStop, and onPause etc in other applications?
oh thanks Dianne, Does that mean there's no defined ways so far to determine whether an app is killed or not? On Jan 3, 1:31 am, Dianne Hackborn hack...@android.com wrote: Please don't write an app that depends on parsing stuff out of the logs. This is not a defined part of the SDK, and your app will surely break in the future. On Fri, Jan 2, 2009 at 2:20 PM, focuser linto...@gmail.com wrote: Thanks Alistair and Dianne, Now I understand that a notification is not possible, But how does an app with READ_LOGS permission access system log? I couldn't find any documentation about this either. I'm guessing if one could read the log, the app could pretty much know when an app is killed because the ActivityManager write a line into the log when this happens. On Jan 2, 11:29 am, Dianne Hackborn hack...@android.com wrote: No, sorry. On Fri, Jan 2, 2009 at 8:26 AM, focuser linto...@gmail.com wrote: anyone please? On Jan 1, 10:26 am, focuser linto...@gmail.com wrote: Just to clarify: by this I meant to receive notification when onDestroy, onStop etc in other applications are called, i.e. somehow monitor the life cycle of apps running on the phone. On Dec 31 2008, 5:01 pm, focuser linto...@gmail.com wrote: Hi, Is there a way to programmatically receive notification onDestroy, onStop, and onPause etc in other applications on the phone? I see there's a READ_LOGS permission and guess this might be achieved by reading the system log. But I couldn't find anything to access the system logs. Thanks and Happy New Year! -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- 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. 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: http proxy
Hi Krishna - Are you trying to set the proxy for the device as a whole, or just for a specific app? If you're trying to use a proxy from within an application you're working on, I'd recommend looking at the API for URL.openConnection(Proxy p); one of the variants of this call takes a proxy as an argument. I've used it and it works quite well. If you're trying to get the device itself to work from behind a proxy (i.e. browser, mail, all the built-in apps), I'm not sure if it's possible to do this from the ui without doing some fiddling around with adb commands. I've only gotten this to work from an emulator, by SSH-ing into the device and changing some tables in the settings database. Never tried from a real device. Dan On Jan 3, 1:50 am, kpowerinfinity kpowerinfin...@gmail.com wrote: Hi, Is there a way to set the http proxy behind a wifi network? I looked around but couldn't find any option. Even a non-authenticated proxy setting will do. There's no way to do this in the settings page, and I could neither find any app that let's me do this. Thanks, Krishna. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: imeem and buffering audio with MediaPlayer
I haven't tried it myself and don't have any sample code. The proxy approach has one advantage over simple file playback: It can start playing as soon as there is a reasonable amount of content downloaded - assuming the content is formatted properly for streaming. For local file playback, I believe that OpenCore seeks to the end immediately to find the end of the file and that won't work with a partial download. On Jan 3, 12:37 am, blindfold seeingwithso...@gmail.com wrote: How does the HTTP proxy approach perform as compared to saving to flash and then playing from there? Is there any sample code for trying this proxy server workaround for playing audio? Thanks On Jan 2, 6:32 pm, Dave Sparks davidspa...@android.com wrote: I haven't looked at imeem, but one way to get around the issue is using an HTTP proxy on the device. The proxy server could be buffering up the next stream while the current stream is playing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: When will the Media classes be able to connect to telephone 'conversation' audio channels ?
It may be a compelling feature, but it's outside the control of the apps processor. It is up to the hardware manufacturer to implement this, not Android. My understanding is that there are strict latency requirements on GSM audio that makes it difficult to loop call audio through the apps processor. On Jan 2, 4:06 pm, mashpl...@gmail.com mashpl...@gmail.com wrote: This is a mistake. There are many reasons why exposing in-call audio to the apps process is a good idea. Please reconsider your position on this. Kind Regards, Vince On Jan 3, 1:27 am, Dave Sparks davidspa...@android.com wrote: There are no plans for exposing in-call audio to the apps processor. In-call audio is controlled by the radio and typically not accessible to the apps processor. On Dec 26 2008, 10:00 pm, StevenS shearer_ste...@hotmail.com wrote: If I'm reading the API documentation correctly, neither the MediaRecorder.AudioSource nor the MediaPlayer.AudioSource can connect to the telephone conversation audio channels - eg. the TELEPHONE CONVERSATION microphone speaker 'lines'. Both of these would be required to support advanced call handling applications ON THE DEVICE. Are there any plans to support this type of functionality ? When might it be available ? Thanks, Steven. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Customizing ListAdapter
This class was renamed a long time ago, it is now called LayoutInflater and it works exactly the same way. On Fri, Jan 2, 2009 at 11:21 PM, Sarath Kamisetty sarath.kamise...@gmail.com wrote: Hi, The examples in the blog are using ViewInflate class, however I can't find this class in the SDK API reference. http://code.google.com/android/reference/classes.html#letter_V Is this deprecated ? Eclipse is also complaining about this. Thanks, Sarath On Wed, Dec 31, 2008 at 6:01 AM, Mark Murphy mmur...@commonsware.com wrote: Sarath Kamisetty wrote: Hi, I have a ListActivity for which I am setting up ListAdapter like below: phoneListAdapter = new SimpleCursorAdapter(this, R.layout.contacts_list_row, managedCursor, new String[] { PhonesColumns.NUMBER, PhonesColumns.TYPE}, new int[] { R.id.text1, R.id.text2 }); setListAdapter(phoneListAdapter); However, the output here is not readable as PhonesColumns.TYPE is displaying number strings like 2, 1 etc. A sample output that I get is like below: 111-222- 2 222-333- 1 I want to make it more readable by converting them to Mobile, Home, Work etc. A sample desired output list is like below: 111-222- MOBILE 222-333- WORK Essentially, I don't want the columns to be displayed as is. How do I achieve this ? There are two ways to approach this: as a data problem, or as a view problem. As a data problem, you could create your own CursorWrapper class that wraps your managedCursor and converts PhonesColumns.TYPE into something more user-friendly. I tend to look at this as a view problem, so I create a custom adapter that creates my own views, where I can make 2, 1 be MOBILE, WORK or different icons or whatever I feel like. I have a whole series of blog posts up on this topic: http://androidguys.com/?s=fancy+listviews Forgive the formatting, and be aware that the older posts are for the M5 SDK and so need some tweaking to work on the current SDK. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml -- 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] Re: When does one use a SurfaceView vs a View?
If you are implementing a game or any other application that has complex animations, a SurfaceView will eek out more frames per second. That is, your class that extends View and implements the custom drawing could extend SurfaceView instead of View to have minimum overhead aside from the drawing. My suggestion would be to start with a normal view (calling invalidate () from within the onDraw() method to keep the animation going), profile the drawing time, and only then bother switching to a surface view if the frames per second is too low (60 frames per second or greater is perfect, 30 is the minimum to not start looking choppy). an example of using a normal view for a game: http://code.google.com/p/apps-for-android/source/browse/trunk/DivideAndConquer/src/com/google/android/divideandconquer/DivideAndConquerView.java?r=40 to see an example of a SurfaceView in action, see LunarView in the lunar lander app in the sample code included with the SDK. then again, if you know you want to maximize the frames per second from the outset, you might just start with a SurfaceView. Karl On Dec 27 2008, 10:54 am, Satya Komatineni satya.komatin...@gmail.com wrote: What doesSurfaceViewabstraction stand for? The documentation suggests thatSurfaceViewallows a secondary thread to draw on it. When would one specialize View vsSurfaceView? Thanks for your help Satya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: http proxy
Hi Dan, I do want to use a proxy in a _real_ device, for the existing firewall and all the other built in apps. It sounds really stupid if there is no way to set a proxy even though there is a way to access it programmatically. I have to travel to a university quite frequently on work, and their network is accessible only through a proxy server! Anybody knows if the option is hidden somewhere? Or at least an app that might help me do this? I wouldn't mind coding it myself, but unfortunately don't have the time! Thanks, Krishna. On Jan 3, 8:55 pm, DanG dan.greenbl...@gmail.com wrote: Hi Krishna - Are you trying to set the proxy for the device as a whole, or just for a specific app? If you're trying to use a proxy from within an application you're working on, I'd recommend looking at the API for URL.openConnection(Proxy p); one of the variants of this call takes a proxy as an argument. I've used it and it works quite well. If you're trying to get the device itself to work from behind a proxy (i.e. browser, mail, all the built-in apps), I'm not sure if it's possible to do this from the ui without doing some fiddling around with adb commands. I've only gotten this to work from an emulator, by SSH-ing into the device and changing some tables in the settings database. Never tried from a real device. Dan On Jan 3, 1:50 am, kpowerinfinity kpowerinfin...@gmail.com wrote: Hi, Is there a way to set the http proxy behind a wifi network? I looked around but couldn't find any option. Even a non-authenticated proxy setting will do. There's no way to do this in the settings page, and I could neither find any app that let's me do this. Thanks, Krishna. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: imeem and buffering audio with MediaPlayer
Thank you David. I was considering whether I should pursue this approach as an ad interim solution, but lacking experience in this sort of http server programming it could take a lot of time and effort to figure things out and make it robust, so in principle I'd rather wait for the more general solution in a future SDK, until then continuing with the cache-to-flash approach. Regards On Jan 3, 5:33 pm, Dave Sparks davidspa...@android.com wrote: I haven't tried it myself and don't have any sample code. The proxy approach has one advantage over simple file playback: It can start playing as soon as there is a reasonable amount of content downloaded - assuming the content is formatted properly for streaming. For local file playback, I believe that OpenCore seeks to the end immediately to find the end of the file and that won't work with a partial download. On Jan 3, 12:37 am, blindfold seeingwithso...@gmail.com wrote: How does the HTTP proxy approach perform as compared to saving to flash and then playing from there? Is there any sample code for trying this proxy server workaround for playing audio? Thanks On Jan 2, 6:32 pm, Dave Sparks davidspa...@android.com wrote: I haven't looked at imeem, but one way to get around the issue is using an HTTP proxy on the device. The proxy server could be buffering up the next stream while the current stream is playing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: changing string resources
Just make sure I'm not missing something... I have some code: public class MyLangTest extends Activity { @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); String fromResources = getResources().getString(r.string.f_name); //Displayed First Name Locale newLocale = new Locale(cs, CZ); Locale.setDefault(newLocale) String fromResourcesLang = getResources().getString(r.string.f_name); //Expected First Name Other Language //But in fact still displayed First Name } } default xml values\ string name=f_nameFirst Name/string values-cs-rCZ\ string name=f_nameFirst Name Other Language/string When I'm watchig this.mCurrentConfig.locale value is still en_US Is it my mistake or SDK doesn't support this locale changes? 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: WebView Behavior on Android
Interesting ... 1. Yes one thread as that is why your addjavascripr interface has to be on a different thread to allow UI changes 2. not sure about this oine yet When I have mor e info it wil be posted to PlanetAndroid.com and blog and youtube channel as I videocast my demos.. Mine, Xspot is targeted for both Android iPhone using same techniques,, We might have some techniques to exchange with each other.. Which UI lib did you settle on iUI or CiUI? On Jan 2, 4:50 am, Tez earlencefe...@gmail.com wrote: Hi, I have a few questions about the behavior of a WebView 1. When an activity launches a web view, and when the webview displays a page, is it all in the same thread? 2. When I click on the BACK button in the emulator when the web view is running, is the process that runs it stopped and cleaned up? Cheers, Earlence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Should be able to launch an Activity from the browser (not a WebView)
There is not an obvious way..iPhone has the same problem. In the PhoneGap js lib project tackled it by doing a native class to enable the 'intent' and use the javascript bridge to access it and call it.. The other project more specific to Android is the OpneIntents project at googlecode.. On Dec 31 2008, 11:36 pm, Tim Bray timb...@gmail.com wrote: Yes, I know you can do this from your handbuilt WebView. But I suggest that it's a serious lack in Android that I can't launch an Activity from Javascript straight out of the regular browser. I have built an Activity that does some cool stuff given a URI, and URIs are commonly encountered in browsers, and I'd like to be able to attach some javascript to it along the lines of: if (running on android) { startActivity(new Intent(mumble)); } Am I the only one to whom this seems like this might be useful? Or (even better) is there an obvious way to do this from the browser rather than WebView? -Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: WebView and JavaScript functionality
See the PhoneGap examples and the webview demo android -apps at googlecode.. On Jan 1, 10:38 pm, Tez earlencefe...@gmail.com wrote: Hi, Thanks for that advice. Also, I heard that AJAX calls are not supported from within the WebView. So it would be logical to implement a native layer that takes care of Network I/O. Are there any other ways of doing this? Cheers, Earlence On Jan 1, 6:50 pm, mboehmer 4...@phoku.de wrote: Hi, execution of normal JavaScript should be possible. But you have to turn it on. Best regards mboehmer On 1 Jan., 14:16, Tez earlencefe...@gmail.com wrote: Hi, I'm trying to launch a Web2.0 app from within a WebView. Can anyone tell me what kind of JavaScript functionality is available to web apps from within the WebView environment? Cheers, Earlence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: GridView
I'm interested in this question aswell, and how you can set the height of each row for that matter, would be nice not to have to reimplement the whole GridView. Regards, //Erik On Dec 9 2008, 10:42 am, Andriy Zakharchuk andriy.zakharc...@gmail.com wrote: Hello Xavier, what I'm trying to do is to get android.widget.GridViewstretched to screen. private LinearLayout panelContent = null; privateGridViewgridViews = null; ... panelContent = new LinearLayout(this); // Custom adapter implementation ListAdapterImpl adapter = new ListAdapterImpl(); gridViews = newGridView(this); gridViews.setAdapter(adapter); gridViews.setNumColumns(2); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT, 1 ); panelContent.addView(gridViews, lp); setContentView(panelContent); In this caseGridViewcovers all the screen, however, grid item views take as much space as they need. What I'm trying to get. Lets imagine the screen is in the portrait mode, screen size (to make it simpler - grid view height) is 480 pixels.GridViewhas two colums. Then: - when I have 1 or 2 elements (1 row) row height should be 480 pixels. - when I have 3 or 4 elements (2 rows) row height should be 240 pixels. - when I have 5 or 6 elements (3 rows) row height should be 160 pixels. - and so on. I can not control grid view item height with ListAdapter.getView(). I looked into AbsListView.generateLayoutParams(), but it work with AbsListViewLayout params which doesn't support smth like weight. So I was not able to redistribute extra space(height) between grid view items. On Dec 1, 9:46 pm, Xavier Mathews xavieruni...@gmail.com wrote: Where are you trying to stretch this? I believe you can if you are talking about android i can go see for you. Xavier A. Mathews Student/Browser Specialist/Developer/Web-Master Google Group Client Based Tech Support Specialist Hazel Crest Illinois xavieruni...@gmail.com¥xavieruni...@hotmail.com¥truestar...@yahoo.com Fear of a name, only increases fear of the thing itself. On Mon, Dec 1, 2008 at 8:47 AM, Andriy Zakharchuk andriy.zakharc...@gmail.com wrote: Hello all, I have a question about grid view: is there any chance to stretch GridViewvertically. What I'm trying to do is to create a screen with a limited number of items (6). I need exactly 2 columns and 3 rows (or 3x2 in landscape mode) to fill all the screen. In a grid view I can control columns number, and columns stretching mode, but not rows. I'm looking into overriding AbsListView.generateLayoutParams() method, but want to ask first. Probably, there is some simpler way available. Thank you in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use WSDL web service in Android
It is possible to insert a timeout in AndroidHttpTransport that thrown an Exception when the url is down or not respond? Please give me some example of code thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to track menu navigation focus changes?
I've submitted it now as issue 1705: http://code.google.com/p/android/issues/detail?id=1705 In my own app I now use a ListView to replace Menu altogether, and that finally works. Regards On Dec 30 2008, 3:12 am, Enginerd enginer...@gmail.com wrote: I'm having a similar issue. I guess you could set up listeners for key up/down (and/or scroll), and check to see where thefocusis. It's tacky, but I think it would work for a simple scroll list. Not sure if this would work for all phones though, and it would definitely be a good thing to have. On Dec 26, 11:46 am, blindfold seeingwithso...@gmail.com wrote: In other words, what is the rationale behind Android lacking something like an android.view.MenuItem.OnFocusChangeListener, while there does exist an android.view.View.OnFocusChangeListener? After all, the ListView - which is functionally not all that different from aMenu- supports both a setOnFocusChangeListener() and a setOnItemClickListener (). Why wasMenunot designed as a subclass of View such that it would have naturally inherited the listeners? Android currently seems to lack some key functionality for accessibility. Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use built in email application to send email from my application?
This doesn't seem to work for regular text file. I have tried giving mime types of */*, text/plain etc. Anyone knows how to attach text files using Gmail? Doesn't even work from Gmail app. On Dec 12 2008, 12:08 pm, Peli peli0...@googlemail.com wrote: I'd love to see that one extra line in your example that shows how to add an image fileattachmentwith the image file stored on the SD card. :-) Oh, sorry, you said image. sendIntent.setType(image/png); sendIntent.putExtra(Intent.EXTRA_STREAM, file:///sdcard/ mygirlfriend.png); I'm sure the next question is how to have both, subject andattachment, but I'll leave this as an exercise to the reader :-) Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use built in email application to send email from my application?
Is there a way to actually send the email without having the user choose an email client and hitting send? (without using a network connection and having a server do it on the back end) On Jan 3, 7:11 pm, Abraham Lincoln mehtabhave...@gmail.com wrote: This doesn't seem to work for regular text file. I have tried giving mime types of */*, text/plain etc. Anyone knows how to attach text files using Gmail? Doesn't even work from Gmail app. On Dec 12 2008, 12:08 pm, Peli peli0...@googlemail.com wrote: I'd love to see that one extra line in your example that shows how to add an image fileattachmentwith the image file stored on the SD card. :-) Oh, sorry, you said image. sendIntent.setType(image/png); sendIntent.putExtra(Intent.EXTRA_STREAM, file:///sdcard/ mygirlfriend.png); I'm sure the next question is how to have both, subject andattachment, but I'll leave this as an exercise to the reader :-) Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use WSDL web service in Android
I thought that would be implement by ourself. mawei...@gmail.com 13585201588 2009/1/4 Cattivik alberto.bott...@gmail.com: It is possible to insert a timeout in AndroidHttpTransport that thrown an Exception when the url is down or not respond? Please give me some example of code thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Store last selected items in Spinner across different app-launching
Hi, I want to save the selected item somehow, so that the selected item is shown as the selected spinner item next time the same activity is launched. How can I achieve that? Thanks, public class MyActivity extends Activity { private Spinner mSpinner; ... public void onCreate(Bundle savedInstanceState) { Cursor cursor = mDbHelper.fetchAllItems(); // get all items from database. startManagingCursor(cursor); ListString items = new ArrayListString(); while (cursor.moveToNext()) { items.add(name); }; Collections.sort(items); ArrayAdapterCharSequence adapter = new ArrayAdapter( this, android.R.layout.simple_spinner_item, items); adapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item); mSpinner.setAdapter(adapter); mSpinner.setOnItemSelectedListener( new OnItemSelectedListener() { public void onItemSelected( AdapterView? parent, View view, int position, long id) { // QUEASTION: I WANT TO SAVE THE SELECTION SOMEHOW, // SO THAT next the selected item is selected/ shown in the spinner by default } }); } A related question: is there a way that I can use SimpleCursorAdapter directly and sort the displayed items in alphabetic order? -- the default SimpleCursorAdapter does not seems to be able to do that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Stumped on launching Market app
I just can't find a simple bit of sample code online that shows how to do this so I'm trying to piece it together as best as I can. Any help is appreciated. I am following the suggestions on the doc page page about publishing w.r.t. notifying users of version updates. I already have a simple text file on my website that indicates the current version and I can successfully read the file and check the current version against the installed version, so I can notify the user that they need to update (this all works), but I can't help them by launching the market app, much less launching it with a specific query to my app's market page. Here's how I thought it should be done: Intent i = new Intent(); i.setAction(ACTION_VIEW); Uri uri = Uri.parse(market://search?q=pname:packageName); i.setData(uri); try { startActivity(i); } catch (Exception e) { String es = e.getMessage(); Log.v(, es); } It fails with a ActivityNotFoundException. It fails in an identical fashion with several other URIs, for example: http://market.android.com/search?q=pname:packageName market://search?q=pub:My Name market://search?q=MyFirstName I am doing all of these on the actual device, not the emulator, and the device has a network connection...if that makes a difference although I wouldn't expect it to be necessary. What's wrong? 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: Store last selected items in Spinner across different app-launching
I would use SharedPreferences for this : http://code.google.com/android/devel/data/preferences.html Emmanuel http://androidblogger.blogspot.com/ On Jan 4, 2:14 am, Developer shuo.yang.2...@gmail.com wrote: Hi, I want to save the selected item somehow, so that the selected item is shown as the selected spinner item next time the same activity is launched. How can I achieve that? Thanks, public class MyActivity extends Activity { private Spinner mSpinner; ... public void onCreate(Bundle savedInstanceState) { Cursor cursor = mDbHelper.fetchAllItems(); // get all items from database. startManagingCursor(cursor); ListString items = new ArrayListString(); while (cursor.moveToNext()) { items.add(name); }; Collections.sort(items); ArrayAdapterCharSequence adapter = new ArrayAdapter( this, android.R.layout.simple_spinner_item, items); adapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item); mSpinner.setAdapter(adapter); mSpinner.setOnItemSelectedListener( new OnItemSelectedListener() { public void onItemSelected( AdapterView? parent, View view, int position, long id) { // QUEASTION: I WANT TO SAVE THE SELECTION SOMEHOW, // SO THAT next the selected item is selected/ shown in the spinner by default } }); } A related question: is there a way that I can use SimpleCursorAdapter directly and sort the displayed items in alphabetic order? -- the default SimpleCursorAdapter does not seems to be able to do that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] where is the control console 's source code?
when I telnet localhost 5554 ,I can input some cmds, such as gsm ,sms etc. I want to know where the gsm cmd's source code is? thanks a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 send AT command to android phone?
such as ATH.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] how to Start onRunning Activity without restarting??
hi all, Happy new year to all... I have a question on starting the activity... if the activity is onRunning(already started) { How can I call the activity to run, without duplicate and restart the activity??? coz whenever I use this.startActivity(intent); twice, it will start twice I wan to start onces even I call twices... if the activity onRunning at background and bring it in front when I second call... Any idea??? } else { Start as new activity... } your attention is much appreciated... thanks... Wesley. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Stumped on launching Market app
Try this: startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse (market://search?q=pname: + packageName))); See http://code.google.com/android/devel/sign-publish.html#marketintent On Jan 3, 9:18 pm, Keith Wiley kbwi...@gmail.com wrote: I just can't find a simple bit of sample code online that shows how to do this so I'm trying to piece it together as best as I can. Any help is appreciated. I am following the suggestions on the doc page page about publishing w.r.t. notifying users of version updates. I already have a simple text file on my website that indicates the current version and I can successfully read the file and check the current version against the installed version, so I can notify the user that they need to update (this all works), but I can't help them by launching the market app, much less launching it with a specific query to my app's market page. Here's how I thought it should be done: Intent i = new Intent(); i.setAction(ACTION_VIEW); Uri uri = Uri.parse(market://search?q=pname:packageName); i.setData(uri); try { startActivity(i);} catch (Exception e) { String es = e.getMessage(); Log.v(, es); } It fails with a ActivityNotFoundException. It fails in an identical fashion with several other URIs, for example: http://market.android.com/search?q=pname:packageName market://search?q=pub:My Name market://search?q=MyFirstName I am doing all of these on the actual device, not the emulator, and the device has a network connection...if that makes a difference although I wouldn't expect it to be necessary. What's wrong? 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: Stumped on launching Market app
Doh - sorry it's late. Re-reading your question it seems you've done the same things. Fwiw, that's what I use in apps and it works just fine. Perhaps you need uses-permission android:name=android.permission.INTERNET / in the manifest? On Jan 3, 11:12 pm, John Spurlock john.spurl...@gmail.com wrote: Try this: startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse (market://search?q=pname: + packageName))); Seehttp://code.google.com/android/devel/sign-publish.html#marketintent On Jan 3, 9:18 pm, Keith Wiley kbwi...@gmail.com wrote: I just can't find a simple bit of sample code online that shows how to do this so I'm trying to piece it together as best as I can. Any help is appreciated. I am following the suggestions on the doc page page about publishing w.r.t. notifying users of version updates. I already have a simple text file on my website that indicates the current version and I can successfully read the file and check the current version against the installed version, so I can notify the user that they need to update (this all works), but I can't help them by launching the market app, much less launching it with a specific query to my app's market page. Here's how I thought it should be done: Intent i = new Intent(); i.setAction(ACTION_VIEW); Uri uri = Uri.parse(market://search?q=pname:packageName); i.setData(uri); try { startActivity(i);} catch (Exception e) { String es = e.getMessage(); Log.v(, es); } It fails with a ActivityNotFoundException. It fails in an identical fashion with several other URIs, for example: http://market.android.com/search?q=pname:packageName market://search?q=pub:My Name market://search?q=MyFirstName I am doing all of these on the actual device, not the emulator, and the device has a network connection...if that makes a difference although I wouldn't expect it to be necessary. What's wrong? 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: Stumped on launching Market app
3rd time's the charm. It's probably your action. Replace ACTION_VIEW with Intent.ACTION_VIEW (which is actually android.intent.action.VIEW) On Jan 3, 11:21 pm, John Spurlock john.spurl...@gmail.com wrote: Doh - sorry it's late. Re-reading your question it seems you've done the same things. Fwiw, that's what I use in apps and it works just fine. Perhaps you need uses-permission android:name=android.permission.INTERNET / in the manifest? On Jan 3, 11:12 pm, John Spurlock john.spurl...@gmail.com wrote: Try this: startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse (market://search?q=pname: + packageName))); Seehttp://code.google.com/android/devel/sign-publish.html#marketintent On Jan 3, 9:18 pm, Keith Wiley kbwi...@gmail.com wrote: I just can't find a simple bit of sample code online that shows how to do this so I'm trying to piece it together as best as I can. Any help is appreciated. I am following the suggestions on the doc page page about publishing w.r.t. notifying users of version updates. I already have a simple text file on my website that indicates the current version and I can successfully read the file and check the current version against the installed version, so I can notify the user that they need to update (this all works), but I can't help them by launching the market app, much less launching it with a specific query to my app's market page. Here's how I thought it should be done: Intent i = new Intent(); i.setAction(ACTION_VIEW); Uri uri = Uri.parse(market://search?q=pname:packageName); i.setData(uri); try { startActivity(i);} catch (Exception e) { String es = e.getMessage(); Log.v(, es); } It fails with a ActivityNotFoundException. It fails in an identical fashion with several other URIs, for example: http://market.android.com/search?q=pname:packageName market://search?q=pub:My Name market://search?q=MyFirstName I am doing all of these on the actual device, not the emulator, and the device has a network connection...if that makes a difference although I wouldn't expect it to be necessary. What's wrong? 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: Stumped on launching Market app
Hmmm, the suggested quoted below worked. I wonder why. BTW, on your other two posts, I had tried those, no luck. Doing the whole thing in one statement seems to work. I'll have to look into it. Thanks. On Jan 3, 8:12 pm, John Spurlock john.spurl...@gmail.com wrote: Try this: startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse (market://search?q=pname: + packageName))); Seehttp://code.google.com/android/devel/sign-publish.html#marketintent On Jan 3, 9:18 pm, Keith Wiley kbwi...@gmail.com wrote: I just can't find a simple bit of sample code online that shows how to do this so I'm trying to piece it together as best as I can. Any help is appreciated. I am following the suggestions on the doc page page about publishing w.r.t. notifying users of version updates. I already have a simple text file on my website that indicates the current version and I can successfully read the file and check the current version against the installed version, so I can notify the user that they need to update (this all works), but I can't help them by launching the market app, much less launching it with a specific query to my app's market page. Here's how I thought it should be done: Intent i = new Intent(); i.setAction(ACTION_VIEW); Uri uri = Uri.parse(market://search?q=pname:packageName); i.setData(uri); try { startActivity(i);} catch (Exception e) { String es = e.getMessage(); Log.v(, es); } It fails with a ActivityNotFoundException. It fails in an identical fashion with several other URIs, for example: http://market.android.com/search?q=pname:packageName market://search?q=pub:My Name market://search?q=MyFirstName I am doing all of these on the actual device, not the emulator, and the device has a network connection...if that makes a difference although I wouldn't expect it to be necessary. What's wrong? 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: How to write code to uninstall apk from device/emulator?
Hi, You could uninstall app by sending an intent. Here is what we do in aTrackDog: Uri uri = Uri.fromParts(package, strPackageName, null); Intent it = new Intent(Intent.ACTION_DELETE, uri); startActivity(it); -- gasolin On 1月3日, 下午9時54分, freepine freep...@gmail.com wrote: Dr. Lu, Don't be sad, I believe there must be a way:) PackageManager.installPackage is still there in cupcake branch. Maybe it's just not exposed in public sdk. On Sat, Jan 3, 2009 at 6:30 PM, Dr. Tingrong Lu lutingr...@hotmail.comwrote: This answer makes me sad, my boss ordered me to do that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] File permissions for world read/write
I'm trying to create file at /sdcard/foobar.tmp from one package that needs to be readable by another package. This works fine on the emulator. However, on the G1, if I create the file in package A, then try to read it in package B, the request fails - even tho both packages are signed by the same certificate. I create the file from Package A with: File myFile = new File(/sdcard/foobar.tmp); myFile.createNewFile(); FileOutputStream fOut = new FileOutputStream(myFile); String sMofi = some text; fOut.write(sMofi.getBytes()); fOut.flush(); fOut.close(); To see if the file exists from Package B, I use: File myFile = new File(/sdcard/foobar.tmp); if (myFile.isFile()) { bTempFile = true; } myFile.isFile() - returns false - I can see the file using ddms with permissions: rw-rw- Why does isFile fail? I cannot use Context.openFileOutput() because that creates a file relative to package A - and B doesn't know where package A is... Is there a way to create a file at /sdcard/foobar.tmp and have any package be able to read or write it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: File permissions for world read/write
problem solved. package B had a typo in the file name. works fine now. On Jan 3, 9:02 pm, ggcespia g...@boopsie.com wrote: I'm trying to create file at /sdcard/foobar.tmp from one package that needs to be readable by another package. This works fine on the emulator. However, on the G1, if I create the file in package A, then try to read it in package B, the request fails - even tho both packages are signed by the same certificate. I create the file from Package A with: File myFile = new File(/sdcard/foobar.tmp); myFile.createNewFile(); FileOutputStream fOut = new FileOutputStream(myFile); String sMofi = some text; fOut.write(sMofi.getBytes()); fOut.flush(); fOut.close(); To see if the file exists from Package B, I use: File myFile = new File(/sdcard/foobar.tmp); if (myFile.isFile()) { bTempFile = true; } myFile.isFile() - returns false - I can see the file using ddms with permissions: rw-rw- Why does isFile fail? I cannot use Context.openFileOutput() because that creates a file relative to package A - and B doesn't know where package A is... Is there a way to create a file at /sdcard/foobar.tmp and have any package be able to read or write it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] use one .apk startup other .apk??
use one .apk startup other .apk?? i wanna use A.apk startup B.apk ,how can i do ??? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to track menu navigation focus changes?
For more on the rationale behind touch-mode and ListView focus see: http://android-developers.blogspot.com/2008/12/touch-mode.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Deployment of native C library
Hi, Did as you suggested from my Windows PC (using adb shell). The 'mount' command did not yield any error. But - saw no change in the \system attributes (using ls -l). And - when I try to do adb push MySans.ttf \system\fonts\MySans.ttf I get an error message: failed to copy ...: read-only file system Any ideas ? Thanks ! On Jan 2, 5:27 pm, Joel Knighton joel.knigh...@gmail.com wrote: Issue the commands in this order (from a terminal on the device, otherwise change to use adb shell). $su #mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system Add/change anything you need, then revert to read only. $su #mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system On Fri, Jan 2, 2009 at 12:31 AM, Margaret mawei...@gmail.com wrote: add sudo where you do mount . mawei...@gmail.com 13585201588 2009/1/2 shimo...@gmail.com shimo...@gmail.com: Hi, Thanks ! Where do I issue this command from ? When I do this from PTerminal on my Android device it hangs, then issues a warning box saying: Activity pTerminal (in application pTerminal) is not responding Do you have a Dev Phone ? Thanks. On Jan 2, 3:39 am, Joel joel.knigh...@gmail.com wrote: Sounds as if you don't have root. Did you issue a su command first? On Jan 1, 6:11 pm, shimo...@gmail.com shimo...@gmail.com wrote: Hi, Tried that on my Dev Phone, and got mount: operation not permitted Can you tell me why ? TIA On Nov 17 2008, 11:48 am, li chen freep...@gmail.com wrote: You can use adb shell toremount/system and try again: mount -oremountrw /system -freepine -- Joel Knighton --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 can i access System directory in an emulator ??
It's not clear if you're trying to write tests (as you implied in the first paragraph) or modify behavior of a running system (as you implied in the second paragraph). But in either case, as Dianne noted, Instrumentation is designed for use directly with your own code, not to be applied to any other code. I don't think it's applicable in either of the cases you describe here. On Fri, Jan 2, 2009 at 5:45 PM, Ashrotronics 030440...@163.com wrote: Here is the case: While i'm trying to make fuctional tests against all apps installed in my device,The feature Target package of My instrumentation class makes it insurmountable to access a third pkg,But in some cases,It is much of a need to do so, e.g. an email from a stranger comes and after i view the content ,i decide to add him to my contact list by pressing menu-add to contact This action may invoke a certain activity in pkg .contact,And in this situation,My instrumentation will abort,as the top activity is already out of the target pkg(.email), So, any way i can do this ?? Thanks again! On Jan 3, 3:38 am, Dianne Hackborn hack...@android.com wrote: Why do you want to run your own instrumentation against apps in the system directory? Anyway, as you say, you need to be signed with the same certificate as the app your are running your instrumentation against. It's not really a matter of being installed in the system dir. If you don't own the target app enough to be able to sign your instrumentation with the same certificate, then you can't run instrumentation against it, and it is very much designed to be that way. On Fri, Jan 2, 2009 at 4:54 AM, Ashrotronics 030440...@163.com wrote: Thanks for your respondence,What i am trying to do is to start apps in system directory through my own instrumentation class, But i am always rejected by android's security mechanism because i do not have the same signature(as is shown in logs:Permission denied) After further consideration,i decided to try installing my app in the system directory ,but also with no luck , any idears i can do this ?? Thanks ! On Jan 2, 2:39 pm, Andrew Stadler stad...@gmail.com wrote: Downloaded apps (such as those developed with the SDK) cannot be installed into the system directory. Perhaps if you can better describe what you are trying to do and which permissions your app requires, the list community can better assist you. On Thu, Jan 1, 2009 at 9:37 PM, Ashrotronics 030440...@163.com wrote: Hi all: It seemed that some work can not be done due to permission reasons unless my APK is in installed in the System/app directory ,So,is there any way i can do that ?? Thanks in advance ~!- Hide quoted text - - Show quoted text - -- 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. All such questions should be posted on public forums, where I and others can see and answer them.- 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] Re: https://dl-ssl.google.com/android/eclipse/
You can try http. On Jan 2, 10:17 pm, AlexG alex.shpindov...@gmail.com wrote: Hi What happened to the ecipse plugin download site?https://dl-ssl.google.com/android/eclipse/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Eclipse IDE for Android platform development android.jar
When I want to build a application ,in Eclipse, using android.opengl.Object3D whereas it's not in SDK android.jar. Then I checked the web-site http://source.android.com/using-eclipse; teaching you how to use whole android opensource in Eclipse and debugging. My questions are: 1. Is there any purpose that original SDK android.jar does not include some packages ? for simplified use ? 2. Can I generate another (full set) JAR file to contain those packages listed in android/development/ide/eclipse/.classpath ? 3. Combined the Q1/Q2 above For ex., in PC Eclipse env, If I want to build an application utilized android.opengl.Object3D, is there any good step-by-step instructions to follow, and even refer to the whole android framework classes such as android.pim.DateUtils ? 4. (Followed item2 above) When I open a new Java project with that .classpath on Eclipse and try to export that project as a JAR file, I got several duplicate entry error and then failed, what could be the wrong I made here ? tks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 write code to install a apk file to device or emulator
Hi,all I want to write a software to download .apk file in a list, when downloading is comleted, user can click the file name and install the apk file. but I can't find any class or package for the function of install. please help me, thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Barcode scanning through the camera
Hi, Does anyone able to setup android sdk on linux with camera working in the emulator? On Thu, Jan 1, 2009 at 4:51 PM, brnzn brendon.mathe...@gmail.com wrote: Hey Timothy, Take a look at ZXing (pronounced Zebra Crossing): http://code.google.com/p/zxing/ brnzn On Jan 2, 9:14 am, Timothy DeWees whtdrgn...@gmail.com wrote: Can anyone point me to a library or something where I can get an idea on how to accomplish scanning barcodes with the camera? I'm getting feature request for an application I published that involve the use like what I describe above and I would love to see what I can work out. -- Kind Regards Timothy A. DeWees --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: use one .apk startup other .apk??
try startIndent ? On Jan 4, 1:32 pm, SinFrancis kyowxf2...@gmail.com wrote: use one .apk startup other .apk?? i wanna use A.apk startup B.apk ,how can i do ??? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Devices for android
Hi all, I am beginner to Android, Can anyone provide me links/articles to start knowledge base for android. From where I can get list of devices which supports Android. Thanks and Regads, Pratik Patel Sr. Software Engineer C-SAM www.c-sam.com email: pratik.pa...@c-sam.com mailto:swati.o...@c-sam.com + 91 265 2324018/19 (O) + 91 265 2334156 (F) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Displaying contact Email address in a List in ListActivity
Hello all, Happy New Year! I'm a newbie trying to display a list of contact details in a ListActivity. What is the best way to retrieve the Contact Name, Email address and phone number and display it in a ListActivity? Here's what I have so far... (Obviously in a half-cooked form) Cursor c = getContentResolver().query(People.CONTENT_URI, null, null, null, null); startManagingCursor(c); String[] from = new String[] {People.NAME, ?EMAIL COLUMN?, ?PHONE COLUMN?); int[] to = new int[]{R.id.name, R.id.email, R.id.phone}; SimpleCursorAdapter adapter = new SimpleCursorAdapter (this,R.layout.contact_row,c,from,to); setListAdapter(adapter); Any help would be much appreciated thanks, cheers, Rohit --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 write code to uninstall apk from device/emulator?
Hi, How to write code to uninstall apk from device/emulator? Could anyone drop a sample code? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] File.setLastModified(long) broken?
setLastModified in the File class seems to always return false, even for files I have created on the SD card? Has anyone been able to get this to work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] question, has any one use the void glDrawElements(intmode,intcount,inttype,intoffset) in GL11
the source of framework shows that use offset as void * directly, than what should I do before call glDrawElements ? /* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */ static void android_glDrawElements__ (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) { glDrawElements( (GLenum)mode, (GLsizei)count, (GLenum)type, (const GLvoid *)offset ); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Slide from an Activity to another...
It may be easier to use animation set, wwhich combines out and in animations together and runs them simultaneously. I am typing from G1, so I can't provide any examples right away. Please let me know if you are interested and I will try to find some. Sergey Moto medicalsou...@gmail.com wrote: I've been trying to now tackle animations on Android and well I'm a little lost. I'm trying to slide on Activity as the older Activity slides out... you could say iPhone's way... I read this isn't possible but maybe I have a good idea on how to approach this: Activity 1: Layout A Activity 2: Layout B On Activity 1: Animate from Layout A sliding out as Layout B slides in. then proceed to Activity 2 which already would have Layout B. Is this possible? How do I animate a Layout? 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: Attaching the Eclipse debugger to actual device
I was also able to get adb to see my devices as a normal user, but with a small quirk. Note: I am using Ubuntu Gutsy (7.10). I have written it up here: http://william.quartz.googlepages.com/mobile%3Agoogleg1 But basically, I have to start the adb deamon a certain way, as follows: kill server if running, then sudo adb devices. After doing some research it appears that while adb is starting, if you ask it to find devices while it is forking, it can find them because the forker is still running under the same id that is forking the server. But, if I use the sequence: sudo adb start-server, then sudo adb devices, it can't find any. I am not sure why but it works. * daemon not running. starting it now * * daemon started successfully * List of devices attached HT846GZ40581device So basically, I make sure the deamon isn't running, then I do sudo adb devices. Weird, but it works. Hmmm... On Nov 17 2008, 10:19 pm, Chris Jordan mobijor...@gmail.com wrote: Thanks Marc! That worked for me on Fedora 6. The only thing I had to do different was: adb kill-server adb start-server Thanks again, -Chris On Oct 24, 12:23 am, Wanted unique nickname marc.rob...@gmail.com wrote: Wow, that totally worked. For those who are interested, here is my complete Suse example: Before you connect the g1 via usb [create the udev rules file, and choose a number lower than the default rules file] /etc/udev/rules.d/11-android.rules [copy the following text to that file, and replace username, all one line] SUBSYSTEM==usb, ATTRS{idVendor}==0bb4, ATTRS{idProduct}==0c02, MODE=0666, NAME=username [start the adb daemon] adb * daemon not running. starting it now * * daemon started successfully * [connect the phone, and check devices] adb devices HT840GZ14538 device -Marc On Oct 23, 5:09 pm, shyamal shyamal.pra...@gmail.com wrote: It seems that the device needs to be owned by the user running 'adb'. At a first approximation anyway; I've worked on Android for a full three days or something. Adding OWNER='yourusername' should fix it. Works for me on a Debian (Testing) system where I mount it to to /dev/ sdb (though I had to use SUBSYSTEMS, not SUBSYSTEM, with the default udev config files). /Shyamal On Oct 22, 8:20 pm, Wanted unique nickname marc.rob...@gmail.com wrote: I was able to write the following udev rule, but running adbdevices does not show any device. What doesadblook for when its scanning for devices? Here is my rule in /etc/udev/rules.d/11-android.rules SUBSYSTEM==usb, ATTRS{idVendor}==0bb4, ATTRS{idProduct}==0c02, MODE=0666, NAME=android When I connect the device the /dev/android link is created. So my rule works with the device, but I still don't get whyadbdevices returns nothing... little help here? -Marc On Oct 22, 7:33 pm, Wanted unique nickname marc.rob...@gmail.com wrote: Does anyone know how to perform Step 3 for developing on SuseLinux? When I run dmesg I get some relevant info, but I don't know enough about udev to make this work on Suse... usb 1-10: new high speed USB device using ehci_hcd and address 10 usb 1-10: new device found, idVendor=0bb4, idProduct=0c02 usb 1-10: new device strings: Mfr=3, Product=2, SerialNumber=1 usb 1-10: Product: Android Phone usb 1-10: Manufacturer: HTC usb 1-10: SerialNumber: HT840GZ14538 usb 1-10: configuration #1 chosen from 1 choice scsi18 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 10 usb-storage: waiting for device to settle before scanning scsi 18:0:0:0: Direct-Access HTC Android Phone 0100 PQ: 0 ANSI: 2 sd 18:0:0:0: [sdc] Attached SCSI removable disk sd 18:0:0:0: Attached scsi generic sg4 type 0 usb-storage: device scan complete -Marc On Oct 22, 12:02 pm, Xavier Ducrohet x...@google.com wrote: We just updated the documentation. Developing on devices is explained here:http://code.google.com/android/intro/develop-and-debug.html#developin... On Tue, Oct 21, 2008 at 11:45 PM, bhines bhi...@gmail.com wrote: this sounds like my problem as well. This really should be mentioned onhttp://code.google.com/android/intro/develop-and-debug.html thanks, -Ben On Oct 21, 8:42 pm, nkijak nki...@gmail.com wrote: That possibly did the trick. I had to restart the phone. Maybe for the Debug when USB thing to take effect? Thanks On Oct 21, 11:33 pm, Xavier Ducrohet x...@google.com wrote: To debug on devices you need to set the 'debuggable' attribute of the application node to true (in AndroidManifest.xml). Make sure to set it back to false before releasing your application. Xav On Tue, Oct 21, 2008 at 8:24 PM, nkijak
[android-developers] how to add webview to listview
Hi, How to add WebView to the listview. I need to take input from a textview at the bottom of the screen and after formatting the text need to add it to the ListView above it.So each time the user enters some text in the textview sends it , it should be added to the listview. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] seeking andriod developers
Company seeking developers with the android platform. We have some amazing ideas for gadgets and we are seeking developers. Please send e- mail with contact information and we will get in touch with you. lincolns...@gmail.com Thanks Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Market paid-for apps
Why don't you just set up a company, in a country where you're allowed to distribute apps from? Setting up a company in the UK is very quick (hours) inexpensive and can be done online. S On 1 Jan 2009, at 07:52, madcoder wrote: I'm an American living in Thailand, and I want to sell to the US, UK, etc. I plan on having multiple languages (when it's fully supported). It would make sense for Google to allow people outside of a country list apps for a different country. But I don't know if Google will allow this or not. I would hate to wait for Thailand to be allowed on the list - it seems this country always shows up at the bottom of the waiting list! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Pass state from Activity to Service
Where is it crashing? I am running in to a similar problem for I different reasons. What class is this in in your code? I don't know if this will help, but try the following code: // In your activity private void startService(){ Intent myIntent = new Intent(this, MyService.class); Bundle b = new Bundle(); b.putSerializable(userBean, user); myIntent.putExtras(b); mMyService.startService(myIntent); } // In your service public void onStart(Intent intent, int startId) { Bundle b = intent.getExtras(); User user = (User) b.getSerializable(userBean); Log.i(MyService, User Name: + user.getName()); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Sending HTML email with GMail installed on G1
Hello Thrusty, This can be solved by using Spans. Here is a piece of code which demonstrates how it can be done: SpannableString ss = new SpannableString(getResources ().getString(R.string.link)); ss.setSpan(new URLSpan(getResources().getString (R.string.url)), 0, ss.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE); SpannableStringBuilder ssb = new SpannableStringBuilder (getResources().getString(R.string.mail_text)) .append(' ') .append(ss); Intent i = new Intent(Intent.ACTION_SEND) .putExtra(Intent.EXTRA_TEXT, ssb) .putExtra(Intent.EXTRA_SUBJECT, getString(R.string.mail_subject)) .setType(message/rfc822); //$NON-NLS-1$ startActivity(Intent.createChooser(i, Title:)); //$NON-NLS-1$ What this code does is is sending email composed of R.string.mail_subject R.string.mail_text R.string.link. Upon clicking on the link, the mail recipient will be navigated to a site, which address is specified by R.string.url. Sergey On Nov 11 2008, 9:11 pm, thrusty tcstellan...@gmail.com wrote: Hello, I'm trying to send HTML email using the GMail package installed on the T-Mobile G1. What I'm finding is that regardless of the content-type I specify, the message body is always translated into both text/plain and text/html ; however, the html is escaped (e.g. becomes lt;) so it does not display as html in the receiving email client. Here's how I'm setting up the Intent: String[] addresses = {aAddress}; Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_EMAIL, addresses); intent.putExtra(Intent.EXTRA_SUBJECT, aSubject); intent.putExtra(Intent.EXTRA_TEXT, aBody); intent.setType(text/html); startActivity(newIntent); The email I receive looks something like this: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_Part_494_24247511.1226466478922 --=_Part_494_24247511.1226466478922 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline htmlpHere's a property you might want to look at:ulli149 Ashbury, San Francisco, CA, 94117br/View in Puluwai | a href=http://www.agencylogic.com/googlebase/149Ashbury-com Browser/a/li/ul/html --=_Part_494_24247511.1226466478922 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline plt;htmlgt;lt;pgt;Here#39;s a property you might want to look at:lt;ulgt;lt;ligt;149 Ashbury, San Francisco, CA, 94117lt;br/ gt;View in Puluwai | lt;a href=quot;a href=http://www.agencylogic.com/googlebase/149Ashbury-com;http://www.agencylogic.com/googlebase/149Ashbury-com/aquot;gt;Browserlt;/agt;lt;/ligt;lt;/ulgt;lt;/htmlgt;/p --=_Part_494_24247511.1226466478922-- As you can see, the html is modified by gmail. The text/plain version is basically correct except for its mime type. I've tried setting various other content types, e.g.: text/xhtml message/rfc822 message/rfc2822 text/plain multipart/mixed No luck so far-- anyone have any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: https://dl-ssl.google.com/android/eclipse/
Use http instead of https... http://dl-ssl.google.com/android/eclipse/ On Jan 2, 7:17 am, AlexG alex.shpindov...@gmail.com wrote: Hi What happened to the ecipse plugin download site?https://dl-ssl.google.com/android/eclipse/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to get Voice data from Android
Hello all, I wish to develop some of my modules onto the Android platform and in order to do so i have some questions regarding the SDK and platform. 1. Is it possible to capture the outgoing voice channel of the caller? 2. Can i control the outgoing buffer and set it to different data? 3. Where can i get code samples that use the above abilities? 4. When running samples from internet of Android developers i sometimes cannot import some java files of Android. How/where can i get all Android environment so i can rull all kind of applications? Thank you, ER --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Market paid-for apps
Isn't that still a 3 month window? It just seems ridiculously long to me. I'm not bashing the guys, I'm sure they're pulling out all the stops. a possible (and likely) 3 more months with no revenue could be serious for many people. I know there are other alternatives like SlideMe which I will certainly be looking into but for the mass market, the default store is the one they will check, probably exclusively. S On 31 Dec 2008, at 22:23, Eric Mill wrote: Yeah, I got that too. It's wonderful news, awesome on Google! -- Eric On Wed, Dec 31, 2008 at 11:51 AM, Al Sutton a...@funkyandroid.com wrote: Did anyone else get the email saying that initially only developers operating in the US and UK will be allowed to sell apps in Market? The email says this will be followed by German, Austria, and the Netherlands, then by France, Italy and Spain, and the plans for other countries will be announced at the end of Q1 2009. So from this I think it's safe to deduce that if you're not in those 8 countries you won't be able to sell apps via Market until after Q1 2009. Al. http://andappstore.com/ -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ClassNotFoundException in Eclipse Layout tab when custom view references another project
I have an eclipse workspace containing several projects. One project is an android project, containing a custom view (say MyView) which I have added to my main.xml layout. My custom view references a class (say OtherClass) in another project in the workspace. The visual layout editor in Eclipse will not draw MyView, because it takes a ClassNotFoundException on OtherClass. I have included OtherClass's project in the Java Build Path and Project References in the project properties for the android project containing MyView. MyView draws fine in the emulator. It is only in Eclipse's visual editor for the layout that I have a problem. Is there another place to add to the classpath for the visual layout editor? Is this a known problem? (If googled for it and looked at the android FAQ to no avail.) Thanks, Jeff P.S. I am using Eclipse version 3.3.2, Android SDK 1.0 r1, and JDK 6.0_02. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Help with Gallery Widget
Hello everyone, I have 2 problems - I want to scroll gallery to a specific position by calling a function, but at the same time to see the animation of scrolling. I have tried the following but they don't seem to do the animation (although the ): # public void setSelection(int position, boolean animate) - it seems like not using the second parameter # public void setSelection(int position) both of the above methods are inherited from android.widget.AbsSpinner - How can i make Gallery widget circular, so when i scroll to the end to continue from the beginning. Actually i don't want it to have an end. Is there any way to do that? Thanks in advance for your time, Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Target window when launching a new web browser activity?
It seems that when I send off an intent to open a web browser window, when i press the back button to go back to my launching activity, the window that was created in the browser app stays open. If there's no way to close it when it returns, is there a way i can get my app to open all links in the same window? Creating several intents seems to flood the browser app with open windows (Not all at once... I notice they accumulate though over time) Any suggestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: support for encryption
Folks might also take a look at the crypto intents and keystore intents that we're building in collaboration between the Android Password Safe project the OpenIntents project. Our system allows a single password, and periodic single sign-on so that all applications can encrypt, decrypt, and store keys using the same master password that the user enters once, which is somewhat of an advantage over directly using the bouncycastle implementation, depending on the need of your application: http://code.google.com/p/openintents/wiki/CryptoIntents peace, isaac --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] New Screens (one per class)
Hi I'm totally out of my depth but persistently wading and learning as I go. I'm really unfamiliar with the Java paradigm, so please bear with me and don't assume I know anything (because, really, I probably don't :- ( ). A few questions: 1. Could someone point me to, or explain to me, the intended flow of an Android application? eg. if I want to: do X; get results from X; then display Y to user; then get input; then do Z I've gleaned so far that I have my main Activity class, in which I set a listener for X, then call X, and that's the end of that class; Then, when my listener is called, I set a listener for input from the user, and display Y to user, and that's all for that class; then, in yet another new class, I have the code that is called if the user presses the button. Is that right ? Seems rather disjoint, and coming from a perl/python background I'm used to systematic flow: Do X, then display content to user, then loop or block until user enters, so please correct my thinking above if it's erroneous. 2. I have a class extends Activity which is the first class of my application. I then want to display a list, and have a class that extends ListActivity. The ListActivity class is called from a BroadcastReceiver (basically, I'm scanning SSIDs, the listener is called when scan is complete, and then I want to display a list of SSIDs to the user for selection). When I attempt to transfer to a method inside the ListActivity class, my program crashes; I understand that this is due to the different type of view (from TextView to ListView, I suspect). I also have the feeling that I need to set an intent to transition from the first class type to the second... however I don't have sufficient knowledge/background/experience to understand how to get this done (My attempt to create an intent and call startActivity failed because startActivity is not available from within a BroadcastReceiver class) ... :-o Many thanks Gary --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Any updates on paid apps timeline?
True, but I suspect there will be more Android devices than iPhones in short order. For a start Samsung sells the most touch screen devices (not Apple) and they're working on multiple handsets. Furthermore, NetBooks and other form factors will start showing up late in the year. Don't flame me iPhone fanboys (I have one, I have developers writing fr it and its a nice platform if you don't mind conforming to the cult of Jobs and being hellishly restricted API wise, it'll change). Apple is however only a single manufacturer. They make excellent devices thogh and have attracted a rabidly loyal fan base of which I am one, though less loyal and without the rabies. ;) S On 2 Jan 2009, at 22:13, loty wrote: There is only 1 Android phone on the market - G1 and while there is only 1 iPhone as well number of G1 users is nowhere near the number of iPhone users. Not yet anyway - maybe in a couple of years... I think there are more developers desperately trying to get some money for their apps than there are current Android users willing to pay for them :) On Jan 2, 9:50 am, NitroDesk gsuku...@gmail.com wrote: @Dianne, You are right, i think part of the reason why the demand for the ability to release paid apps is high so early on is the fantastic job that has been done on the SDK, the platform that was picked for the programmability and in general the confidence developers (even at the time of release) have on the platform that they will be able to stand behind the apps they build. A lot of this is testament to the trust that we as developers place on the platform. So all this clamoring should be taken as a compliment :-) -Nitro On Dec 30 2008, 5:29 pm, Justin Collum jcol...@gmail.com wrote: I heard somewhere that there was a 90 day moratorium on not-free apps. Looks like I heard wrong. On Tue, Dec 30, 2008 at 2:38 PM, Dianne Hackborn hack...@android.comwrote: Just to be clear, this is lots of speculation and no facts. :) Some facts I can share: Android is stable as of 1.0 and we will not be breaking compatibility, and in particular we will not be breaking applications in the cupcake branch. Comparing Android to iPhone in that way is also a questionable endeavor, since the way they were released was very different: iPhone shipped for almost a year with no support for third party apps and then released an update to add that feature, while Android shipped from the start with third party app support. I can't comment on adoption of the G1 vs. the original iPhone, but clearly at this point there is a smaller number of Android users, simply because we started from 0 at the point where third party developers were supported. This is something developers should keep in mind and certainly isn't being hidden. On Mon, Dec 29, 2008 at 1:10 PM, Sven Boden boden.s...@gmail.com wrote: I think the answer is guessable (and no I don't work for Google)... when the android OS settles down more or less. I expect it a little while after the cupcake release. Currently some things are still going to break and if they would allow you to buy applications from the market, you would need to get a new version of the applications very quickly, ... I also don't think android adoption is as quick as the iphone's. In a lot of countries you can't even get an T1 in a legal/normal way... Belgium e.g. :( . So maybe if applications would come out now as paying applications they would disappoint the developers as well qua sales. Regards, Sven 2008/12/29 NitroDesk gsuku...@gmail.com True, but the most distressing part is the inability to distribute paid apps on the market, even with the possibility of charging for them offsite. I bet this keeps lots of good apps from showing up on the market, and worse still, from being developed. -Nitro On Dec 28, 12:48 pm, Sven Boden boden.s...@gmail.com wrote: There are already sites out there which allow you to charge for android apps, for the official site I didn't see anything out there yet. Regards, Sven 2008/12/28 Redhunt androidgr...@survivorsoft.com Has anyone heard any news on when developers will be able to post apps for a fee ? Thanks- Hide quoted text - - Show quoted text - -- 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. All such questions should be posted on public forums, where I and others can see and answer them.- 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
[android-developers] Very slow startup of app on first run
Hi everyone, I have an app that is around 3.8 megs, with a lot of that size being png graphics. When I install the apk on the device the first run of the app takes a very long time, around 30 seconds. After that first run the startup is nearly instant. Is there something I can do to speed that first run up? Is this something a user would experience when downloading the app from the marketplace? As a side note, I'm using the build.xml as generated by createactivity.py to build and install the apk. Thanks for any assistance. Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Long click on list activity item
Hi, Maybe this can help: @Override public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) { AdapterView.AdapterContextMenuInfo info; try { info = (AdapterView.AdapterContextMenuInfo) menuInfo; } catch (ClassCastException e) { Log.e(TAG, bad menuInfo, e); return; } long l = getListAdapter().getItemId(info.position); } On Dec 1 2008, 7:12 pm, Thao thao.uye...@gmail.com wrote: Hi all, I have an Activity that implements a ListActivty. In there, I have a list of item that is wrapped by a custom adapter. I would like to enable long click on each item in my list, but I can't figure out how to do this...Could someone give an example please ? Thank. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Calling JavaScript functions with parameters
Hi, Can anyone show me an example of how to call a JavaScript function from a function in Java WITH parameters passed to the JavaScript Function? Cheers, Earlence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---