[android-developers] Re: load image from the web?
hi... I did like this.. This may help you public class demo extends Activity { /** Called when the activity is first created. */ ImageView i1; public int position=0; private String[] myRemoteImages = { http://www.cssnz.org/flower.jpg}; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button1= (Button) findViewById(R.id.clear); i1 =(ImageView) findViewById(R.id.i1); load(); } } public void load() { try { URL aURL = new URL(myRemoteImages[i]); URLConnection con = aURL.openConnection(); con.connect(); InputStream is = con.getInputStream(); /* Buffered is always good for a performance plus. */ BufferedInputStream bis = new BufferedInputStream(is); /* Decode url-data to a bitmap. */ Bitmap bm = BitmapFactory.decodeStream(bis); i1.setImageBitmap(bm)); bis.close(); is.close(); /* Apply the Bitmap to the ImageView that will be returned. */ } catch (IOException e) { Log.e(DEBUGTAG, Remtoe Image Exception, e); } } Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: load image from the web?
Hi nithin Thanks... Its works for me Thank You Rock --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Help!IME apk app installing problem in US official cupcake
Maybe something problem in AndroidManifest.xml,delet 'android:sharedUserId=android.uid.shared ',but I can't edit the xml file On May 25, 1:05 pm, flank xin.c...@gmail.com wrote: Yesterday I updated my G1 to US offcial 1.5 version by mannual.But when I installed the google chinese pinyin IME(Because I'm in China),It has errors.The google pinyin IME app(googlepinyin.apk) is published by Google Inc. I installed it by using adb install,but it replied this information: fl...@flank-t23:/opt/android-sdk-linux_x86-1.5_r2/tools$ ./adb install -l /media/disk/pinyinime.apk 299 KB/s (1293766 bytes in 4.214s) pkg: /data/local/tmp/pinyinime.apk Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] then I used the adb logcat to see what happened: 用adb logcat抓的,帮忙分析下 I/CheckinService( 57): From server: Intent { action=android.server.checkin.FOTA_CANCEL } W/InputManagerService( 57): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@432e4fc8 I/ActivityManager( 57): Starting activity: Intent { action=android.intent.action.VIEW data=file:///sdcard/pinyinime.apk type=application/vnd.android.package-archive comp={com.android.packageinstaller/ com.android.packageinstaller.PackageInstaller Activity} } I/installd( 37): free_cache(5175064) avail 73830400 I/ActivityManager( 57): Starting activity: Intent { data=file:///data/data/com.android.packageinstaller/files/ pinyinime.apk comp={com.android.packageinstaller/ com.android.packageinstaller.InstallAppConfir mation} (has extras) } W/InputManagerService( 57): Starting input on non-focused client com.android.internal.view.iinputmethodclient$stub$pr...@433696e8 (uid=10028 pid=346) I/ActivityManager( 57): Displayed activity com.android.packageinstaller/.InstallAppConfirmation: 1191 ms I/InstallAppConfirmation( 352): result ok I/ActivityManager( 57): Starting activity: Intent { data=file:///data/data/com.android.packageinstaller/files/ pinyinime.apk comp={com.android.packageinstaller/ com.android.packageinstaller.InstallAppProgre ss} (has extras) } W/InputManagerService( 57): Starting input on non-focused client com.android.internal.view.iinputmethodclient$stub$pr...@4332b3e8 (uid=10012 pid=352) I/ActivityManager( 57): Displayed activity com.android.packageinstaller/.InstallAppProgress: 192 ms I/ActivityManager( 57): Process com.android.settings (pid 240) has died. E/PackageManager( 57): Package com.android.inputmethod.pinyin has no signatures that match those in shared user android.uid.shared; ignoring! W/PackageManager( 57): Package couldn't be installed in /data/app/com.android.inputmethod.pinyin.apk so please help.I'm trying to find a solution --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: whats wrong with my EditText to int
hi... @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); add(); this way you call the add function... Then it will thrown exception... see this blog.. This may help you http://groups.google.com/group/android-developers/browse_thread/thread/9a17873ffe8b6e0b/5ef7d60fb4ea4fa1?q=nithinvaramballi#5ef7d60fb4ea4fa1 Thank You Rock --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 do i Autoscroll the ListView with some specified time interval
hi Christine, it's working fine. thax a lot. On May 25, 12:16 pm, Christine christine.kar...@gmail.com wrote: I would use a handler. You create a task for the list scroll, then hand it to the handler (.postDelayed) to execute after 10 seconds. When executed, the task can schedule a new scroll ten seconds later. On May 24, 7:39 pm, Freshman csato...@gmail.com wrote: Hello Romain Guy, Thax for the reply. I tried AsyncTask but it works only if i have 10 to 15 elements in my listview. if i set my length variable more then 15 in below for loop its giving out of memory error in eclipse. Is there any other way i can implement same functionality ? i tried something like this. button.setOnClickListener(new OnClickListener() { public void onClick(View v) { for(int i=0;i = length; i++){ new AddTask().execute(i); } } AddTask Class private class AddTask extends AsyncTaskInteger, Void, Void { TextView textView; int counter; protected void onPreExecute() { textView= (TextView) findViewById(R.id.english); } protected Void doInBackground(Integer... params) { counter = params[0]; try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } return null; } @Override public void onPostExecute(Void ignore) { getListView().setSelection(counter); textView.setText(List View Item + counter); } } Thax in advance On May 21, 2:04 pm, Romain Guy romain...@google.com wrote: Hi, You are blocking the UI thread. Basically you are preventing ListView from ever doing a layout or a redraw. You should use a Handler or an AsyncTask to do this. On Wed, May 20, 2009 at 10:01 PM, Freshman csato...@gmail.com wrote: Hi guys, I am new to Android I've a ListView. I want to autoscroll all the items of listview on button click event with some specified time interval, and also wants to update the TextView according to selected items. I tried something like this on button click for(inti=0;i=length;i++){ getListView().setSelection(i); textview.setText(Hi ! + i); Thread.sleep(1000); } After some time It will directly scrolls to last element. And TextView dosen't get updated every time, it'll only shows last element of listview. Could you please suggest me any ways to solve this problem ? Thanks in advance, freshman -- 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- 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: load image from the web?
cool looks pretty straight forward, thanks for the quick reply this will be a big help! On May 25, 1:32 am, Nithin Varamballi nithi...@gmail.com wrote: hi... I did like this.. This may help you public class demo extends Activity { /** Called when the activity is first created. */ ImageView i1; public int position=0; private String[] myRemoteImages = { http://www.cssnz.org/flower.jpg}; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button1 = (Button) findViewById(R.id.clear); i1 =(ImageView) findViewById(R.id.i1); load(); }} public void load() { try { URL aURL = new URL(myRemoteImages[i]); URLConnection con = aURL.openConnection(); con.connect(); InputStream is = con.getInputStream(); /* Buffered is always good for a performance plus. */ BufferedInputStream bis = new BufferedInputStream(is); /* Decode url-data to a bitmap. */ Bitmap bm = BitmapFactory.decodeStream(bis); i1.setImageBitmap(bm)); bis.close(); is.close(); /* Apply the Bitmap to the ImageView that will be returned. */ } catch (IOException e) { Log.e(DEBUGTAG, Remtoe Image Exception, e); } } Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with Internet connection through emulator
Yes, thats for sure. Unfortunately I am required to work behind it - this is pretty annoying, even more since there are about 10 programmers here, ALL suffering from this - this isn't just in some cases :(. On May 25, 4:15 am, Gerald Logor gerald.lo...@gmail.com wrote: I guess working behind a (bureaucracy corporate) proxy raises the difficulty in working with the emulator. I tried running it from home (with an internet provider assigned IP within a designated DNS address) and it worked properly. On Mon, May 18, 2009 at 5:42 PM, Chronos g358279012044...@gmail.com wrote: Unfortunately, this problem isn't solved :( In addition to the steps Gerald has taken already, we also: - provided the -http-proxy option at emulator start; still no success neither for the browser application, nor for our own application (which works perfectly without proxy) - tried IP addresses instead of domain names in order to circumvent possible DNS problems = still no success - tried -debug-proxy with the following unsuccessful output: #emulator -avd standard_1_5 -http-proxy browser:3128 -debug-proxy proxy_http_setup: creating http proxy service connecting to browser: 3128 server name 'browser' resolved to 192.168.1.122:3128 proxy_http_setup: creating HTTP Proxy Service Footer is (len=2): ' ' http_service_connect: trying to connect to 209.85.135.99:8028 http_service_connect: using HTTP rewriter tcp:209.85.135.99:8028(1576): cannot connect to proxy: unknown error http_service_connect: trying to connect to w.x.y.z:808028 http_service_connect: using HTTP rewriter tcp:w.x.y.z:808028(1576): cannot connect to proxy: unknown error http_service_free I have obfuscated the second IP - but I strongly wonder about those obviously wrong port numbers... I hope this is just a string formating bug. Anyway we're stuck here... Can't anybody help ? On May 9, 9:16 am, sujoydas1...@gmail.com sujoydas1...@gmail.com wrote: Worked for me. Go to Tools directory and type emulator-http-proxyproxy-address:proxy-port On May 8, 2:50 am, Gerald Logor gerald.lo...@gmail.com wrote: Well if that's the case, if the -http-proxyproxy command-line option is not supplied, thenemulatorshould by default looks up the http_proxyenvironment variable (which I did set it using sqlite3 in the settingsdb file) and automatically uses any value matching the proxy format. However, it still cannot go online. Thanks for the reference to the releasenotes though. Gerald Logor On Fri, May 8, 2009 at 11:22 AM, Android Users androidmai...@gmail.comwrote: SDK 1.5 release notes mention this, In some cases, you may encounter problems when using the browser on an emulatorstarted with the command-line option -http-proxy. Ref :http://developer.android.com/sdk/RELEASENOTES.html On Fri, May 8, 2009 at 8:50 AM, Gerald Logor gerald.lo...@gmail.com wrote: After spending hours of research and different ways to connect myemulator to the internet (i.e just accessing any ordinary webpages), I'm still hitting a brick wall. My current internet setting is that I'm behind a corporate internet connection thus connecting via a proxy (154.23.x.yy:80zz) Ways I tried: 1. Connect to theemulatorusing the adb shell command (From tools folder of SDK) *adb shell* enter this.. *# sqlite3 /data/data/com.android.providers.settings/databases/settings.db sqlite INSERT INTO system VALUES(99,'http_proxy','PROXY_IP:PROXY_Port');* Restarting theemulator, it's still showing WebPage unavailable 2. Using Eclipse as my IDE, I Go to Run - Run Configurations -Target in eclipse and enter *-http-proxyPROXY_IP:PROXY_Port * in Additionalemulatorcommand line options. Still, no happiness. 3. I also tried (in Eclipse), Windows-Preferences-Android-Default Emulatoroption, and insertinghttp-proxy*PROXY_IP:PROXY_Port *4. I'm not creating any of my own view or activity, thus did not need to setup INTERNET permissions in my manifest file. Any helps would be appreciated. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use the ninepatch png image via file, not from resource?
anybody can tell me the detailed process of 9patch png? Thanks On May 25, 9:50 am, Paranoia zheny...@gmail.com wrote: i want to use the ninepatch image in the file system. but seems that it can be referenced via res. how to get the auto-scale support for the images in file system. Thanks! Best Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Regarding Intents
Hi, I wrote a new application and i want to send an intent to another application.is it not enough if i broadcast that intent from my new app and add an intent filter in the receiving application? The intent seems to be not received in the receiving application. should i add / register the intent somewhere in the framework so that it gets received.can someone help me on this.. Regards, Bhargavi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] About screen unlock—help!!!
Now,I have a trouble,please help me! When the screen of the phone is locked,I have to hide the locked screen in the method onCreate() of my activity,and the way I can hide the locked screen, is to use method disableKeyguard in KeyguardManager.KeyguardLock. And in the onDestroy method of my activtiy,I use the method reenableKeyguard to redisplay the lock screen. But there have a problem,my activity will be keepped on calling by service, so this activity will do the thing:hiding and redisplaying the locked screen endless. After the activity being called thirty or much more times,an exception was thrown like this: dalvikmv-heap 28900-byte external allocation too large for this process . VM won't let us allocate 28900 bytes. uncaught handler:thread WinddowManagerPolicy exiting due to uncaught exception ***EXCEPTION IN SYSTEM PROCESS;System will crash android.view.InflateException:Binary XML file line#60 Error inflating class java.lang.reflect.Constructor at com.android.internal.policy.impl.UnLockScreen.init (UnlockScreen.java 134) at com.android.internal.policy.impl.LockPatternKeyguardView.CreateUnlockScreenFor (LockPattenKeyguardView.java 457) at com.android.internal.policy.impl.LockPatternKeyguardView.init (LockPatternKeyguardView.java:274) at com.android.internal.policy.impl.LockPatternKeyguardViewProperties.createKeyguardView (LockPatternKeyguardViewProperties.java:48) at com.android.internal.policy.impl.LockPatternKeyguardViewManager.show (LockPatternKeyguardViewManager.java:123) at com.android.server.WindowManagerService$PolicyThread.run (WindowManagerService.java:474) Cased by :java.lang.reflect.InvocatinTargetException at com.andoid.internal.widget.LockPatternView.init (LockPatternView.java:246) After throwing this exception,the emulator restarted by itself! Please if there someone can tell me why this exception happened??and this let the emulator restarted by itself! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Regarding Intents
You must register your intent in AndroidMenifest.xml file. You can locate this file at the root of your android application. On May 25, 2:05 pm, Bhargavi bha...@gmail.com wrote: Hi, I wrote a new application and i want to send an intent to another application.is it not enough if i broadcast that intent from my new app and add an intent filter in the receiving application? The intent seems to be not received in the receiving application. should i add / register the intent somewhere in the framework so that it gets received.can someone help me on this.. Regards, Bhargavi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can I access other package's private files?
You must specify the permission in androidMenifest.xml file for the application you want to access. On May 25, 6:52 am, mongd mongdl...@gmail.com wrote: Hello, I'm trying to find a way to access private files created by other packages. According to the dev site (plz see the following), I can read/write files of other packages if some flags are set on the create of those files, but I don't know how. Can I just open those files with Context.openFileInput(or Context.openFileOutput)? Do I need a different way for those three cases? By three cases, I mean getSharedPreferences(String, int), openFileOutput(String, int), openOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory). Thank you in advance. Wookyun Any data stored by an application will be assigned that application's user ID, and not normally accessible to other packages. When creating a new file with getSharedPreferences(String, int), openFileOutput (String, int), or openOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory), you can use the MODE_WORLD_READABLE and/ or MODE_WORLD_WRITEABLE flags to allow any other package to read/write the file. When setting these flags, the file is still owned by your application, but its global read and/or write permissions have been set appropriately so any other application can see it. - from http://developer.android.com/ guide/topics/security/security.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How run a apk in the app
Downloading an APK does not let call it straightaway, since you must install the downloaded application first. Having installed it, you can use the traditional method and use intents for inter-process communication. On May 25, 2:42 am, Harwkin Xu iou200...@gmail.com wrote: I means from an application to call another application. thanks 2009/5/24 MrSnowflake mrsnowfl...@gmail.com Apk files are like installers and cab files on Windows Mobile, they are not the applications it self, but a mechanism to install the application (task) they contain. On May 23, 10:51 am, Mark Murphy mmur...@commonsware.com wrote: iou200...@gmail.com wrote: I want to know ,too. On May 6, 9:11 pm, ainilife ainil...@gmail.com wrote: hi all: i want to download aapkfile from my server and run this application in my app. is this possible? if it can , please post some sample code. thank you all. That is not possible. At most, you can download an APK and tell Android to begin the installation process. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy Looking for Android opportunties?http://wiki.andmob.org/hado -- How bigger your heart ,how larger the world! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
GT wrote: Does anybody have an example of using the PhoneState Listener while running a service? I've been having problems having a PhoneState Listener inside of the service. I don't have an example I can publish, but it definitely works. What specifically has been your issue? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can I access other package's private files?
Dharmesh wrote: You must specify the permission in androidMenifest.xml file for the application you want to access. Permissions (i.e., uses-permission elements in the manifest) have nothing to do with this issue, AFAIK. On May 25, 6:52 am, mongd mongdl...@gmail.com wrote: Hello, I'm trying to find a way to access private files created by other packages. According to the dev site (plz see the following), I can read/write files of other packages if some flags are set on the create of those files, but I don't know how. Can I just open those files with Context.openFileInput(or Context.openFileOutput)? Do I need a different way for those three cases? You would definitely need to use ordinary file I/O and fully-qualified paths: /data/data/the.other.package.here/... By three cases, I mean getSharedPreferences(String, int), openFileOutput(String, int), openOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory). The downside of MODE_WORLD_WRITEABLE is that it is world writeable. Another approach is for you to arrange for both applications to run as the same user ID: http://developer.android.com/guide/topics/manifest/manifest-element.html And have both applications signed by the same key (debug or production). Then, both applications should be able to read/write each other's files without issue, because they are both running as the same user. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: load image from the web?
Bear in mind that the code shown below runs on the UI thread. This means the UI thread is blocked until the HTTP request returns. If the HTTP request has a problem (e.g., the server is not responding), it could very easily take beyond the ~5 seconds allowed before an application-not-responding (ANR) error occurs and your activity is forcibly closed. I heartily encourage you to use a placeholder image when launching your UI and have the real image downloaded off the Web in the background. AsyncTask should work very well for this case -- you can download and decode the image in doInBackground() and apply it to the ImageView in onPostExecute(). Nithin Varamballi wrote: hi... I did like this.. This may help you public class demo extends Activity { /** Called when the activity is first created. */ ImageView i1; public int position=0; private String[] myRemoteImages = { http://www.cssnz.org/flower.jpg}; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button1= (Button) findViewById(R.id.clear); i1 =(ImageView) findViewById(R.id.i1); load(); } } public void load() { try { URL aURL = new URL(myRemoteImages[i]); URLConnection con = aURL.openConnection(); con.connect(); InputStream is = con.getInputStream(); /* Buffered is always good for a performance plus. */ BufferedInputStream bis = new BufferedInputStream(is); /* Decode url-data to a bitmap. */ Bitmap bm = BitmapFactory.decodeStream(bis); i1.setImageBitmap(bm)); bis.close(); is.close(); /* Apply the Bitmap to the ImageView that will be returned. */ } catch (IOException e) { Log.e(DEBUGTAG, Remtoe Image Exception, e); } } Thank You Nithin N V -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with Internet connection through emulator
The emulator does just that, but the variable must be defined in the environment on the host. Adding http_proxy on the device itself is not supported as far as I know. I may have worked in previous SDK releases, but I don't think it is guaranteed to work on 1.5 or future releases. On Fri, May 8, 2009 at 9:50 AM, Gerald Logor gerald.lo...@gmail.com wrote: Well if that's the case, if the -http-proxy proxy command-line option is not supplied, then emulator should by default looks up the http_proxyenvironment variable (which I did set it using sqlite3 in the settingsdb file) and automatically uses any value matching the proxy format. However, it still cannot go online. Thanks for the reference to the releasenotes though. Gerald Logor On Fri, May 8, 2009 at 11:22 AM, Android Users androidmai...@gmail.comwrote: SDK 1.5 release notes mention this, In some cases, you may encounter problems when using the browser on an emulator started with the command-line option -http-proxy. Ref : http://developer.android.com/sdk/RELEASENOTES.html On Fri, May 8, 2009 at 8:50 AM, Gerald Logor gerald.lo...@gmail.comwrote: After spending hours of research and different ways to connect my emulator to the internet (i.e just accessing any ordinary webpages), I'm still hitting a brick wall. My current internet setting is that I'm behind a corporate internet connection thus connecting via a proxy (154.23.x.yy:80zz) Ways I tried: 1. Connect to the emulator using the adb shell command (From tools folder of SDK) *adb shell* enter this.. *# sqlite3 /data/data/com.android.providers.settings/databases/settings.db sqlite INSERT INTO system VALUES(99,'http_proxy','PROXY_IP:PROXY_Port');* Restarting the emulator, it's still showing WebPage unavailable 2. Using Eclipse as my IDE, I Go to Run - Run Configurations -Target in eclipse and enter *-http-proxy PROXY_IP:PROXY_Port * in Additional emulator command line options. Still, no happiness. 3. I also tried (in Eclipse), Windows-Preferences-Android-Default Emulator option, and inserting http-proxy *PROXY_IP:PROXY_Port *4. I'm not creating any of my own view or activity, thus did not need to setup INTERNET permissions in my manifest file. Any helps would be appreciated. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with Internet connection through emulator
It's a known bug in the 1.5 emulator. It only happens under specific network conditions that are hard to replicate but should be fixed in a later release (you can try to rebuild the emulator from the open-source depot if you want the fix). One potential way to fix this is to run an intermediate proxy on your localhost interface, and direct the emulator to use it, as in: emulator local proxy real proxy There are many free programs that do that very well. Hope this helps. On Mon, May 18, 2009 at 12:42 PM, Chronos g358279012044...@gmail.comwrote: Unfortunately, this problem isn't solved :( In addition to the steps Gerald has taken already, we also: - provided the -http-proxy option at emulator start; still no success neither for the browser application, nor for our own application (which works perfectly without proxy) - tried IP addresses instead of domain names in order to circumvent possible DNS problems = still no success - tried -debug-proxy with the following unsuccessful output: #emulator -avd standard_1_5 -http-proxy browser:3128 -debug-proxy proxy_http_setup: creating http proxy service connecting to browser: 3128 server name 'browser' resolved to 192.168.1.122:3128 proxy_http_setup: creating HTTP Proxy Service Footer is (len=2): ' ' http_service_connect: trying to connect to 209.85.135.99:8028 http_service_connect: using HTTP rewriter tcp:209.85.135.99:8028(1576): cannot connect to proxy: unknown error http_service_connect: trying to connect to w.x.y.z:808028 http_service_connect: using HTTP rewriter tcp:w.x.y.z:808028(1576): cannot connect to proxy: unknown error http_service_free I have obfuscated the second IP - but I strongly wonder about those obviously wrong port numbers... I hope this is just a string formating bug. Anyway we're stuck here... Can't anybody help ? On May 9, 9:16 am, sujoydas1...@gmail.com sujoydas1...@gmail.com wrote: Worked for me. Go to Tools directory and type emulator-http-proxyproxy-address:proxy-port On May 8, 2:50 am, Gerald Logor gerald.lo...@gmail.com wrote: Well if that's the case, if the -http-proxyproxy command-line option is not supplied, thenemulatorshould by default looks up the http_proxyenvironment variable (which I did set it using sqlite3 in the settingsdb file) and automatically uses any value matching the proxy format. However, it still cannot go online. Thanks for the reference to the releasenotes though. Gerald Logor On Fri, May 8, 2009 at 11:22 AM, Android Users androidmai...@gmail.comwrote: SDK 1.5 release notes mention this, In some cases, you may encounter problems when using the browser on an emulatorstarted with the command-line option -http-proxy. Ref :http://developer.android.com/sdk/RELEASENOTES.html On Fri, May 8, 2009 at 8:50 AM, Gerald Logor gerald.lo...@gmail.com wrote: After spending hours of research and different ways to connect myemulator to the internet (i.e just accessing any ordinary webpages), I'm still hitting a brick wall. My current internet setting is that I'm behind a corporate internet connection thus connecting via a proxy (154.23.x.yy:80zz) Ways I tried: 1. Connect to theemulatorusing the adb shell command (From tools folder of SDK) *adb shell* enter this.. *# sqlite3 /data/data/com.android.providers.settings/databases/settings.db sqlite INSERT INTO system VALUES(99,'http_proxy','PROXY_IP:PROXY_Port');* Restarting theemulator, it's still showing WebPage unavailable 2. Using Eclipse as my IDE, I Go to Run - Run Configurations -Target in eclipse and enter *-http-proxyPROXY_IP:PROXY_Port * in Additionalemulatorcommand line options. Still, no happiness. 3. I also tried (in Eclipse), Windows-Preferences-Android-Default Emulatoroption, and insertinghttp-proxy*PROXY_IP:PROXY_Port *4. I'm not creating any of my own view or activity, thus did not need to setup INTERNET permissions in my manifest file. Any helps would be appreciated. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SDK 1.5: unable to send SMS to another emulator
On Sun, May 24, 2009 at 6:17 PM, Steve steveoliv...@gmail.com wrote: Not working for me either, running a Mac with SDK 1.5. I wonder if the new AVD's have somehow broken the port numbers, and since you have to run each emulator against a separate AVD, now the 2 emulators can't see each other. Argh! No, the issue is related to IPv6 and a bug in the emulator's name resolution code. A fix will be available in the next release. In the meantime, you could try disabling IPv6 on your localhost interface and see if it helps. (Yes, I know it's gruesome, sorry). On May 13, 1:59 pm, Laurie mamla...@gmail.com wrote: Same for me. With the 1.5 SDK toolkit, I cannot send or receiveSMS/ Calls using TWO EMULATOR INSTANCES on the same development machine. **Simulating incoming calls andSMSmessages using the emulator console via telnet works fine. Using DDMS in Eclipse works fine. I am using Windows Vista, using distinct AVDs, both the Dialer/ Messaging applications and port numbers (eg. 5554 and 5556). I have tried both launching both emulator instances through Eclipse, as well as one with Eclipse and one from the command line. Neither method works. These features worked fine in Android 1.1. I hope we get an answer to this query soon. -LED --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Start virtual Keyboard???
Hi, in my app i have 2 areas where a user have to make an input. 1. with a notefield (5rows high).. there the virtual Keyboard comes up automaticly 2. where is just one row .. the virtual keyboard DOES NOT appear automaticly How can i make that the Virtual Keyboard always comes up while Input is needed? I dont know why it comes when there are more rows, and not when just one. thanks 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] Re: How to send SMS between two emulators (SDK 1.5 or older)
Can you tell me if the issue is fixed for you in the SDK 1.5 r2 release that just went off the presses ? Thanks in advance. On Sun, May 24, 2009 at 6:16 PM, Steve steveoliv...@gmail.com wrote: Not working for me on a Mac with SDK 1.5, and others have seen the same thing, here is the issue http://code.google.com/p/android/issues/detail?id=2660 Seems to have something to do with the AVD's that are new in 1.5 and the emulators not recognizing that part of the port name. On Apr 17, 9:15 am, a druid klausf...@gmail.com wrote: Hi, with the SDK 1.5 it is possible to instantiate twoemulatorswith two different devices. Could I assign a phone number to each device, such, that I could sendSMSmessages forth and back? thanks and bye --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Start virtual Keyboard???
ok.. the problem seems the SetKeylistener... but how can i use the virtual Keyboard including the Keylistener??? in the moment the following code is included.. the virtual keyboard do not appear! dapikeyfield.setKeyListener(new NumberKeyListener(){ private static final String CHARS= abcdefghijklmnopqrstuvwxyz + ABCDEFGHIJKLMNOPQRSTUVWXYZ; @Override protected char[] getAcceptedChars() { return(CHARS.toCharArray()); } public int getInputType() { // TODO Auto-generated method stub return 0; } }); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Sensor Problem n SDK 1.5 ANR messages.
AsslamuAlikum and Hi, I am a android developer. Issue is listed there for Sensor , while using sensor under emulator , ANR messages occurs , so I want to ask that if we rebuild the emulator from the cupcake release do the problem vanish or do it fix the problem, Is this problem fixed, or any change to fix this. My application uses very much Sensor APIs. so any help would be appreciated. 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] Disable specific alarm but disable all alarm
Hi, I want to disable a specific alarm set from my program, but it would disable all alarms when I disable one of them every time. My code is as follows, Intent AlarmIntent = new Intent(context, AlarmRingtoneReceiver.class); AlarmIntent.putExtra(taskId, taskId); AlarmIntent.putExtra(alarmId, alarmId); AlarmIntent.putExtra(summary, summary); AlarmIntent.putExtra(SelectedRingtoneId, ringtoneId); PendingIntent sender = PendingIntent.getBroadcast(context, 0, AlarmIntent, PendingIntent.FLAG_CANCEL_CURRENT); AlarmManager alarmManager = (AlarmManager) context.getSystemService (Context.ALARM_SERVICE); alarmManager.cancel(sender); Is there any problems in my code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting the manifest.xml of applications from the market?
Thank you for your answers! Based on the assumption that I already have the apk-file, your answers are very helpful, because I was not aware of the issue with the binary file format. I've tested the aapt command and it did what you said, which is ok. But my question should have asked how I can programatically download apks from the market, or if there is a way to just download the manifest.xml. From what I have read elsewhere, I think the Google Market does not allow other clients than the official one to access it. And even if it did, it could only server the whole apk and not just the AndroidManifest.xml, because the market does not even have this file in XML syntax. So I'm going to try out my idea with another, non-official market like andappstore.com, where I can directly download apks from the device as well as from a host side. And as soon as I have something working, I might come back and ask how to integrate it with google market. -- thanks, Brian On 22 Mai, 00:38, Dianne Hackborn hack...@android.com wrote: If you are running on a device, you can use the Java APIs to get and read the package and compiled XML files out of it. If you are running on the host side, aapt dump xmltree path to apk path to file inside apk will print out a not-at-all-XML-but-human-readable version of the binary XML file. On Thu, May 21, 2009 at 2:51 PM, rollbak roll...@gmail.com wrote: That is not so simple, because manifest inside APK is converted to a binary file which format is unknown. On May 21, 2:52 am, Raphael r...@android.com wrote: APKs are simply zip files. If you have anAPK, you can read its manifest. R/ On Wed, May 20, 2009 at 1:49 AM, brian.schim...@googlemail.com brian.schim...@googlemail.com wrote: Hi there, is there some way to retrieve the manifest.xmlof an application from the market, without installing the application? I think the official Market Application somehow get this file (or at least parts of it) to show needed permissions, etc. before installing. I'd be interested in seeing the IntentFilters defined by applications and their activities and processing this information in my application. thanks, Brian -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] My good god, bugs in Android brick phone, and it's not difficult to reproduce...
Hey guys, you need to look into this, this morning I downloaded a soft keyboard (a Russian keyboard) from the market, disabled the build-in keyboard and enabled it in locale setting. Then without disabling it, I uninstall the keyboard using the uninstall button in market. Then my phone started to force closes over and over, looked at the logs, clearly the input method is crashing because it couldnt find the keyboard anymore, so I long pressed the power button and chose power off and rebooted the phone, the phone will NOT boot any more I was able to recover it by popping the battery and then hold Home button when powering on to get into recovery mode and did a alt-W to wipe the phone clear and started over. Now imagine someone dont know how to do that would think about the system. Even I recovered it, it's still a pain in the butt to setup everything again. See the logs below, YOU GOT TO FIX THIS W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library I/SystemServer( 132): Starting Alarm Manager. I/SystemServer( 132): Starting Sensor Service. I/SystemServer( 132): Starting Window Manager. I/EventHub( 132): New device: path=/dev/input/event4 name=compass id=0x1 (of 0x1) index=1 fd=50 classes=0x0 D/SensorManager( 132): found sensor: AK8976A 3-axis Accelerometer, handle=0 D/SensorManager( 132): found sensor: AK8976A 3-axis Magnetic field sensor, handle=1 D/SensorManager( 132): found sensor: AK8976A Orientation sensor, handle=2 D/SensorManager( 132): found sensor: AK8976A Temperature sensor, handle=3 I/EventHub( 132): New device: path=/dev/input/event3 name=trout- keypad-v3 id=0x10001 (of 0x2) index=2 fd=51 classes=0x3 I/EventHub( 132): New keyboard: publicID=0 device-id=65537 devname='trout-keypad-v3' propName='hw.keyboards.0.devname' keylayout='/system/usr/keylayout/trout-keypad-v3.kl' I/SystemServer( 132): Starting Bluetooth Service. I/EventHub( 132): New device: path=/dev/input/event2 name=trout-nav id=0x10002 (of 0x3) index=3 fd=53 classes=0x8 I/EventHub( 132): New device: path=/dev/input/event1 name=synaptics- rmi-touchscreen id=0x10003 (of 0x4) index=4 fd=55 classes=0x4 I/SystemServer( 132): Starting Status Bar Service. I/EventHub( 132): New device: path=/dev/input/event0 name=h2w headset id=0x10004 (of 0x5) index=5 fd=56 classes=0x1 I/EventHub( 132): New keyboard: publicID=65540 device-id=65540 devname='h2w headset' propName='hw.keyboards.65540.devname' keylayout='/system/usr/keylayout/h2w_headset.kl' I/KeyInputQueue( 132): Device added: id=0x10004, name=h2w headset, classes=1 I/KeyInputQueue( 132): Device added: id=0x10003, name=null, classes=4 I/KeyInputQueue( 132): X: min=80 max=3400 flat=0 fuzz=0 I/KeyInputQueue( 132): Y: min=32 max=5336 flat=0 fuzz=0 I/KeyInputQueue( 132): Pressure: min=0 max=255 flat=0 fuzz=0 I/KeyInputQueue( 132): Size: min=0 max=15 flat=0 fuzz=0 I/KeyInputQueue( 132): Device added: id=0x10002, name=null, classes=8 I/KeyInputQueue( 132): Device added: id=0x0, name=trout-keypad-v3, classes=3 I/KeyInputQueue( 132): Device added: id=0x1, name=null, classes=0 I/SystemServer( 132): Starting Clipboard Service. I/SystemServer( 132): Starting Input Method Service. W/ResourceType( 132): No package identifier when getting value for resource number 0x7f060001 I/InputManagerService( 132): Enabled input methods: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): Unknown input method from prefs: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): java.lang.IllegalArgumentException: Unknown id: null W/InputManagerService( 132): at com.android.server.InputMethodManagerService.setInputMethodLocked (InputMethodManagerService.java:919) W/InputManagerService( 132): at com.android.server.InputMethodManagerService.updateFromSettingsLocked (InputMethodManagerService.java:903) W/InputManagerService( 132): at com.android.server.InputMethodManagerService.init (InputMethodManagerService.java:492) W/InputManagerService( 132): at com.android.server.ServerThread.run (SystemServer.java:209) I/SystemServer( 132): Starting NetStat Service. I/SystemServer( 132): Starting Connectivity Service. I/WifiService( 132): WifiService starting up with Wi-Fi enabled I/SystemServer( 132): Starting Notification Manager. I/SystemServer( 132): Starting Mount Service. I/SystemServer( 132): Starting DeviceStorageMonitor service I/SystemServer( 132): Starting Location Manager. V/WifiStateTracker( 132): Connection to supplicant established, state=COMPLETED W/BluetoothHeadset( 132): Proxy not attached to service D/WifiStateTracker( 132): DhcpHandler: DHCP request started I/SystemServer( 132): Starting Search Service. I/SystemServer( 132): Starting Checkin Service. I/SystemServer( 132): Starting Wallpaper Service D/WallpaperService( 132): WallpaperService startup I/SystemServer( 132):
[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...
oh by the way in case you are wondering, I am using the offical cupcake OTA update, NOT any modified rom On May 25, 7:12 am, zl25drexel zl25dre...@gmail.com wrote: Hey guys, you need to look into this, this morning I downloaded a soft keyboard (a Russian keyboard) from the market, disabled the build-in keyboard and enabled it in locale setting. Then without disabling it, I uninstall the keyboard using the uninstall button in market. Then my phone started to force closes over and over, looked at the logs, clearly the input method is crashing because it couldnt find the keyboard anymore, so I long pressed the power button and chose power off and rebooted the phone, the phone will NOT boot any more I was able to recover it by popping the battery and then hold Home button when powering on to get into recovery mode and did a alt-W to wipe the phone clear and started over. Now imagine someone dont know how to do that would think about the system. Even I recovered it, it's still a pain in the butt to setup everything again. See the logs below, YOU GOT TO FIX THIS W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library I/SystemServer( 132): Starting Alarm Manager. I/SystemServer( 132): Starting Sensor Service. I/SystemServer( 132): Starting Window Manager. I/EventHub( 132): New device: path=/dev/input/event4 name=compass id=0x1 (of 0x1) index=1 fd=50 classes=0x0 D/SensorManager( 132): found sensor: AK8976A 3-axis Accelerometer, handle=0 D/SensorManager( 132): found sensor: AK8976A 3-axis Magnetic field sensor, handle=1 D/SensorManager( 132): found sensor: AK8976A Orientation sensor, handle=2 D/SensorManager( 132): found sensor: AK8976A Temperature sensor, handle=3 I/EventHub( 132): New device: path=/dev/input/event3 name=trout- keypad-v3 id=0x10001 (of 0x2) index=2 fd=51 classes=0x3 I/EventHub( 132): New keyboard: publicID=0 device-id=65537 devname='trout-keypad-v3' propName='hw.keyboards.0.devname' keylayout='/system/usr/keylayout/trout-keypad-v3.kl' I/SystemServer( 132): Starting Bluetooth Service. I/EventHub( 132): New device: path=/dev/input/event2 name=trout-nav id=0x10002 (of 0x3) index=3 fd=53 classes=0x8 I/EventHub( 132): New device: path=/dev/input/event1 name=synaptics- rmi-touchscreen id=0x10003 (of 0x4) index=4 fd=55 classes=0x4 I/SystemServer( 132): Starting Status Bar Service. I/EventHub( 132): New device: path=/dev/input/event0 name=h2w headset id=0x10004 (of 0x5) index=5 fd=56 classes=0x1 I/EventHub( 132): New keyboard: publicID=65540 device-id=65540 devname='h2w headset' propName='hw.keyboards.65540.devname' keylayout='/system/usr/keylayout/h2w_headset.kl' I/KeyInputQueue( 132): Device added: id=0x10004, name=h2w headset, classes=1 I/KeyInputQueue( 132): Device added: id=0x10003, name=null, classes=4 I/KeyInputQueue( 132): X: min=80 max=3400 flat=0 fuzz=0 I/KeyInputQueue( 132): Y: min=32 max=5336 flat=0 fuzz=0 I/KeyInputQueue( 132): Pressure: min=0 max=255 flat=0 fuzz=0 I/KeyInputQueue( 132): Size: min=0 max=15 flat=0 fuzz=0 I/KeyInputQueue( 132): Device added: id=0x10002, name=null, classes=8 I/KeyInputQueue( 132): Device added: id=0x0, name=trout-keypad-v3, classes=3 I/KeyInputQueue( 132): Device added: id=0x1, name=null, classes=0 I/SystemServer( 132): Starting Clipboard Service. I/SystemServer( 132): Starting Input Method Service. W/ResourceType( 132): No package identifier when getting value for resource number 0x7f060001 I/InputManagerService( 132): Enabled input methods: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): Unknown input method from prefs: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): java.lang.IllegalArgumentException: Unknown id: null W/InputManagerService( 132): at com.android.server.InputMethodManagerService.setInputMethodLocked (InputMethodManagerService.java:919) W/InputManagerService( 132): at com.android.server.InputMethodManagerService.updateFromSettingsLocked (InputMethodManagerService.java:903) W/InputManagerService( 132): at com.android.server.InputMethodManagerService.init (InputMethodManagerService.java:492) W/InputManagerService( 132): at com.android.server.ServerThread.run (SystemServer.java:209) I/SystemServer( 132): Starting NetStat Service. I/SystemServer( 132): Starting Connectivity Service. I/WifiService( 132): WifiService starting up with Wi-Fi enabled I/SystemServer( 132): Starting Notification Manager. I/SystemServer( 132): Starting Mount Service. I/SystemServer( 132): Starting DeviceStorageMonitor service I/SystemServer( 132): Starting Location Manager. V/WifiStateTracker( 132): Connection to supplicant established, state=COMPLETED W/BluetoothHeadset( 132): Proxy not attached to service D/WifiStateTracker( 132):
[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...
Granted, something looks really weird here. But please do not say the phone was bricked when it was not. You can also boot in safe mode by holding Menu during the boot sequence and use the safe mode to clear data/uninstall apps. On Mon, May 25, 2009 at 4:15 AM, AndroidApp zl25dre...@gmail.com wrote: oh by the way in case you are wondering, I am using the offical cupcake OTA update, NOT any modified rom On May 25, 7:12 am, zl25drexel zl25dre...@gmail.com wrote: Hey guys, you need to look into this, this morning I downloaded a soft keyboard (a Russian keyboard) from the market, disabled the build-in keyboard and enabled it in locale setting. Then without disabling it, I uninstall the keyboard using the uninstall button in market. Then my phone started to force closes over and over, looked at the logs, clearly the input method is crashing because it couldnt find the keyboard anymore, so I long pressed the power button and chose power off and rebooted the phone, the phone will NOT boot any more I was able to recover it by popping the battery and then hold Home button when powering on to get into recovery mode and did a alt-W to wipe the phone clear and started over. Now imagine someone dont know how to do that would think about the system. Even I recovered it, it's still a pain in the butt to setup everything again. See the logs below, YOU GOT TO FIX THIS W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library I/SystemServer( 132): Starting Alarm Manager. I/SystemServer( 132): Starting Sensor Service. I/SystemServer( 132): Starting Window Manager. I/EventHub( 132): New device: path=/dev/input/event4 name=compass id=0x1 (of 0x1) index=1 fd=50 classes=0x0 D/SensorManager( 132): found sensor: AK8976A 3-axis Accelerometer, handle=0 D/SensorManager( 132): found sensor: AK8976A 3-axis Magnetic field sensor, handle=1 D/SensorManager( 132): found sensor: AK8976A Orientation sensor, handle=2 D/SensorManager( 132): found sensor: AK8976A Temperature sensor, handle=3 I/EventHub( 132): New device: path=/dev/input/event3 name=trout- keypad-v3 id=0x10001 (of 0x2) index=2 fd=51 classes=0x3 I/EventHub( 132): New keyboard: publicID=0 device-id=65537 devname='trout-keypad-v3' propName='hw.keyboards.0.devname' keylayout='/system/usr/keylayout/trout-keypad-v3.kl' I/SystemServer( 132): Starting Bluetooth Service. I/EventHub( 132): New device: path=/dev/input/event2 name=trout-nav id=0x10002 (of 0x3) index=3 fd=53 classes=0x8 I/EventHub( 132): New device: path=/dev/input/event1 name=synaptics- rmi-touchscreen id=0x10003 (of 0x4) index=4 fd=55 classes=0x4 I/SystemServer( 132): Starting Status Bar Service. I/EventHub( 132): New device: path=/dev/input/event0 name=h2w headset id=0x10004 (of 0x5) index=5 fd=56 classes=0x1 I/EventHub( 132): New keyboard: publicID=65540 device-id=65540 devname='h2w headset' propName='hw.keyboards.65540.devname' keylayout='/system/usr/keylayout/h2w_headset.kl' I/KeyInputQueue( 132): Device added: id=0x10004, name=h2w headset, classes=1 I/KeyInputQueue( 132): Device added: id=0x10003, name=null, classes=4 I/KeyInputQueue( 132): X: min=80 max=3400 flat=0 fuzz=0 I/KeyInputQueue( 132): Y: min=32 max=5336 flat=0 fuzz=0 I/KeyInputQueue( 132): Pressure: min=0 max=255 flat=0 fuzz=0 I/KeyInputQueue( 132): Size: min=0 max=15 flat=0 fuzz=0 I/KeyInputQueue( 132): Device added: id=0x10002, name=null, classes=8 I/KeyInputQueue( 132): Device added: id=0x0, name=trout-keypad-v3, classes=3 I/KeyInputQueue( 132): Device added: id=0x1, name=null, classes=0 I/SystemServer( 132): Starting Clipboard Service. I/SystemServer( 132): Starting Input Method Service. W/ResourceType( 132): No package identifier when getting value for resource number 0x7f060001 I/InputManagerService( 132): Enabled input methods: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): Unknown input method from prefs: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): java.lang.IllegalArgumentException: Unknown id: null W/InputManagerService( 132): at com.android.server.InputMethodManagerService.setInputMethodLocked (InputMethodManagerService.java:919) W/InputManagerService( 132): at com.android.server.InputMethodManagerService.updateFromSettingsLocked (InputMethodManagerService.java:903) W/InputManagerService( 132): at com.android.server.InputMethodManagerService.init (InputMethodManagerService.java:492) W/InputManagerService( 132): at com.android.server.ServerThread.run (SystemServer.java:209) I/SystemServer( 132): Starting NetStat Service. I/SystemServer( 132): Starting Connectivity Service. I/WifiService( 132): WifiService starting up with Wi-Fi enabled I/SystemServer( 132): Starting Notification Manager. I/SystemServer( 132):
[android-developers] Re: Using PhoneState Listener and Services
I just quite don't understand how to use the two... This is what I have so far, am I even on the right track? And I do appreciate the response... import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.IBinder; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; public class incomingCallService extends Service { @Override public void onCreate() { //Actions to do when Service is created } @Override public IBinder onBind(Intent intent) { //Replace with service binding implementation. return null; } @Override public void onStart(Intent intent, int StartId) { String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager) getSystemService(srvcName); } public class PhoneListener extends PhoneStateListener { } } On May 25, 3:01 am, Mark Murphy mmur...@commonsware.com wrote: GT wrote: Does anybody have an example of using the PhoneState Listener while running a service? I've been having problems having a PhoneState Listener inside of the service. I don't have an example I can publish, but it definitely works. What specifically has been your issue? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...
Lol, I didnt expect to get a response this quickly. Romain you are up early (assuming you are still at the west coast) :-) Yes it was a little dramatic, but I was just pretending to be an ignorant user and tell you what someone dont know anything about safe mode and recovery mode would think. The very first I tried was safe mode, I dont think it worked, that's why I did a full wipe. Judging from the log, I dont think safe mode is going to help because the error came from a system service. I know software has bugs, but you guys are google, I expect you jump on an issue and fix it before you go to bed :-) On May 25, 7:18 am, Romain Guy romain...@google.com wrote: Granted, something looks really weird here. But please do not say the phone was bricked when it was not. You can also boot in safe mode by holding Menu during the boot sequence and use the safe mode to clear data/uninstall apps. On Mon, May 25, 2009 at 4:15 AM, AndroidApp zl25dre...@gmail.com wrote: oh by the way in case you are wondering, I am using the offical cupcake OTA update, NOT any modified rom On May 25, 7:12 am, zl25drexel zl25dre...@gmail.com wrote: Hey guys, you need to look into this, this morning I downloaded a soft keyboard (a Russian keyboard) from the market, disabled the build-in keyboard and enabled it in locale setting. Then without disabling it, I uninstall the keyboard using the uninstall button in market. Then my phone started to force closes over and over, looked at the logs, clearly the input method is crashing because it couldnt find the keyboard anymore, so I long pressed the power button and chose power off and rebooted the phone, the phone will NOT boot any more I was able to recover it by popping the battery and then hold Home button when powering on to get into recovery mode and did a alt-W to wipe the phone clear and started over. Now imagine someone dont know how to do that would think about the system. Even I recovered it, it's still a pain in the butt to setup everything again. See the logs below, YOU GOT TO FIX THIS W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library I/SystemServer( 132): Starting Alarm Manager. I/SystemServer( 132): Starting Sensor Service. I/SystemServer( 132): Starting Window Manager. I/EventHub( 132): New device: path=/dev/input/event4 name=compass id=0x1 (of 0x1) index=1 fd=50 classes=0x0 D/SensorManager( 132): found sensor: AK8976A 3-axis Accelerometer, handle=0 D/SensorManager( 132): found sensor: AK8976A 3-axis Magnetic field sensor, handle=1 D/SensorManager( 132): found sensor: AK8976A Orientation sensor, handle=2 D/SensorManager( 132): found sensor: AK8976A Temperature sensor, handle=3 I/EventHub( 132): New device: path=/dev/input/event3 name=trout- keypad-v3 id=0x10001 (of 0x2) index=2 fd=51 classes=0x3 I/EventHub( 132): New keyboard: publicID=0 device-id=65537 devname='trout-keypad-v3' propName='hw.keyboards.0.devname' keylayout='/system/usr/keylayout/trout-keypad-v3.kl' I/SystemServer( 132): Starting Bluetooth Service. I/EventHub( 132): New device: path=/dev/input/event2 name=trout-nav id=0x10002 (of 0x3) index=3 fd=53 classes=0x8 I/EventHub( 132): New device: path=/dev/input/event1 name=synaptics- rmi-touchscreen id=0x10003 (of 0x4) index=4 fd=55 classes=0x4 I/SystemServer( 132): Starting Status Bar Service. I/EventHub( 132): New device: path=/dev/input/event0 name=h2w headset id=0x10004 (of 0x5) index=5 fd=56 classes=0x1 I/EventHub( 132): New keyboard: publicID=65540 device-id=65540 devname='h2w headset' propName='hw.keyboards.65540.devname' keylayout='/system/usr/keylayout/h2w_headset.kl' I/KeyInputQueue( 132): Device added: id=0x10004, name=h2w headset, classes=1 I/KeyInputQueue( 132): Device added: id=0x10003, name=null, classes=4 I/KeyInputQueue( 132): X: min=80 max=3400 flat=0 fuzz=0 I/KeyInputQueue( 132): Y: min=32 max=5336 flat=0 fuzz=0 I/KeyInputQueue( 132): Pressure: min=0 max=255 flat=0 fuzz=0 I/KeyInputQueue( 132): Size: min=0 max=15 flat=0 fuzz=0 I/KeyInputQueue( 132): Device added: id=0x10002, name=null, classes=8 I/KeyInputQueue( 132): Device added: id=0x0, name=trout-keypad-v3, classes=3 I/KeyInputQueue( 132): Device added: id=0x1, name=null, classes=0 I/SystemServer( 132): Starting Clipboard Service. I/SystemServer( 132): Starting Input Method Service. W/ResourceType( 132): No package identifier when getting value for resource number 0x7f060001 I/InputManagerService( 132): Enabled input methods: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): Unknown input method from prefs: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): java.lang.IllegalArgumentException: Unknown id: null
[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...
oh another thought, how about defaulting to safe mode if the boot wont finish for a couple time? Or show the safe mode option like windows do when the system was not shut down cleanly? You know there are a lot of people do not know about safe mode and recovery mode that are using the phone. On May 25, 7:18 am, Romain Guy romain...@google.com wrote: Granted, something looks really weird here. But please do not say the phone was bricked when it was not. You can also boot in safe mode by holding Menu during the boot sequence and use the safe mode to clear data/uninstall apps. On Mon, May 25, 2009 at 4:15 AM, AndroidApp zl25dre...@gmail.com wrote: oh by the way in case you are wondering, I am using the offical cupcake OTA update, NOT any modified rom On May 25, 7:12 am, zl25drexel zl25dre...@gmail.com wrote: Hey guys, you need to look into this, this morning I downloaded a soft keyboard (a Russian keyboard) from the market, disabled the build-in keyboard and enabled it in locale setting. Then without disabling it, I uninstall the keyboard using the uninstall button in market. Then my phone started to force closes over and over, looked at the logs, clearly the input method is crashing because it couldnt find the keyboard anymore, so I long pressed the power button and chose power off and rebooted the phone, the phone will NOT boot any more I was able to recover it by popping the battery and then hold Home button when powering on to get into recovery mode and did a alt-W to wipe the phone clear and started over. Now imagine someone dont know how to do that would think about the system. Even I recovered it, it's still a pain in the butt to setup everything again. See the logs below, YOU GOT TO FIX THIS W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library I/SystemServer( 132): Starting Alarm Manager. I/SystemServer( 132): Starting Sensor Service. I/SystemServer( 132): Starting Window Manager. I/EventHub( 132): New device: path=/dev/input/event4 name=compass id=0x1 (of 0x1) index=1 fd=50 classes=0x0 D/SensorManager( 132): found sensor: AK8976A 3-axis Accelerometer, handle=0 D/SensorManager( 132): found sensor: AK8976A 3-axis Magnetic field sensor, handle=1 D/SensorManager( 132): found sensor: AK8976A Orientation sensor, handle=2 D/SensorManager( 132): found sensor: AK8976A Temperature sensor, handle=3 I/EventHub( 132): New device: path=/dev/input/event3 name=trout- keypad-v3 id=0x10001 (of 0x2) index=2 fd=51 classes=0x3 I/EventHub( 132): New keyboard: publicID=0 device-id=65537 devname='trout-keypad-v3' propName='hw.keyboards.0.devname' keylayout='/system/usr/keylayout/trout-keypad-v3.kl' I/SystemServer( 132): Starting Bluetooth Service. I/EventHub( 132): New device: path=/dev/input/event2 name=trout-nav id=0x10002 (of 0x3) index=3 fd=53 classes=0x8 I/EventHub( 132): New device: path=/dev/input/event1 name=synaptics- rmi-touchscreen id=0x10003 (of 0x4) index=4 fd=55 classes=0x4 I/SystemServer( 132): Starting Status Bar Service. I/EventHub( 132): New device: path=/dev/input/event0 name=h2w headset id=0x10004 (of 0x5) index=5 fd=56 classes=0x1 I/EventHub( 132): New keyboard: publicID=65540 device-id=65540 devname='h2w headset' propName='hw.keyboards.65540.devname' keylayout='/system/usr/keylayout/h2w_headset.kl' I/KeyInputQueue( 132): Device added: id=0x10004, name=h2w headset, classes=1 I/KeyInputQueue( 132): Device added: id=0x10003, name=null, classes=4 I/KeyInputQueue( 132): X: min=80 max=3400 flat=0 fuzz=0 I/KeyInputQueue( 132): Y: min=32 max=5336 flat=0 fuzz=0 I/KeyInputQueue( 132): Pressure: min=0 max=255 flat=0 fuzz=0 I/KeyInputQueue( 132): Size: min=0 max=15 flat=0 fuzz=0 I/KeyInputQueue( 132): Device added: id=0x10002, name=null, classes=8 I/KeyInputQueue( 132): Device added: id=0x0, name=trout-keypad-v3, classes=3 I/KeyInputQueue( 132): Device added: id=0x1, name=null, classes=0 I/SystemServer( 132): Starting Clipboard Service. I/SystemServer( 132): Starting Input Method Service. W/ResourceType( 132): No package identifier when getting value for resource number 0x7f060001 I/InputManagerService( 132): Enabled input methods: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): Unknown input method from prefs: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): java.lang.IllegalArgumentException: Unknown id: null W/InputManagerService( 132): at com.android.server.InputMethodManagerService.setInputMethodLocked (InputMethodManagerService.java:919) W/InputManagerService( 132): at com.android.server.InputMethodManagerService.updateFromSettingsLocked (InputMethodManagerService.java:903) W/InputManagerService( 132): at
[android-developers] Problem SetKeyListener Virtual Keyboard
Hi, I have an Input in a Dialog and when I invoke SetkeyListener the Virtual Keyboard does not appear? With the hardware keyboard not Prob. What can I do that the Virtual keyboard also appear with seKeyListener Or how do i Make a accepted Chars with the virtual keyboard? dapikeyfield.setKeyListener(new NumberKeyListener() { private static final String CHARS= abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ; @Override protected char[] getAcceptedChars() { return(CHARS.toCharArray ()); } public int getInputType() { // TODO Auto-generated method stub return 0;} }); Hope there is a solution with the code above and I do not need a extra keylistener for the virtual keyboard and even checking if the virtual keyboard is active thanks 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] Re: Bluetooth and Serial Port Profile
Nick Pelly wrote: 2009/5/20 moa mich...@jixel.com: What is the process for it becoming available on real devices? If an SDK update is released that supports SPP or RFCOMM. Does that mean applications compiled on that SDK will run on current cupcake devices (like the Magic) without any new firmware on the phone? Or once new BT support is added to the SDK does that mean new firmware on the phone to be compatible? New firmware would be required. For the record: Early access to such a firmware would be *MUCH* appreciated. Our installments often have several months lead time, so being able to show a working prototype long before it being officially available could make a lot of decision makers very happy to go the Android route rather than the more typical Nokia route for the whole installation. Best / Jonas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Bluetooth and Serial Port Profile
Jonas Petersson wrote: For the record: Early access to such a firmware would be *MUCH* appreciated. Code changes of the sort you are seeking should show up in http://source.android.com. Your bigger challenge is in knowing when the feature is sufficiently done that it is worthwhile testing out. Since you are seeking Bluetooth, and the emulator does not emulate Bluetooth AFAIK, you would be needing the source code anyway in order to create a firmware image for your prototype hardware device. Or, wait until an official shipping Android has those capabilities. For example, if somebody contributed patches now, they could presumably be included in Android 2.0 (or whatever the next major release winds up being called). BTW, discussion about the source code itself is best held in a discussion list pertaining to the source code: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 0.95 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: Using PhoneState Listener and Services
GT wrote: I just quite don't understand how to use the two... This is what I have so far, am I even on the right track? And I do appreciate the response... snip @Override public void onStart(Intent intent, int StartId) { String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager) getSystemService(srvcName); } Depending on how you are using your service, you may want to get your TelephonyManager and use it in onCreate(). onStart() can be called several times; onCreate() is only called once before a corresponding onDestroy(). If you only need one listener for the service -- and you should only need one -- I'd register it via TelephonyManager#listen() on onCreate() and release it in onDestroy(). public class PhoneListener extends PhoneStateListener { } You could use a few methods here, but I suspect you realize that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
Hi guys, i'm using the foll code snippet in my program to display the user's phone number... TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); phNoText.setText(You are : + tm.getLine1Number()); i'm getting a no in the emulator... but when i try runnin on the G1 it always returns a null string... am i doin something wrong or is it bec G1 doesnt give my app the phno??? -- Regards, Sujay Mitch Hedberghttp://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html - My fake plants died because I did not pretend to water 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: Assistance with large datasets
Although I am not sure about the object itself, AFAIK a single SQL statement is atomic, so your database itself will hopefully never lock. If the object accessing it is not thread safe, I could see that locking, but as Mark mentioned, I think getting a new SQLiteDatabase is relatively 'cheap'. I know that's not exactly what you were looking for, but it's my two cents Hamy On May 24, 9:07 am, Matt Williams m...@makeable.co.uk wrote: I'd reverse the question: if you aren't exposing the data to other applications, what are you *gaining* by using ContentProvider? If you want a model class to hide your database internals, you can roll one of those without ContentProvider. There are 2 reasons why I had decided on a content provider Confusion over the Application model. Traditionally, I would have initialized my database as part of the main applications startup process, but from the code examples I've seen people seemed to be doing it all on a per activity basis, which just seemed like repeating myself. Lack of knowledge of thread-safe access to the database. I'm using a few threads that may attempt concurrent writes on the database. There doesn't seem to be any documentation on whether SQLDatabase its thread-safe or not, whereas I just assumed a ContentProvider would be. If I was to instantiate the database in the Application as a static singleton, am I correct in assuming that I would only need to set the method that queries the database to synchronized? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
Sujay Krishna Suresh wrote: Hi guys, i'm using the foll code snippet in my program to display the user's phone number... TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); phNoText.setText(You are : + tm.getLine1Number()); i'm getting a no in the emulator... but when i try runnin on the G1 it always returns a null string... am i doin something wrong or is it bec G1 doesnt give my app the phno??? That technique is unreliable, at least through Android 1.1. On my G1, for example, getLine1Number() returns the phone number that my SIM was originally set for, before I ported an existing mobile number over to my account. Others have reported null values. My assumption is that this is a SIM-specific issue. I am not aware of a perfect solution to get the device's true phone number. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...
just tried to reproduce it by installing and uinstalling keyboard, that didnt crash the phone, so it looks like it's a widget service problem. On May 25, 7:42 am, AndroidApp zl25dre...@gmail.com wrote: oh another thought, how about defaulting to safe mode if the boot wont finish for a couple time? Or show the safe mode option like windows do when the system was not shut down cleanly? You know there are a lot of people do not know about safe mode and recovery mode that are using the phone. On May 25, 7:18 am, Romain Guy romain...@google.com wrote: Granted, something looks really weird here. But please do not say the phone was bricked when it was not. You can also boot in safe mode by holding Menu during the boot sequence and use the safe mode to clear data/uninstall apps. On Mon, May 25, 2009 at 4:15 AM, AndroidApp zl25dre...@gmail.com wrote: oh by the way in case you are wondering, I am using the offical cupcake OTA update, NOT any modified rom On May 25, 7:12 am, zl25drexel zl25dre...@gmail.com wrote: Hey guys, you need to look into this, this morning I downloaded a soft keyboard (a Russian keyboard) from the market, disabled the build-in keyboard and enabled it in locale setting. Then without disabling it, I uninstall the keyboard using the uninstall button in market. Then my phone started to force closes over and over, looked at the logs, clearly the input method is crashing because it couldnt find the keyboard anymore, so I long pressed the power button and chose power off and rebooted the phone, the phone will NOT boot any more I was able to recover it by popping the battery and then hold Home button when powering on to get into recovery mode and did a alt-W to wipe the phone clear and started over. Now imagine someone dont know how to do that would think about the system. Even I recovered it, it's still a pain in the butt to setup everything again. See the logs below, YOU GOT TO FIX THIS W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library W/HAL ( 132): load: module=/system/lib/hw/lights.trout.so error=Cannot find library I/SystemServer( 132): Starting Alarm Manager. I/SystemServer( 132): Starting Sensor Service. I/SystemServer( 132): Starting Window Manager. I/EventHub( 132): New device: path=/dev/input/event4 name=compass id=0x1 (of 0x1) index=1 fd=50 classes=0x0 D/SensorManager( 132): found sensor: AK8976A 3-axis Accelerometer, handle=0 D/SensorManager( 132): found sensor: AK8976A 3-axis Magnetic field sensor, handle=1 D/SensorManager( 132): found sensor: AK8976A Orientation sensor, handle=2 D/SensorManager( 132): found sensor: AK8976A Temperature sensor, handle=3 I/EventHub( 132): New device: path=/dev/input/event3 name=trout- keypad-v3 id=0x10001 (of 0x2) index=2 fd=51 classes=0x3 I/EventHub( 132): New keyboard: publicID=0 device-id=65537 devname='trout-keypad-v3' propName='hw.keyboards.0.devname' keylayout='/system/usr/keylayout/trout-keypad-v3.kl' I/SystemServer( 132): Starting Bluetooth Service. I/EventHub( 132): New device: path=/dev/input/event2 name=trout-nav id=0x10002 (of 0x3) index=3 fd=53 classes=0x8 I/EventHub( 132): New device: path=/dev/input/event1 name=synaptics- rmi-touchscreen id=0x10003 (of 0x4) index=4 fd=55 classes=0x4 I/SystemServer( 132): Starting Status Bar Service. I/EventHub( 132): New device: path=/dev/input/event0 name=h2w headset id=0x10004 (of 0x5) index=5 fd=56 classes=0x1 I/EventHub( 132): New keyboard: publicID=65540 device-id=65540 devname='h2w headset' propName='hw.keyboards.65540.devname' keylayout='/system/usr/keylayout/h2w_headset.kl' I/KeyInputQueue( 132): Device added: id=0x10004, name=h2w headset, classes=1 I/KeyInputQueue( 132): Device added: id=0x10003, name=null, classes=4 I/KeyInputQueue( 132): X: min=80 max=3400 flat=0 fuzz=0 I/KeyInputQueue( 132): Y: min=32 max=5336 flat=0 fuzz=0 I/KeyInputQueue( 132): Pressure: min=0 max=255 flat=0 fuzz=0 I/KeyInputQueue( 132): Size: min=0 max=15 flat=0 fuzz=0 I/KeyInputQueue( 132): Device added: id=0x10002, name=null, classes=8 I/KeyInputQueue( 132): Device added: id=0x0, name=trout-keypad-v3, classes=3 I/KeyInputQueue( 132): Device added: id=0x1, name=null, classes=0 I/SystemServer( 132): Starting Clipboard Service. I/SystemServer( 132): Starting Input Method Service. W/ResourceType( 132): No package identifier when getting value for resource number 0x7f060001 I/InputManagerService( 132): Enabled input methods: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): Unknown input method from prefs: com.codesector.russian.keyboard/.SoftKeyboard W/InputManagerService( 132): java.lang.IllegalArgumentException: Unknown id: null W/InputManagerService( 132): at
[android-developers] Re: My good god, bugs in Android brick phone, and it's not difficult to reproduce...
AndroidApp wrote: just tried to reproduce it by installing and uinstalling keyboard, that didnt crash the phone, so it looks like it's a widget service problem. That was my interpretation from your posted stack trace. Did you have any widgets on your home screen beyond the standard ones? If you wish, post the stack trace over on http://b.android.com, so it doesn't get lost. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
Thanks a lot for the fast response mark... but i think its not associated with the sim bec i tried this with abt 10 diff sim cards i'm wasting a lot of money for this... i'd like to no wats goin wrong... is there any mechanism to check whether my sim cards r rejecting the call??? -- Regards, Sujay Walt Disney http://www.brainyquote.com/quotes/authors/w/walt_disney.html - I love Mickey Mouse more than any woman I have ever known. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Always-showing view among activities
Any idea? Taísa On Thu, May 21, 2009 at 10:21 AM, Taísa Cristina taisa.san...@gmail.comwrote: Hi all! Is there a way to have a view always-showing between activities? I say, I need a button to be always appearing on the bottom of the screen. I could get it working with an ActivityGroup, but I got a problem. My application can work with more than one level of activities, or rather, Activity A can start acitivity B that can start Activity C, all them with the button showing in the bottom. When I press Back, I need activity C to finish and the focus to go back to B, but as I'm using an ActivityGroup, it does not work. Is there another way to do that? Thanks, Taísa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 SetKeyListener Virtual Keyboard
You might want to read this post for more info how the IME works. http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html You shouldn't need the set a key listener. An editable text view should invoke the virtual keyboard for you when it received focus. If you want to interact with the current input method, you can query for the InputMethodManager. http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html You might also run into panning issue with accepting input in a dialog as describes in the thread below http://groups.google.com/group/android-developers/browse_thread/thread/7cfdf6e5acd2c229/ab38dc2e02cba903?lnk=gstq=dialog+keyboard#ab38dc2e02cba903 On May 25, 6:46 am, guruk ilovesi...@gmail.com wrote: Hi, I have an Input in a Dialog and when I invoke SetkeyListener the Virtual Keyboard does not appear? With the hardware keyboard not Prob. What can I do that the Virtual keyboard also appear with seKeyListener Or how do i Make a accepted Chars with the virtual keyboard? dapikeyfield.setKeyListener(new NumberKeyListener() { private static final String CHARS= abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ; �...@override protected char[] getAcceptedChars() { return(CHARS.toCharArray ()); } public int getInputType() { // TODO Auto-generated method stub return 0; } }); Hope there is a solution with the code above and I do not need a extra keylistener for the virtual keyboard and even checking if the virtual keyboard is active thanks 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] Re: Possible IMF issue for existing applications
Hi Tom, that works ok mPin.setKeyListener(DigitsKeyListener.getInstance(0123456789)); but I need ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ; it even works with the command above, but it starts the softkeyboard with the Numeric Field.(even i can choose to go to the alphabetic keyboad) How can i make my keylistener to my needs OR just say the softkeyboard should show the alphabetic Keyboard first! Thanks 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] knowing whether there is a good reception
Good morning, I'd like to do an app which draws a picture on the screen when the reception is ok, ok enough to make a call for instance and draws another picture when there is no reception at all. I used ServiceState : ServiceState mservicestate = new ServiceState(); int state = mservicestate.getState(); if(state == 1) reception.setImageResource(R.drawable.reseau); else reception.setImageResource(R.drawable.pas_reseau); But there is still an error message force to close. Can anyone explain to me how can this work ? 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: knowing whether there is a good reception
PI9 wrote: Good morning, I'd like to do an app which draws a picture on the screen when the reception is ok, ok enough to make a call for instance and draws another picture when there is no reception at all. I used ServiceState : ServiceState mservicestate = new ServiceState(); int state = mservicestate.getState(); if(state == 1) reception.setImageResource(R.drawable.reseau); else reception.setImageResource(R.drawable.pas_reseau); But there is still an error message force to close. Can anyone explain to me how can this work ? If you get a force-close dialog box, your Java stack trace should tell you where you are crashing. You can get the Java stack trace via adb logcat or DDMS. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: maps api and 1.5
Hi everybody, I'm getting the same problems. Of course I have read this thread and tried everything that was suggested (and some more), but it does not work. Here are the facts: * Using SDK 1.5_r1 * Project target in Eclipse is Google APIs 1.5 * AndroidManifest.xml contains uses-sdk android:minSdkVersion=3 / inside the manifest element * AndroidManifest.xml contains uses-library android:name=com.google.android.maps / inside the application element * maps.jar is NOT added manually to the buildpath, but is shown under Project - Google APIs - maps.jar * The maps key is setup properly (that is, worked before switching to 1.5) * code works when compiled againt the 1.1 API, but I need to compile for 1.5 because I want to provide a Widget. On the emulator (Firmware 1.5, google_sdk_eng 1.5 CUPCAKE 147336 test- keys, the one that comes with DSK 1.5_r1) I get this: 05-25 12:33:40.554: INFO/ActivityManager(568): Starting activity: Intent { comp={com.webxells.ourapp/.OurMapview} } 05-25 12:33:40.564: DEBUG/AndroidRuntime(819): Shutting down VM 05-25 12:33:40.564: WARN/dalvikvm(819): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 05-25 12:33:40.564: ERROR/AndroidRuntime(819): Uncaught handler: thread main exiting due to uncaught exception 05-25 12:33:40.584: ERROR/AndroidRuntime(819): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.webxells.ourapp/.OurMapview}; have you declared this activity in your AndroidManifest.xml? 05-25 12:33:40.584: ERROR/AndroidRuntime(819): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1480) 05-25 12:33:40.584: ERROR/AndroidRuntime(819): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1454) 05-25 12:33:40.584: ERROR/AndroidRuntime(819): at android.app.Activity.startActivityForResult(Activity.java:2656) 05-25 12:33:40.584: ERROR/AndroidRuntime(819): at android.app.Activity.startActivity(Activity.java:2700) 05-25 12:33:40.584: ERROR/AndroidRuntime(819): at com.webxells.ourapp.CommonUi.onOptionsItemSelected(CommonUi.java:64) 05-25 12:33:40.584: ERROR/AndroidRuntime(819): at com.webxells.ourapp.OurAppStart.onOptionsItemSelected(OurAppStart.java: 22) 05-25 12:33:40.584: ERROR/AndroidRuntime(819): at android.app.Activity.onMenuItemSelected(Activity.java:2085) ... some more... Of course, the activity is declared in the AndroidManifest.xml, and this declaration worked when compiling against the 1.1 API. And on a real device (HTC Dev Phone 1, Firmware 1.5, dream_devphone- userdebug 1.5 CRB21 147201 test-keys) I get another error, instead of the one above: 05-25 12:17:34.764: WARN/dalvikvm(691): Unable to resolve superclass of Lcom/webxells/ourapp/OurMapview; (100) 05-25 12:17:34.764: WARN/dalvikvm(691): Link of class 'Lcom/webxells/ ourapp/OurMapview;' failed 05-25 12:17:34.764: ERROR/dalvikvm(691): Could not find class 'com.webxells.ourapp.OurMapview', referenced from method com.webxells.ourapp.CommonUi.onOptionsItemSelected 05-25 12:17:34.764: WARN/dalvikvm(691): VFY: unable to resolve const- class 114 (Lcom/webxells/ourapp/OurMapview;) in Lcom/webxells/ourapp/ CommonUi; 05-25 12:17:34.764: WARN/dalvikvm(691): VFY: rejecting opcode 0x1c at 0x0045 05-25 12:17:34.764: WARN/dalvikvm(691): VFY: rejected Lcom/webxells/ ourapp/CommonUi;.onOptionsItemSelected (Landroid/view/ MenuItem;Landroid/app/Activity;)Z 05-25 12:17:34.764: WARN/dalvikvm(691): Verifier rejected class Lcom/ webxells/ourapp/CommonUi; 05-25 12:17:34.764: DEBUG/AndroidRuntime(691): Shutting down VM 05-25 12:17:34.764: WARN/dalvikvm(691): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 05-25 12:17:34.764: ERROR/AndroidRuntime(691): Uncaught handler: thread main exiting due to uncaught exception 05-25 12:17:34.784: ERROR/AndroidRuntime(691): java.lang.VerifyError: com.webxells.ourapp.CommonUi 05-25 12:17:34.784: ERROR/AndroidRuntime(691): at com.webxells.ourapp.ourappMain.onOptionsItemSelected(ourappMain.java: 36) 05-25 12:17:34.784: ERROR/AndroidRuntime(691): at android.app.Activity.onMenuItemSelected(Activity.java:2085) ... some more ... of course, the unknown superclass of OurMapview is com.google.android.maps.MapActivity. Don't get confused by the name OurMapview, it's an activity, not a view. While trying different targets and small changes in the manifest, I somehow managed to get it working on the emulator, but it never worked on the device. When I compiled for 1.1, it worked on the emulator and the device, though they were already running the 1.5 firmware. Any idea what else could be wrong? thanks, Brian On 21 Apr., 19:29, André Charles Legendre andre.legen...@gmail.com wrote: Hi Finally, my error was to leftmaps.jar in the classpath Now, this very simple Map app with 1.5 SDK launch good Thank for all the responses. It helps a lot. Andre --~--~-~--~~~---~--~~ You received this message because you are
[android-developers] Re: Always-showing view among activities
We'd be able to understand ur prob better if u could post ur code snippet that's responsible for this... -- Regards, Sujay Walt Disney http://www.brainyquote.com/quotes/authors/w/walt_disney.html - I love Mickey Mouse more than any woman I have ever known. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About screen unlock—help! !!
Oh,as a fact,I have tried for more than five times like this: Click endcall to lock screen,and then click menu to unlock screen. Just do this again and again,about more than sixty or seventy times,the exception: dalvikvm-heap 28900-byte external allocation too large for this process . VM won't let us allocate 28900 bytes.will be shown! That is to say,the exception is not caused by my activtiy! So,I wish there would be someone of Google's Developers could resolve this problem as quick as possible! Beacuse if the screen is locked,then my activity just have to hide the lock screen in order to display itself, and then before destroying,to redisplay the lock screen,and do this too much can cause the phone to reboot! It's terrible! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About screen unlock—help! !!
andrew wrote: But there have a problem,my activity will be keepped on calling by service, so this activity will do the thing:hiding and redisplaying the locked screen endless. This would seem to be a bug in your code. Fix this bug, and your problems will go away. Alternatively, provide us with a good justifiable reason why Android needs to support hiding and redisplaying the locked screen endless. After the activity being called thirty or much more times,an exception was thrown like this: dalvikmv-heap 28900-byte external allocation too large for this process . VM won't let us allocate 28900 bytes. This means either the keyguard ran out of memory or at least had enough heap fragmentation that it could not allocate the requested amount. Oh,as a fact,I have tried for more than five times like this: Click endcall to lock screen,and then click menu to unlock screen. Just do this again and again,about more than sixty or seventy times,the exception: dalvikvm-heap 28900-byte external allocation too large for this process . VM won't let us allocate 28900 bytes.will be shown! That is to say,the exception is not caused by my activtiy! No, but it *is* caused by unexpected input. While there is probably a bug here that should get fixed, most users will not attempt to lock and unlock their device sixty or seventy times in succession. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem SetKeyListener Virtual Keyboard
ok, maybe i can without keylistener. but when i add in my layout xml for the editText android:inputType=textPhonetic or anything else it always allow also 1234... but I jus need the alphabet ABCD...abcde and Space?? hope anyone know greets 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] Re: google calendar in g1
Hi, Petreman 1. Enter 'tools' in the the SDK directory. In 'tools' folder, there exists commands like 'adb', 'fastboot' etc. You can search, because there are different directory tree of different release. 2. type ' adb install -r THE_CALENDAR_APK_ABSOLUTE_PATH' Then it would be fine. BR Shawn On May 15, 4:24 am, Peterman pserr...@gmail.com wrote: Hi to all I would like test androidcalendarapplication of g1 emulator (android sdk). Anybodys knows how to install this program in a emulator? In a physical device is installed but not in a emulator... 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: where is APN setting stored in emulator/device?
mbaroukh once told me, maybe helpful: From: mbaroukh mike.baro...@gmail.com Date: Fri, 8 May 2009 10:30:16 -0700 (PDT) Local: Sat, May 9 2009 1:30 am yes. I need to do this to retrieve current apn proxy. Her is how I did it : Cursor mCursor = getContentResolver().query(Uri.parse(content:// telephony/carriers), new String[] {name}, current=1, null, null); if (mCursor!=null) { try { if (mCursor.moveToFirst()) { String name = mCursor.getString(0); .. do what ever you wan't with it ... } } } finally { mCursor.close(); } } So, as you see, it's where clause current=1 that select the current apn. Fields you can retrieve can be found in com.android.providers.telephony.TelephonyProvider : db.execSQL(CREATE TABLE + CARRIERS_TABLE + (_id INTEGER PRIMARY KEY, + name TEXT, + numeric TEXT, + mcc TEXT, + mnc TEXT, + apn TEXT, + user TEXT, + server TEXT, + password TEXT, + proxy TEXT, + port TEXT, + mmsproxy TEXT, + mmsport TEXT, + mmsc TEXT, + type TEXT, + current INTEGER);); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Repeat Events in Calendar
Hi, Farida I forgot what P meas in P300S, but I surely know that S means seconds. Then, if the 'duration' field is P300S, it means that event would last for 5 minutes, that's 300 seconds. If it is an hour, it would be P3600S BR Shawn On May 21, 8:58 pm, farida mailfaridak...@gmail.com wrote: If we add a repeat event in thecalendar, we are unable to get the end day till when the event shall last. There is field duration in the events table in the database which gives us an encoded format string like P300S for repititive events. We are unable to decode as to what this string will mean. Can any body help us with this Query? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SoftKeyboard ONLY with ABCDE....
Hi, i really dont find a solution how I can tell the SoftKeyboard to accept only ABCDE abcde... and space. Its easy in the layout xml to say only numeric=integer or so but... how to make only LETTERS?? thanks Chis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ACTION_SCREEN_OFF no longer detectable in cupcake 1.5
Hey, Code below stopped working in 1.5 : IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_SCREEN_OFF); registerReceiver( mySleepModeDetector, filter); // 1.5: mySleepModeDetector not called when screen turned off ACTION_SCREEN_ON, btw, works just fine . GiladH --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Webview + self signed ssl cert
The server and url in question is private and no one apart from myself will ever use it. Personally, I can't see the point of getting a proper signed certificate for this. Well, read the link I sent. If you're using encryption, presumably you're worried about somebody attempting to snoop your traffic. If you're worried about that, then self-signed certificates are something to avoid, unless you can hard code the certificate in your app then check it against what the WebView received, but i'm not sure there's an API for that. If you're not worried about MITM attacks then you don't need encryption (bear in mind 3G is already encrypted). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About screen unlock—help! !!
No, but it *is* caused by unexpected input. While there is probably a bug here that should get fixed, most users will not attempt tolockand unlock their device sixty or seventy times in succession. Thanks for your answer! I known the users may not attempt to lock and unlock their device like this, and as now,maybe no other people known it has this problem except me! But that is to say,there mybe a bug,why and what caused the exception: dalvikvm-heap 28900-byte external allocation too large for this process . VM won't let us allocate 28900 bytes. If I do other things like this one hundred or even more,nothing will happen! And only doing lock and unlock sixty or seventy times is a simply way for testing,in order to find wether the exception is caused by my application,or it is the API BUG. I have to do other things rather than lock and anlock the screen, in this condition,maybe the phone will reboot only do this less than ten times. So,I hope it can be resolved,and want to know the reason too. And due to this problem it has now,I have to try other way to avoid conflicting with the problem I have found. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] what is the MIME type for the Contacts.Photos.DATA picture???
HI, I am trying to get the MIME type for the photo that can be attached to the Contacts information. Where can i find the MIME type ?? . I cannot see the MIME type data from the Contacts.Photos class , where can i find it ?? Thanks for the helper. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About screen unlock---help!!!
andrew wrote: If I do other things like this one hundred or even more,nothing will happen! So? Again, I'm not saying there is no bug. I am saying the bug may only matter if a user has obsessive-compulsive disorder (and therefore keeps locking/unlocking the screen in rapid succession) or somebody misuses the screen-unlock API (such as your app, apparently). For example, I do not know how quickly (or slowly) you did your sixty-to-seventy unlock/lock cycles while trying to get the keyguard to crash. If you can get it to crash averaging one cycle every minute or two, that suggests the keyguard might crash after sixty-to-seventy locks and unlocks in more normal use, which would be bad. If, however, to get it to crash, you had to do a cycle every second or so, garbage collection may not have been able to keep up, and hence you get the error. Rapid locking and unlocking is not normal behavior, so the importance of the issue drops, though ideally it would still get investigated. I have to do other things rather than lock and anlock the screen, in this condition,maybe the phone will reboot only do this less than ten times. Probably not. The crash appears to be in the keyguard, which (AFAIK) runs in its own process. So,I hope it can be resolved,and want to know the reason too. Did you report your symptoms on http://b.android.com? It is unlikely to get resolved any other way. And due to this problem it has now,I have to try other way to avoid conflicting with the problem I have found. Which gets back to what I originally wrote: endless locking and unlocking of the screen is something you should avoid, even if this crash *didn't* happen. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 0.95 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: About screen unlock—help! !!
andrew wrote: But there have a problem,my activity will be keepped on calling by service, so this activity will do the thing:hiding and redisplaying the lockedscreenendless. This would seem to be a bug in your code. Fix this bug, and your problems will go away. Alternatively, provide us with a good justifiable reason why Android needs to support hiding and redisplaying the lockedscreenendless. I am sorry for using the wrong word endless. My service is a listener,when receiving messages from computer, it will call my activity,and in my activity,if finds the screen is locked,it have to hide the screen,in order to display itself. If the the messages is keeping on sending to my service, when user keeping on operating the computer,my activity will be called again and again, so it have to hide and rediplay the lock again and again. Maybe someone could tell me how to remove the lock when my activity is loaded,and to add the lock when my activity finished, this will give me a new way to deal my problem. Thanks for everyone! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: DRM Issue
Hi.. This is how my androidManifest.xml looks like ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.Test uses-permission android:name=android.permission.ACCESS_DRM / uses-permission android:name=android.permission.ACCESS_NETWORK_STATE / I am able to get the content from the server but while inserting in the DRMProvider I am facing the issue.Getting the error -- Requires DRM Permission Please let me know if any of you faced the same issue. On May 22, 9:16 pm, Marco Nelissen marc...@android.com wrote: On Fri, May 22, 2009 at 3:40 AM, Prashant M prashant.mut...@gmail.comwrote: Developed one sample APP to insert the FL (forward Lock content) into DRM provider. While insertion throwing security exception. I added android.permission.ACCESS_DRM in the androidmanifest.xmlBut still facing the issue. android.permission.ACCESS_DRM How did you add it to the manifest, i.e. what does your manifest look like? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About screen unlock---help!!!
andrew wrote: I am sorry for using the wrong word endless. My service is a listener,when receiving messages from computer, it will call my activity,and in my activity,if finds the screen is locked,it have to hide the screen,in order to display itself. Why not use a Notification? That's the preferred means of alerting the user to something that has occurred in the background. If the the messages is keeping on sending to my service, when user keeping on operating the computer,my activity will be called again and again, so it have to hide and rediplay the lock again and again. What you are describing sounds like an incredible drain on the battery, coupled with a UI that will interfere with any other use of the device (Want to send an SMS? Tough! Your activity will keep forcing itself to the foreground!). I sure hope you know what your users will want... Maybe someone could tell me how to remove the lock when my activity is loaded,and to add the lock when my activity finished, this will give me a new way to deal my problem. onCreate() and onDestroy(), perhaps? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 0.95 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: Always-showing view among activities
What I would do is create a base activity and a base layout that has your content container and the button at the bottom. Then in each of your other activities extend that base activity and inflate your layout into the content container. On May 25, 5:53 am, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: We'd be able to understand ur prob better if u could post ur code snippet that's responsible for this... -- Regards, Sujay Walt Disney http://www.brainyquote.com/quotes/authors/w/walt_disney.html - I love Mickey Mouse more than any woman I have ever known. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SoftKeyboard ONLY with ABCDE....
guruk wrote: no ideas? just to tell the SoftKeyboard only to allow ABCD? Bear in mind that it is a holiday today in the US, so there will be fewer core Android team members monitoring these lists than you might otherwise find on a Monday. But, no, I have no ideas, in part because I have not played with the new android:inputType options much yet. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to replace Android JPEG with my own JPEG Codec
Hi, Anybody is having the knowledge on porting of our own codec with replacing the Android one. Please do the needful. Thanks and regards Somashekar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SoftKeyboard ONLY with ABCDE....
no ideas? just to tell the SoftKeyboard only to allow ABCD? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: load image from the web?
In addition to Mark's suggestion, I would encourage you to use httpclient apis, instead of direct urlconnection. On May 25, 3:11 am, Mark Murphy mmur...@commonsware.com wrote: Bear in mind that the code shown below runs on the UI thread. This means the UI thread is blocked until the HTTP request returns. If the HTTP request has a problem (e.g., the server is not responding), it could very easily take beyond the ~5 seconds allowed before an application-not-responding (ANR) error occurs and your activity is forcibly closed. I heartily encourage you to use a placeholder image when launching your UI and have the real image downloaded off the Web in the background. AsyncTask should work very well for this case -- you can download and decode the image in doInBackground() and apply it to the ImageView in onPostExecute(). Nithin Varamballi wrote: hi... I did like this.. This may help you public class demo extends Activity { /** Called when the activity is first created. */ ImageView i1; public int position=0; private String[] myRemoteImages = { http://www.cssnz.org/flower.jpg}; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button1 = (Button) findViewById(R.id.clear); i1 =(ImageView) findViewById(R.id.i1); load(); } } public void load() { try { URL aURL = new URL(myRemoteImages[i]); URLConnection con = aURL.openConnection(); con.connect(); InputStream is = con.getInputStream(); /* Buffered is always good for a performance plus. */ BufferedInputStream bis = new BufferedInputStream(is); /* Decode url-data to a bitmap. */ Bitmap bm = BitmapFactory.decodeStream(bis); i1.setImageBitmap(bm)); bis.close(); is.close(); /* Apply the Bitmap to the ImageView that will be returned. */ } catch (IOException e) { Log.e(DEBUGTAG, Remtoe Image Exception, e); } } Thank You Nithin N V -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Vertical and Horizontal scroller for EditText
Hi Guys, Can someone heklp me as to how I can add a horizontal and vertical scrollbar for an EditText? I need it to be done through java code and not through xml. Regards, R.Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Always-showing view among activities
Thanks for answering, but I need to show the button and handle its events even when an activity transition [the middle one] is happening. On Mon, May 25, 2009 at 1:03 PM, nEx.Software justin.shapc...@gmail.comwrote: What I would do is create a base activity and a base layout that has your content container and the button at the bottom. Then in each of your other activities extend that base activity and inflate your layout into the content container. On May 25, 5:53 am, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: We'd be able to understand ur prob better if u could post ur code snippet that's responsible for this... -- Regards, Sujay Walt Disney http://www.brainyquote.com/quotes/authors/w/walt_disney.html - I love Mickey Mouse more than any woman I have ever known. -- Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 replace Android JPEG with my own JPEG Codec
somu wrote: Anybody is having the knowledge on porting of our own codec with replacing the Android one. Please do the needful. Questions pertaining to porting Android or the Android source code and firmware should be asked on a list pertaining to those topics: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Always-showing view among activities
Taísa Cristina wrote: Thanks for answering, but I need to show the button and handle its events even when an activity transition [the middle one] is happening. I am unconvinced what you want to do is possible using separate activities. Have you considered using ViewFlipper or something along those lines to have all of these things be in one activity? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About screen unlock---help!!!
Thanks very much for Mark Murphy's answers. Mark Murphy wrote: andrew wrote: I am sorry for using the wrong word endless. My service is a listener,when receiving messages from computer, it will call my activity,and in my activity,if finds thescreenis locked,it have to hide thescreen,in order to display itself. Why not use a Notification? That's the preferred means of alerting the user to something that has occurred in the background. Sorry,I have tried to use Notification,but it is not right way. When my activity is displaying,user can click the button on the activity, so the user can interrupt the operation the computer is doing now. but Notification can not let user to do this,it still have to unlock the screen, then user could do things what the activity can let the user do. If the the messages is keeping on sending to my service, when user keeping on operating the computer,my activity will be called again and again, so it have to hide and rediplay thelockagain and again. What you are describing sounds like an incredible drain on the battery, coupled with a UI that will interfere with any other use of the device (Want to send an SMS? Tough! Your activity will keep forcing itself to the foreground!). I sure hope you know what your users will want... A little differrence,I want to display what the computer is doing now,and also give a chance for user to interrupt the opration in my activity.When a new operation is coming, the old activity will be finished, a new activity is showing. Maybe someone could tell me how to remove thelockwhen my activity is loaded,and to add thelockwhen my activity finished, this will give me a new way to deal my problem. onCreate() and onDestroy(), perhaps? I mean to remove the function of the lock for a moment(not to use KeyguardManager to hide lock and redisplay), when user finishs his operation,I revert the function. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SoftKeyboard ONLY with ABCDE....
Why not use addTextChangedListener() and filter whatever you like in the listener? I wasted many hours recently only to find out that OnKeyListener() is not really usable with the soft keyboard, such that I next had to write my own working OnKeyListener() emulator for the soft keyboard using addTextChangedListener(). On May 25, 6:20 pm, guruk ilovesi...@gmail.com wrote: no ideas? just to tell the SoftKeyboard only to allow ABCD? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] RPC Best Practices
Hey guys, I'm starting my first Android Application and I'm trying to figure out the best way to implement an RPC layer to communicate with my Tomcat server. Basically, I've got POJOs on the Android Client and on the Server. I simply would like to serialize the POJOs on Android, send up an HTTP Post, deserialize on the server, do some work, then serialize a POJO response back down to the client. I've seen a number of posts referencing JSON and XML but nothing really definitive. Further clouding the matter is the different Android SDKs out there that seem to have different levels of support for each. Obviously, if Android has a native library that works well, I'd like to use that. Additionally, I'd like something that could work with my existing POJOs without a great deal of trouble. What are the best practices for this sort of thing? Can anyone send me to any tutorials that have some solid examples on how to get this implemented and going? Thanks! Evan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] get Toast visibility issue
hi, Toast has some methods to show()/close() it but it lacks a method to get its visibility. i figured out, however, that i can getView().isShown() but i'm not 100% sure whether its proper way or not... any ideas? thanks, pskink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: RPC Best Practices
Evan Ruff wrote: Further clouding the matter is the different Android SDKs out there that seem to have different levels of support for each. No, they have stayed fairly consistent since Android 1.0 last fall. You have three XML parsing options (DOM, SAX, and XmlPullParser) but no XML encoding options. JSON (org.json.*) lets you generate and parse. However, neither work directly with POJOs, any more than they do outside of Android. In either case, you need to serialize/deserialize your POJOs to/from XML or JSON constructs. You, of course, are not limited to these. For example, I've used Thrift's serialize/deserialize code, even if I skipped their RPC layer in favor of simpler HTTP REST-ish operations. You have not inquired about HTTP, but there is the standard HttpUrlConnection, along with Apache's HTTPClient. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Determine which row of ListView is highlighted
Hey, I would like to change the font colour of text in each ListView row when the row is highlighted. I.e. when the row is not highlighted leave the font black, however when it is highlighted change the font colour to white. Is there a method which allows one to get the ID of the currently selected row? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Webview Broken in 1.5 SDK?
I actually just subscribed to your subscription service and am happy to report your solution works for this problem! (I needed a little more explanation than the code itself.) Looks like a nice set of instructions all together, I look forward to the rest, and updates! Thanks, SJ Are you behind a firewall, proxy server, or anything that might interfere with Web access? Does the built-in Browser application work? If it fails, then the issue is not with your code, but with something about your environment. I have tried someWebViewcode from both my Android and Advanced Android books with Android1.5within the past couple of hours, and they have all worked, so I feel really confident thatWebViewis not completely broken. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: List items not clickable when using ListAdapter, but clickable with SimpleAdapter
Just a small update, just in case some else has the same problem... I finally found the source code at http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/SimpleAdapter.java;hb=HEAD (no idea why I did not find it before), and there is nothing inside that should have an impact on the click behaviour. So there muste be something wrong in my code. On 13 Mai, 20:24, brian.schim...@googlemail.com brian.schim...@googlemail.com wrote: Hi, I was populating a list with a SimpleAdapter like this: final ListMapString, String data = someObject.getData(); SimpleAdapter dataAdapter = new SimpleAdapter (this, data, R.layout.listline, from, to); listView.setAdapter(dataAdapter); listView.setOnItemClickListener(...); The listView gets this from the layout.xml: android:choiceMode=singleChoice android:clickable=true R.layout.listline defines a layout for each line, having 4 TextViews and some more widgets. Everything works fine so far. But now I need to use a ListAdapter to populate my list. It was easy to write a class that implements all those methods required by that interface, and the resulting List looks exactly the same now. It performs well on scrolling, changing data, etc. but the lines are not clickable any more. My onItemClickListener.onClick is never called, not matter where I tap on my list line (e.g. on one of the TextViews or on the background of that line). In my implementation, I use View.inflate to inflate excactly the same xml as the SimpleAdapter did. Shouldn't the click behaviour of a list be independant of where data comes from? I guess SimpleAdapter does some internal magic that I'd need to perform in my own implementation as well, to make the line clickable. Can somebody point out what I'm missing? I'd also like to look at the source code of SimpleAdapter, but I coudn't find it anywhere onhttp://android.git.kernel.org/- maybe I'm just to dumb to look in the right place. Can somebody point me to that code? (possibly without forcing me to install git and download the whole code base) thanks, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Hiding contacts
Hi group. ...this is my third attempt... ...sigh... :-) Anyone at Google, please...? How can I hide contacts? By hiding I mean that the contact is not shown in the system Contacts group. As I have already explained the problem is as follows: 1) Programatically create a group Uri uri = Contacts.Groups.CONTENT_URI; ContentValues values = new ContentValues(); values.put(Contacts.GroupsColumns.NAME, name); values.put(Contacts.GroupsColumns.SHOULD_SYNC, 1); uri = cr.insert(uri, values); 2) Programaically create a contact ContentValues personInfo = new ContentValues(); personInfo.put(Contacts.PeopleColumns.NAME, name); ContentResolver cr = context.getContentResolver(); Uri newEntry = cr.insert(People.CONTENT_URI, personInfo); 3) add that contact to the newly created group Cursor c = cr.query(newEntry, new String[] { BaseColumns._ID }, null, null, null); if ((c != null) (c.moveToFirst())) { long personId = c.getLong(0); Contacts.People.addToGroup(cr, personId, groupId); } In the emulator the new contacts is not added to the system Contacts group. On a real device which of course is assigned to a Google account, however, the new contact becomes member of the system Contacts group, too, which is not what I want, because the new contact should not be displayed in the Contacts application, unless, of course, the users switches to my newly creatd group. Please help. Regards Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: RPC Best Practices
Evan Ruff wrote: I've been living over in GWT land for the last year or so, so I guess I've gotten spoiled. GWT's whole object-internet-object magic has really taken me out of the transport game! Sorry, Android is much more normal than that... ;-) Do you have any experience/ recommendation with any of the available libraries that do the mapping automatically? I'm wondering if XStream, Json-lib Jackson JSON would work in a compatible and performance-acceptable manner. I seem to recall hearing somewhere that Jackson worked on Android, but I have no direct experience with any of those. Usually, I am stuck writing clients to existing back-ends, and as such lack control over both ends of the communications. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Determine which row of ListView is highlighted
mscwd01 wrote: Hey, I would like to change the font colour of text in each ListView row when the row is highlighted. I.e. when the row is not highlighted leave the font black, however when it is highlighted change the font colour to white. Is there a method which allows one to get the ID of the currently selected row? getSelectedItem(), getSelectedItemId(), and getSelectedView() should all work. For your case, getSelectedView() may be the best of the three. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Webview Broken in 1.5 SDK?
superjet wrote: I actually just subscribed to your subscription service and am happy to report your solution works for this problem! (I needed a little more explanation than the code itself.) Looks like a nice set of instructions all together, I look forward to the rest, and updates! Happy to help, and thanks for subscribing! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Determine which row of ListView is highlighted
Great thanks Mark, I hoped you'd be the one to reply... and you didn't disappoint! Thanks again On May 25, 6:22 pm, Mark Murphy mmur...@commonsware.com wrote: mscwd01 wrote: Hey, I would like to change the font colour of text in each ListView row when the row is highlighted. I.e. when the row is not highlighted leave the font black, however when it is highlighted change the font colour to white. Is there a method which allows one to get the ID of the currently selected row? getSelectedItem(), getSelectedItemId(), and getSelectedView() should all work. For your case, getSelectedView() may be the best of the three. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Need Android talent? Ask on HADO!http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: RPC Best Practices
Alright, I'm going to give it a shot. I will report back. Thanks! Evan On May 25, 1:21 pm, Mark Murphy mmur...@commonsware.com wrote: Evan Ruff wrote: I've been living over in GWT land for the last year or so, so I guess I've gotten spoiled. GWT's whole object-internet-object magic has really taken me out of the transport game! Sorry, Android is much more normal than that... ;-) Do you have any experience/ recommendation with any of the available libraries that do the mapping automatically? I'm wondering if XStream, Json-lib Jackson JSON would work in a compatible and performance-acceptable manner. I seem to recall hearing somewhere that Jackson worked on Android, but I have no direct experience with any of those. Usually, I am stuck writing clients to existing back-ends, and as such lack control over both ends of the communications. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Need Android talent? Ask on HADO!http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
Ok thank you, I will mess around with that then On May 25, 5:03 am, Mark Murphy mmur...@commonsware.com wrote: GT wrote: I just quite don't understand how to use the two... This is what I have so far, am I even on the right track? And I do appreciate the response... snip @Override public void onStart(Intent intent, int StartId) { String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager) getSystemService(srvcName); } Depending on how you are using your service, you may want to get your TelephonyManager and use it in onCreate(). onStart() can be called several times; onCreate() is only called once before a corresponding onDestroy(). If you only need one listener for the service -- and you should only need one -- I'd register it via TelephonyManager#listen() on onCreate() and release it in onDestroy(). public class PhoneListener extends PhoneStateListener { } You could use a few methods here, but I suspect you realize that. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
Ok, Ive fixed that and added more stuff. Just so you know where I am at here is some more code im still working on it, and thank you so much for your help. import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.IBinder; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; public class incomingCallService extends Service { @Override public void onCreate() { //Actions to do when Service is created String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager) getSystemService(srvcName); PhoneListener phoneListener = new PhoneListener(); telephonyManager.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE); } @Override public IBinder onBind(Intent intent) { //Replace with service binding implementation. return null; } @Override public void onStart(Intent intent, int StartId) { } public class PhoneListener extends PhoneStateListener { public void onCallStateChnaged(int state, int incomingNumber) { switch(state) { case TelephonyManager.CALL_STATE_IDLE: break; case TelephonyManager.CALL_STATE_OFFHOOK: break; case TelephonyManager.CALL_STATE_RINGING: findContactNum(incomingNumber); break; } } public void findContactNum(int number) { //Find contanct } } } On May 25, 10:42 am, GT burlysk...@gmail.com wrote: Ok thank you, I will mess around with that then On May 25, 5:03 am, Mark Murphy mmur...@commonsware.com wrote: GT wrote: I just quite don't understand how to use the two... This is what I have so far, am I even on the right track? And I do appreciate the response... snip @Override public void onStart(Intent intent, int StartId) { String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager) getSystemService(srvcName); } Depending on how you are using your service, you may want to get your TelephonyManager and use it in onCreate(). onStart() can be called several times; onCreate() is only called once before a corresponding onDestroy(). If you only need one listener for the service -- and you should only need one -- I'd register it via TelephonyManager#listen() on onCreate() and release it in onDestroy(). public class PhoneListener extends PhoneStateListener { } You could use a few methods here, but I suspect you realize that. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Animated Sprites For Games
How do I add animated sprites to a custom view? I have used AnimationDrawable object to execute the animation. The animation works if I add the xml resource to the background of my custom view. But I want to know how to draw the animationdrawable directly on a canvas. Please help me with examples.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
Actually I was thinking, would a service be the way to go? Because won't my app start(or do what I want it to) if I use the PhoneState Listener? On May 25, 11:05 am, GT burlysk...@gmail.com wrote: Ok, Ive fixed that and added more stuff. Just so you know where I am at here is some more code im still working on it, and thank you so much for your help. import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.IBinder; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; public class incomingCallService extends Service { @Override public void onCreate() { //Actions to do when Service is created String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager) getSystemService(srvcName); PhoneListener phoneListener = new PhoneListener(); telephonyManager.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE); } @Override public IBinder onBind(Intent intent) { //Replace with service binding implementation. return null; } @Override public void onStart(Intent intent, int StartId) { } public class PhoneListener extends PhoneStateListener { public void onCallStateChnaged(int state, int incomingNumber) { switch(state) { case TelephonyManager.CALL_STATE_IDLE: break; case TelephonyManager.CALL_STATE_OFFHOOK: break; case TelephonyManager.CALL_STATE_RINGING: findContactNum(incomingNumber); break; } } public void findContactNum(int number) { //Find contanct } } } On May 25, 10:42 am, GT burlysk...@gmail.com wrote: Ok thank you, I will mess around with that then On May 25, 5:03 am, Mark Murphy mmur...@commonsware.com wrote: GT wrote: I just quite don't understand how to use the two... This is what I have so far, am I even on the right track? And I do appreciate the response... snip @Override public void onStart(Intent intent, int StartId) { String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager) getSystemService(srvcName); } Depending on how you are using your service, you may want to get your TelephonyManager and use it in onCreate(). onStart() can be called several times; onCreate() is only called once before a corresponding onDestroy(). If you only need one listener for the service -- and you should only need one -- I'd register it via TelephonyManager#listen() on onCreate() and release it in onDestroy(). public class PhoneListener extends PhoneStateListener { } You could use a few methods here, but I suspect you realize that. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
GT wrote: Actually I was thinking, would a service be the way to go? Because won't my app start(or do what I want it to) if I use the PhoneState Listener? I do not understand your question, but let me see if I can address it by pointing out a problem in your code. If you call: telephonyManager.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE); Then at some point, you also need to call: telephonyManager.listen(listener, PhoneStateListener.LISTEN_NONE); If you fail to do so, your listener will receive events, forever and ever, until your process is terminated. Hence, in onDestroy(), you should set your listener to LISTEN_NONE. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
Oh, ok thank you. I will rephrase, when you run an app it goes through the the android app life cycle. Lets say my activity that contains the listener is terminated, will it start running and do what it needs to if the phone rings? That is if its not a service... On May 25, 11:56 am, Mark Murphy mmur...@commonsware.com wrote: GT wrote: Actually I was thinking, would a service be the way to go? Because won't my app start(or do what I want it to) if I use the PhoneState Listener? I do not understand your question, but let me see if I can address it by pointing out a problem in your code. If you call: telephonyManager.listen(phoneListener, PhoneStateListener.LISTEN_CALL_STATE); Then at some point, you also need to call: telephonyManager.listen(listener, PhoneStateListener.LISTEN_NONE); If you fail to do so, your listener will receive events, forever and ever, until your process is terminated. Hence, in onDestroy(), you should set your listener to LISTEN_NONE. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Looking for Android opportunties?http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: get Toast visibility issue
You really shouldn't be needing to do such things. Toasts are intended for very brief fire-and-forget messages to the user. Trying to do more is probably an inappropriate abuse, which would be better done with a dialog or pop-up window. On Mon, May 25, 2009 at 9:51 AM, skink psk...@gmail.com wrote: hi, Toast has some methods to show()/close() it but it lacks a method to get its visibility. i figured out, however, that i can getView().isShown() but i'm not 100% sure whether its proper way or not... any ideas? thanks, pskink -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SoftKeyboard ONLY with ABCDE....
You can't do that, you'll need to filter out the data in the EditText as it is added. On Mon, May 25, 2009 at 7:19 AM, guruk ilovesi...@gmail.com wrote: Hi, i really dont find a solution how I can tell the SoftKeyboard to accept only ABCDE abcde... and space. Its easy in the layout xml to say only numeric=integer or so but... how to make only LETTERS?? thanks Chis -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can I access other package's private files?
On Mon, May 25, 2009 at 3:06 AM, Mark Murphy mmur...@commonsware.comwrote: You would definitely need to use ordinary file I/O and fully-qualified paths: /data/data/the.other.package.here/... Please use Context.createPackageContext() for the other package and just access the files through that. All of the same permission limitations apply, but then you don't need to have nasty absolute magic paths. (Which okay at this point I have come to terms with the fact that we are stuck forever with /data/data because of so many apps hard-coding it, but I can still dream.) -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
GT wrote: Oh, ok thank you. I will rephrase, when you run an app it goes through the the android app life cycle. Lets say my activity that contains the listener is terminated, will it start running and do what it needs to if the phone rings? That is if its not a service... If you do the following: -- in an activity's onCreate(), register the PhoneStateListener -- never unregister the PhoneStateListener -- the activity is closed up on onDestroy() Then that is very very bad. Your listener will continue to receive notification of call events. However, its activity will not be on screen, nor ever will it be again on the screen, so the listener cannot do much of value. The same holds true if this is a service's onCreate() and onDestroy(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How run a apk in the app
On Sun, May 24, 2009 at 2:45 AM, MrSnowflake mrsnowfl...@gmail.com wrote: Apk files are like installers and cab files on Windows Mobile, they are not the applications it self, but a mechanism to install the application (task) they contain. Actually an .apk is not an installer -- there is no code in it to install itself. If you want to compare it to anything, it is really a .jar file. All that installing an .apk means is the system parsing its manifest to find out what it contains (and storing its few persistent pieces of data such as the assigned uid, certificate, etc), and performing the final dex optimization on the code for the current running environment. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can I access other package's private files?
Dianne Hackborn wrote: On Mon, May 25, 2009 at 3:06 AM, Mark Murphy mmur...@commonsware.com mailto:mmur...@commonsware.com wrote: You would definitely need to use ordinary file I/O and fully-qualified paths: /data/data/the.other.package.here/... Please use Context.createPackageContext() for the other package and just access the files through that. All of the same permission limitations apply, but then you don't need to have nasty absolute magic paths. (Which okay at this point I have come to terms with the fact that we are stuck forever with /data/data because of so many apps hard-coding it, but I can still dream.) I apologize for giving out improper information. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using PhoneState Listener and Services
Oh ok. So I guess I should stick with the service because I want it to run in the background, and yea I have unregistered it. On May 25, 12:16 pm, Mark Murphy mmur...@commonsware.com wrote: GT wrote: Oh, ok thank you. I will rephrase, when you run an app it goes through the the android app life cycle. Lets say my activity that contains the listener is terminated, will it start running and do what it needs to if the phone rings? That is if its not a service... If you do the following: -- in an activity's onCreate(), register the PhoneStateListener -- never unregister the PhoneStateListener -- the activity is closed up on onDestroy() Then that is very very bad. Your listener will continue to receive notification of call events. However, its activity will not be on screen, nor ever will it be again on the screen, so the listener cannot do much of value. The same holds true if this is a service's onCreate() and onDestroy(). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] getRotationMatrix and accelerometer values
I'm trying to use the rotation matrix to translate the accelerometer values from the device coordinates to the world coordinates. It's not clear how to do this. Theoretically, I should be able to do something like this: double[][] accelArray = { {xaccel}, {yaccel}, {zaccel} }; Matrix accelDevice = new Matrix(accelArray); Matrix accelWorld = rotationMatrix.times(accelDevice); That code works for a third-party matrix library, but I can't figure out how to do it with any of the SensorManager methods or the Android Matrix classes. Any help would be appreciated. Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---