[android-developers] Re: When will google post official cupcake SDK
When the fix is in the open source repo I'll roll some new SDKs. As for a date for a Google originated SDK, there's no solid commitment to a date as yet. Al. --- * Written an Android App? - List it at 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. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Howie Sent: 10 April 2009 05:22 To: Android Developers Subject: [android-developers] Re: When will google post official cupcake SDK When is Google planning on distributing an SDK that does not have such a bug? On Apr 9, 12:16 pm, Romain Guy romain...@google.com wrote: The SDK Al is distributing contains a bug that prevents the emulator from using the network. On Thu, Apr 9, 2009 at 11:59 AM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: Thanks Al. I downloaded it. Works great. However, I couldn't connect to the network. E.g., launching browser will show an error page. logcat reports Unknown hostwww.google.com, throwing UnknownHostException. I have a 1.0 emulator working on the same PC and it can access network just fine. I tried passing -dns-server to emulator.exe, but that just made emulator.exe to crash on start-up. Thanks On Thu, Apr 9, 2009 at 11:23 AM, Al Sutton a...@funkyandroid.com wrote: http://andappstore.com/AndroidPhoneApplications/sdk/ --- * Written an Android App? - List it athttp://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. From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Mattaku Betsujin Sent: 09 April 2009 19:22 To: android-developers@googlegroups.com Subject: [android-developers] When will google post official cupcake SDK Even a beta SDK would be helpful. There are lots of app developers who don't necessarily know how to build cupcake from the GIT. Given that HTC Magic (based on cupcake, I heard) is rolling out real soon now, wouldn't it be nice to give the app developers a chance to test if their app is compatible with cupcake? Sure, Android API is supposed to be backwards compatible. However, there are quite a few bugs in the G1 that I had to work around with ugly hacks. Now I start to worry if those hacks would break on cupcake. -- 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: Conversion to Dalvik format failed with error
Did you try on SDK/emulator, or on real HTC G1? As far as I have tried, I never got video to work on the emulator. On Thu, Apr 9, 2009 at 9:34 PM, Nithin Varamballi nithi...@gmail.comwrote: Thank you sir.. Can you know how live video streaming can be done... I tried demo sample But i give error likeCannot play the video. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Conversion to Dalvik format failed with error
Hi I tried in SDK emulator. Even i have Same problem like yours. Till now i didnt run video on emulator Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: no root access.. how to put file...
On Thu, Apr 9, 2009 at 8:32 PM, BIRJODH birjodh.tiw...@gmail.com wrote: adb push local sdcard when the sdcard of emulator is read only.. Is this some kind of mockery or sarcasm with the users? Yes, we hate you, and laugh at every pain we can cause. Plus the sdcard provides world read/write access. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Key dispatching timed out
hi Streets Of Boston, I solved my problem. Once again thanks for your valuable reply.. This is my new code.. import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.URL; import android.app.Activity; import android.app.Dialog; import android.app.ProgressDialog; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.widget.ImageView; public class ViewStorageImage extends Activity{ private String url; ImageView iv; Thread t; Bitmap bm; ProgressDialog dialog; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); showDialog(0); setContentView(R.layout.storageimage); Intent i = getIntent(); Bundle ext = i.getExtras(); url = ext.getString(url); iv=(ImageView)findViewById(R.id.storageactualimage); t=new Thread() { public void run() { viewImage(); } }; t.start(); } @Override protected Dialog onCreateDialog(int id) { switch (id) { case 0: { dialog = new ProgressDialog(this); dialog.setMessage(Please wait while loading...); dialog.setIndeterminate(true); dialog.setCancelable(true); return dialog; } } return null; } private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { Bitmap image=(Bitmap)msg.obj; iv.setImageBitmap(image); } }; public void viewImage() { try { URL myURL = new URL(url); final BufferedInputStream bis = new BufferedInputStream(myURL .openStream(), 1024); final ByteArrayOutputStream dataStream = new ByteArrayOutputStream (); BufferedOutputStream out = new BufferedOutputStream (dataStream, 1024); copy(bis, out); out.flush(); final byte[] data = dataStream.toByteArray(); BitmapFactory.Options bfo = new BitmapFactory.Options(); bfo.inSampleSize = 2; bm = BitmapFactory .decodeByteArray(data, 0, data.length, bfo); bis.close(); removeDialog(0); Message myMessage=new Message(); myMessage.obj=bm; handler.sendMessage(myMessage); } catch (Exception e) { finish(); } } static final int BUFF_SIZE = 1024; static final byte[] buffer = new byte[BUFF_SIZE]; public static void copy(BufferedInputStream in, BufferedOutputStream out) throws IOException { try { while (true) { synchronized (buffer) { int amountRead = in.read(buffer); if (amountRead == -1) { break; } out.write(buffer, 0, amountRead); } } } catch(Exception e) { if (in != null) { in.close(); } if (out != null) { out.close(); } } finally { if (in != null) { in.close(); } if (out != null) { out.close(); } } } } Regards, Ramesh On Apr 9, 8:46 pm, Streets Of Boston flyingdutc...@gmail.com wrote: How are you downloading your images? Are you doing this in your main message-thread? (e.g. in a onSomethingSomething(...) method?) If so, this causes your problem. Start a new thread. Have this thread download your image when necessary. When you thread is
[android-developers] Are there alternate ways to look up user phone number when TelephonyManager returns null?
Is there a way to look up the user phone number other than TelephonyManager? In my G1, this returns null: // get your phone number TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String tel = telephonyManager.getLine1Number(); Log.i(Telephone Number == , tel+ ==); Is there any other way of getting user's own phone number? take care, Muthu Ramadoss. http://linkedin.com/in/tellibitz http://androidrocks.googlecode.com - Android Consulting. Emo Philips http://www.brainyquote.com/quotes/authors/e/emo_philips.html - A computer once beat me at chess, but it was no match for me at kick boxing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] (pre- post-) processing raw audio data
I want to develop an app that lets one intercept raw audio data sent for playback (possibly by a different app), and apply audio enhancements over this raw data. Does Cupcake allow such filtering of audio data? If so, which API should I use? I understand this may not be possible at an application level for security reasons. I'm trying to see if this is possible with native code linking to public or private API of Android. 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 order the items of GridView?
Thanks a lot, Romain. On 4月7日, 下午2时44分, Romain Guy romain...@google.com wrote: This is not supported by the default Home screen application. On Mon, Apr 6, 2009 at 11:43 PM, HelloWorld xiaolong_...@yahoo.com.cn wrote: Dear all, In emulator, the items of GridView(e.g. Launcher) are in alphabetical order. Would you please point me how to implement a user- defined order in Launcher? For example, I'd like 'Browser' to be the first item in Launcher... Thank you in advance. -- 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] who put an icon in status bar to indicate the mobile network type?
In 1.5, I find an inco in status bar to indicate current network type (2G or 3G). Would you please tell me which app sets this icon in status bar? I'd like to go through the source code... 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] Programmatically delete a home-screen shortcut
Hi, I have some questions related to Android's home-screen contents: 1) Is there a way to programmatically delete a home-screen shortcut on Android? I know that it can be done manually but I want to do it in code. 2) Is there a directory where all the contents of the home-screen are stored and, if there is, is there a way to update the contents of this directory? Thank you... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Email Configuration - Compose activity
Hi All, Is there anyway i can know is the email application configured correctly, before i fire the intent? 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: no root access.. how to put file...
On Fri, Apr 10, 2009 at 5:32 AM, BIRJODH birjodh.tiw...@gmail.com wrote: I am not able to understand one simple issue.. if there is no root access to file system even to the user who owns the phone then why on earth would the dev guide include commands like adb push local sdcard when the sdcard of emulator is read only.. Is this some kind of mockery or sarcasm with the users? you are mistaken, the sdcard is not read only on the emulator, you just must provide one with the -sdcard option. if you don't, an empty /sdcard directory is created on the root filesystem but will not allow you to write anything to 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: Post subject: Store the data in raw folder of res directory
Honest wrote: My application has requirements to store or edit the file data in the file which is available in Raw folder. Can some one tell me how it is possible ? You cannot modify an APK's resources in-place at runtime. You would need to copy the resource out to some other location (e.g., SD card) and modify it there. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Post subject: Store the data in raw folder of res directory
Hello, My application has requirements to store or edit the file data in the file which is available in Raw folder. Can some one tell me how it is possible ? I want to store the audio data in mp3 file which is available in res folder. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: who put an icon in status bar to indicate the mobile network type?
HelloWorld wrote: In 1.5, I find an inco in status bar to indicate current network type (2G or 3G). Would you please tell me which app sets this icon in status bar? I'd like to go through the source code... Thank you in advance. Questions regarding the source code are best asked on lists pertaining to the source code: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 web services in android
Hi All, I am doing game project where in i need to call PHP web service and display scores in score board. I am new to android,Can somebody please help on how to call web services in android. I searched for so many examples,but no example looked to be working. It is urgent,Please help. Thanks Kavitha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: showing graph in Application
jj wrote: Hello I want to display graph(time ver distance) in Activity , how should be this achieved in Android. is there any tut available? http://code.google.com/p/bluechart/ http://rapidandroid.org/wiki/Graphing http://www.java4less.com/charts/chart.php?info=android I am sure there are other graphing/charting components or techniques. And, you can always draw your own on a Canvas. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use AutoCompleteTextView with SimpleCursorAdapter
Unfortunately, this is not a complete worked out example. Could someone forward me a more complete example? I've found lots of code fragments, but no code that shows how to initialise the SimpleCursorAdapter contents, or how it works together with the AutoCompleteTextView. There is also an example in the APi demos with the contacts.~/android-sdk-windows-1.1_r1/samples/ApiDemos/src/com/example/android/apis/view/AutoComplete4.java Many thanks. That was very helpful. I still have a question. I have now progressed to the point where list of entries is being displayed on the auto-complete box. However, when I try to narrow down the displayed choice by typing text into the auto-complete text box, the displayed list remains the same. For example, if the list initially contains “1”, “2”, “aabb1”, “aabb2”, and “aacc1” and “aacc2”, then when I type in “aab”, I expect to see only “aabb1” and “aabb2”. Instead all entries are still displayed. I found this very helpful message explaining that the problem is that SimpleCursorAdapter does not implement filtering: http://www.mail-archive.com/android-developers@googlegroups.com/msg00546.html The runQuery() method of the FilterQueryProvider class has to be defined to allow the class to filter what is displayed on the screen. @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); m_adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, m_cursor, PROJECTION, new int[] { android.R.id.text1 }, CONTENT_URI, DEFAULT_SORT_ORDER); m_adapter.setFilterQueryProvider(new SimpleCursorAdapater.FilterQueryProvider() { @Override protected Cursor runQuery(CharSequence constraint) { StringBuilder buffer = null; String[] args = null; if (constraint != null) { buffer = new StringBuilder(); buffer.append(UPPER(); buffer.append(m_projection[0]); buffer.append() GLOB ?); String filter = constraint.toString().toUpperCase() + *; if (m_filterMode == FILTERMODE_CONTAINS) { filter = * + filter; } args = new String[] { filter }; } return m_contentResolver.query(CONTENT_URI, PROJECTION, buffer == null ? null : buffer.toString(), args, m_sortOrder); } m_box = (AutoCompleteTextView) findViewById(R.id.autocomplete); m_box.setAdapter(m_adapter); There are two problems: 1. I’m using the v1.1 DSK, and the constructor for SimpleCursorAdapter is defined as follows: SimpleCursorAdapterhttp://developer.android.com/reference/android/widget/SimpleCursorAdapter.html#SimpleCursorAdapter%28android.content.Context,%20int,%20android.database.Cursor,%20java.lang.String%5B%5D,%20int%5B%5D%29 (Contexthttp://developer.android.com/reference/android/content/Context.htmlcontext, int layout, Cursorhttp://developer.android.com/reference/android/database/Cursor.htmlc, String[] http://developer.android.com/reference/java/lang/String.htmlfrom, int[] to); The parameters CONTENT_URI and DEFAULT_SORT_ORDER are not defined for this constructor. 2. Where is the CONTENT_URI obtained from? In my case, the SQLiteDatabase that the cursor argument refers to, was filled by reading in the contents of a text file. Many thanks, Paul 2009/4/8 Paul Moore polom...@gmail.com Hello, I have an application that involves reading a text dictionary file with about 7000 entries, and allowing the user to choose one of these. My first approach was to allow the user to select one of these by using a AutoCompleteTextView together with ArrayAdapterString. This works, but is very slow (~10 seconds to update the word list each time the user enters a character to narrow down the choice). I was wondering how to rework it so that I could use a database using a SimpleCursorAdapter instead. In other words, to hope that a SQL database could provide a more efficient ordering and access for the elements. Is this the best way to do it? I've also seen several references to SQLiteDatabase, but don't know which one to use. I found
[android-developers] Re: Are there alternate ways to look up user phone number when TelephonyManager returns null?
Muthu Ramadoss wrote: Is there a way to look up the user phone number other than TelephonyManager? In my G1, this returns null: // get your phone number TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String tel = telephonyManager.getLine1Number(); Log.i(Telephone Number == , tel+ ==); Not only does this apparently return null in some cases (like you got), it does not have to necessarily return a valid value. I tried your code, and I get a phone number that I *think* is what I was originally assigned when I bought the G1, before my other T-Mobile number could be ported over. So I am not certain this method is reliable in any case. Is there any other way of getting user's own phone number? Hopefully yes, though I don't know of one... -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Calling web services in android
It depends on what you mean by web services, but there are many many many threads on this list about that topic. Try searching the list, you will find KSOAP examples (if you mean SOAP), and REST examples, and several discussions about when and where you should use web services with a mobile device. On Apr 10, 7:30 am, kavitha kavith...@gmail.com wrote: Hi All, I am doing game project where in i need to call PHP web service and display scores in score board. I am new to android,Can somebody please help on how to call web services in android. I searched for so many examples,but no example looked to be working. It is urgent,Please help. Thanks Kavitha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Calling web services in android
Hi Charlie, I am trying to consume web service methods written in PHP which will give me information about score board in my game. I tried searching and execute examples,,but in vain. When new user starts playing game,,i need to send information to web service through post or get request to insert a new player details record. when user tries to see top 20 scores,i should be able to parse the xml output from php server returned by web service and display them in android. For all these things,i need to make connection with PHP web service and be able to call methods and get response. sample response xml from server is http://www.permeative.com/projects/clearit/getall_global_scores.php How to do it in android? Please help. Thanks Kavitha On Fri, Apr 10, 2009 at 5:25 PM, Charlie Collins charlie.coll...@gmail.com wrote: It depends on what you mean by web services, but there are many many many threads on this list about that topic. Try searching the list, you will find KSOAP examples (if you mean SOAP), and REST examples, and several discussions about when and where you should use web services with a mobile device. On Apr 10, 7:30 am, kavitha kavith...@gmail.com wrote: Hi All, I am doing game project where in i need to call PHP web service and display scores in score board. I am new to android,Can somebody please help on how to call web services in android. I searched for so many examples,but no example looked to be working. It is urgent,Please help. Thanks Kavitha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Calling web services in android
kavitha wrote: For all these things,i need to make connection with PHP web service and be able to call methods and get response. sample response xml from server is http://www.permeative.com/projects/clearit/getall_global_scores.php How to do it in android? The same way you might do it in regular Java: -- Use HttpURLConnection or HttpClient to retrieve the document http://www.exampledepot.com/egs/java.net/pkg.html http://hc.apache.org -- Use DOM or SAX or the XmlPullParser to parse the document http://www.exampledepot.com/egs/javax.xml.parsers/pkg.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.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] How to remove the WebView top/left 8-pixel inner margin?
Hello. After some search, even in the WebView and related classes source code, I could not find where the built-in 8-pixel inner margin of a WebView is set. I would like to display a WebView with no inner margin: is it feasible, please? Or am I missing something and there is no top and left inner margin inside a WebView? Thank you for your help and support. Regards, Édouard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: More Than One Instance of Application
I ran into this as well. Try adding this to the Activity tag ... android:launchMode=singleTask Jason Van Anden http://www.smileproject.com On Thu, Apr 9, 2009 at 6:29 PM, Dianne Hackborn hack...@android.com wrote: It brings the currently running instance to the foreground. On Thu, Apr 9, 2009 at 2:39 PM, Noam noam.ha...@gmail.com wrote: Hello, Is there a way to prevent the user of opening more than one instance of my application? For example: User clicks on App and opens it. The user clicks on the home button. (the app is still running in the background) The user clicks on (not the menu button, but the button above it in the homescreen), and then opens the application again. Does it open the same instance, or does it create another one? If it does create another one, how can I prevent it from creating another one, and just opening the existing instance? Thanks, Noam. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to determine the amount of characters that will fit into a TextView
I'd say if you know the text you want to put into the TextView, you should be able to measure the text and compare to the size of the TextView... In the API Demos, there is a measure text sample. I'd start there. On Apr 9, 3:11 pm, nwmotog...@gmail.com nwmotog...@gmail.com wrote: I am trying to place only the exact amount of data into a TextView but I need to know how much it can hold. Is there a way to do this based on it's height, width and the textsize? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Losing Data on Reboot
So, I made a mistake and I still had the debug version of my app (from Eclipse) on my phone when I tried to install a signed version. The install failed, but I could no longer access the debug version in Manage Applications to uninstall it. I was at work and couldn't reinstall the debug version in order to uninstall, so I did a complete factory reset of my phone (using MyBackup Pro to backup stuff). Now I can install my app. However, now I notice upon reboot that my app loses all of its data from shared preferences. I'm not entirely sure that it's not a problem of mine somehow, but does anyone know why it is doing that and how I can fix it? I may have left the debuggable=true on in the version I'm trying to test. Would that cause this problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Losing Data on Reboot
If it helps at all, I've discovered that this only happens if my bootup service tries to read certain preferences and install an alarm. I've used this process to install several other alarms, but for some reason the latest alarms I've added have been causing me to lose all my preferences on a reboot. I'm not doing anything different that I can tell, but maybe there's some known problem that can caused shared preferences to crash and disappear like this? On Apr 10, 8:35 am, droozen droozenr...@gmail.com wrote: So, I made a mistake and I still had the debug version of my app (from Eclipse) on my phone when I tried to install a signed version. The install failed, but I could no longer access the debug version in Manage Applications to uninstall it. I was at work and couldn't reinstall the debug version in order to uninstall, so I did a complete factory reset of my phone (using MyBackup Pro to backup stuff). Now I can install my app. However, now I notice upon reboot that my app loses all of its data from shared preferences. I'm not entirely sure that it's not a problem of mine somehow, but does anyone know why it is doing that and how I can fix it? I may have left the debuggable=true on in the version I'm trying to test. Would that cause this problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] String-Integer Hashmap alternative
Currently, I'm using a hashmap which maps strings to integers. I've read that using a wrapper for a primitive type in a hashmap has extra cost and was wandering if there is an alternative I could use. I've seen sparsearrays in the sdk, but they map ints to objects but I need the opposite. Is there an alternative to hashmap available for this or should I write my own class to use an array of strings and a seperate array of ints? If I do write my own class, is there a better implementation I could 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: String-Integer Hashmap alternative
If you mean you map 'String's to 'int's, then yes, you have some overhead because of the autoboxing of Java, making 'int's into 'Integer's. If your map's keys (in this case Strings) can be any possible String, i would just use a MapString, Integer. Depending on how you use this map, you should create a TreeMap or a HashMap. TreeMap is more expensive in modifying itself, but fast in reading. HashMap is more expensive in reading, but faster in modifying itself. I don't know what your requirements are, but, in general, i would not advice you to write your own Map implementation. On Apr 10, 10:16 am, al capwn alcapw...@googlemail.com wrote: Currently, I'm using a hashmap which maps strings to integers. I've read that using a wrapper for a primitive type in a hashmap has extra cost and was wandering if there is an alternative I could use. I've seen sparsearrays in the sdk, but they map ints to objects but I need the opposite. Is there an alternative to hashmap available for this or should I write my own class to use an array of strings and a seperate array of ints? If I do write my own class, is there a better implementation I could 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] Can an Italian company sell apps directly?
Hi, checking the Google Checkout signup process, it seems that only UK and US companies can signup, and so sell apps through Android Market. Is this true? If yes, should a company look for a publisher in UK or US to sell apps? Are there any official plans on when Google will allow companies from other countries? Thanks in advance, Alessandro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Black areas during alpha animation on transparent PNGs.. Help !
Here is the screenshot ... I have compared it.. please take a look and someone help me http://img58.imageshack.us/img58/7016/sample.png this is just a sample.. on my real application due to the colors used, the blackness appears more.. On Mar 19, 9:29 am, quakeboy prasna...@gmail.com wrote: No. It is not opaque as it doesn't give a completely black background it is just that when the animation of fading out starts I start seeing highly translucent black color. I will get some screenshots to make you understand better. On Mar 18, 10:13 pm, Michael MacDonald googlec...@antlersoft.com wrote: I think the system might be assuming the ImageView is opaque and so not drawing what's behind it. Try using a custom Drawable in the image view and return the correct value from getOpacity() quakeboy wrote: I am currently at the verge of releasing a game for android. While creating menu view animations, for which I use ImageViews in AbsoluteLayout and while changing screen, I have used a custom Alpha animation (I tried built in fadeout also) When I startAnimation on the ImageView, Instead of reducing alpha property, It shows a black area, in the areas where transparency is between 0 to 100. Of course it does fade out but it shows a black area in the semi transparent areas of the PNG while fading away. It looks soo bad. Does it have something to do with display mode ? Should I set 32 bpp mode explicitly ?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 deploy and bundle third party dynamic library
Hi, If the application needs to use a third party dynamically linked library (.so) file, how to package that as bundle?. Can i follow the samples platform library example? The .so file is built with android toolchain. Will that work even if i have no source code. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to deploy and bundle third party dynamic library
Layeeq wrote: Can i follow the samples platform library example? The .so file is built with android toolchain. Will that work even if i have no source code. Questions regarding using the Android source code are best asked on a discussion list pertaining to the Android source code: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.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: Are there alternate ways to look up user phone number when TelephonyManager returns null?
Does your G1 display the correct line number through settings? (Settings About phone Status Phone Number) This method used by the system seems to always be accurate, but I believe it is a private API; // Snippit from http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob_plain;f=src/com/android/settings/deviceinfo/Status.java;hb=HEAD import com.android.internal.telephony.Phone; import com.android.internal.telephony.PhoneFactory; ... Phone mPhone = PhoneFactory.getDefaultPhone(); ... setSummaryText(number, mPhone.getLine1Number()); // End snippit On Apr 10, 7:56 am, Mark Murphy mmur...@commonsware.com wrote: Muthu Ramadoss wrote: Is there a way to look up the user phone number other than TelephonyManager? In my G1, this returns null: // get your phone number TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String tel = telephonyManager.getLine1Number(); Log.i(Telephone Number == , tel+ ==); Not only does this apparently return null in some cases (like you got), it does not have to necessarily return a valid value. I tried your code, and I get a phone number that I *think* is what I was originally assigned when I bought the G1, before my other T-Mobile number could be ported over. So I am not certain this method is reliable in any case. Is there any other way of getting user's own phone number? Hopefully yes, though I don't know of one... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Are there alternate ways to look up user phone number when TelephonyManager returns null?
My G1 says Unknown when (Settings About phone Status Phone Number) I haven't tried your new code snippet. I'll report back with the results. Thanks. On Apr 10, 8:08 pm, strazzere str...@gmail.com wrote: Does your G1 display the correct line number through settings? (Settings About phone Status Phone Number) This method used by the system seems to always be accurate, but I believe it is a private API; // Snippit fromhttp://android.git.kernel.org/?p=platform/packages/apps/Settings.git;... import com.android.internal.telephony.Phone; import com.android.internal.telephony.PhoneFactory; ... Phone mPhone = PhoneFactory.getDefaultPhone(); ... setSummaryText(number, mPhone.getLine1Number()); // End snippit On Apr 10, 7:56 am, Mark Murphy mmur...@commonsware.com wrote: Muthu Ramadoss wrote: Is there a way to look up the user phone number other than TelephonyManager? In my G1, this returns null: // get your phone number TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String tel = telephonyManager.getLine1Number(); Log.i(Telephone Number == , tel+ ==); Not only does this apparently return null in some cases (like you got), it does not have to necessarily return a valid value. I tried your code, and I get a phone number that I *think* is what I was originally assigned when I bought the G1, before my other T-Mobile number could be ported over. So I am not certain this method is reliable in any case. Is there any other way of getting user's own phone number? Hopefully yes, though I don't know of one... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Margin-problem with changed layout for titlebar
If you take a look at the hierarchy viewer, you will notice that the customized title is contained in a FrameLayout with id title_container, which has a left and right padding set to 7. I would be you, I'd try something like have a handle on your activity root view, ask for its parent (a FrameLayout with id content), from there ask this new view parent, i.e. a LinearLayout with no identifier, and ask this view second child, which is the FrameLayout responsible for setting the left and right passings: call the setPadding() method on it, and see what happens. This is really dirty, and I woul suggest to do as mentionned in the previous post in your case! That was just meant to say that it might be possible... Hope that helps. Regards, Édouard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ERROR/MediaPlayer(1066): setDataSource called in state 128
MediaPlayer states are protected by mutexes in the native layer. However, the playback complete is an asynchronous event that comes on a binder worker thread. It's possible that you could call reset() in the window after the native media player service has posted a playback complete message to the binder interface, but before the client worker thread has processed it. In this case, the playback complete message would reset the client side of the interface to the stopped state. Your subsequent setDataSource() call would fail. If you wait for the playback complete message and then post a message to your handler to start the next playback, you can avoid this problem. Or as Marco suggests, create a second MediaPlayer object. Just make sure you call release() on each one after you're done with it to release the native resources. On Apr 9, 8:23 pm, ATrubka atru...@gmail.com wrote: I agree that it's most likely me doing something wrong. It looks like when the audio file is about to end the state of MediaPlayer gets changed in the native code. And maybe reset() doesn't take effect during this process while setDataSource(), invoked right after, finds player not to be ready. Maybe Android music app creates MediaPlayer every time or synchronizes the invocations somehow. I wonder whether the situation I described is possible and if it is whether you can advise on the solution. I can create MediaPlayer all the time, but I'm afraid to use too many resources doing so. I'm usually reluctant to creation of unnecessary objects. I really appreciate your help and apologize for my not very deep knowledge of the player functionality. On Apr 9, 3:23 pm, Marco Nelissen marc...@android.com wrote: I am one, and the error you posted indicates you called setDataSource while the MediaPlayer was in the 'playback completed' state. It could be a race condition in the framework, but since I have never seen this problem occur with the Android music app, I'm inclined to think it's a problem with your code. As a workaround, you could create a new MediaPlayer when you want to play something new. On Wed, Apr 8, 2009 at 1:05 PM,ATrubkaatru...@gmail.com wrote: Guys, please... Is there any Android native code developers around? On Apr 8, 12:38 am,ATrubkaatru...@gmail.com wrote: MediaPlayer.reset() always gets invoked. Here's the exact lines of code: _mediaPlayer.reset(); _mediaPlayer.setDataSource(resource); _mediaPlayer.prepare(); _mediaPlayer.start(); Additionally, the error occurs only when next audio starts while previous audio is about to end. If next audio starts in the middle of the playback or after it has completely stopped playing, then everything works fine. It looks pretty much like a synchronization issue to me. This method is not synchronized at the moment. Since most of the MediaPlayer code is native I'm not sure what should be synchronized. On Apr 7, 9:20 pm, Marco Nelissen marc...@android.com wrote: Looks like you're calling MediaPlayer.setDataSource() on a MediaPlayer that was already initialized, without first calling MediaPlayer.reset() On Tue, Apr 7, 2009 at 1:28 PM,ATrubkaatru...@gmail.com wrote: Hi, guys. I'm using MediaPlayer and sometimes when first audio is about to end and I click to the next audio I get the exception below. Looks like the MediaPlayer is in some weird state of stopping playing and cannot accept audio at the moment. The exception goes to the native code which is greeks to me. I couldn't find anything about this error on the internet either. Is anyone here familiar with the problem? Thank you in advance! 04-07 20:19:35.855: ERROR/MediaPlayer(1066): setDataSource called in state 128 04-07 20:19:35.855: ERROR/AudioPlayerService(1066): Unable to play chapter audio 04-07 20:19:35.855: ERROR/AudioPlayerService(1066): java.lang.IllegalStateException 04-07 20:19:35.855: ERROR/AudioPlayerService(1066): at android.media.MediaPlayer.setDataSource(Native Method) 04-07 20:19:35.855: ERROR/AudioPlayerService(1066): at com.tourizo.android.services.AudioPlayerService.playResource (AudioPlayerService.java:291) 04-07 20:19:35.855: ERROR/AudioPlayerService(1066): at com.tourizo.android.services.AudioPlayerService.access$3 (AudioPlayerService.java:287) 04-07 20:19:35.855: ERROR/AudioPlayerService(1066): at com.tourizo.android.services.AudioPlayerService$1.playCurrentChapter (AudioPlayerService.java:89) 04-07 20:19:35.855: ERROR/AudioPlayerService(1066): at com.tourizo.android.services.AudioPlayerRemoteInterface$Stub.onTransact (AudioPlayerRemoteInterface.java:99) 04-07 20:19:35.855: ERROR/AudioPlayerService(1066): at android.os.Binder.execTransact(Binder.java:276)
[android-developers] Re: (pre- post-) processing raw audio data
No, this is not supported. If we ever do support it, it would require a special permission that the user would have to grant, and it would break for DRM content for obvious reasons. On Apr 10, 1:44 am, devi prasad dpras...@gmail.com wrote: I want to develop an app that lets one intercept raw audio data sent for playback (possibly by a different app), and apply audio enhancements over this raw data. Does Cupcake allow such filtering of audio data? If so, which API should I use? I understand this may not be possible at an application level for security reasons. I'm trying to see if this is possible with native code linking to public or private API of Android. 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] Keyguard does not unlock when intent fires while user is at home screen
Hi, I have a pendingIntent that, when it is launched and the user is at the home screen with the keyguard locked and screen off, it does not always unlock the screen even after calling disableKeyguard. If the user is still in the application and the intent launches, I acquire the wakelock and the keyguard is unlocked w/disableKeyguard with no problem in onResume. It only seems that when the user is outside of the application and the intent launches, I acquire the wakelock, but the keyguard does not always unlock - even though I'm calling disableKeyguard in onResume. Anyone seen this behavior before? Or am I using this incorrectly? 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: playing of wma audio
The Windows Media codecs are not part of OpenCORE. They require a separate license which is typically negotiated between the hardware manufacturer and the codec supplier. On Apr 9, 4:49 am, l hx lihongxia8...@gmail.com wrote: now , the opencore can not play the audio of wma. is it right? and the total time of the wma file can not be find in the trackbrowseractivity. who know why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 extend an ArrayAdapter?
Hello, I'm running into difficulties overriding an ArrayAdapter to be displayed in a ListActivity. The ArrayAdapter is filled asynchronously. What I'm trying to do is add a special sentinel object that sits at the beginning of the list to show the progress of the computation. Ultimately this may be a progress bar, but right now I am just using a TextView as a placeholder. The problem is that the sentinel seems to get inserted multiple times into the list - not just once at the beginning. It *seems* to be appearing once per page of list data (so if 8 list items fit on the screen, my sentinel appears as the 1st, then 9th, then the 17th, etc..), but that interpretation may not be accurate. While maybe not how ArrayAdapters were intended to be extended, I thought something like this should work by simply overriding getView() to show my custom TextView for index 0: public class CustomAdapterE extends ArrayAdapterE { private View sentinel; public CustomAdapter(Context context, int textViewResourceId, ListE objects) { super(context, textViewResourceId, objects); sentinel = new TextView(context); ((TextView)sentinel).setText(Still Loading..); } @Override public View getView(int position, View convertView, ViewGroup parent) { if(position == 0) return sentinel; return super.getView(position, convertView, parent); } public void finish() { //called when async list computation finishes remove(getItem(0)); } } The adapter is created in the usual way: ... ArrayListString data = new ArrayListString(); data.add(''); //item 0, this should get replaced adapter = new CustomAdapterString(this, android.R.layout.simple_expandable_list_item_1, data); adapter.add(Sentinel); setListAdapter(adapter); ... My two guesses so far are: 1) When data is added asynchronously, something goes wrong with redrawing the list view. 2) I'm not correctly interpreting the position parameter of getView(). Any suggestions on why this doesn't work? Thanks for reading folks. - C --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 extend an ArrayAdapter?
craiget wrote: I'm running into difficulties overriding an ArrayAdapter to be displayed in a ListActivity. The ArrayAdapter is filled asynchronously. What I'm trying to do is add a special sentinel object that sits at the beginning of the list to show the progress of the computation. Try addHeaderView(). My two guesses so far are: 1) When data is added asynchronously, something goes wrong with redrawing the list view. 2) I'm not correctly interpreting the position parameter of getView(). Any suggestions on why this doesn't work? You haven't indicated how you are adding stuff to the ArrayAdapter, and your problem may lie in there. However, I would use addHeaderView() for this circumstance, or have your sentinel live outside the ListView. Remember: even though you are using a ListActivity, you can still specify your own layout. You need the magic android:id for the ListView (@android:id/list) in that case. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: CONTROL_LOCATION_UPDATES permission failure
Hello again Richard, I have a quick question. The SignalStrength class and setSignalStrength methods in the two lines below are not part of the Android SDK or other Android telephony related classes. Did you write it, or did you find it somewhere else? SignalStrength.setSignalStrength(signalPercent); SignalStrength.setSignalStrengthASU(signalStrength); Thanks. Alex Donnini On Apr 9, 10:18 pm, alexdonnini alexdonn...@ieee.org wrote: Hello Richard, Thanks very much. This is very helpful. I am using the same SDK version but in this case I was not using the SDK. I had been experimenting with LocationListener too. I had been using onLocationChanged. Again, Thanks. Alex Donnini On Apr 9, 7:32 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: I have the SDK version 1.1r1 on my machine, and Actually don't see this API call in the current version. What version of the SDK are you using? Anyway, I assume you want to cell tower location and such. Try creating a listener, and then registering your listener with the TelephonyManager. Start by giving your application the following permissions: android.permission.ACCESS_FINE_LOCATION android.permission.ACCES_COARSE_LOCATION Then, create your listener: // implement both phone state listener and location listener. public class PhoneSignalListener extends PhoneStateListener implements LocationListener{ /** * @param signalStrength signal strength in ACU. */ public void onSignalStrengthChanged(int signalStrength){ float signalPercent = ((float)signalStrength)/31f * 100f; SignalStrength.setSignalStrength(signalPercent); SignalStrength.setSignalStrengthASU(signalStrength); } public void onCellLocationChanged(CellLocation cellLoc){} public void onLocationChanged(Location loc) {} public void onProviderDisabled(String arg0) {} public void onProviderEnabled(String arg0) {} public void onStatusChanged(String arg0, int arg1, Bundle arg2) {} } And then you register it with TelephonyManager. In your application's main activity (Activity.onCreate()): public class MyActivity extends Activity{ public void onCreate(Bundle savedInstanceState) { TelephonyManager telManager = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE); telManager.listen(new PhoneSignalListener(), PhoneStateListener.LISTEN_SERVICE_STATE | PhoneStateListener.LISTEN_SIGNAL_STRENGTH | PhoneStateListener.LISTEN_CELL_LOCATION); } } As the phone location changes you get the information delivered, wrapped in a pretty package with a bow, to the Phone signal listener. Richard Schilling Root Wireless On Apr 9, 11:15 am,alexdonninialexdonn...@ieee.org wrote: Hello, Although the manifest file in my application contains uses-permission android:name=android.permission.CONTROL_LOCATION_UPDATES / the operation, mTelephonyManager.enableLocationUpdates(); fails with 04-09 14:01:01.754: WARN/System.err(5495): java.lang.SecurityException: Neither user 10026 nor current process has android.permission.CONTROL_LOCATION_UPDATES. Could anyone help me understand where I am making a mistake, and how to correct it? Thanks. Alex Donnini --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Programmatically delete a home-screen shortcut
1) Is there a way to programmatically delete a home-screen shortcut on Android? I know that it can be done manually but I want to do it in code. You can use the UNINSTALL_SHORTCUT intent provided by Home. 2) Is there a directory where all the contents of the home-screen are stored and, if there is, is there a way to update the contents of this directory? No, there's no such directory. Home uses a private database that only Home can access and manipulate. -- 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: Are there alternate ways to look up user phone number when TelephonyManager returns null?
What type of phone are you using? Does it have a simcard and/or work on your carrier network? If the About phone/Status is not showing, then I doubt the snippit would work even if you could compile it (your not going to be able to using the standard SDK) On Apr 10, 11:22 am, Muthu Ramadoss muthu.ramad...@gmail.com wrote: My G1 says Unknown when (Settings About phone Status Phone Number) I haven't tried your new code snippet. I'll report back with the results. Thanks. On Apr 10, 8:08 pm, strazzere str...@gmail.com wrote: Does your G1 display the correct line number through settings? (Settings About phone Status Phone Number) This method used by the system seems to always be accurate, but I believe it is a private API; // Snippit fromhttp://android.git.kernel.org/?p=platform/packages/apps/Settings.git;... import com.android.internal.telephony.Phone; import com.android.internal.telephony.PhoneFactory; ... Phone mPhone = PhoneFactory.getDefaultPhone(); ... setSummaryText(number, mPhone.getLine1Number()); // End snippit On Apr 10, 7:56 am, Mark Murphy mmur...@commonsware.com wrote: Muthu Ramadoss wrote: Is there a way to look up the user phone number other than TelephonyManager? In my G1, this returns null: // get your phone number TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String tel = telephonyManager.getLine1Number(); Log.i(Telephone Number == , tel+ ==); Not only does this apparently return null in some cases (like you got), it does not have to necessarily return a valid value. I tried your code, and I get a phone number that I *think* is what I was originally assigned when I bought the G1, before my other T-Mobile number could be ported over. So I am not certain this method is reliable in any case. Is there any other way of getting user's own phone number? Hopefully yes, though I don't know of one... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Custom View Subclass - How do I properly specify xmlns in my layout.xml file?
I thought you are not read the Dev Guide clear you can define like the follow code - com.foo.bar android:id=@+id/parameterName android:layout_width=fill_parent android:layout_height=fill_parent /com.foo.bar --- Done. Good Luck. On 4月6日, 下午1时23分, Mark Rosenberg markrosenberg01460...@gmail.com wrote: I am following the LabelView.java and associated custom_view_1.xml layout files to guide me, but I am perplexed by the xmlns:app specification. Mycustomviewis in the com.foo.bar package. What do I specify as the xmlns:app value to properly bind my XML layout declarations to the attribute set mycustomviewconstructor processes? I've tried xmlns:app=com.foo.bar, xmlns:app=http:// schemas.android.com/apk/res/com.foo.bar, xmlns:app=http:// schemas.android.com/com.foo.bar to no avail. Its not clear to me why the api example uses an http: scheme in the first place. Shouldn't the package name be adequately unique? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Alias custom view path in XML
I like the full namespace, so I can find my custom component easy and clear. On 3月24日, 下午10时50分, Mark Murphy mmur...@commonsware.com wrote: Ward Willats wrote: Is there a way to alias the path to mycustomviewclass (perhaps in its styleable) so I can say MyGreatView in the XML, instead of com.myco.myapps.MyGreatView (I played around with the months ago, namespaces and what-not, but never found a solution.) Just a nice to have thing. Not that I'm aware of. Otherwise, I would have expected Google to avail itself of the technique with MapView. Right now, we have to spell out the whole fully-qualified class name when putting MapView in our layouts (unless something changed on that front that I missed). -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Exception locking surface - lockCanvas() returns a null?
thank you sooo much, everyone! i've been meaning for someone to tell me that since a very long time ago, but no one did, so i was stuck! :) On Apr 9, 3:30 pm, Dianne Hackborn hack...@android.com wrote: If you want to use the standard 2d APIs, don't use OpenGL. On Thu, Apr 9, 2009 at 1:45 PM, mcmc manni...@gmail.com wrote: wow thanks so much for your help. I think you're right! :D however, now I run into another problem. Do you know how to convert openGL to simply using the standard android/java 2D APIs? On Apr 9, 2:31 am, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: I hadn't realised you are doing openGL stuff. I've used surfaceview/ holder in the same was as the lunarlander, but I haven't used openGL so I don't know how that works. But, at a glance, it looks like you've got a mix of two different approaches here - maybe the lockcanvas/unlockcanvasandpost approach is not appropriate when using openGL as the openGL code is controlling and locking the surface? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Updating TextView Values
Hi You can only modify views from the UI thread - as per the docs: Note: The entire view tree is single threaded. You must always be on the UI thread when calling any method on any view. If you are doing work on other threads and want to update the state of a view from that thread, you should use a Handler. So, you could do that, i.e. in your timer thread post a message to a handler in your UI thread informing it to fetch the latest orientation values But I think a simpler approach is to avoid threading altogether - just implement onSensorChanged in your UI thread. It will be called whenever the orientation changes, avoiding the need for you to run a seperate thread to cache the values. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: require eclipse 3.1 , 3.2
For your information, the ADT plugin for Eclipse requires Eclipse 3.3 or 3.4 (ganymede) now. R/ On Tue, Apr 7, 2009 at 11:08 PM, harne prashant harneprashant...@gmail.com wrote: hi group i want eclipse 3.1 , 3.2 (europa )for developing application in Android. i searched it but i didnt get if any one has its related links pls give me i m waitng for reply its urgent !! -- p...@$#@NT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Please suggest me possible ways to get Image data from camera
hi I am working on image processing in mobile. When Camera,takePicture(null,null,pictureCallback) called I am getting (640*480) JPEG image data, its taking 1 second delay.When I try to get raw data it returns null value.I am interested only on delay. Anyone please suggest me possible ways to get image data faster rate. Thank you, sparu...@mix.wvu.edu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Exception locking surface - lockCanvas() returns a null?
Just my 2 stotinki -- I see more and more developers using this WRONG resource acquisition pattern with try...finally: try { acquireResource(); } finally { releaseResource(); } This is plain wrong. The correct way to obtain a resource and release it is to acquire it BEFORE the try block, and release it in the finally block: acquireResource(); try { // do whatever with the resource } finally { releaseResource(); } if acquireResource could throw an error, the correct way to handle it is in an outer try block: try { acquireResource(); try { // do whatever with the resource } finally { releaseResource(); } } catch (WhateverException e) { } as opposed to this anti-pattern (again widely used): Resource r = null; try { r = acquireResource(); // do whatever with the resource } finally { if (r != null) { releaseResource(); } } Cheers On Fri, Apr 10, 2009 at 8:00 PM, mcmc manni...@gmail.com wrote: thank you sooo much, everyone! i've been meaning for someone to tell me that since a very long time ago, but no one did, so i was stuck! :) On Apr 9, 3:30 pm, Dianne Hackborn hack...@android.com wrote: If you want to use the standard 2d APIs, don't use OpenGL. On Thu, Apr 9, 2009 at 1:45 PM, mcmc manni...@gmail.com wrote: wow thanks so much for your help. I think you're right! :D however, now I run into another problem. Do you know how to convert openGL to simply using the standard android/java 2D APIs? On Apr 9, 2:31 am, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: I hadn't realised you are doing openGL stuff. I've used surfaceview/ holder in the same was as the lunarlander, but I haven't used openGL so I don't know how that works. But, at a glance, it looks like you've got a mix of two different approaches here - maybe the lockcanvas/unlockcanvasandpost approach is not appropriate when using openGL as the openGL code is controlling and locking the surface? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] What happened to the HOME button in cupcake
I tried the 'unofficial' cupcake SDK and found that the hardware HOME button doesn't bring me back to the home screen anymore. Is this a conscious UI decision? What's the reason behind it? Also, long-press on the HOME button doesn't bring up the task manager anymore. So, if I am in the browser, I have to all the way close all the pages before I can go back to home screen? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Dispatch event from children to parent
Hi all, I tried some stuffs, but i didn't find yet the solution, so question... I've a Layout containing some ImageView. I manage the TouchEvent on the layout, with a setOnTouchListener, to launch animation when user slide on screen. If I do a slide on an Image, nothing happens. So I would like that the animation is launched when user slide on an image. I tried to use the dispatch event from my ImageView, but my app crash always...I get a NullPointer but I don't finf where...the logs are not really explicit...see below Do you have a solution or a good strategy? Thanks for your help 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): java.lang.NullPointerException 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at android.view.ViewRoot.handleMessage(ViewRoot.java:1198) 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at android.os.Handler.dispatchMessage(Handler.java:88) 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at android.os.Looper.loop(Looper.java:123) 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at android.app.ActivityThread.main(ActivityThread.java:3739) 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at java.lang.reflect.Method.invokeNative(Native Method) 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at java.lang.reflect.Method.invoke(Method.java:515) 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:739) 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 04-10 19:18:38.884: ERROR/AndroidRuntime(12224): at dalvik.system.NativeStart.main(Native Method) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: can replace default dialer?
Thanks I also found your other Feb answers which was helpful as well.. On Apr 9, 11:40 am, Dianne Hackborn hack...@android.com wrote: You can replace the entire dialtacts activity. You can't replace just one tab in it. This is regardless of whether you are running as root. On Thu, Apr 9, 2009 at 9:03 AM, Fred Grott(shareme) fred.gr...@gmail.comwrote: I want to verify something.. I already did some app tests but I am coming to the conclusion that I can nnto as non root replace the default dialer like one might replace the HomeScreen. is this assumption correct? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] permissions related to /dev/alarm and setting the system
I understand that userland apps on android cannot set the system clock. Wanting to know more about how the security mechanism is set up for the system I did some digging around in the source code. /dev/alarm is opened R/W to set the system clock using SystemClock.setCurrentTimeMillis. Can someone explain how the permissions work to determine whether or not an application has permission to set the clock. I assume it's just a user level permission, and the write bit for /dev/ alarm is only enabled for the system user and not the userland user applications run under. But, if someone can set me straight or confirm that what I'm thinking is true that would be great. Thanks. Cheers, Richard Schilling --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Please suggest me possible ways to get Image data from camera
That's how it is. RAW data callback is not supported. The JPEG image data is the full-size image as it has been taken by the camera. Per default, it should be 2048*1536 px. And taking a picture takes this long, about a second. You can mitigate this by pre-focusing On Apr 10, 2:28 pm, srik sri_reddy...@yahoo.com wrote: hi I am working on image processing in mobile. When Camera,takePicture(null,null,pictureCallback) called I am getting (640*480) JPEG image data, its taking 1 second delay.When I try to get raw data it returns null value.I am interested only on delay. Anyone please suggest me possible ways to get image data faster rate. Thank you, sparu...@mix.wvu.edu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What happened to the HOME button in cupcake
On Fri, Apr 10, 2009 at 12:24 PM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: I tried the 'unofficial' cupcake SDK and found that the hardware HOME button doesn't bring me back to the home screen anymore. Is this a conscious UI decision? What's the reason behind it? You are talking about the emulator, right? The official SDK runs an app called SdkSetup at boot time to correctly setup the home button. Seems like something is missing in your unofficial SDK then. R/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SQLite Pre-populated Database
I must say I am surprised no one at google thinks it's important to provide a better way of including a pre-populated database into a package. I've spent 10 hours trying to get a 3.5MB database working with my APK and have given up. This is what I tried, and would appreciate if someone has a solution: 1. Included the db as an asset 2. Copied it to the SDCard at startup 3. The above fails with a uncompress_data_max when it's being pulled out of the Assets directory I don't want to upload the file anywhere as I can't deal with all the extra bandwidth used. How can I include the file in the package and then somehow copy it elsewhere (considering it's more than 1MB in size)? Many 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] onsingletapup not called
My TextView subclass implements OnGestureListener and I successfully detect onDown events, but both taps and long presses cause onLongPress to be called and never onSingleTapUp. I realize I'm not provided much detail, but I'm not sure what nuances might be relevant. Please ask for any relevant elaboration. Any thoughts? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: SQLite Pre-populated Database
fg1921 wrote: I must say I am surprised no one at google thinks it's important to provide a better way of including a pre-populated database into a package. Bashing the people who might offer you assistance is a curious tactic. I've spent 10 hours trying to get a 3.5MB database working with my APK and have given up. This is what I tried, and would appreciate if someone has a solution: 1. Included the db as an asset 2. Copied it to the SDCard at startup 3. The above fails with a uncompress_data_max when it's being pulled out of the Assets directory Without source code showing how you are trying to do this, it is difficult to comment on this specific error. You might try: -- Splitting the file into pieces in /assets, reassembling them as part of your copy operation -- Try using a raw resource rather than an asset, in case that makes a difference -- Try copying to on-board flash (/data/data/your.package.here/databases) instead of the SD card, in case that makes a difference I don't want to upload the file anywhere as I can't deal with all the extra bandwidth used. http://www.nearlyfreespeech.net $1/GB. A 3.5MB database costs about a third of a penny per download, and it's pay as you go, so there's no monthly minimums or anything. Amazon S3 or other services may be cheaper still. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What happened to the HOME button in cupcake
This is why we want to be clear it is unofficial, because it is not actually a working SDK. If you really want to play around with it, please don't assume that any random thing you happen to experience is actually correct. :} On Fri, Apr 10, 2009 at 12:24 PM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: I tried the 'unofficial' cupcake SDK and found that the hardware HOME button doesn't bring me back to the home screen anymore. Is this a conscious UI decision? What's the reason behind it? Also, long-press on the HOME button doesn't bring up the task manager anymore. So, if I am in the browser, I have to all the way close all the pages before I can go back to home screen? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: permissions related to /dev/alarm and setting the system
Please read the documentation in the SDK on the security model. You can look at the alarm device to see its permissions: $ adb shell ls -l /dev/alarm crw-rw-r-- system radio 10, 45 2009-04-10 09:03 alarm So anyone can read it, and only the system uid can write it. On Fri, Apr 10, 2009 at 12:53 PM, Richard Schilling richard.rootwirel...@gmail.com wrote: I understand that userland apps on android cannot set the system clock. Wanting to know more about how the security mechanism is set up for the system I did some digging around in the source code. /dev/alarm is opened R/W to set the system clock using SystemClock.setCurrentTimeMillis. Can someone explain how the permissions work to determine whether or not an application has permission to set the clock. I assume it's just a user level permission, and the write bit for /dev/ alarm is only enabled for the system user and not the userland user applications run under. But, if someone can set me straight or confirm that what I'm thinking is true that would be great. Thanks. Cheers, Richard Schilling -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: showing graph in Application
In the API Demos in the OS section there is a Sensors demo which graphs the sensor data. You may want to take a look at that implementation as well. ~clark On Apr 9, 10:48 pm, jj jagtap...@gmail.com wrote: Hello I want to display graph(time ver distance) in Activity , how should be this achieved in Android. is there any tut available? Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: showing graph in Application
I'm currently using Google Charts API, but do you know of any solutions that will allow for interactive charts? Thanks, Kirk On Apr 10, 2:07 pm, clark clarkd...@gmail.com wrote: In the API Demos in the OS section there is a Sensors demo which graphs the sensor data. You may want to take a look at that implementation as well. ~clark On Apr 9, 10:48 pm, jj jagtap...@gmail.com wrote: Hello I want to display graph(time ver distance) in Activity , how should be this achieved in Android. is there any tut available? Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What happened to the HOME button in cupcake
This is a sign to me that the HTC Magic won't come out for quite a while. I just hope not too many people are holding off buying the G1 to wait for the Magic. On Fri, Apr 10, 2009 at 2:03 PM, Dianne Hackborn hack...@android.comwrote: This is why we want to be clear it is unofficial, because it is not actually a working SDK. If you really want to play around with it, please don't assume that any random thing you happen to experience is actually correct. :} On Fri, Apr 10, 2009 at 12:24 PM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: I tried the 'unofficial' cupcake SDK and found that the hardware HOME button doesn't bring me back to the home screen anymore. Is this a conscious UI decision? What's the reason behind it? Also, long-press on the HOME button doesn't bring up the task manager anymore. So, if I am in the browser, I have to all the way close all the pages before I can go back to home screen? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What happened to the HOME button in cupcake
..so where is the SDK that the magic google team (or whomever else, don't get picky here) is working with? On Fri, Apr 10, 2009 at 5:03 PM, Dianne Hackborn hack...@android.comwrote: This is why we want to be clear it is unofficial, because it is not actually a working SDK. If you really want to play around with it, please don't assume that any random thing you happen to experience is actually correct. :} On Fri, Apr 10, 2009 at 12:24 PM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: I tried the 'unofficial' cupcake SDK and found that the hardware HOME button doesn't bring me back to the home screen anymore. Is this a conscious UI decision? What's the reason behind it? Also, long-press on the HOME button doesn't bring up the task manager anymore. So, if I am in the browser, I have to all the way close all the pages before I can go back to home screen? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SQLite Pre-populated Database
Thanks Mark None of these options work (apart from the downloading one). It's not really easy/possible to split the DB up in any sensible form nor can we spend 10 minutes constructing it at start up. The app we're working on is expected to have more than a thousand downloads a day, and all that bandwidth is going to be very expensive (not to mention it's going to be for free). Sigh. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: SQLite Pre-populated Database
fg1921 wrote: It's not really easy/possible to split the DB up in any sensible form Run split (or equivalent Windows programs) to chop your binary database file into pieces, small enough to avoid the error. I'd start at 1MB and see if that is small enough. Since you are already unpacking it from an asset in the APK, you are presumably doing a byte-wise stream copy. In that case, open the first asset, open the output stream, copy the first asset, leave the output stream open, open the second asset, lather, rinse repeat. The result should be a byte-for-byte copy of the original file pre-split, out on your SD card. The whole process can be put into your Ant script (or Eclipse thingamajig) to automate the split at compile time. What is not...possible about that? nor can we spend 10 minutes constructing it at start up. I would not expect the above to take significantly longer than copying it from the APK all as one file -- maybe a few hundred milliseconds of extra overhead for opening/decompressing a few streams instead of one. Now, I have not tried unpacking 3.5MB of data from an APK onto the SD card, so I don't have a sense for how long that will take, but I rather doubt 10 minutes will be needed. The app we're working on is expected to have more than a thousand downloads a day Great! and all that bandwidth is going to be very expensive $3.50/day is expensive? (3.5MB/day * 1024 = 3.5GB/day @ $1/GB = $3.50/day) Some people spend more than that in Starbucks before 9am. ;-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What happened to the HOME button in cupcake
On Fri, Apr 10, 2009 at 3:15 PM, Disconnect dc.disconn...@gmail.com wrote: ..so where is the SDK that the magic google team (or whomever else, don't get picky here) is working with? We aren't working with an SDK, we develop in the platform tree. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Getting the network restarted after phone starts sleeping
I have a long lived service, it wakes up (via the AlarmManager) at intervals and connects to a web server. If the phone goes to sleep and one of my polling intervals happens the phone wakes up enough to let me attempt to connect to the network but the ConnectionManager claims there is no network. Given the system log this is correct, it was torn down. Pushing Menu once is enough to get the network back up and then my service can connect. How do I get the network to reconstruct itself? tia, mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What happened to the HOME button in cupcake
On Sat, Apr 11, 2009 at 12:15 AM, Disconnect dc.disconn...@gmail.comwrote: ..so where is the SDK that the magic google team (or whomever else, don't get picky here) is working with? Right there in the public sources. The problem is really in packaging; building a proper SDK package is tricky at the moment and it's easy to generate one that doesn't work 100% as it should (as experienced with the recent SD Card auto-mounting problem which was due to a missing configuration file). We're working on fixing this and providing detailed instructions on how to build an SDK. However, one should expect this kind of problem episodically when trying to build its own SDK. And as Dianne said, most of the team works in the source tree directly, which generates images that are a bit different than the ones packaged for a SDK (this is also true of the generic product in the open-source tree); that's why releasing an official SDK takes time by the way, we need to ensure that everything works as it should, even though the rest of the team often makes modifications that work on normal build products, but not on the SDK system images themselves for really corny reasons. On Fri, Apr 10, 2009 at 5:03 PM, Dianne Hackborn hack...@android.comwrote: This is why we want to be clear it is unofficial, because it is not actually a working SDK. If you really want to play around with it, please don't assume that any random thing you happen to experience is actually correct. :} On Fri, Apr 10, 2009 at 12:24 PM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: I tried the 'unofficial' cupcake SDK and found that the hardware HOME button doesn't bring me back to the home screen anymore. Is this a conscious UI decision? What's the reason behind it? Also, long-press on the HOME button doesn't bring up the task manager anymore. So, if I am in the browser, I have to all the way close all the pages before I can go back to home screen? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SQLite Pre-populated Database
Do you need it as an on-device database? Can you make web services (or some other service) out of the data instead? Hosting providers don't charge all that much; I get 2500gb/mo for well under $200. On Apr 10, 3:32 pm, fg1921 guidedw...@googlemail.com wrote: Thanks Mark None of these options work (apart from the downloading one). It's not really easy/possible to split the DB up in any sensible form nor can we spend 10 minutes constructing it at start up. The app we're working on is expected to have more than a thousand downloads a day, and all that bandwidth is going to be very expensive (not to mention it's going to be for free). Sigh. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Get the name of the owner of the phone? (the email sender)
Did you ever find this solution? On Feb 18, 1:21 pm, Zombies and Robots caecus...@gmail.com wrote: I've been doing some research on this topic myself, but so far, I haven't come up with anything. It seems like a very simple question. Does anyone else have an idea? I'm going back to scouring the API... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 get MediaRecorder to record in MP3 format
Would be more useful than AMR / MP4. Also would be compatible with the very handy source code for RingDroid. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: (pre- post-) processing raw audio data
Hi Dave thanks much for the information. What I'm actually looking for is a bunch of functions equivalent to the WaveOut API of MS Windows. Are there equivalents to functions such as waveOutOpen, waveOutClose, waveOutWrite, waveOutReset, etc? thanks again On Fri, Apr 10, 2009 at 9:10 PM, Dave Sparks davidspa...@android.com wrote: No, this is not supported. If we ever do support it, it would require a special permission that the user would have to grant, and it would break for DRM content for obvious reasons. On Apr 10, 1:44 am, devi prasad dpras...@gmail.com wrote: I want to develop an app that lets one intercept raw audio data sent for playback (possibly by a different app), and apply audio enhancements over this raw data. Does Cupcake allow such filtering of audio data? If so, which API should I use? I understand this may not be possible at an application level for security reasons. I'm trying to see if this is possible with native code linking to public or private API of Android. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What happened to the HOME button in cupcake
I built from GIT cupcake source as well as the HOME button in the emulator still doesn't do anything. I understand that the SDK, especially Windows-based one, may be lacking, but is the HOME button in cupcake supposed to work the same way as in 1.0? Thanks On Fri, Apr 10, 2009 at 4:28 PM, David Turner di...@android.com wrote: On Sat, Apr 11, 2009 at 12:15 AM, Disconnect dc.disconn...@gmail.comwrote: ..so where is the SDK that the magic google team (or whomever else, don't get picky here) is working with? Right there in the public sources. The problem is really in packaging; building a proper SDK package is tricky at the moment and it's easy to generate one that doesn't work 100% as it should (as experienced with the recent SD Card auto-mounting problem which was due to a missing configuration file). We're working on fixing this and providing detailed instructions on how to build an SDK. However, one should expect this kind of problem episodically when trying to build its own SDK. And as Dianne said, most of the team works in the source tree directly, which generates images that are a bit different than the ones packaged for a SDK (this is also true of the generic product in the open-source tree); that's why releasing an official SDK takes time by the way, we need to ensure that everything works as it should, even though the rest of the team often makes modifications that work on normal build products, but not on the SDK system images themselves for really corny reasons. On Fri, Apr 10, 2009 at 5:03 PM, Dianne Hackborn hack...@android.comwrote: This is why we want to be clear it is unofficial, because it is not actually a working SDK. If you really want to play around with it, please don't assume that any random thing you happen to experience is actually correct. :} On Fri, Apr 10, 2009 at 12:24 PM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: I tried the 'unofficial' cupcake SDK and found that the hardware HOME button doesn't bring me back to the home screen anymore. Is this a conscious UI decision? What's the reason behind it? Also, long-press on the HOME button doesn't bring up the task manager anymore. So, if I am in the browser, I have to all the way close all the pages before I can go back to home screen? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What happened to the HOME button in cupcake
It is, this problem is just due to the fact that the SDK thinks the system is not provisioned. The SDK usually relies on a special apk to do this automatically and I don't know why it doesn't happen for you. On Fri, Apr 10, 2009 at 5:52 PM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: I built from GIT cupcake source as well as the HOME button in the emulator still doesn't do anything. I understand that the SDK, especially Windows-based one, may be lacking, but is the HOME button in cupcake supposed to work the same way as in 1.0? Thanks On Fri, Apr 10, 2009 at 4:28 PM, David Turner di...@android.com wrote: On Sat, Apr 11, 2009 at 12:15 AM, Disconnect dc.disconn...@gmail.com wrote: ..so where is the SDK that the magic google team (or whomever else, don't get picky here) is working with? Right there in the public sources. The problem is really in packaging; building a proper SDK package is tricky at the moment and it's easy to generate one that doesn't work 100% as it should (as experienced with the recent SD Card auto-mounting problem which was due to a missing configuration file). We're working on fixing this and providing detailed instructions on how to build an SDK. However, one should expect this kind of problem episodically when trying to build its own SDK. And as Dianne said, most of the team works in the source tree directly, which generates images that are a bit different than the ones packaged for a SDK (this is also true of the generic product in the open-source tree); that's why releasing an official SDK takes time by the way, we need to ensure that everything works as it should, even though the rest of the team often makes modifications that work on normal build products, but not on the SDK system images themselves for really corny reasons. On Fri, Apr 10, 2009 at 5:03 PM, Dianne Hackborn hack...@android.com wrote: This is why we want to be clear it is unofficial, because it is not actually a working SDK. If you really want to play around with it, please don't assume that any random thing you happen to experience is actually correct. :} On Fri, Apr 10, 2009 at 12:24 PM, Mattaku Betsujin mattaku.betsu...@gmail.com wrote: I tried the 'unofficial' cupcake SDK and found that the hardware HOME button doesn't bring me back to the home screen anymore. Is this a conscious UI decision? What's the reason behind it? Also, long-press on the HOME button doesn't bring up the task manager anymore. So, if I am in the browser, I have to all the way close all the pages before I can go back to home screen? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: ListView not touchable in my Activity - A clue...not the solution though..
Thanks for answering... I ended descontructing the whole Activity until I came across what seems to be the cause of the problem. When creating the SimpleCursorAdapter I use: R.layout.row which is a layout that I created. When I use one of android's, for instance: android.R.layout.simple_list_item_1, it works but it does not show what I need on screen. If anybody can help... I'd appreciate it. Thanks! You don't see any itemClickListener because I post part of the code...this is what I missed. @Override protected void onListItemClick(ListView l, View v, int position, long id){ super.onListItemClick(l, v, position, id); Cursor c = (Cursor) this.getListAdapter().getItem(position); this.var1=c.getString(1); this.var2=c.getString(2); this.var3=c.getString(3); this.var4=c.getString(4); Intent nextActivity = new Intent(Activity_CardList.this, Activity_ViewCard.class); nextActivity.putExtra(var1, var1); startActivity(nextActivity); } On Apr 9, 11:24 pm, Chander Pechetty cspeche...@gmail.com wrote: I don't see any itemClickListener registered ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Dialogs: in(determinate) vs. spinner/horizontal style
I thought an indeterminate dialog was the circle and a determinate one was a progress bar, but now I see that these properties are set orthogonally. You can call setIndeterminate(true/false) entirely independent of calling setProgressStyle(STYLE_HORIZONTAL/ STYLE_SPINNER). All four combinations are possible. So, if the style call sets whether it is a spinner or a bar (it does, I have verified this), then was does indeterminacy refer to? What aspect of a ProgressDialog is it setting? As far as I can tell, my dialogs look and behave exactly the same no matter how I set the indeterminacy. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How get MediaRecorder to record in MP3 format
There is no mp3 encoder included in Android currently, so you can't record to mp3. On Fri, Apr 10, 2009 at 5:13 PM, admin.androidsl...@googlemail.com admin.androidsl...@googlemail.com wrote: Would be more useful than AMR / MP4. Also would be compatible with the very handy source code for RingDroid. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] play video
Hi to all I tried to play the video through sdcard image... But i got a error like Cannot play the video.. Can anyone tell me what is the error in my code... public class SimpleVideo extends Activity { private VideoView myVideo; private MediaController mc; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.main); Button bPlayVideo=(Button)findViewById(R.id.playvideo); bPlayVideo.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { mc.show(); } }); myVideo=(VideoView)findViewById(R.id.video); myVideo.setVideoPath(/sdcard/test.mp4); mc=new MediaController(this); mc.setMediaPlayer(myVideo); myVideo.setMediaController(mc); myVideo.requestFocus(); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] sdcard
Hi to all I push the one video file... and tried to play that video file in emulator.. But i got error... Can any tell me how can i check weather video file insert or not... Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] WiFi
Hi to all Can anyone tell me weather emulator support WiFi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: sdcard
It would help if you said what error you're getting. You can check whether the file is actually there by doing something like adb shell ls -l /sdcard and checking that the file exists. On Fri, Apr 10, 2009 at 9:23 PM, Nithin nithi...@gmail.com wrote: Hi to all I push the one video file... and tried to play that video file in emulator.. But i got error... Can any tell me how can i check weather video file insert or not... Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: sdcard
and i meet a matter such as: some file in the /sdcard can not be seen in the trackbrowserActivity of music app. i found the file also can not be found in the database of the mediaprovider. who know why? On Sat, Apr 11, 2009 at 1:24 PM, Marco Nelissen marc...@android.com wrote: It would help if you said what error you're getting. You can check whether the file is actually there by doing something like adb shell ls -l /sdcard and checking that the file exists. On Fri, Apr 10, 2009 at 9:23 PM, Nithin nithi...@gmail.com wrote: Hi to all I push the one video file... and tried to play that video file in emulator.. But i got error... Can any tell me how can i check weather video file insert or not... Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: sdcard
Are the files in a supported format? How did you put the files in /sdcard? On Fri, Apr 10, 2009 at 10:33 PM, l hx lihongxia8...@gmail.com wrote: and i meet a matter such as: some file in the /sdcard can not be seen in the trackbrowserActivity of music app. i found the file also can not be found in the database of the mediaprovider. who know why? On Sat, Apr 11, 2009 at 1:24 PM, Marco Nelissen marc...@android.com wrote: It would help if you said what error you're getting. You can check whether the file is actually there by doing something like adb shell ls -l /sdcard and checking that the file exists. On Fri, Apr 10, 2009 at 9:23 PM, Nithin nithi...@gmail.com wrote: Hi to all I push the one video file... and tried to play that video file in emulator.. But i got error... Can any tell me how can i check weather video file insert or not... Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---