[android-developers] Re: Recording Audio
Finally got it figured out: http://www.benmccann.com/dev-blog/android-audio-recording-tutorial/ On Mar 9, 11:37 am, benmccann benjamin.j.mcc...@gmail.com wrote: I'm still feeling directionless when it comes to what MediaRecorder.setOutputFile(String path) is expecting. Is it a relative path? Is it a fully qualified path? Must the directory we are recording in already exist, or will MediaRecorder create it for us if it does not exist? What happens if we specify a file path which already exists - will it override the existing file or will it bomb out? On Mar 7, 10:30 pm, benmccann benjamin.j.mcc...@gmail.com wrote: jdl, I'd be happy to post my code, but I still don't have a working example. I upgraded to the 1.1 SDK today in hopes that it fixed a bug and things would work for me, but it seems the media APIs are still hopelessly broken. All I ever get is the meaningless message start failed. It looks like perhaps the cause is a buffer overflow in the native code: 03-07 21:19:42.059: DEBUG/AudioHardware(25): AudioStreamInGeneric::set (0xac50, 7, 1, 1, 8000) 03-07 21:19:42.069: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x40308020, 320) from fd 7 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x40308160, 320) from fd 7 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x403082a0, 320) from fd 7 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x403083e0, 320) from fd 7 03-07 21:19:42.088: WARN/AudioFlinger(25): AudioRecordThread: buffer overflow 03-07 21:19:42.098: DEBUG/AndroidRuntime(185): Shutting down VM 03-07 21:19:42.098: WARN/dalvikvm(185): threadid=3: thread exiting with uncaught exception (group=0x4000fe68) 03-07 21:19:42.098: ERROR/AndroidRuntime(185): Uncaught handler: thread main exiting due to uncaught exception 03-07 21:19:42.128: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x40308020, 320) from fd 7 03-07 21:19:42.128: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x40308160, 320) from fd 7 03-07 21:19:42.128: ERROR/AndroidRuntime(185): java.lang.RuntimeException: start failed. 03-07 21:19:42.128: ERROR/AndroidRuntime(185): at android.media.MediaRecorder.start(Native Method) 03-07 21:19:42.128: ERROR/AndroidRuntime(185): at com.benmccann.android.hello.AudioRecorder.start(AudioRecorder.java:59) 03-07 21:19:42.128: ERROR/AndroidRuntime(185): at com.benmccann.android.hello.HelloAndroid$1.onClick(HelloAndroid.java: 31) On Mar 6, 1:38 pm, benmccann benjamin.j.mcc...@gmail.com wrote: Bugs already exist:http://code.google.com/p/android/issues/detail?id=450q=media%20docum.. On Mar 5, 9:23 pm, Dave Sparks davidspa...@android.com wrote: Log a bug athttp://b.android.com. On Mar 5, 2:17 pm, jdl j...@edufone.com wrote: Diane or Dave, How do we go about requesting that someone from the Android project update the Audio/Video tutorial,http://developer.android.com/guide/topics/media/index.html, so that it works with the current version of the API? Thanks, AN On Feb 28, 2:45 pm, Dianne Hackborn hack...@android.com wrote: You use Context to get at your private data files: http://developer.android.com/guide/topics/data/data-storage.html http://developer.android.com/reference/android/content/Context.html#g...) On Thu, Feb 26, 2009 at 2:40 PM, benmccann benjamin.j.mcc...@gmail.comwrote: each application has its own private data directory / data/app-private/app-package. I believe your working directory is set to this directory by default Cool. So it sounds like I should just be able to use a relative path from the current location then. Unfortunately, I'm getting the following exception (with no clues as to why start is failing): 02-26 14:34:55.132: ERROR/AndroidRuntime(164): java.lang.RuntimeException: start failed. 02-26 14:34:55.132: ERROR/AndroidRuntime(164): at android.media.MediaRecorder.start(Native Method) Here's my code: final MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setOutputFile(test.3gpp); recorder.prepare(); recorder.start(); On Feb 26, 12:14 am, Dave Sparks davidspa...@android.com wrote: You can get the path to external storage (e.g. SD card) with Environment.getExternalStorageDirectory(). This is world read/ writable. Alternatively, each application has its own private data directory / data/app-private/app-package. I believe your working directory is set to
[android-developers] Re: startActivityForResult problems
I found the problem. It's a singleInstance application launchMode. On Mar 11, 10:20 pm, Geos george.kremenet...@gmail.com wrote: Hello All I've use startActivityForResult as it described in many examples but it return 0 result code after start new Activity. In main Activity I use such code for sub activity invocation Intent iShowVideo = new Intent(EventHandling.this, ShowVideo.class); startActivityForResult(iShowVideo, this.REQUEST_CODE_SHOW_VIDEO); And such code for getting results. @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub //super.onActivityResult(requestCode, resultCode, data); if(requestCode == REQUEST_CODE_SHOW_VIDEO){ if(resultCode == RESULT_CANCELED){ Toast toast = Toast.makeText(this, onActivityResultCancel: + String.valueOf(resultCode), Toast.LENGTH_LONG); toast.show(); }else{ Toast toast = Toast.makeText(this, onActivityResult: + String.valueOf(resultCode), Toast.LENGTH_LONG); toast.show(); } } } Here is a part code from ShowVideo activity @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.showvideo); //showDialog(DIALOG_YES_NO_MESSAGE); Button button = (Button)findViewById(R.id.btnOK); button.setOnClickListener(mOkListener); button = (Button)findViewById(R.id.btnCancel); button.setOnClickListener(mCancelListener); //setResult(RESULT_OK, (new Intent()).setAction(Test!)); } private OnClickListener mOkListener = new OnClickListener() { public void onClick(View v) { // To send a result, simply call setResult() before your // activity is finished. setResult(RESULT_OK, (new Intent()).setAction(Corky!)); finish(); } }; This code should work according many examples. And it should return RESULT_OK after btnOK clicked but after I click this button it only closes ShowVideo Activity. Please help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Editing XML files using DOM in Android
Hi all , I am developing an application where i need to update a value in an XML file according to the value entered by the user and send this updated file to some server.I am using DOM to do this ..but the problem is that the function setNodeValue does not seem to work When i print the value after changing the content it gives the same value as before ... Code: NodeList list = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); //xmlFile = fileName; try { DocumentBuilder db = dbf.newDocumentBuilder(); InputStream istream = null; istream=(this.mCtx).getResources().openRawResource (R.raw.currencyconverter); xmlDoc2 = db.parse(istream); Element docEle = xmlDoc2.getDocumentElement(); list = docEle.getElementsByTagName(Variable); for (int j = 0; j list.getLength(); j++) { Node child = list.item(j); if (child.getNodeType() == Node.ELEMENT_NODE) { Element element=(Element)child; setTextValue(element,contentvalue,1000); System.out.println(This is the text value+getTextValue (element,contentvalue)); } } } catch (Exception e) { e.printStackTrace(); } This is the setTextValue method : private static void setTextValue(Element ele,String tagName,String Value) { try { NodeList nl = ele.getElementsByTagName(tagName); if (nl != null nl.getLength() 0) { Element el = (Element) nl.item(0); if (el.getFirstChild() != null) { el.getFirstChild().setNodeValue(Value); // This is the statement which does not seem to work } } } catch (Exception e) { e.printStackTrace(); } } Please help i am not able to understand what is happening . 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: Problem Troubleshooting Vista ADB USB Connection.
It's a long standing problem see http://groups.google.com/group/android-developers/browse_thread/thread/84c3cba9a05a561d The only solution I found was to use the Emulator and buy a cheap second machine to do interaction with the G1 and final testing (I bought an eeeBox with XP). Al. JLMG wrote: This one is kinda weird... I have a Ubuntu 8.10 box with everything including Eclipse working perfectly, both the emulator and USB connection to my ADP1... works perfectly! But I decide to inflict Vista on myself by attempting to get Eclipse and ADT working on my Vista laptop. I set up Vista with Eclipse and installed the Android plug-in... but... the only thing NOT working is the USB connection using the exact same USB cable to the exact same ADP1. Everything including the emulator is just fine, but no USB to ADP1. ;o ( Here is the message I get when I try to use the ADB command line: -- Microsoft Windows [Version 6.0.6000] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\Users\Johnadb version Android Debug Bridge version 1.0.20 (Same version as on the Linux box) C:\Users\Johnadb shell * daemon not running. starting it now * * daemon started successfully * error: device not found C:\Users\Johnadb shell error: device not found C:\Users\John -- And to top it all off, the Device Manager shows the ADP1 sdcard as a USB mass storage device. but won't let me install the USB driver over the Microsoft version. I've been scouring around looking for a solution but remain flummoxed so far. Thanks for any pointers to a solution for this vexing pain in the Windows! JLMG -- * 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. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: List of countries carriers
http://en.wikipedia.org/wiki/HTC_Dream is the closest thing I've seen. Al. Noonien Soong wrote: Does anyone know a list of countries and carriers where phones with the Android OS can be bought? I searched for a while for this now but haven't found anything... Thx! -- * 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. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Problems with support from T-mobile/General Question
I think 1 is best answered by a lawyer. As for 2; Google works with the providers, but what the providers ship is the providers decision and not Googles. Al. Joseph G wrote: Hello, I am having an issue that looks to be a bug on my Tmobile G1, but T- mobile isn't helping me resolve or expedite it. The bug details are listed here: http://code.google.com/p/android/issues/detail?id=2083. T-mobile claims that I have the responsibility to troubleshoot Android and file bugs for a phone they support and run on their network. Humorously enough I went to the Better Business Bureau and so they finally got back to me after 5 separate calls to support. They claim 2 things that I am wondering about... 1. Do providers have responsiblity for interfacing with you the Android team in submitting bugs on behalf of their supported consumers? Or does the consumer? 2. Do you have a team within the Android group at Google that works with the provider networks? BTW, the particular senior customer service manager I spoke with said that the issue related to the fact that Android was open source. Being a user, supporter and advocate of FOSS I had to stop and laugh. xD I asked him what that had to do with it and I got no response. -- * 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. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 delete a particular call log from call log list
Hi, I have deleted whole call log by the following statement context.getContentResolver().delete (CallLog.Calls.CONTENT_URI,null,null); but i am facing problem to delete particular call log from call log list by the following code any one can help me. if any one have successfully delete particular call log please change in my following code i want to delete that numbers form call log that starts with + or 00 its urgent. Uri delUri = Uri.withAppendedPath(CallLog.Calls.CONTENT_URI,); Cursor cursor = context.getContentResolver().query (delUri,null,null,null,null); context.getContentResolver().delete (delUri,_id=+cursor.getCount(),null); Thanks Regards, Gulfam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Spanned How to use?
Here is what I am trying to do. I am parsing an XML an inside CDDATA tags inside content:encoded tags I have an html ![CDATA[ p /p p class=MsoNormala href=http://www.androidturkiye.net/wp-content/ uploads/2009/03/ahome.jpgimg class=alignleft size-thumbnail wp- image-791 title=ahome src=http://www.androidturkiye.net/wp-content/ uploads/2009/03/ahome-150x150.jpg alt=ahome width=150 height=150 //aGeliştiricileri a href=http://www.mappn.com/ community/http://www.mappn.com/community//a olan amacı Androidin grafiksel arayüzünü değiştirmeye yarayan ve internette birçok teması bulunan ve temaları geliştirilmeye devam eden kullanışlı bir program.Size nasıl kullanıldığını açıklamaya çalışacağım./p p class=MsoNormal /p p class=MsoNormalÖncelikle uygulamayı bulmak için android market açtıktan sonra menü tuşuna basarak Search diyelim gelen arama bölümüne ahome yazalım,karşınıza sağdaki gibi ahome ait program ve temalar karşınıza gelecektir,ahome'un 2 versiyonu mevcut biri ücretli olan biri ise free yani ücretsiz olan versiyonu strongAhome Lite / strongbiz lite olanını yüklüyoruz.Yükleme bittikten sonra programı çalıştırmayınız , size tavsiyem yükledikten sonra cihazınızı yeniden başlatırsanız sıkıntı yaşamasınız,/p p class=MsoNormalYüklendikten sonra , Ana ekrandayken Home tuşuna bir kere bastığınızda karşınıza aşağıdaki gibi bir seçim ekranı gelecektir,aHome Lite ı seçtiğimizde masaüstü 2 bölüm oluyor sağ ve sol olarak./p p class=MsoNormala href=http://www.androidturkiye.net/wp-content/ uploads/2009/03/ahome2.jpgimg class=alignnone size-medium wp- image-792 title=ahome2 src=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome2-200x300.jpg alt=ahome2 width=200 height=300 / /aa href=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome3.jpgimg class=alignnone size-medium wp-image-793 title=ahome3 src=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome3-200x300.jpg alt=ahome3 width=200 height=300 //a/p p class=MsoNormal /p p class=MsoNormalAşağıda göründüğü gibi , hava durumu ve saat tarih ve günü gösteren bir widget geliyor.Aşağıda soldaki Büyüteç işareti herzamanki program listemizi açıyor, sağdaki hız göstergesi ise kullanılabilecek widgetları listeliyor, istediginiz widgeti silebiliyorsunuz yerini değiştirebiliyorsunuz./p p class=MsoNormal /p p class=MsoNormala href=http://www.androidturkiye.net/wp-content/ uploads/2009/03/ahome4.jpgimg class=alignnone size-medium wp- image-794 title=ahome4 src=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome4-200x300.jpg alt=ahome4 width=200 height=300 / /aa href=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome5.jpgimg class=alignnone size-medium wp-image-795 title=ahome5 src=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome5-200x300.jpg alt=ahome5 width=200 height=300 //a/p p class=MsoNormalYüklenen temaları değiştirmek için ise menü tuşuna bastıktan sonra preference kısmına girdikten sonra gelen menüden yapabiliyorsunuz./p p class=MsoNormal a href=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome7.jpgimg class=alignnone size-medium wp-image-797 title=ahome7 src=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome7-200x300.jpg alt=ahome7 width=200 height=300 / /aa href=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome8.jpgimg class=alignnone size-medium wp-image-799 title=ahome8 src=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome8-200x300.jpg alt=ahome8 width=200 height=300 //a/p p class=MsoNormalTemayı seçtiğinizde yukarıda Star tema seçildi, temanın uygulanması 5-6 saniye alıyor./p p class=MsoNormal /p p class=MsoNormal a href=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome9.jpgimg class=alignnone size-medium wp-image-801 title=ahome9 src=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome9-200x300.jpg alt=ahome9 width=200 height=300 / /aa href=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome10.jpgimg class=alignnone size-medium wp-image-802 title=ahome10 src=http://www.androidturkiye.net/wp- content/uploads/2009/03/ahome10-200x300.jpg alt=ahome10 width=200 height=300 //a/p p class=MsoNormal /p p class=MsoNormalStar themein görünümü yukaridaki gibidir program ikonlarınızın çoğunu tema olduğu gibi değiştirmektedir. Bunun yanında hali hazırda iPhoneStyle,Freenil,PinkStar,Star,Blue iPhone gibi çeşitli temalarda mevcut./p p class=MsoNormal /p p class=MsoNormalstrongKişisel izlenimler:/strong/p p class=MsoNormalProgram androidi alışılmış arayüzünden kurtararak farklı bir görünüme sokuyor , hava durumu gibi ektra özellikler ekliyor , star teması biraz olsun sistemi yavaşlatıyor, fakat gördüğüm kadarı ile temaya göre performans farklılık gösterebilir, ,yeni geliştirilen ve geliştirilecek olan temalarıda denemek gerekir.Arayüz değişikliği isteyenler için rahatlıkla kullanılacak bir programdır./ p ]] /content:encoded I am trying to extract images and text from this
[android-developers] Re: Dial a USSD code
saying that... I have been testing on a network other than Tmobile... If anyone reading this in the US on Tmobile tries this, please post the results. You will need to change the USSD code to one that is valid for Tmobile, one that returns the handset mobile number would be a good choice. Also enable calling in the manifest and create a TextView called sometext. /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String encodedHash = Uri.encode(#); view = (TextView) findViewById(R.id.sometext); call(*121 + encodedHash); } protected void call(String phoneNumber) { startActivityForResult(new Intent(android.intent.action.CALL, Uri.parse(tel: + phoneNumber)), 1); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { view.setText(USSD: + requestCode + + resultCode + + data); } On Mar 10, 5:44 pm, Ray rnva...@googlemail.com wrote: I expected to see the response by using startActivityForResult and onActivityResult(int requestCode, int resultCode, Intent data) But that didn't work for me and I've run out of ideas. Ray On Mar 3, 6:29 am, droi...@gmail.com droi...@gmail.com wrote: Does the Android API provide a way to catch the USSD response after the dial? thanks On Jan 29, 5:41 am, sabdart rnva...@googlemail.com wrote: Not a bug and it is in the documentation (http://code.google.com/ android/reference/android/net/Uri.html) I should have been escaping the # symbol with %23 String encodedHash = Uri.encode(#); startActivity(new Intent(android.intent.action.DIAL, Uri.parse(tel:**004*+668190099 + encodedHash))); Note to self: RTFM --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Learning JAVA
Hi, I have Ganymede and it works just fine. Make sure java is correctly installed, there are a lot of tutorials around. Install the Eclipse Plugins for Android. How to do that is described on http://developer.android.com/sdk/1.1_r1/installing.html under Installing the ADT Plugin for Eclipse. The red cross at the package means, if the red cross does not appear in a deeper level of the package, that there is something wrong with the preferences. You can right click on the project and select Properties, just at the bottom. You should check the settings for Android and Java. My guess is that you didn't select an Android SDK. Do you really mean package, or Project? Does the symbol appear at a package icon or next to the project icon, which is an open folder in yellow/blue? Good luck, Tommaso On 12 Mrz., 02:58, JonnySnip3r jonnysni...@googlemail.com wrote: Hey guys was wondering if you could help me, im new to the JAVA programming language just started in fact i have installed the following... android-sdk-windows-1.1_r1 apache-ant-1.7.1-bin droiddraw-r1b11 jdk-6u12-windows-i586-p Eclipse Ganymede (latest) i have installed all the android updates for eclipse but every time i start a new android project to learn i keep getting a red cross at the side of the package telling me there is an error :| im a n00b and i have no idea hope someone can help me i want to start ASAP here is where the error is... Code: package com.android.hello.android.hello; import android.app.Activity; import android.os.Bundle; public class android extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }} 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: Learning JAVA
Hi Jonny, I'm using Ganymede for Android development with no problems, so I wouldn't try any other versions of Eclipse - it's probably your setup that's wrong. If you bring up the 'Problems' view, it should give you an indication of what's actually wrong with your project. 'Window - Show View - Problems'. Now click on the package icon that has the error - a message should appear in the Problems window explaining what's wrong. --Mark On Mar 12, 1:58 am, JonnySnip3r jonnysni...@googlemail.com wrote: Hey guys was wondering if you could help me, im new to the JAVA programming language just started in fact i have installed the following... android-sdk-windows-1.1_r1 apache-ant-1.7.1-bin droiddraw-r1b11 jdk-6u12-windows-i586-p Eclipse Ganymede (latest) i have installed all the android updates for eclipse but every time i start a new android project to learn i keep getting a red cross at the side of the package telling me there is an error :| im a n00b and i have no idea hope someone can help me i want to start ASAP here is where the error is... Code: package com.android.hello.android.hello; import android.app.Activity; import android.os.Bundle; public class android extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }} 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: Out of memory exception on setting wallpaper
ursnavin wrote: Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into an out of memory exception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Sounds like a memory leak. Are you sure getWallpaper() isn't doing something that would hold references to past bitmaps, causing them not to get garbage collected? -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 can I install my GPS app to my device?
Hi there all, I download a app GPS.apk for my GPS test. I can install it to my emulator using adb install GPS.apk,but how can I install it in my real device? 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: Out of memory exception on setting wallpaper
Hey, the getWallpaper() is the frameworks getWallpaper() function.Everytime the xception occurs only inside this function.Is this a bug in android?? On Mar 12, 3:56 pm, Mark Murphy mmur...@commonsware.com wrote: ursnavin wrote: Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into anoutofmemoryexception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Sounds like amemoryleak. Are you sure getWallpaper() isn't doing something that would hold references to past bitmaps, causing them not to get garbage collected? -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training in Sweden --http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Out of memory exception on setting wallpaper
Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into an out of memory exception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Thanks Navin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can I install my GPS app to my device?
Nio wrote: I download a app GPS.apk for my GPS test. I can install it to my emulator using adb install GPS.apk,but how can I install it in my real device? Thanks. If you have the SDK, the device, and a USB cable (and are not running Windows Vista), you can use the same technique as you did with the emulator. Otherwise, you can upload the APK file to some hosting service that serves APK files with the appropriate MIME type, then use the Browser application to download and install it. Or, you can find a file manager application (e.g., on Android Market) that can install APK files, then copy your APK file to the SD card and use the file manager to install it. Of course, you can always publish your APK via a market, but I am guessing you are not ready for that step just yet. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] GoogleSearchbar EditText font
Hello, which font is assigned to the edittext of the google searchbar on the g1? rgds Mr.No --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Out of memory exception on setting wallpaper
Hey, Thanks for the reply, The getWallpaper() is the android frameworks getWallpaper() function. On Mar 12, 3:56 pm, Mark Murphy mmur...@commonsware.com wrote: ursnavin wrote: Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into an out of memory exception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Sounds like a memory leak. Are you sure getWallpaper() isn't doing something that would hold references to past bitmaps, causing them not to get garbage collected? -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training in Sweden --http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Out of memory exception on setting wallpaper
ursnavin wrote: Hey, Thanks for the reply, The getWallpaper() is the android frameworks getWallpaper() function. Oh. I don't know what to tell you, then. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] 3D modeling library for Opengles in Android
Hi, Is there any 3D modeling library for Opengles that can be used in Android. Pradeep --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Launch Application
I want to basically create an application launcher. How do do this? Shouldn't the following just work? PackageManager pm = this.getPackageManager(); ListApplicationInfo appList = pm.getInstalledApplications (0); Intent i = new Intent(); i.setAction(appList.get(15).packageName); i.setClassName(appList.get(15).packageName, appList.get (15).className); startActivity(i); It just crashes and I don't know why. Brenton --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: DefaultHttpClient Timeout
THX On 12 Mrz., 10:57, Mr.No f.hi...@arcor.de wrote: Hello, how i can set the timeout for a DefaultHttpClient? and which function i must override to handle the event? rgds Mr.No --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] savedInstanceState
Hello, how do i put a Obect(or a HashMap) into the Bundle? rgds F.Hildt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Landscape Modus
Hello, how do i prevent the landscape modus? or how i can save the state of my app. without saving manual the data? rgds Mr.No --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 I initialize an Array list from data specified in xml resource file?
Thanks Mafro. That worked. I used DocumentBuilder to parse xml from raw folder instead of using compiled resource. Thanks for your help! Videoguy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Menu option starts Thread - menu hangs.
Hi, I am developing a game based on the SurfaceView/LunarLander example in the sample code. I have one activity, with one menu option that is new game. My activity listens for the menu selection, and once new game is selected, doStart of the Game thread is called. The game starts up after 3-4 seconds, but the menu option sticks around on the screen until the game has started. I think the main thread is waiting on the doStart to do its thing, but since it's creating a new thread, how do I get it to just start the thread and continue its business of hiding the menu option right away, instead of after 3 seconds? Thanks, Ayan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Recording Audio
Nice solution, thanks for sharing! On Mar 12, 1:36 pm, benmccann benjamin.j.mcc...@gmail.com wrote: Finally got it figured out:http://www.benmccann.com/dev-blog/android-audio-recording-tutorial/ On Mar 9, 11:37 am, benmccann benjamin.j.mcc...@gmail.com wrote: I'm still feeling directionless when it comes to what MediaRecorder.setOutputFile(String path) is expecting. Is it a relative path? Is it a fully qualified path? Must the directory we are recording in already exist, or will MediaRecorder create it for us if it does not exist? What happens if we specify a file path which already exists - will it override the existing file or will it bomb out? On Mar 7, 10:30 pm, benmccann benjamin.j.mcc...@gmail.com wrote: jdl, I'd be happy to post my code, but I still don't have a working example. I upgraded to the 1.1 SDK today in hopes that it fixed a bug and things would work for me, but it seems the media APIs are still hopelessly broken. All I ever get is the meaningless message start failed. It looks like perhaps the cause is a buffer overflow in the native code: 03-07 21:19:42.059: DEBUG/AudioHardware(25): AudioStreamInGeneric::set (0xac50, 7, 1, 1, 8000) 03-07 21:19:42.069: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x40308020, 320) from fd 7 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x40308160, 320) from fd 7 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x403082a0, 320) from fd 7 03-07 21:19:42.078: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x403083e0, 320) from fd 7 03-07 21:19:42.088: WARN/AudioFlinger(25): AudioRecordThread: buffer overflow 03-07 21:19:42.098: DEBUG/AndroidRuntime(185): Shutting down VM 03-07 21:19:42.098: WARN/dalvikvm(185): threadid=3: thread exiting with uncaught exception (group=0x4000fe68) 03-07 21:19:42.098: ERROR/AndroidRuntime(185): Uncaught handler: thread main exiting due to uncaught exception 03-07 21:19:42.128: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x40308020, 320) from fd 7 03-07 21:19:42.128: DEBUG/AudioHardware(25): AudioStreamInGeneric::read (0x40308160, 320) from fd 7 03-07 21:19:42.128: ERROR/AndroidRuntime(185): java.lang.RuntimeException: start failed. 03-07 21:19:42.128: ERROR/AndroidRuntime(185): at android.media.MediaRecorder.start(Native Method) 03-07 21:19:42.128: ERROR/AndroidRuntime(185): at com.benmccann.android.hello.AudioRecorder.start(AudioRecorder.java:59) 03-07 21:19:42.128: ERROR/AndroidRuntime(185): at com.benmccann.android.hello.HelloAndroid$1.onClick(HelloAndroid.java: 31) On Mar 6, 1:38 pm, benmccann benjamin.j.mcc...@gmail.com wrote: Bugs already exist:http://code.google.com/p/android/issues/detail?id=450q=media%20docum.. On Mar 5, 9:23 pm, Dave Sparks davidspa...@android.com wrote: Log a bug athttp://b.android.com. On Mar 5, 2:17 pm, jdl j...@edufone.com wrote: Diane or Dave, How do we go about requesting that someone from the Android project update the Audio/Video tutorial,http://developer.android.com/guide/topics/media/index.html, so that it works with the current version of the API? Thanks, AN On Feb 28, 2:45 pm, Dianne Hackborn hack...@android.com wrote: You use Context to get at your private data files: http://developer.android.com/guide/topics/data/data-storage.html http://developer.android.com/reference/android/content/Context.html#g...) On Thu, Feb 26, 2009 at 2:40 PM, benmccann benjamin.j.mcc...@gmail.comwrote: each application has its own private data directory / data/app-private/app-package. I believe your working directory is set to this directory by default Cool. So it sounds like I should just be able to use a relative path from the current location then. Unfortunately, I'm getting the following exception (with no clues as to why start is failing): 02-26 14:34:55.132: ERROR/AndroidRuntime(164): java.lang.RuntimeException: start failed. 02-26 14:34:55.132: ERROR/AndroidRuntime(164): at android.media.MediaRecorder.start(Native Method) Here's my code: final MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setOutputFile(test.3gpp); recorder.prepare(); recorder.start(); On Feb 26, 12:14 am, Dave Sparks davidspa...@android.com wrote: You can get the path to external storage (e.g. SD card) with Environment.getExternalStorageDirectory(). This is world
[android-developers] Re: Merchant account signup down?
Wait for it. That's all. I couldn't get my account verified, and had to send emails to support for a few weeks to get it all straight, but in the end, to Google's credit, they worked it all out. On Mar 12, 10:02 am, jsdf jasons...@gmail.com wrote: Unfortunately, 24 hours later, it is still down. And, I check with a friend who works at Google, but he's in Adwords and is unable to do anything. Even he said I'm at the mercy of support, while acknowledging that Google is terrible at support. Now what? Suggestions? On Mar 11, 10:03 am, keith_hi...@yahoo.com keith_hi...@yahoo.com wrote: I am having the same issue. Been trying since yesterday to get this resolved. Google as of yet has not responded to my tech support request. On Mar 10, 9:16 pm,jsdfjasons...@gmail.com wrote: I am trying to sign up for a merchant account but it seems to be down: Sorry, we could not setup your merchant account. Please try again later. Can anyone else confirm this, or is it just my login? 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: Out of memory exception on setting wallpaper
Sounds like the Drawable remains attached to a View between rotations. See blog post: http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.html On Mar 12, 3:29 am, ursnavin ursna...@gmail.com wrote: Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into an out of memory exception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Thanks Navin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem Troubleshooting Vista ADB USB Connection.
If you have Vista 32 bit installed, it should work and i can't help you to fix your problem. However, if you have a 64bit system, check this thread: http://forum.xda-developers.com/showthread.php?t=446274highlight=64bit+usb It may fix your issues :) On Mar 11, 4:12 pm, JLMG john.l.millergeo...@gmail.com wrote: This one is kinda weird... I have a Ubuntu 8.10 box with everything including Eclipse working perfectly, both the emulator and USB connection to my ADP1... works perfectly! But I decide to inflict Vista on myself by attempting to get Eclipse and ADT working on my Vista laptop. I set up Vista with Eclipse and installed the Android plug-in... but... the only thing NOT working is the USB connection using the exact same USB cable to the exact same ADP1. Everything including the emulator is just fine, but no USB to ADP1. ;o ( Here is the message I get when I try to use the ADB command line: -- Microsoft Windows [Version 6.0.6000] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\Users\Johnadb version Android Debug Bridge version 1.0.20 (Same version as on the Linux box) C:\Users\Johnadb shell * daemon not running. starting it now * * daemon started successfully * error: device not found C:\Users\Johnadb shell error: device not found C:\Users\John -- And to top it all off, the Device Manager shows the ADP1 sdcard as a USB mass storage device. but won't let me install the USB driver over the Microsoft version. I've been scouring around looking for a solution but remain flummoxed so far. Thanks for any pointers to a solution for this vexing pain in the Windows! JLMG --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Menu option starts Thread - menu hangs.
Could you provide a code-snippet showing how you coded the menu- handling and the starting of your thread? On Mar 12, 10:00 am, Ikon ayanafr...@gmail.com wrote: Hi, I am developing a game based on the SurfaceView/LunarLander example in the sample code. I have one activity, with one menu option that is new game. My activity listens for the menu selection, and once new game is selected, doStart of the Game thread is called. The game starts up after 3-4 seconds, but the menu option sticks around on the screen until the game has started. I think the main thread is waiting on the doStart to do its thing, but since it's creating a new thread, how do I get it to just start the thread and continue its business of hiding the menu option right away, instead of after 3 seconds? Thanks, Ayan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] When do you use FrameLayout? Why not AbsoluteLayout?
Hi When do you use FrameLayout? The way I understand it, all the children are pegged relative to the top left of FrameLayout. That means all the children's coordinates (marginLeft/right etc) are relative to parent. AbsoluteLayout does the same thing. When would one use FrameLayout? Thanks Videoguy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Merchant account signup down?
Weeks! Wow, that's truly a testament to how little Google cares about customer support. As an example of how things could be done better, look at Authorize.net. A webstore I help maintain went down. I got on the phone and was talking to a human within 2 minutes. Turned out the problem was on my end, but boy it was nice to be able to establish that up front without wasting a lot of time. (And, I'm sure people will have issue with Authorize.net as an example, but my point is that it is still way waaay better than Google). The biggest problem I have always had with Google is the seeming attitude of since customer support doesn't scale, we don't bother doing it. You are on your own. This is reflected in all of their help and community pages. On EVERY help page they indicate something to the effect of sorry, we don't answer help requests.. No other company in the world could get away with this level of customer support, and it's incredible to me that Google can and routinely does. Let's be clear, this isn't for something Google is providing for free. I, and everyone else on this list, PAID to be an Android Market developer. That includes the customer support that should go with it. Oh, and in case you are keeping score, 36 hours later, still down. [/venting] On Mar 12, 9:13 am, madcoder paperga...@gmail.com wrote: Wait for it. That's all. I couldn't get my account verified, and had to send emails to support for a few weeks to get it all straight, but in the end, to Google's credit, they worked it all out. On Mar 12, 10:02 am,jsdfjasons...@gmail.com wrote: Unfortunately, 24 hours later, it is still down. And, I check with a friend who works at Google, but he's in Adwords and is unable to do anything. Even he said I'm at the mercy of support, while acknowledging that Google is terrible at support. Now what? Suggestions? On Mar 11, 10:03 am, keith_hi...@yahoo.com keith_hi...@yahoo.com wrote: I am having the same issue. Been trying since yesterday to get this resolved. Google as of yet has not responded to my tech support request. On Mar 10, 9:16 pm,jsdfjasons...@gmail.com wrote: I am trying to sign up for a merchant account but it seems to be down: Sorry, we could not setup your merchant account. Please try again later. Can anyone else confirm this, or is it just my login? 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: Merchant account signup down?
Agreed on Google support, but I guess that's what we get for free stuff. Oh wait, they're (trying to ) make money with Google Checkout. My concern is that many potential customers will not bother with Checkout altogether due to Credit Card requirements and possible problems with verification/approval. Hopefully, this will only affect a very small number of users in the future. On Thu, Mar 12, 2009 at 10:09 PM, jsdf jasons...@gmail.com wrote: Weeks! Wow, that's truly a testament to how little Google cares about customer support. As an example of how things could be done better, look at Authorize.net. A webstore I help maintain went down. I got on the phone and was talking to a human within 2 minutes. Turned out the problem was on my end, but boy it was nice to be able to establish that up front without wasting a lot of time. (And, I'm sure people will have issue with Authorize.net as an example, but my point is that it is still way waaay better than Google). The biggest problem I have always had with Google is the seeming attitude of since customer support doesn't scale, we don't bother doing it. You are on your own. This is reflected in all of their help and community pages. On EVERY help page they indicate something to the effect of sorry, we don't answer help requests.. No other company in the world could get away with this level of customer support, and it's incredible to me that Google can and routinely does. Let's be clear, this isn't for something Google is providing for free. I, and everyone else on this list, PAID to be an Android Market developer. That includes the customer support that should go with it. Oh, and in case you are keeping score, 36 hours later, still down. [/venting] On Mar 12, 9:13 am, madcoder paperga...@gmail.com wrote: Wait for it. That's all. I couldn't get my account verified, and had to send emails to support for a few weeks to get it all straight, but in the end, to Google's credit, they worked it all out. On Mar 12, 10:02 am,jsdfjasons...@gmail.com wrote: Unfortunately, 24 hours later, it is still down. And, I check with a friend who works at Google, but he's in Adwords and is unable to do anything. Even he said I'm at the mercy of support, while acknowledging that Google is terrible at support. Now what? Suggestions? On Mar 11, 10:03 am, keith_hi...@yahoo.com keith_hi...@yahoo.com wrote: I am having the same issue. Been trying since yesterday to get this resolved. Google as of yet has not responded to my tech support request. On Mar 10, 9:16 pm,jsdfjasons...@gmail.com wrote: I am trying to sign up for a merchant account but it seems to be down: Sorry, we could not setup your merchant account. Please try again later. Can anyone else confirm this, or is it just my login? 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: Launch Application
Update: OK, I can get my application to launch another application if I explicitly type in the package and class names. For example: Intent i = new Intent(); i.setClassName(com.android.calculator2, com.android.calculator2.Calculator); startActivity(i); Now, how to do find out what the Activity Name is for each package? I only guessed Calculator in the example above after a couple tries. I also tried: appList.get(0).getClassName; But, it returns null. Brenton On Mar 12, 8:21 am, bklik brenton.k...@gmail.com wrote: I want to basically create an application launcher. How do do this? Shouldn't the following just work? PackageManager pm = this.getPackageManager(); ListApplicationInfo appList = pm.getInstalledApplications (0); Intent i = new Intent(); i.setAction(appList.get(15).packageName); i.setClassName(appList.get(15).packageName, appList.get (15).className); startActivity(i); It just crashes and I don't know why. Brenton --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Intents and Uris, for Ringtone Picker
I'd like to allow the user to choose a Ringtone from my application, that I will play later for an alarm. Looking at the javadocs, I see EXTRA_RINGTONE_DEFAULT_URI in RingtoneManager, and extra that, it says, is Given to the ringtone picker as a Uri. There is also an EXTRA_RINGTONE_PICKED_URI that I would get from the returning intent: Returned from the ringtone picker as a Uri However, I see no intent.putExtra(String, Uri) function, so no option to give a Uri. And there is no getUri(String) function in the Bundle for me to get a Uri in return. Is the RingtoneManager documentation wrong and it is given and returned as, say, a String? Or what am I missing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] apply color to Button
Hi all, I am developing a simple GUI with three buttons i want to fill the button with color but i found back ground color. if i set mybutton.setBackgroundcolor (color); it's not visible how can i fill the button with color.. need help Thank you Dilli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Problems with support from T-mobile/General Question
Hello Dave/Al/ Everyone, Thanks for taking the time to answer my questions. If anyone actually knows about how I should deal with situation please respond to me off list. No one else found it funny that T-mobile said the issues of the device were BECAUSE it was open source!? I just about had a laughing fit. xD Thanks, Joe On Mar 12, 3:10 am, Al Sutton a...@funkyandroid.com wrote: I think 1 is best answered by a lawyer. As for 2; Google works with the providers, but what the providers ship is the providers decision and not Googles. Al. Joseph G wrote: Hello, I am having an issue that looks to be a bug on my Tmobile G1, but T- mobile isn't helping me resolve or expedite it. The bug details are listed here:http://code.google.com/p/android/issues/detail?id=2083. T-mobile claims that I have the responsibility to troubleshoot Android and file bugs for a phone they support and run on their network. Humorously enough I went to the Better Business Bureau and so they finally got back to me after 5 separate calls to support. They claim 2 things that I am wondering about... 1. Do providers have responsiblity for interfacing with you the Android team in submitting bugs on behalf of their supported consumers? Or does the consumer? 2. Do you have a team within the Android group at Google that works with the provider networks? BTW, the particular senior customer service manager I spoke with said that the issue related to the fact that Android was open source. Being a user, supporter and advocate of FOSS I had to stop and laugh. xD I asked him what that had to do with it and I got no response. -- * 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. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: apply color to Button
Make sure the color you're sending has an alpha component. On Mar 12, 10:17 am, Dilli dilliraomca...@gmail.com wrote: Hi all, I am developing a simple GUI with three buttons i want to fill the button with color but i found back ground color. if i set mybutton.setBackgroundcolor (color); it's not visible how can i fill the button with color.. need help Thank you Dilli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Out of memory exception on setting wallpaper
getWallpaper() is not leaking. The default Home app is using it and does not experience out of memory errors because of that. I am more than willing to fix any existing memory leak in the framework (and I did several times) or in the default apps (and I did several times) but developers should really stop assuming that out of memory errors are always caused by the framework. It is *very* easy for an application to leak or simply to use too much memory. On Thu, Mar 12, 2009 at 7:24 AM, JP joachim.pfeif...@gmail.com wrote: Sounds like the Drawable remains attached to a View between rotations. See blog post: http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.html On Mar 12, 3:29 am, ursnavin ursna...@gmail.com wrote: Hi , Im trying to develop a home application . Whenever there is a shift between landscape and potrait mode , im setting the wallpaper onCreate () function using the below code . getWindow().setBackgroundDrawable(getwallpaper()); The code seems to work fine for first few shifts , but after that I run into an out of memory exception . Is this the correct approach or am i missing some thing here . Below is the exception that i get . 03-12 15:08:55.118: ERROR/AndroidRuntime(739): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Thanks Navin -- 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: did someone implement a ScrollView with horizontal scroll support?
It will be available in Cupcake. On Thu, Mar 12, 2009 at 4:02 AM, Derek xianguan...@gmail.com wrote: Hi, It looks like the standard ScrollView does not support horizontal scroll. Has anyone implement a ScrollView with horizontal scroll support? It would be appreciated if you can share it. Thanks -- 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] Two applications in one Manifest file ?
Is it possible to have two application tags (application) in the same AndroidManifest.xml file ? If yes - is there anything special that needs to be done, I am trying it, the syntax is accepted by the XML parser but when I install my second application is not 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] Notification to play sound
So I've set up my app to have a repeating alarm, daily, as the user decides, using AlarmManager. I want the user to select a ringtone for it. This works fine, too. I store the string of the Uri they selected in a preference to pull it back when my alarm gets run. To pull it back, I do this: NotificationManager notifManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Notification notif = new Notification(-notification stuff-); SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); String reminderSound = settings.getString(getString (R.string.RingtoneReminder), null); if(reminderSound != null){ notif.sound = Uri.parse(reminderSound); } So I set the Notification's sound field to the Uri of my notification. Later, when I call the notifManager.notify(rowId, notif), the notification still pops up, but the sound doesn't play. How do I get the sound to play? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Two applications in one Manifest file ?
You want to have two applications in your application? Why not make the other application a separate application? I'm not sure if the xml would let you and all that, but I why would you want to? On Mar 12, 11:49 am, sandy8531 mathur...@gmail.com wrote: Is it possible to have two application tags (application) in the same AndroidManifest.xml file ? If yes - is there anything special that needs to be done, I am trying it, the syntax is accepted by the XML parser but when I install my second application is not 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] How to implement android's Gallery fling action in my own widget
Hi, Can you please tell me how implement android's Gallery fling action (with the animation) in my own widget? 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: did someone implement a ScrollView with horizontal scroll support?
Here is one Google made earlier, except they forgot to flip x/y. Took about an hour to convert. :) Oh, and it might not work with the 1.1 SDK, because of the attribute set changes. It works fine with the 1.0 SDK. Michael /* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package your.package.here; import java.lang.reflect.Field; import java.util.List; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Rect; import android.util.AttributeSet; import android.util.Log; import android.view.FocusFinder; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; import android.view.ViewParent; import android.view.animation.AnimationUtils; import android.widget.FrameLayout; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.Scroller; import android.widget.TextView; /** * Layout container for a view hierarchy that can be scrolled by the user, * allowing it to be larger than the physical display. A ScrollView is a * {...@link FrameLayout}, meaning you should place one child in it containing the * entire contents to scroll; this child may itself be a layout manager with a * complex hierarchy of objects. A child that is often used is a * {...@link LinearLayout} in a vertical orientation, presenting a vertical array * of top-level items that the user can scroll through. * * p * You should never use a ScrollView with a {...@link ListView}, since ListView * takes care of its own scrolling. Most importantly, doing this defeats all of * the important optimizations in ListView for dealing with large lists, since * it effectively forces the ListView to display its entire list of items to * fill up the infinite container supplied by ScrollView. * * p * The {...@link TextView} class also takes care of its own scrolling, so does not * require a ScrollView, but using the two together is possible to achieve the * effect of a text view within a larger container. * * p * ScrollView only supports vertical scrolling. */ public class HorizontalScrollView extends FrameLayout { static final String TAG = HScroll; private static final int ANIMATED_SCROLL_GAP = 250; /** * When arrow scrolling, ListView will never scroll more than this factor * times the height of the list. */ private static final float MAX_SCROLL_FACTOR = 0.5f; private long mLastScroll; private final Rect mTempRect = new Rect(); private Scroller mScroller; /** * Flag to indicate that we are moving focus ourselves. This is so the code * that watches for focus changes initiated outside this ScrollView knows that * it does not have to do anything. */ private boolean mScrollViewMovedFocus; /** * Position of the last motion event. */ private float mLastMotionX; /** * True when the layout has changed but the traversal has not come through * yet. Ideally the view hierarchy would keep track of this for us. */ private boolean mIsLayoutDirty = true; /** * The child to give focus to in the event that a child has requested focus * while the layout is dirty. This prevents the scroll from being wrong if the * child has not been laid out before requesting focus. */ private View mChildToScrollTo = null; /** * True if the user is currently dragging this ScrollView around. This is not * the same as 'is being flinged', which can be checked by * mScroller.isFinished() (flinging begins when the user lifts his finger). */ private boolean mIsBeingDragged = false; /** * Determines speed during touch scrolling */ private VelocityTracker mVelocityTracker; /** * When set to true, the scroll view measure its child to make it fill the * currently visible area. */ private boolean mFillViewport; /** * Whether arrow scrolling is animated. */ private boolean mSmoothScrollingEnabled = true; public HorizontalScrollView(Context context) {
[android-developers] Not able to start API demos.
Hi I had to recompile my kernel for some development purpose and after the recompile the normal .img files from the SDK would not boot up and gave some errors . i have already posted them here http://groups.google.com/group/android-platform/browse_thread/thread/521797fdef2ce628/b8efe72b76486e82?lnk=gstq=API+demos#b8efe72b76486e82 and hence i had to use the img files from a recently repo synced code from master which i had built and then started the emulator .Though the emulator booted fine i am not able see API demos in there ( which i need to actually test a part of my code ). When i tried to individually install API demos pack by getting the Apidemos.apk from a previous version i am getting this error $ adb install ApiDemos.apk 675 KB/s (0 bytes in 1977520.002s) pkg: /data/local/tmp/ApiDemos.apk Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY} This is what i got on my command prompts since i ran the emulator with logcat i was able to see the logs from inside and they come from the Package manger of course E/PackageManager( 585): Package com.example.android.apis requires unavailable s hared library com.google.android.maps; ignoring! W/PackageManager( 585): Package couldn't be installed in /data/app/ com.example. android.apis.apk My question is why is this happening , why wouldn't API demos be available? and if i individually want to install Api demos is it possible for me to get the MISSING_SHARED_LIBRARY it is complaining about and install that first and then proceed with installing API demos . Thanks for your time . googlekid --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 place focus in child view of list row?
Hi.. I have ListView, where each row contains two edittext boxes. I'd like on list item selected(using Dpad) place focus on first edittext box. I tried the following code, but it does not work: ListView list = (ListView) findViewById(R.id.list); OnItemClickListener click_listener = new OnItemClickListener() { public void onItemClick(AdapterView? parent, View view, int position, long id){ EditText box1 = (EditText)view.findViewById(R.id.box1); box1.requestFocus(); return ; } }; list.setOnItemClickListener(click_listener); } Any help is appreciated. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Switch the language of all app dynamically!
Hi all: I must change en_US Locale into zh_CH dynamically(Like user choose it). I writed a demo where the code is following: public void onClick(View v){ Resources resource=super.getResources(); Configuration cf=resource.getConfiguration(); DisplayMetrics dm =resource.getDisplayMetrics(); cf.locale=Locale.CHINA; resource.updateConfiguration(cf, dm); ((TextView)super.findViewById(R.id.usernamelabel)).setText ((super.getResources()).getString(R.string.username)); ((TextView)super.findViewById(R.id.passwordlabel)).setText ((super.getResources()).getString(R.string.password)); ((Button)super.findViewById(R.id.loginbutton)).setText ((super.getResources()).getString(R.string.loginbutton)); ((Button)super.findViewById(R.id.cancelbutton)).setText ((super.getResources()).getString(R.string.cancel)); ((Button)super.findViewById(R.id.i8nbutton)).setText ((super.getResources()).getString(R.string.i8nbtn)); }//the end of onClick block The code works fine.But I think this is very heavy to android developer so I have to change every activity . Is there anyone know the quicky way to change language setting?Please tell me the detail steps if you know. Thanks! TIP: My enviroment: android-sdk-windows-1.0_r2+JDK 6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Learning JAVA
Hi: You might want to check if the ADT plug-in for Eclipse is in place. Please refer to the installation guide for more detail: http://developer.android.com/sdk/1.1_r1/installing.html Thanks, wjcs On Wed, Mar 11, 2009 at 9:58 PM, JonnySnip3r jonnysni...@googlemail.comwrote: Hey guys was wondering if you could help me, im new to the JAVA programming language just started in fact i have installed the following... android-sdk-windows-1.1_r1 apache-ant-1.7.1-bin droiddraw-r1b11 jdk-6u12-windows-i586-p Eclipse Ganymede (latest) i have installed all the android updates for eclipse but every time i start a new android project to learn i keep getting a red cross at the side of the package telling me there is an error :| im a n00b and i have no idea hope someone can help me i want to start ASAP here is where the error is... Code: package com.android.hello.android.hello; import android.app.Activity; import android.os.Bundle; public class android extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } 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] Layout Problem Listview in Scrollview
Hi, (sorry if this mail is twice, but i dont see my first posting online:) I have a Scrollview with an Gallery at the top, bellow two lines textview and a Listview) 1. Problem. Listview with height=Fill_parent or wrap_content does not work (it only shows me a tiny part of the listview) So i did just dummy Listview Height=5300, to see how it have to look like. What to do, that the Listview comes automaticly full filled and shown with all items? Finaly when I scroll the page down, the Gallery, textview and Listview should scroll up, all. Thats why I placed ALL in a Scrollview. 2. As it is now (with my dummy heigth 5300), when the GUI pops up, it does not start at the top with the gallery, instead it starts at the Listview ???!?! Here is my Layout xml. ?xml version=1.0 encoding=utf-8? ScrollView android:id=@+id/widget28 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; LinearLayout android:id=@+id/widget29 android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical Gallery android:id=@+id/gallery android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=bottom / TextView android:id=@+id/gallery_underline1 android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=center_horizontal android:textSize=16sp android:textStyle=bold android:text=Picture Info helloo / TextView android:id=@+id/gallery_underline2 android:layout_width=fill_parent android:layout_height=wrap_content android:text=Seconde Line of Picture android:gravity=center_horizontal / ListView android:id=@+id/shoppinglist android:layout_width=fill_parent android:layout_height=5366px / /LinearLayout /ScrollView Thanks for Help Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can I use PC to control G1 Phone?
I want to develop an Agent on G1 ,so I can use PC to control a Gphone ,which likes LogMeIn Rescue+Mobile.After the user click the Keyboard,The character is transmited to the Gphone,I want the screen to be changed corresponding. It seems the character make the screen changed.Is there APIs to help me to relise the Key stroke? Thanks very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] cannot compile source with OoO issue.
Hi All I experienced one issue when I try to build my app. java.lang.OutOfMemoryError: Java heap space : at com.android.dx.ssa.SsaMethod.getGoto(Ssa Method.java :231) .. ... Thanks Sandy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Learning JAVA
* JonnySnip3r wrote on 11 Mar 2009: public class android extends Activity { ^^^ Is the name of the class exactly the same name of the file? Because the name of the file has to be exactly the same as the class. odi -- The question of whether computers can think is just like the question of whether submarines can swim. -- Edsger W. Dijkstra ~ :wq --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 place focus in child view of list row?
Hi.. I have ListView, where each row contains two edittext boxes. I'd like on list item selected(using Dpad) place focus on first edittext box. I tried the following code, but it does not work: ListView list = (ListView) findViewById(R.id.list); OnItemClickListener click_listener = new OnItemClickListener() { public void onItemClick(AdapterView? parent, View view, int position, long id){ EditText box1 = (EditText)view.findViewById(R.id.box1); box1.requestFocus(); return ; } }; list.setOnItemClickListener(click_listener); } Any help is appreciated. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How delete a particular call log from call log list
You need to iterate through your Cursor and get the _id values of the entries you want to delete (the ones who number starts with + or 00). Then you can delete that individual entries. // assume the row you want to delete has an _id value of 2 getContentResolver().delete(delUri, _id=2, null) What you were doing was incorrect because you were setting the _id to cursor.getCount() which doesn't make sense. Eric On Mar 12, 3:33 am, Gulfam gulfa...@gmail.com wrote: Hi, I have deleted whole call log by the following statement context.getContentResolver().delete (CallLog.Calls.CONTENT_URI,null,null); but i am facing problem to delete particular call log from call log list by the following code any one can help me. if any one have successfully delete particular call log please change in my following code i want to delete that numbers form call log that starts with + or 00 its urgent. Uri delUri = Uri.withAppendedPath(CallLog.Calls.CONTENT_URI,); Cursor cursor = context.getContentResolver().query (delUri,null,null,null,null); context.getContentResolver().delete (delUri,_id=+cursor.getCount(),null); Thanks Regards, Gulfam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 lighten LED in key driver, when user press any KEY.
hi, In G1 phone, when user press any KEY, the LED that be as backlight of HOME KEY, will be lightened. I check Android source codes, and want to know how to lighten the LED in key driver, but, don't find any clue. I have checked following source codes: -- kernel/drivers/input/ kernel/drivers/leds/ --- My key question is that where in the codes of key driver, will call LED driver to control LED on/off. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how can I clear a transparent or translucent canvas
Hi I am painting some bitmaps onto a transparent canvas, so it is rendered above the system screen. When I draw the next bitmap, I cannot clear the previously drawn one. How can I erase it? If I could capture the initial canvas would be fine...because I could paint always that before drawing the bitmap...but I am not succedding on capturing it. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can I use PC to control G1 Phone?
I want to develop an Agent on G1 ,so I can use PC to control a Gphone ,which likes LogMeIn Rescue+Mobile.After the user click the Keyboard,The character is transmited to the Gphone,I want the screen to be changed corresponding. It seems the character make the screen changed.Is there APIs to help me to relise the Key stroke? Thanks very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] android camera changing sensor orientation?
Hi all I am developing an application which uses a live camera preview. At the same activity I am using camera preview and sensors (accelerometers). After this activity is closed and entered again the sensors are flipped. It looks like the screen orientation changes(but it can’t be seen at camera-everything is OK). Tried changing screen orientation parameters but they doesn’t seem to work on the camera preview(known issue as far as I am concerned…). I have already spent some time trying to find where the problem is and I am stuck. I unregister the sensor listener when the activity is closed: mSensorManager.unregisterListener(sensorsListener); Also, in activities where camera is not used sensor orientation doesn't change, so the problem is not necessarily in accesing sensor data. Any suggestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to build library without optimization in order to properly debug it
hi, I'm trying to debug native library (in particular, libril.so). Everythig is going fine, breakpoint is being hit, I can go thru the lines of RIL_onRequestComplete() function. But when I tried to print out particular struct I got, (gdb) print pRI $2 = value optimized out (gdb) print pRI-pCI $3 = (android::._115 *) 0x613 (gdb) print pRI-pCI-requestNumber Cannot access memory at address 0x613 I suspect it could be due to optimization done by compiler. But when I tried to add, LOCAL_CFLAGS := -g3 -O0 into makefile of the lib, I've got another problem when I cannot correctly set breakpoint on desired function. Instead of correct one, (gdb) break RIL_onRequestComplete Breakpoint 1 at 0xae402e4e: file hardware/ril/libril/ril.cpp, line 1800. I got, (gdb) break RIL_onRequestComplete Breakpoint 1 at 0xab44: file bionic/libm/src/s_tanf.c, line 42. Does anybody know what could be a problem, and what is the right way to handle this? -- Dmitry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] List of private / hidden / system APIs?
In this post http://groups.google.com/group/android-developers/browse_thread/thread/bedd7b2dcfad5e97/6257106b3d301527 i've read about all that stuff about private APIs which are annotated with @Hide. The presence of hidden APIs is not as well-known as the All Apps are equal-mantra, but I think there should be more information on it. As long as I belivied in the mantra, I had dialogues like that: Boss: Can you do Xyz on android? Me: Yes, of course, there are Apps on my phone which do it, so we can do it, too! Boss: Cool, go ahead and code that stuff. Customers will love it! ...two days later... Me: Hey boss, I just found out I need some private API for that. Forget all your business plans. I totally agree with those two reasons for private APIs: 1. some features would be too dangerous from a security perspective 2. some APIs were not ready to ship when 1.0 came out, so they should be published later The post I mentioned above is about two private APIs: * Installing Apps without any intervention by the User * Calling emergency phone numbers like 911 I'm sure there are more private APIs, I think those are good examples: * Everything related to Bluetooth * Reading Contancts from a SIM card / writing them there But I'm afraid there may be many more which I'm not aware of. Could we create an exhaustive list of them? I think no such list exists yet. For each API/feature it would be nice to know: * Why is it private? * Will it ever be public? * If yes, are there any schedules when this might come true, in terms of release numbers or in terms of a date? with best regars, Brian Schimmel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Can I draw a line following a street?
Hi, In my application, I have just one GeoPoint at my map, and a I want to draw a line in the street, the GeoPoint will be in the center, and 1 mile to tup and 1 mile to down, for example. But, the street can have a curve, or something like that. So, my doubts: 1) How can I get\calculate the point far 1 mile from my original GeoPoint, that follow the street? or: 2) Suppose that I have tow GeoPoint in a street, how can I draw a line following the street? Max --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can I clear a transparent or translucent canvas
Just call Canvas.drawColor(0). On Thu, Mar 12, 2009 at 10:35 AM, sebastian sdjua...@gmail.com wrote: Hi I am painting some bitmaps onto a transparent canvas, so it is rendered above the system screen. When I draw the next bitmap, I cannot clear the previously drawn one. How can I erase it? If I could capture the initial canvas would be fine...because I could paint always that before drawing the bitmap...but I am not succedding on capturing it. Thanks! -- 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: did someone implement a ScrollView with horizontal scroll support?
The code in setScrollXY is not called anywhere in the class, and was old test code to get around the fact that some fields/methods are not available in sub-classes in different packages. It can be and should have been removed, but then again, who has time for that? Michael On Mar 12, 1:44 pm, Romain Guy romain...@google.com wrote: Do NOT use this implementation. The setScrollXY() method changes field by reflection. Not only is it likely to break it's also VERY VERY inefficient. Especially given the lookup is done *every* single time. View already has methods to change the scroll X/Y 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: Slow Scrolling
Is there any way to get around the problem of it being non responsive? The lack of feedback to the scroll attempt is very noticeable. On Mar 11, 11:16 pm, Romain Guy romain...@google.com wrote: It's waiting for events in the main events queue. That's pretty normal to see this. On Wed, Mar 11, 2009 at 4:03 PM, AlCapwn alcapw...@googlemail.com wrote: Whoops, forgot to add this. When the freeze happened, I generated a bugreport and it says this: main prio=5 tid=3 TIMED_WAIT | group=main sCount=1 dsCount=0 s=0 obj=0x400103e8 | sysTid=2339 nice=0 sched=0/0 handle=-1096221588 at java.lang.Object.wait(Native Method) - waiting on 0x1b6408 (a android.os.MessageQueue) at java.lang.Object.wait(Object.java:195) at android.os.MessageQueue.next(MessageQueue.java:144) at android.os.Looper.loop(Looper.java:110) at android.app.ActivityThread.main(ActivityThread.java:3739) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:739) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) at dalvik.system.NativeStart.main(Native Method) Not too sure why it would be wait()ing :s On Mar 11, 11:00 pm, Al alcapw...@googlemail.com wrote: Hi, sometimes when I try to scroll using a scrollview (wrapped around a textview), there will be no response. I've noticed this in both my apps and the only common thing between them is the textview in both apps use Spanned (SpanableStringBuilder to be exact) text. This happens even when there is no activity on the window and no anr pops up either. Any idea what would be the cause? Thanks. -- 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: Can android application overwrite the volume down/up key's behavior?
You can override dispatchKeyEvent which should do the trick. On Mar 12, 1:21 pm, striverwang striverw...@gmail.com wrote: hi, all: I want to development a application, which want to use volume down, up key to do something I need. For example, when the user click the volume up button, a dialog pop- up. Can I do that ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can I clear a transparent or translucent canvas
Just call Canvas.drawColor(0). That probably won't do much because it uses the default srcover porterduff mode Canvas.drawColor( 0, PorterDuff.Mode.CLEAR ); would be better On Mar 12, 6:47 pm, Romain Guy romain...@google.com wrote: Just call Canvas.drawColor(0). On Thu, Mar 12, 2009 at 10:35 AM, sebastian sdjua...@gmail.com wrote: Hi I am painting some bitmaps onto a transparent canvas, so it is rendered above the system screen. When I draw the next bitmap, I cannot clear the previously drawn one. How can I erase it? If I could capture the initial canvas would be fine...because I could paint always that before drawing the bitmap...but I am not succedding on capturing it. Thanks! -- 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: how can I clear a transparent or translucent canvas
Argh yes, drawColor(0) is for opaque Canvas, sorry :) On Thu, Mar 12, 2009 at 11:43 AM, Eric webmonke...@gmail.com wrote: Just call Canvas.drawColor(0). That probably won't do much because it uses the default srcover porterduff mode Canvas.drawColor( 0, PorterDuff.Mode.CLEAR ); would be better On Mar 12, 6:47 pm, Romain Guy romain...@google.com wrote: Just call Canvas.drawColor(0). On Thu, Mar 12, 2009 at 10:35 AM, sebastian sdjua...@gmail.com wrote: Hi I am painting some bitmaps onto a transparent canvas, so it is rendered above the system screen. When I draw the next bitmap, I cannot clear the previously drawn one. How can I erase it? If I could capture the initial canvas would be fine...because I could paint always that before drawing the bitmap...but I am not succedding on capturing it. Thanks! -- 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 -- 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: Two applications in one Manifest file ?
No, you can only have one application tag. Why exactly do you want to have multiple tags? On Thu, Mar 12, 2009 at 9:49 AM, sandy8531 mathur...@gmail.com wrote: Is it possible to have two application tags (application) in the same AndroidManifest.xml file ? If yes - is there anything special that needs to be done, I am trying it, the syntax is accepted by the XML parser but when I install my second application is not available. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Intents and Uris, for Ringtone Picker
Uri is a Parcelable, so you can just use intent.putExtra(String, Parcelable). On Thu, Mar 12, 2009 at 9:02 AM, droozen droozenr...@gmail.com wrote: I'd like to allow the user to choose a Ringtone from my application, that I will play later for an alarm. Looking at the javadocs, I see EXTRA_RINGTONE_DEFAULT_URI in RingtoneManager, and extra that, it says, is Given to the ringtone picker as a Uri. There is also an EXTRA_RINGTONE_PICKED_URI that I would get from the returning intent: Returned from the ringtone picker as a Uri However, I see no intent.putExtra(String, Uri) function, so no option to give a Uri. And there is no getUri(String) function in the Bundle for me to get a Uri in return. Is the RingtoneManager documentation wrong and it is given and returned as, say, a String? Or what am I missing? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Launch Application
The is a home screen sample code in the SDK. I would suggest using that that to see how to do things. On Thu, Mar 12, 2009 at 8:45 AM, bklik brenton.k...@gmail.com wrote: Update: OK, I can get my application to launch another application if I explicitly type in the package and class names. For example: Intent i = new Intent(); i.setClassName(com.android.calculator2, com.android.calculator2.Calculator); startActivity(i); Now, how to do find out what the Activity Name is for each package? I only guessed Calculator in the example above after a couple tries. I also tried: appList.get(0).getClassName; But, it returns null. Brenton On Mar 12, 8:21 am, bklik brenton.k...@gmail.com wrote: I want to basically create an application launcher. How do do this? Shouldn't the following just work? PackageManager pm = this.getPackageManager(); ListApplicationInfo appList = pm.getInstalledApplications (0); Intent i = new Intent(); i.setAction(appList.get(15).packageName); i.setClassName(appList.get(15).packageName, appList.get (15).className); startActivity(i); It just crashes and I don't know why. Brenton -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to transfer an action(ex:key press) from an Activity to other Activities
First you should figure out what you really try to accomplish. I don't know the details of your app, but i guess that your goal is not to push a button. The goal is the action that occurs when the button is pushed. I would just call the action (method/java-code/etc) directly that would have been called by the button-click of the other activity. On Mar 12, 7:31 am, npak...@gmail.com npak...@gmail.com wrote: Hi all, When my application is running, a button is pressed.After my application processes this event, i want to continue to transfer this event to other applications. Is it possible? If yes, how to do that? I very appreciate your advices, Thanks, NPAK --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] 639,000 Android-based Phones Sold in 4th Quarter
Please pardon the off topic posting, but I think all developers will want to see this information. Many of us have been trying to figure out how many Android phones have been sold. The following link breaks down some of the numbers for mobile phone sales in 2008 (source:Gartner). It is estimated that T- Mobile sold 639,000 in 4th Quarter of 2008. http://blogs.eweek.com/applewatch/content/iphone/apple_smartphone_ranking_declines.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: Does Camera API really works ?
Maybe i'm stating the obvious here: Did you assign the camera- permission to your application in your manifest file? On Mar 12, 12:18 pm, crowcasso crowca...@gmail.com wrote: Currently the above code is crashing for me (even after fixing the 3 params instead of 2) when performing takePicture() with a IOException: W/System.err( 1470): java.io.IOException: takePicture failed W/System.err( 1470): at android.hardware.Camera.native_takePicture (Native Method) I've written a different Camera application that crashes as well on takePicture(). Is this a known issue? Any suggestions? On Mar 10, 6:50 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Maybe this piece of code won't work, but i'm writing an app that successfully uses thecamera. No crashes :) ... ... so far ... :=) On Feb 17, 1:35 am, cindy ypu01...@yahoo.com wrote: I tried google'scameraAPI sample code. I found there are 2 problems: 1 It only can take picture in Landscape orientation 2 After click the space key, the application crashes. WOw:) XML: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical SurfaceView android:id=@+id/surface android:layout_width=fill_parent android:layout_height=10dip android:layout_weight=1 /SurfaceView /LinearLayout Java code: /** * Copyright (c) 2007, Google Inc. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.cameraapitest; import android.app.Activity; import android.content.Intent; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.net.Uri; import android.os.Handler; import android.os.Message; import android.os.Bundle; import android.provider.MediaStore.Images; import android.provider.MediaStore.Video; import android.view.Menu; import android.view.MenuItem; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.KeyEvent; import android.hardware.Camera; import android.util.Log; public class CameraApiTest extends Activity implements SurfaceHolder.Callback { private static final String TAG = CameraApiTest; CameramCamera; boolean mPreviewRunning = false; public void onCreate(Bundle icicle) { super.onCreate(icicle); Log.e(TAG, onCreate); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.camera_api_test); mSurfaceView = (SurfaceView)findViewById(R.id.surface); mSurfaceHolder = mSurfaceView.getHolder(); mSurfaceHolder.addCallback(this); mSurfaceHolder.setType (SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public boolean onCreateOptionsMenu(android.view.Menu menu) { MenuItem item = menu.add(0, 0, 0, goto gallery); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { Uri target = Uri.parse(content://media/external/ images/media); Intent intent = new Intent(Intent.ACTION_VIEW, target); startActivity(intent); return true; } }); return true; } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); } Camera.PictureCallback mPictureCallback = new Camera.PictureCallback() { public void onPictureTaken(byte[] data,Camerac) { Log.e(TAG, PICTURE CALLBACK: data.length = + data.length); mCamera.startPreview(); } }; public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return super.onKeyDown(keyCode, event); } if (keyCode == KeyEvent.KEYCODE_SPACE) { mCamera.takePicture(null, mPictureCallback); return true; } return false; } protected void onResume() { Log.e(TAG, onResume);
[android-developers] Re: How to implement android's Gallery fling action in my own widget
Take a look at the GestureDetector class. - Create an instance of GestureDetector. - Handle the onTouch event of your activity. In your onTouch event handler, forward the MotionEvent to this GestureDetector instance. - Assign a listener to this GestureDetector (one that implements onFling, amongst others) Implement the onFling method in your listener to handle flings. On Mar 12, 1:27 pm, Meryl Silverburgh silverburgh.me...@gmail.com wrote: Hi, Can you please tell me how implement android's Gallery fling action (with the animation) in my own widget? 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: Performance Problem with ListView / Styled TextView
Hi forandroid, I guess you're talking about the class TwoLineListItem [1], right? Out of curiosity, not because I am trying to be a smart ass: Why would this be faster? Cheers, Mariano [1] http://developer.android.com/reference/android/widget/TwoLineListItem.html On Wed, Jan 14, 2009 at 10:51 AM, for android forandr...@gmail.com wrote: use the efficient list adapter And also you can use the TwoLineListitem On Wed, Jan 14, 2009 at 2:23 PM, Mariano Kamp mariano.k...@gmail.comwrote: *bump* ;-) On Sun, Jan 11, 2009 at 7:10 PM, Mariano Kamp mariano.k...@gmail.comwrote: Hi, I have a performance problem in a ListView. The problem seems to be that it takes too long to setup each individual row. It scrolls very, very painfully slow, because of that. The actual code renders an Entry differently depending on the read state and if it is changed. When not using this code and just plainly called setText() on the TextViews it is reasonable fast. Also the content is HTML. Am I doing something terribly wrong here? ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android= http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=wrap_content TextView android:id=@+id/feed_title android:layout_width= fill_parent android:layout_height=wrap_content android:textSize=11sp android:paddingTop=3px / TextView android:id=@+id/entry_title android:layout_width= fill_parent android:layout_height=wrap_content android:layout_below= @id/feed_title android:textSize=15sp android:paddingBottom=3px / /RelativeLayout class EntryListAdapter extends BaseAdapter { [..] public View getView(int position, View convertView, ViewGroup parent) { View rowView = convertView != null ? convertView : activity .findViewById(R.layout.entry_row); if (rowView == null) rowView = inflater.inflate(R.layout.entry_row, parent, false); Entry entry = entries.get(position); -- slow version EntryViewHelper.populateEntryView(rowView, entry); -- -- OR -- -- (somewhat) fast version TextView entryTitleView = (TextView) rowView.findViewById(R.id. entry_title); TextView feedTitleView = (TextView) rowView.findViewById(R.id. feed_title); feedTitleView.setText(entry.getFeedTitle()); entryTitleView.setText(entry.getTitle()); -- return rowView; } } class EntryViewHelper { [..] static void populateEntryView(View view, Entry entry) { TextView entryTitleView = (TextView) view .findViewById(R.id.entry_title); TextView feedTitleView = (TextView) view.findViewById(R.id.feed_title); feedTitleView.setText(U.renderTitleToSpannedString( entry.getFeedTitle(), entry.getFeedTitleType())); entryTitleView.setText(U.renderTitleToSpannedString(entry.getTitle(), entry.getTitleType())); int style = Typeface.NORMAL; if (!entry.isRead()) style |= Typeface.BOLD; if (entry.isReadStatePending()) style |= Typeface.ITALIC; entryTitleView.setText(U.renderTitleToSpannedString(entry.getTitle(), entry .getTitleType())); feedTitleView.setText(U.renderTitleToSpannedString( entry.getFeedTitle(), entry.getFeedTitleType())); entryTitleView.setTypeface(Typeface.DEFAULT, style); } } .. import android.text.Html; import android.text.Spanned; import android.text.SpannedString; .. class U { static Spanned renderTitleToSpannedString(String titleString, String titleType) { Spanned title = null; if (html.equals(titleType) || xhtml.equals(titleType)) title = Html.fromHtml(titleString); else title = new SpannedString(titleString); return title; } } Btw. I re-use the convert view etc. The performance degradation only happens when I style the output. Cheers, Mariano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] new version of app - does it show on new content?
Hi I have an application on the market. If I upload an update, does it show on the new content section? If no, why I am seeing other apps with versions like 1.3.3 showing on the new content with no rating? Did the remove the app and put it back again? Thanks Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] G1 Storage Space
How much storage space does a G1 phone come with? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Switch the language of all app dynamically!
Try saving the locale some way, make your own implementation of Application and change the locale in Application. Then when the users wants a new locale, restart the activity/task. On 12 mrt, 04:22, Stephen Le yangle...@gmail.com wrote: Hi all: I must change en_US Locale into zh_CH dynamically(Like user choose it). I writed a demo where the code is following: public void onClick(View v){ Resources resource=super.getResources(); Configuration cf=resource.getConfiguration(); DisplayMetrics dm =resource.getDisplayMetrics(); cf.locale=Locale.CHINA; resource.updateConfiguration(cf, dm); ((TextView)super.findViewById(R.id.usernamelabel)).setText ((super.getResources()).getString(R.string.username)); ((TextView)super.findViewById(R.id.passwordlabel)).setText ((super.getResources()).getString(R.string.password)); ((Button)super.findViewById(R.id.loginbutton)).setText ((super.getResources()).getString(R.string.loginbutton)); ((Button)super.findViewById(R.id.cancelbutton)).setText ((super.getResources()).getString(R.string.cancel)); ((Button)super.findViewById(R.id.i8nbutton)).setText ((super.getResources()).getString(R.string.i8nbtn)); }//the end of onClick block The code works fine.But I think this is very heavy to android developer so I have to change every activity . Is there anyone know the quicky way to change language setting?Please tell me the detail steps if you know. Thanks! TIP: My enviroment: android-sdk-windows-1.0_r2+JDK 6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: 639,000 Android-based Phones Sold in 4th Quarter
great info. Thanks. Now we have to wait for 1st Quarter 2009. On Mar 12, 4:17 pm, Steve Ingram steveing...@gmail.com wrote: Please pardon the off topic posting, but I think all developers will want to see this information. Many of us have been trying to figure out how many Android phones have been sold. The following link breaks down some of the numbers for mobile phone sales in 2008 (source:Gartner). It is estimated that T- Mobile sold 639,000 in 4th Quarter of 2008. http://blogs.eweek.com/applewatch/content/iphone/apple_smartphone_ran... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Where can I get com.google.googlenav Package
Oh yes, googlenav. That's gold, and there's several people including myself that could add great value to their apps with it. googlenav also provides location based search. It was included in m3 and was not made available any longer starting m5. http://groups.google.com/group/android-developers/browse_thread/thread/7f232590bc88b89/47f700db00b29c34?q=#47f700db00b29c34 On Mar 11, 10:07 am, jenny jenny...@msn.cn wrote: Hi everyone, I am working on a GPS navigation App. I notice that com.google.googlenav Package is available in Android SDK-m5,but in the source code, there is nothing about googlenav. However, the package is necessary for drive direction development on the device. Could anyone please tell me from where I can get that googlenav library? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] new version of app - is the user notified?
Hi If I upload a new version of the application. Does the user knows that there is a new version of the app? Thanks Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: sound effect using SoundPool
Is the API of the SoundPool the same in cupcake? I hope so. For all the people who need a reliable soundpool, i have made a class that handles the details with soundpool and is easy to use: import java.util.HashMap; import android.content.Context; import android.media.AudioManager; import android.media.SoundPool; import android.os.Vibrator; import android.util.Log; public class SoundEffects { public boolean released=false; protected Context context; private SoundPool soundPool; private int volume; private HashMapInteger, Integer soundPoolMap; protected SoundEffects(int size, Context context) { this.context=context; // keep maxStreams high, ugly hack because pre cupcake android could deadlock // with soundpool soundPool=new SoundPool(size+20, AudioManager.STREAM_MUSIC, 40); soundPoolMap = new HashMapInteger, Integer(); AudioManager mgr=(AudioManager)context.getSystemService (Context.AUDIO_SERVICE); volume=mgr.getStreamVolume(AudioManager.STREAM_MUSIC); } /* public boolean isLoaded() { soundPool. } */ public void addSound(int resid) { int soundId=soundPool.load(context, resid, 1); soundPoolMap.put(resid, soundId); soundPool.setLoop(soundId, 1); } public void addLoopSound(int resid) { int soundId=soundPool.load(context, resid, 1); soundPoolMap.put(resid, soundId); soundPool.setLoop(soundId, -1); } public void play(int resid) { Log.i(SoundEffects, Playing: +resid); int soundId=soundPoolMap.get(resid); soundPool.setLoop(soundId, 1); soundPool.play(soundId, volume, volume, 1, 0, 1f); } public void playLoop(int resid) { int soundId=soundPoolMap.get(resid); soundPool.setLoop(soundId, -1); soundPool.play(soundId, volume, volume, 1, 0, 1f);; } public void stop(int resid) { //soundPool.stop(resid); // apperently a bug, workaround int soundId=soundPoolMap.get(resid); soundPool.setLoop(soundId, 0); soundPool.setVolume(soundId, 0f, 0f); } public void release() { released=true; soundPool.release(); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: sound effect using SoundPool
By the way: try to use .ogg files, they are played better by android. Also i had problems with playLoop(int resid), sometimes the sample is looped, and sometimes it is not. A possible usage of the SoundEffects class is by subclassing it. The code from my example ( i am making a col game! :-) : public class GameSounds extends SoundEffects { private static GameSounds INSTANCE; public static GameSounds getInstance(Context ctx) { //return new GameSounds(ctx); if(INSTANCE==null || INSTANCE.released)INSTANCE=new GameSounds(ctx); return INSTANCE; } private GameSounds(Context context) { super(17, context); addSound(R.raw.engage); addLoopSound(R.raw.alarm2); addSound(R.raw.fire); addSound(R.raw.explosion1); addSound(R.raw.explosion2); addSound(R.raw.smallexplosion); addSound(R.raw.mediumexplosion); addSound(R.raw.lasergun); addLoopSound(R.raw.machinegun1); //addSound(R.raw.); addSound(R.raw.heal); addSound(R.raw.enemydeath); addSound(R.raw.bossdeath); //addSound(R.raw.bigexplosion); //addSound(R.raw.shortshoot1); addSound(R.raw.shortshoot2); //addSound(R.raw.gunload); } public void smallExplosion() { play(R.raw.smallexplosion); } public void explosion() { play(R.raw.mediumexplosion); } public void explosion2() { play(R.raw.explosion2); } public void engage() { play(R.raw.engage); } public void heal() { play(R.raw.heal); } public void nextWave() { play(R.raw.heal); } public void fireVoice() { play(R.raw.fire); } public void fire() { play(R.raw.smallexplosion); } public void fire1() { //play(R.raw.shortshoot1); } public void fire2() { //play(R.raw.shortshoot1); } public void startFire() { playLoop(R.raw.machinegun1); } public void stopFire() { stop(R.raw.machinegun1); } public void startAlarm() { playLoop(R.raw.alarm2); } public void stopAlarm() { stop(R.raw.alarm2); } public void gameover() { play(R.raw.bossdeath); } } On 12 mrt, 21:37, TjerkW tje...@gmail.com wrote: Is the API of theSoundPoolthe same in cupcake? I hope so. For all the people who need a reliablesoundpool, i have made a class that handles the details withsoundpooland is easy to use: import java.util.HashMap; import android.content.Context; import android.media.AudioManager; import android.media.SoundPool; import android.os.Vibrator; import android.util.Log; public class SoundEffects { public boolean released=false; protected Context context; privateSoundPoolsoundPool; private int volume; private HashMapInteger, Integer soundPoolMap; protected SoundEffects(int size, Context context) { this.context=context; // keep maxStreams high, ugly hack because pre cupcake android could deadlock // withsoundpool soundPool=newSoundPool(size+20, AudioManager.STREAM_MUSIC, 40); soundPoolMap = new HashMapInteger, Integer(); AudioManager mgr=(AudioManager)context.getSystemService (Context.AUDIO_SERVICE); volume=mgr.getStreamVolume(AudioManager.STREAM_MUSIC); } /* public boolean isLoaded() { soundPool. } */ public void addSound(int resid) { int soundId=soundPool.load(context, resid, 1); soundPoolMap.put(resid, soundId); soundPool.setLoop(soundId, 1); } public void addLoopSound(int resid) { int soundId=soundPool.load(context, resid, 1); soundPoolMap.put(resid, soundId); soundPool.setLoop(soundId, -1); } public void play(int resid) { Log.i(SoundEffects, Playing: +resid); int soundId=soundPoolMap.get(resid); soundPool.setLoop(soundId, 1); soundPool.play(soundId, volume, volume, 1, 0, 1f); } public void playLoop(int resid) { int soundId=soundPoolMap.get(resid); soundPool.setLoop(soundId, -1); soundPool.play(soundId, volume, volume, 1, 0, 1f);; } public void stop(int
[android-developers] Re: sound effect using SoundPool
On Sun, Feb 15, 2009 at 12:00 AM, Sundog sunns...@gmail.com wrote: I am using your class and setting it up as you indicate, but having the same difficulty I did last time I tried to use SoundPool; I have seven one-shot sounds that trigger from buttons and in the emulator it works every time, but on the phone itself, occasionally all 7 work but usually only a random few do or sometimes none at all. Any idea what might be going wrong? This is a bug in the SoundPool API. I have 1 customer who reported that sometimes my game just stops playing sounds. It happens on my G1, luckily very rarely. As a workaround, in my Options menu in the game, when the user turns off all sounds, and then turns them on, I reload everything and the sounds come back. I'm 100% sure it's a bug on the Android/SoundPool API side. I know it doesn't help, but that's it. I wish there was a way of figuring out that a sound doesn't play -- in this case we could handle it and reload or whatever. In the situations where the sounds go mute I don't see anything in the log. Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: new version of app - is the user notified?
If he looks at your app browsing the Market he'll see it has an update. I can't remember if he gets a notification as well, probably not. On Thu, Mar 12, 2009 at 10:11 PM, daniel.benedykt daniel.bened...@gmail.com wrote: Hi If I upload a new version of the application. Does the user knows that there is a new version of the app? Thanks Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: G1 Storage Space
~70MB for apps, 1GB SD card. I know the 70MB is hilarious, tough luck. Maybe a next release, when Google implement file system encryption will allow installing and running apps off the SD card, but that's not likely to happen soon. On Thu, Mar 12, 2009 at 9:53 PM, WebsiteMagazine andr...@websitemagazine.com wrote: How much storage space does a G1 phone come with? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: new version of app - is the user notified?
You get notification like once a day of all the apps with upgrades. you get a Market notification at the top. On Thu, Mar 12, 2009 at 2:57 PM, Stoyan Damov stoyan.da...@gmail.comwrote: If he looks at your app browsing the Market he'll see it has an update. I can't remember if he gets a notification as well, probably not. On Thu, Mar 12, 2009 at 10:11 PM, daniel.benedykt daniel.bened...@gmail.com wrote: Hi If I upload a new version of the application. Does the user knows that there is a new version of the app? Thanks Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Does android support Google Gear?
On Mar 10, 9:34 pm, Mark Murphy mmur...@commonsware.com wrote: ying lcs wrote: By dumping the content, I mean displaying what are the database column, database row content. Is that possible on the emulator? by opening a shell to it and run some commands? It's possible. For example, after running Gears Database Demo and entering some values into it opn the emulator and # cd /data/data/com.android.browser/gears/code.google.com/http_80 # # sqlite3 'database-demo#database' ! select * from Demo; ! Heel|1236894032405 This is|1236894036105 Gears|1236894040152 The sqlite3 command is built into the emulator, and you can use it and .dump to dump a database's contents. Please refer to the SQLite documentation for details on sqlite3: http://sqlite.org -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] DoubleTwist
I must say this is big news for Android-Mac users like me. I just wanted to share with the rest of the developers here. http://lifehacker.com/5160323/doubletwist-may-be-the-coolest-universal-media-manager-ever This is one thing missing with my G1. Maybe this can open a few software ideas. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Learning JAVA
It might be easier of you don't know Java to start by learning Java and writing some usual desktop applications in awt/Swing. Look at the materials for the Java programmer certification to get a good overview of Java. Once you've got a handle on Java then try writing and Android app. Just my 2 cents. On Mar 12, 1:13 am, Oliver Dunkl oliver.du...@gmail.com wrote: * JonnySnip3r wrote on 11 Mar 2009: public class android extends Activity { ^^^ Is the name of the class exactly the same name of the file? Because the name of the file has to be exactly the same as the class. odi -- The question of whether computers can think is just like the question of whether submarines can swim. -- Edsger W. Dijkstra ~ :wq --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] android.R.styleable can't be resolved?
Hi, I'm using the last android sdk 1.1r1. Eclipse complains about class android.R.styleable. I can't see R$styleable.class inside of android.jar\android either. But it's in the api doc. By using java reflection as below, android.R does have inner class called styleable. Could someone tell me what the problem is? for (Class c : android.R.class.getClasses()) { if (c.getName().indexOf(styleable) = 0) { Log .w(!!, c.getName()); } } Thanks, Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Telephony
This can be done, but it is a bit of an advanced topic. You'll need to use an internal class which is com.android.internal.telephony.PhoneStateIntentReceiver Grab this package, the .class files from the cupcake source tree repository , (doesn't ship with the SDK) and add the classes to you're class path, and include in the /libs directory, or package them into your existent android.jar file. Code to get the signal strength is as follows: import com.android.internal.telephony.PhoneStateIntentReceiver; private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200; .. /// first initialize the PhoneStateIntentReceiver (assumes you're inside a class that extends Context) void initPhoneStateReciever() { phoneStateReciever = new PhoneStateIntentReceiver(this, new Handler( getMainLooper())); phoneStateReciever.notifySignalStrength (EVENT_SIGNAL_STRENGTH_CHANGED); phoneStateReciever.registerIntent(); } //to get the signal strength, use this method, or something similar void updateSignalStrength() { int signalDbm = phoneStateReciever.getSignalStrengthDbm(); int signalAsu = phoneStateReciever.getSignalStrength(); System.out.println(Time: +System.currentTimeMillis()+ Signal Strength DB: +signalDbm+ strength Asu: +signalAsu); } The use of internal classes is not officially supported, and you'll need to grab the .class files from the source repo, but I do actually have code that implements and is tested on the G1. Refer to other threads on options for getting the code and setting up your development environment to use internal classes. Good luck! Mark On Mar 11, 7:49 am, Shrikant Agrawal shrikant...@gmail.com wrote: Hi I want to find the network signal strength for my app. But I cant find the api for it. Do anybody know how to find the signal strength of the phone? 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 creat Toast Like view
Did you look at PopupWindow in the /widgets package? it is toast like, but persist until the user closes it. Mark On Mar 11, 5:26 am, Gulfam gulfa...@gmail.com wrote: Hi Tushar You can make toast like this public void showAlertMessage(Context context, String text){ LayoutInflater inflater = (LayoutInflater)context.getSystemService (Context.LAYOUT_INFLATER_SERVICE); View view = inflater.inflate(R.layout.toast_layout, null); // set the text in the view TextView message = (TextView) view.findViewById(R.id.toast_message); message.setText(text); ImageView image = (ImageView)view.findViewById(R.id.toast_image); image.setImageResource(R.drawable.logo_icon); Toast toast = new Toast(context); toast.setView(view); toast.setDuration(Toast.LENGTH_LONG); toast.show(); } AND XML would be like this ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=wrap_content android:background=@android:drawable/toast_frame LinearLayout android:orientation=horizontal android:layout_width=fill_parent android:layout_height=wrap_content ImageView android:id=@+id/toast_image android:layout_width=wrap_content android:layout_height=wrap_content/ !-- android:src=@drawable/vopium_logo_icon / -- TextView android:id=@+id/toast_message android:layout_width=wrap_content android:layout_height=wrap_content/ /LinearLayout /FrameLayout * another way to make toast is Toast.makeText(context,Any String,Toast.LENGTH_LONG).show(); Hope fully it will help u Regards Gulfam On Mar 11, 1:16 pm, Tushar tusharpatu...@gmail.com wrote: Hi, Using android.widget.Toast one can created floating view over the application. I would like to created similar view which will float on top of all running applications at a specified location. Any thoughts on what should I need to do for this. I tried to created activity by setting android:windowIsFloating =true , but didn't worked out. Any suggestions ?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Slow Scrolling
I vaguely remember a similar problem too. Do you also see the dreaded You used the BufferedReader default constructor (something like that) message? I had the feeling that it lead to a lot of garbage collections which would in turn explain the unresponsiveness I suppose. Btw. I got rid of the Spanneds and now do the actual work (in my case HTML rendering, more exactly translating html entities to text) ahead of time. On Thu, Mar 12, 2009 at 7:35 PM, AlCapwn alcapw...@googlemail.com wrote: Is there any way to get around the problem of it being non responsive? The lack of feedback to the scroll attempt is very noticeable. On Mar 11, 11:16 pm, Romain Guy romain...@google.com wrote: It's waiting for events in the main events queue. That's pretty normal to see this. On Wed, Mar 11, 2009 at 4:03 PM, AlCapwn alcapw...@googlemail.com wrote: Whoops, forgot to add this. When the freeze happened, I generated a bugreport and it says this: main prio=5 tid=3 TIMED_WAIT | group=main sCount=1 dsCount=0 s=0 obj=0x400103e8 | sysTid=2339 nice=0 sched=0/0 handle=-1096221588 at java.lang.Object.wait(Native Method) - waiting on 0x1b6408 (a android.os.MessageQueue) at java.lang.Object.wait(Object.java:195) at android.os.MessageQueue.next(MessageQueue.java:144) at android.os.Looper.loop(Looper.java:110) at android.app.ActivityThread.main(ActivityThread.java:3739) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:739) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) at dalvik.system.NativeStart.main(Native Method) Not too sure why it would be wait()ing :s On Mar 11, 11:00 pm, Al alcapw...@googlemail.com wrote: Hi, sometimes when I try to scroll using a scrollview (wrapped around a textview), there will be no response. I've noticed this in both my apps and the only common thing between them is the textview in both apps use Spanned (SpanableStringBuilder to be exact) text. This happens even when there is no activity on the window and no anr pops up either. Any idea what would be the cause? Thanks. -- 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: android.R.styleable can't be resolved?
styleable was removed from the SDK; this shouldn't have been in the SDK, because the values it contains change between releases. It also is not needed in any way for applications: these are just sets of resources that are interesting to specific pieces of code. You should use declare-styleable in your own app to create an explicit set of resources you want and use that. On Thu, Mar 12, 2009 at 3:22 PM, Derek xianguan...@gmail.com wrote: Hi, I'm using the last android sdk 1.1r1. Eclipse complains about class android.R.styleable. I can't see R$styleable.class inside of android.jar\android either. But it's in the api doc. By using java reflection as below, android.R does have inner class called styleable. Could someone tell me what the problem is? for (Class c : android.R.class.getClasses()) { if (c.getName().indexOf(styleable) = 0) { Log .w(!!, c.getName()); } } Thanks, Derek -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Unified Database Populating Solution
Mark Murphy wrote: Another thing to consider with large yet simple database structures is whether SQLite is the right answer at all. This is particularly true if the data is read-only or read-mostly. It may be you are better served finding a Java library implementing a lower-level data structure (red-black tree, AVL tree, etc.) that is better tuned for your scenario. You might even find one that can work efficiently with an InputStream, thereby allowing you to keep the data in the APK without a second copy. For example, when I see large word dictionary, I think of spell-checkers, and implementing a spell-checker with a SQLite backend would seem likely to have poor performance. Of course, then again, it's been about two decades since I wrote my last spell-checker... Mark, I observed that you are the author of two books on android (one yet to be released). I currently own a book on android by another author and I'm somewhat disappointed. It's rather superficial and lacks depth of discussion on issues like this, and actually skips a lot of simple features as well. How in-depth do you go in your books, especially in demonstrating best-practices of common tasks such as managing large amounts of data on such a small platform? Also, how are the two books related? Does the second book supersede the first, or are they companions? I'd like to buy both but I'm on a tight budget. Justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Unified Database Populating Solution
Justin Allen Jaynes wrote: How in-depth do you go in your books, especially in demonstrating best-practices of common tasks such as managing large amounts of data on such a small platform? Also, how are the two books related? Does the second book supersede the first, or are they companions? I'd like to buy both but I'm on a tight budget. Thanks for the interest! I'll reply to you off-list shortly, so this doesn't turn into a commercial... -- 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: Android Keystore V2
Greetings. You might find the OpenIntents keystore project of interest as well: http://code.google.com/p/openintents/wiki/CryptoIntents It would be great to build something compatible, since the goal of the openintents project is interoperability :) peace, isaac --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---