[android-developers] Re: static getString()??
Thanks for the quick reply Yogini.. unfortunately that doesn't work.. I'm trying to access the string resource from a static method: public static void blah() { getResources().getString() // doesn't work } I also tried Resources.getSystem().getString() with no luck.. but I guess I should've expected that. Any other suggestions? Thanks! On May 4, 10:40 pm, Yogini Pimpalgaonkar yogin...@gmail.com wrote: getResources().getString(R.string.unknown_num) On Tue, May 5, 2009 at 11:06 AM, Sheado chad...@gmail.com wrote: hello, anybody know if there's anyway way I to access the String values of String resources statically? e.g. a static equivalent of Context.getString(...)? thanky in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get current date ??
check the time-picker example @ http://developer.android.com/guide/tutorials/views/hello-timepicker.html On May 5, 10:50 am, daehoon jeondaeh...@gmail.com wrote: How to use calendar.get(Calendar.DATE) I want to display current date, but it doesn't work. private void DateDisplay() { mDateDisplay.setText( new StringBuilder() .append(calendar.get(Calendar.DATE))); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Cannot use dependent projects in 1.5
Hi I have 2 projects in the following layout MainActivityProject - BaseProject (i.e. MainActivityProject depends on the other project). Both are android projects created with the eclipse New Android project functionality) however, the BaseProject does not have an activity defined. However, in BaseProject I define an activity base class where MainActivityProject's Activity derives from. This used to work fine up until 1.1 but now with the 1.5 SDK I get ClassNotFoundExceptions when launching the app. Any suggestion on how to fix this? I obviously dont want to copy all the sources to a single project as I intend to reuse my Activity base class for other things (it contains some boiler plate stuff that I dont want to have in each and every activity. cheers - Rainer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Soft keypad not appearing for edit text-Urgent
Hi, I have an application that has 2 AutoComplete TextViews on a single screen. I have just upgraded the application from 1.0 to 1.5 and I am facing 2 issues here: 1. I get soft keypad for only one of the text view. Wat could be the problem with the other one? 2. For the text view that i get soft keypad,on entering data into the text view using soft key pad, i get the below exception *05-05 11:01:17.465: ERROR/AndroidRuntime(274): Uncaught handler: thread main exiting due to uncaught exception 05-05 11:01:17.645: ERROR/AndroidRuntime(274): java.lang.StackOverflowError 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.text.SpannableStringBuilder.getSpans(SpannableStringBuilder.java:783) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.text.Styled.each(Styled.java:43) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.text.Styled.foreach(Styled.java:249) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.text.Styled.drawText(Styled.java:302) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.text.Layout.drawText(Layout.java:1346) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.text.Layout.draw(Layout.java:339) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.widget.TextView.onDraw(TextView.java:3924) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.View.draw(View.java:5838) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1536) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1534) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1534) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.View.draw(View.java:5841) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1536) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.View.draw(View.java:5841) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.widget.FrameLayout.draw(FrameLayout.java:352) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1536) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1534) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.View.draw(View.java:5841) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.widget.FrameLayout.draw(FrameLayout.java:352) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1536) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1534) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1534) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1534) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1534) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.View.draw(View.java:5841) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.widget.FrameLayout.draw(FrameLayout.java:352) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1536) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.drawChild(ViewGroup.java:1534) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1278) 05-05 11:01:17.645: ERROR/AndroidRuntime(274): at
[android-developers] Change custom title view of window at run time
Hi I am using a custom title view in my application for each activity. In one of the activities, based on button clicks I need to change the custom title view. Now this works fine every time when I make a call to setFeatureInt. But if I try to update any items in the custom title (say change the text of a button or a text view on the title), the update does not take place. Debugging through the code shows that the text view and button instances are not null and I can also see the custom title bar. But the text on the text view or the button is not updated. Has anyone else faced this problem? How do I resolve it? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Retrieving Draft SMS details
many thanx for that information! at least I have the starting point now to search more on how to retrieve this data, as I was stack on this problem! Hopefully it will not be hard now. many thanx again, /sermojohn On May 4, 11:06 pm, swarup me.s...@gmail.com wrote: drafts are stored at the same database i.e. /data/data/ com.android.providers.telephony/databases/mmssms.db but drafts does not store the TO address in the same tuple like MO/MT SMS (in the sms table), rather its stored in the canonical_addresses table. I am not clear how to get this info from the canonical_addresses table using the ContentResolver. I guess there might be a way to do this. On May 4, 12:01 pm, sermojohn sermoj...@gmail.com wrote: Hello, while implementing an SMS application I ve faced this issue. Despite not having any problem to read any SMS from the content://sms uri, when there is e a draft SMS in the SMS table, only its message body is retrieved, but not the address number that has to be written in the SMS form, so that the SMS can be saved in drafts ( this is what I ve noticed that many SMS applications ask from the user ). Does anyone know, if the Draft SMS are saved somewhere else, separately or if their phone address is saved on another field than the phone address of the SMS stored in the inbox or outbox? It you be really helpful to me, if you could provide me with such info! /sermojohn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] onDraw() help
Hi all, I'm relatively new to Android. I want to draw strokes on my screen when the user touches. Next stroke should be drawn from the end point of the previous stroke. This is my code. What happens here is just only the current stroke is drawn. Previous strokes are vanished? What is wrong here? Please help.. package src.test; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; public class ActDraw extends Activity implements OnTouchListener { float x = 200; float y = 200; float x1 = 10; float y1 = 45; float prvx = 150; float prvy = 150; MyView m; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); m = new MyView(this); m.setOnTouchListener(this); setContentView(m); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { prvx = x; prvy = y; x = event.getX(); y = event.getY(); m.invalidate(); } } return false; } class MyView extends View { Paint p = new Paint(); Bitmap bm; int i; public MyView(Context context) { super(context); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); p.setColor(Color.GREEN); p.setStrokeWidth(4); canvas.drawLine(prvx, prvy, x, y, p); } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] onDraw() help needed....!
Hi all, I'm relatively new to Android. I want to draw strokes on my screen when the user touches. Next stroke should be drawn from the end point of the previous stroke. This is my code. What happens here is just only the current stroke is drawn. Previous strokes are vanished? What is wrong here? Please help.. package src.test; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; public class ActDraw extends Activity implements OnTouchListener { float x = 200; float y = 200; float x1 = 10; float y1 = 45; float prvx = 150; float prvy = 150; MyView m; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); m = new MyView(this); m.setOnTouchListener(this); setContentView(m); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { prvx = x; prvy = y; x = event.getX(); y = event.getY(); m.invalidate(); } } return false; } class MyView extends View { Paint p = new Paint(); Bitmap bm; int i; public MyView(Context context) { super(context); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); p.setColor(Color.GREEN); p.setStrokeWidth(4); canvas.drawLine(prvx, prvy, x, y, p); } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Obtaining/calculating process CPU usage.
So is there any possibility to calculate CPU usage? On May 4, 9:19 pm, Dianne Hackborn hack...@android.com wrote: There isn't a supported API for this. On Mon, May 4, 2009 at 7:02 AM, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage? ActivityManager provides method that returns a list of all active processes (list of RunningAppProcessInfo), but that class doesn't provide any CPU usage information. Thanks in advance, Tomek -- 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: sdcard on emulator mounted read only !!
I guess /system/etc/vold.conf is missing from your build. How did you configure it ? On Mon, May 4, 2009 at 11:51 PM, Marco Nelissen marc...@android.com wrote: Well, so what does the system log say? If there's an error mounting the card, it's probably going to be logged there. On Mon, May 4, 2009 at 2:39 PM, dan raaka danra...@gmail.com wrote: well .. I wish it was the reason !! $ ls -l out/target/product/generic/sdcard* -rwxrwxrwx 1 mankapur mankapur 67108864 2009-05-01 16:56 out/target/product/generic/sdcard.img -rw--- 1 mankapur mankapur6 2009-05-04 11:22 out/target/product/generic/sdcard.img.lock On Mon, May 4, 2009 at 12:55 PM, swarup me.s...@gmail.com wrote: well, just a small test shows that when sdcard.img file is RO, it is not shown in the mount list. check the below o/p i got from my set up. === [swa...@~/.android/avd/mydev.avd/]% chmod -w sdcard.img [swa...@~/.android/avd/mydev.avd/]% ls -l -r--r--r-- 1 swarup swarup 134217728 2009-04-30 23:36 sdcard.img -rw--- 1 swarup swarup 5 2009-05-05 00:44 sdcard.img.lock [swa...@~/.android/avd/mydev.avd/]% emu #run emulator [swa...@~/.android/avd/mydev.avd/]% adb shell mount rootfs / rootfs ro 0 0 tmpfs /dev tmpfs rw,mode=755 0 0 devpts /dev/pts devpts rw,mode=600 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0 /dev/block/mtdblock0 /system yaffs2 ro 0 0 /dev/block/mtdblock1 /data yaffs2 rw,nosuid,nodev 0 0 /dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev 0 0 [swa...@~/.android/avd/mydev.avd/]% chmod +w sdcard.img [swa...@~/.android/avd/mydev.avd/]% ls -l -rw-r--r-- 1 swarup swarup 134217728 2009-04-30 23:36 sdcard.img -rw--- 1 swarup swarup 6 2009-05-05 01:14 sdcard.img.lock [swa...@~/.android/avd/mydev.avd/]% emu #run emulator [swa...@~/.android/avd/mydev.avd/]% adb shell mount rootfs / rootfs ro 0 0 tmpfs /dev tmpfs rw,mode=755 0 0 devpts /dev/pts devpts rw,mode=600 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0 /dev/block/mtdblock0 /system yaffs2 ro 0 0 /dev/block/mtdblock1 /data yaffs2 rw,nosuid,nodev 0 0 /dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev 0 0 /dev/block//vold/179:0 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8 0 0 [swa...@~/.android/avd/mydev.avd/]% === On May 5, 12:42 am, swarup me.s...@gmail.com wrote: yes Marco, you are write, even for RO sdcard.img files, it should be visible for 'mount' command. recreation of the sdcard.img might help in resolving the issue. On May 5, 12:21 am, Marco Nelissen marc...@android.com wrote: As long as you run the emulator as the user 'owner', it should be writable. And again: the problem is not that it's mounted read-only, it's that it's not mounted at all. Your dmesg seems to indicate that no partition was found in your image. What does the system log say? (logcat) On Mon, May 4, 2009 at 12:18 PM, swarup me.s...@gmail.com wrote: check the permissions of the ./sdcard.img file. does it have write permission?? -rw-r--r-- 1 owner owner 134217728 2009-04-30 23:36 sdcard.img On May 4, 11:59 pm, dan raaka danra...@gmail.com wrote: Here goes the dmesg log $ adb shell dmesg 5Linux version 2.6.27-00110-g132305e ( mikec...@cheetara.corp.google.com) (gcc version 4.2.1) #6 Mon Feb 2 12:47:38 PST 2009 4CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177 4Machine: Goldfish 4Memory policy: ECC disabled, Data cache writeback 7On node 0 totalpages: 24576 7free_area_init_node: node 0, pgdat c0294734, node_mem_map c031e000 7 DMA zone: 24384 pages, LIFO batch:3 4CPU0: D VIVT write-through cache 4CPU0: I cache: 4096 bytes, associativity 4, 32 byte lines, 32 sets 4CPU0: D cache: 65536 bytes, associativity 4, 32 byte lines, 512 sets 4Built 1 zonelists in Zone order, mobility grouping on. Total pages: 24384 5Kernel command line: qemu=1 console=ttyS0 android.checkjni=1 android.qemud=ttyS1 android.ndns=1 3Unknown boot option `android.checkjni=1': ignoring 3Unknown boot option `android.qemud=ttyS1': ignoring 3Unknown boot option `android.ndns=1': ignoring 4PID hash table entries: 512 (order: 9, 2048 bytes) 4Console: colour dummy device 80x30 6Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) 6Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) 6Memory: 96MB = 96MB total 5Memory: 94040KB available (2408K code, 640K data, 104K init) 6Calibrating delay loop... 104.65 BogoMIPS (lpj=523264) 4Mount-cache hash table entries: 512 6CPU: Testing write buffer coherency: ok
[android-developers] Re: static getString()??
Maybe create a new Resources object will work . On May 5, 1:59 pm, Sheado chad...@gmail.com wrote: Thanks for the quick reply Yogini.. unfortunately that doesn't work.. I'm trying to access the string resource from a static method: public static void blah() { getResources().getString() // doesn't work } I also tried Resources.getSystem().getString() with no luck.. but I guess I should've expected that. Any other suggestions? Thanks! On May 4, 10:40 pm, Yogini Pimpalgaonkar yogin...@gmail.com wrote: getResources().getString(R.string.unknown_num) On Tue, May 5, 2009 at 11:06 AM, Sheado chad...@gmail.com wrote: hello, anybody know if there's anyway way I to access the String values of String resources statically? e.g. a static equivalent of Context.getString(...)? thanky 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] 1.1 emulator - internet problem
In the preview release of SDK 1.5, internet didn't work on the 1.1 emulator. Is that still true in the current release? In my 1.1 emulator, I don't have internet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Custom Locale, Spare parts - how to get them?
Like in the topic - after uprading my G1 Dev Phone with recovery images provided by HTC I don't have those 2 apps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Permission on apk
Hi, I've a problem to read on an apk File. I've created my sdcard with command 'mksdcard ...' I execute this code : File tmpdir = new File(tmpdirpath+name); if (!tmpdir.exists()) { boolean b = tmpdir.mkdirs(); } else { if (!tmpdir.isDirectory()) { throw new RuntimeException(here : the tmp dir conflicts); } } with name = name of my apk file. My file is correctly created on my temporary directory on /sdcard, but when i try to read it, i've not the permissions. My permissions are '- - - - r w - r w -' I tried to change this permission with #adb shell # chmod 777 There is no error but my permissions are always the same '- - - - r w - r w -' So in my application, i've the exception : 04-28 14:56:16.296: ERROR/dalvikvm(231): Can't open dex cache '/data/ dalvik-cache/ sdc...@.tmpdir@org.python.pycode._p...@org.python.pycode._pyx0.apk@classes.dex': No such file or directory 04-28 14:56:16.296: INFO/dalvikvm(231): Unable to open or create cache for /sdcard/.tmpdir/org.python.pycode._pyx0/ org.python.pycode._pyx0.apk 04-28 14:56:16.306: WARN/System.err(231): java.io.IOException: unable to open DEX file 04-28 14:56:16.326: WARN/System.err(231): at dalvik.system.DexFile.openDexFile(Native Method) 04-28 14:56:16.336: WARN/System.err(231): at dalvik.system.DexFile.init(DexFile.java:55) 04-28 14:56:16.346: WARN/System.err(231): at dalvik.system.DexFile.init(DexFile.java:41) 04-28 14:56:16.355: WARN/System.err(231): at org.python.debug.FixMe.getClassByName(FixMe.java:93) Some help, please ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: static getString()??
You can't. Pass a Context or Resources object into the function. On Mon, May 4, 2009 at 10:59 PM, Sheado chad...@gmail.com wrote: Thanks for the quick reply Yogini.. unfortunately that doesn't work.. I'm trying to access the string resource from a static method: public static void blah() { getResources().getString() // doesn't work } I also tried Resources.getSystem().getString() with no luck.. but I guess I should've expected that. Any other suggestions? Thanks! On May 4, 10:40 pm, Yogini Pimpalgaonkar yogin...@gmail.com wrote: getResources().getString(R.string.unknown_num) On Tue, May 5, 2009 at 11:06 AM, Sheado chad...@gmail.com wrote: hello, anybody know if there's anyway way I to access the String values of String resources statically? e.g. a static equivalent of Context.getString(...)? thanky in advance! -- 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: Obtaining/calculating process CPU usage.
There is no supported API for this. I am not helping people find and use unsupported APIs, and then having to deal with their apps breaking when we update the platform. On Mon, May 4, 2009 at 11:43 PM, Donald_W wojcik.to...@gmail.com wrote: So is there any possibility to calculate CPU usage? On May 4, 9:19 pm, Dianne Hackborn hack...@android.com wrote: There isn't a supported API for this. On Mon, May 4, 2009 at 7:02 AM, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage? ActivityManager provides method that returns a list of all active processes (list of RunningAppProcessInfo), but that class doesn't provide any CPU usage information. Thanks in advance, Tomek -- 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. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to draw directly on screen without calling invalidate?
I want to draw strokes on my screen when the user touches. Next stroke should be drawn from the end point of the previous stroke. This is my code. What happens here is just only the current stroke is drawn. Previous strokes are vanished? What is wrong here? Please help.. package src.test; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; public class ActDraw extends Activity implements OnTouchListener { float x = 200; float y = 200; float x1 = 10; float y1 = 45; float prvx = 150; float prvy = 150; MyView m; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); m = new MyView(this); m.setOnTouchListener(this); setContentView(m); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { prvx = x; prvy = y; x = event.getX(); y = event.getY(); m.invalidate(); } } return false; } class MyView extends View { Paint p = new Paint(); Bitmap bm; int i; public MyView(Context context) { super(context); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); p.setColor(Color.GREEN); p.setStrokeWidth(4); canvas.drawLine(prvx, prvy, x, y, p); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Test browsertestplugin
Hi, Please anyone tell me how to test broswertestplugin that comes up with mydroid package? Please tell me how to develop broswer plugins?? Thanks, Maha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: onDraw() help needed....!
Your program does what you tell it to do: it draws a line every time onDraw is called. If you want it to draw the previous lines also, you have to tell it to draw the previous lines also. On May 5, 8:43 am, Sukitha Udugamasooriya suk...@gmail.com wrote: Hi all, I'm relatively new to Android. I want to draw strokes on my screen when the user touches. Next stroke should be drawn from the end point of the previous stroke. This is my code. What happens here is just only the current stroke is drawn. Previous strokes are vanished? What is wrong here? Please help.. package src.test; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; public class ActDraw extends Activity implements OnTouchListener { float x = 200; float y = 200; float x1 = 10; float y1 = 45; float prvx = 150; float prvy = 150; MyView m; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); m = new MyView(this); m.setOnTouchListener(this); setContentView(m); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { prvx = x; prvy = y; x = event.getX(); y = event.getY(); m.invalidate(); } } return false; } class MyView extends View { Paint p = new Paint(); Bitmap bm; int i; public MyView(Context context) { super(context); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); p.setColor(Color.GREEN); p.setStrokeWidth(4); canvas.drawLine(prvx, prvy, x, y, p); } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Keeping an application transparently on top of all other applications
The application model gives all resources to the currently active app. You can't prevent your app from being stopped, unless you go around the app model, which I think means going around the SDK. I don't think you can have an app that stays on top at all times. If you find a way to do it, plz let me know :-) On May 5, 7:54 am, Alex Jurgensen asquare...@gmail.com wrote: Hi, All, How can I keep my application which is a transparent window ontop of every other application so that the other application is seen unterneath as if beneath a pane of glass? Thanks, Alex, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Change custom title view of window at run time
Maybe you can provide more detail on what your code does? You can update TextViews and titles from your code, with .setText() or setTitle (). On May 5, 8:16 am, idev ideveloper...@gmail.com wrote: Hi I am using a custom title view in my application for each activity. In one of the activities, based on button clicks I need to change the custom title view. Now this works fine every time when I make a call to setFeatureInt. But if I try to update any items in the custom title (say change the text of a button or a text view on the title), the update does not take place. Debugging through the code shows that the text view and button instances are not null and I can also see the custom title bar. But the text on the text view or the button is not updated. Has anyone else faced this problem? How do I resolve it? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can i change the layout_gravity by code?
invalidate just asks the view hierarchy to draw in its current state; request layout asks it to do a layout traversal (which will then do invalidates of whatever has changed). On Mon, May 4, 2009 at 8:01 PM, Sheepz eladk...@gmail.com wrote: Right you are, and indeed it has fixed it, however, I thought that the correct way to do it to call postInvalidate on the container and that the activity will take care of it itself... What am I missing? On May 4, 9:59 pm, Romain Guy romain...@google.com wrote: You probably forgot to call requestLayout(). On Mon, May 4, 2009 at 6:41 PM, Sheepz eladk...@gmail.com wrote: First of all, thanks for the quick reply. I have tried it and it worked partially - I'll explain what I mean: I have a linear layout with 5 image views in it when I set it with the xml so that 2 of the image views have a gravity value of top and the rest are bottom (or for that matter 2 of the image views have a bottom margin of 10px and the others 0px) it indeed shows it corretly. however when i set it in the code, it will only show one imageview as gravity top and will not set the others as to until i reset the first one to bottom - i.e. there can only be one imageview with a top value at a time for some reason - have you ever encountered that? do you know why that happens? Thanks, Sh. On May 4, 8:49 pm, Romain Guy romain...@google.com wrote: ((LinearLayout.LayoutParams) imageView.getLayoutParams()).gravity = Gravity.TOP; On Mon, May 4, 2009 at 5:47 PM, Sheepz eladk...@gmail.com wrote: I need to change it for an imageview that resides in a linearLayout changing it from top to bottom any ideas? thanks, Sh -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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: getting location name from lat, lon
It's called GeoCoder. On May 5, 7:51 am, jj jagtap...@gmail.com wrote: hello everybody Is there any API method{[android.location pack ] to get location name? did not find related method to to retrieve location name for given GeoPoint(lat,lon); I wanted to keep list of location names for particular GeoPoints (lat,Lon) in journey. can this be achievable in Android to calculate the name of location from lat , lon. please guide for soluation. thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cannot use dependent projects in 1.5
Try switching sdk compatibility to 1.1, then back to 1.5. On May 5, 8:08 am, Rainer rbur...@gmail.com wrote: Hi I have 2 projects in the following layout MainActivityProject - BaseProject (i.e. MainActivityProject depends on the other project). Both are android projects created with the eclipse New Android project functionality) however, the BaseProject does not have an activity defined. However, in BaseProject I define an activity base class where MainActivityProject's Activity derives from. This used to work fine up until 1.1 but now with the 1.5 SDK I get ClassNotFoundExceptions when launching the app. Any suggestion on how to fix this? I obviously dont want to copy all the sources to a single project as I intend to reuse my Activity base class for other things (it contains some boiler plate stuff that I dont want to have in each and every activity. cheers - Rainer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] access to the audio channel
Hello, I'm working on an Android Project. I'm trying to create an application using DTMF (Dual Tone Multi Frequency) to provide special service to user. In fact, I would like that once you call someone, this person could put you through (using DTMF). The process is the following: 1- You call your contact 2- You ask him to put you through 3- He enter a DTMF sequence (containing the number to be dialed by your own phone,..) 4- Your phone receive the DTMF tones, end this call and dial the new number (decoded) Therefore, I would like to know if it's possible to access the audio channel in DevPhone or G1. 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: Change custom title view of window at run time
Here's the code Initially , when the activity is created, I set the title like this getWindow ().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.text_title); TextView databar = (TextView) findViewById(R.id.search_title_text); databar.setText(titleText); On a button click, I change the title to have an EditText and a button MyClass.this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.search_title); On this button's click, I again change the title to the original one MyClass.this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.text_title); TextView databar = (TextView) findViewById(R.id.search_title_text); databar.setText(titleText); The databar setText statement does not work now. I see the text_title set as the title bar of the activity. But there is no text in the textview. Debugging the code shows that databar does have a value and is not null. titleText is also not null. But the value is not reflected. On 05-May-09, at 1:23 PM, Christine wrote: Maybe you can provide more detail on what your code does? You can update TextViews and titles from your code, with .setText() or setTitle (). On May 5, 8:16 am, idev ideveloper...@gmail.com wrote: Hi I am using a custom title view in my application for each activity. In one of the activities, based on button clicks I need to change the custom title view. Now this works fine every time when I make a call to setFeatureInt. But if I try to update any items in the custom title (say change the text of a button or a text view on the title), the update does not take place. Debugging through the code shows that the text view and button instances are not null and I can also see the custom title bar. But the text on the text view or the button is not updated. Has anyone else faced this problem? How do I resolve it? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to draw directly on screen without calling invalidate?
The onDraw() method starts from the scratch every time and so doesn't keep your drawings from the last invocation. Instead you would need to save all the previous points yourself and use them in onDraw(). On Tue, May 5, 2009 at 9:25 AM, Sukitha Udugamasooriya suk...@gmail.comwrote: I want to draw strokes on my screen when the user touches. Next stroke should be drawn from the end point of the previous stroke. This is my code. What happens here is just only the current stroke is drawn. Previous strokes are vanished? What is wrong here? Please help.. package src.test; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; public class ActDraw extends Activity implements OnTouchListener { float x = 200; float y = 200; float x1 = 10; float y1 = 45; float prvx = 150; float prvy = 150; MyView m; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); m = new MyView(this); m.setOnTouchListener(this); setContentView(m); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { prvx = x; prvy = y; x = event.getX(); y = event.getY(); m.invalidate(); } } return false; } class MyView extends View { Paint p = new Paint(); Bitmap bm; int i; public MyView(Context context) { super(context); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); p.setColor(Color.GREEN); p.setStrokeWidth(4); canvas.drawLine(prvx, prvy, x, y, p); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: 1.1 emulator - internet problem
At least here on Mac OSX the official release 1.5r1 supports internet access from within an 1.1 avd/emulator. And that didn't work in the preview. On Tue, May 5, 2009 at 9:15 AM, Christine christine.kar...@gmail.comwrote: In the preview release of SDK 1.5, internet didn't work on the 1.1 emulator. Is that still true in the current release? In my 1.1 emulator, I don't have internet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Background streaming video playback.
Hi, I try to write a streaming player AP with videoView to play the streamming video. If there is an incoming phone call during the streaming video is playing, I'll call mediaplayer.pause() in onPause() to pause the video. Streaming AP will be put to background, and the surface of the videoView will be destroyed. When the phone call is end and then returns to the streaming player AP, the mediaplayer will play with only audio, the screen will be full dark. I tried to set the surface holder got from surfaceCreated() to mediaplayer through setDisplay(), but it still not work. Is there any way to prevent reconnecting to the streaming server when the streaming player AP is interrupted by incoming phone call? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to create and save data(DATE, TIME) to DB???
Hi everyone. I found lots of samples on internet about DB, but most of all contain two String variables. like this : public static final String KEY_TITLE=title; public static final String KEY_BODY=body; create table notes (_id integer primary key autoincrement, + title text not null, body text not null);; I need to add some other variables to DB, like DATE,TIME. I added datetime to DB like titlebody, it was no problem. But they are String, not int. I need int type to use, how to create table include date and time? can anyone help? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android 1.5: How do we use the AudioTrack class?
On May 1, 6:43 pm, Jean-Michel jmtr...@gmail.com wrote: Blindfold, Yes, with the marker set at 1000 I would now *sometimes* get the onMarkerReached() callback, but extremely rarely (maybe once in a hundred one-second 8-bit mono PCM sample playbacks on my ADP, which is why I had not even noticed it at first). It may depend on parameter settings, sample length, CPU load, whatever, but for my use it is totally unreliable and useless. At least it proves that my coding was not totally wrong, or else the callback would *never* have been invoked. :-) I think we need some feedback from the Android Team about how onMarkerReached() is supposed to behave or under what conditions it works. Some undocumented statement order that one has to adhere to? Timing assumptions? By contrast, MediaPlayer's OnCompletionListener() works just fine for me. Thanks I can get onMarkerReached() called for a STATICAudioTrackinstance. A few things you might want to try: - the marker position must be set in frames, not bytes. So make sure you're not giving a marker position that's not beyond your content. For instance if your content is stereo/8bit, you must divide the size by two, by four for stereo/16bit, to go from data size to frame count. - try setting a really low value for your marker position, like 10, to see if it gets called. - if all that still doesn't work, I'd start checking in which thread the callback is supposed to be called. By default it's in the same thread as the one in which you created yourAudioTrackinstance. If you want it to be called from a different thread, use setPlaybackPositionUpdateListener(listener, handler) where you pass the handler of the thread you want to use. Hope this helps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Old value in bundle in BroadcastReceiver
Hello , I have used AlarmManager to schedule my sms . and in the intent i add value of destination and message content in the bundle and put the bundle in the intent Bundle bundle = new Bundle(); bundle.putString(DESTINATION, destination); bundle.putString(CONTENT,content); intent.putExtras(bundle); PendingIntent sender = PendingIntent.getBroadcast(SmsClass.this, 0, intent, 0); But problem arises when i use teh broadcast receiver second time and this time it shows the old bundle values I use the value in Broadcast receiver but after first use it always shows old values, Can anybody help , can i clear the old bundle or new instance... public class OneShotAlarm extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Bundle bundle = intent.getExtras(); String destination = bundle.getString(SMSproject.DESTINATION); String content = bundle.getString(SMSproject.CONTENT); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: onActivityResult called before onRestart()
Activity A starts at onActivityResultf(). So if you try to make a clean exit with onStop(), it will cause nullPointers when it comes back. Probably you need to set the result.You have to set the result and handle this case also in the onActivityResult() On Tue, May 5, 2009 at 7:57 AM, Jeremy Villalobos jeremyvillalo...@gmail.com wrote: I am updating some code from 1.1 to run with the new SDK 1.5. I noticed that onActivityResult is being called before OnRestart. If Activity A calls activity B. Activity A goes to onPause(), then onStop(). Activity B goes on... finishes and returns. Activity A starts at onActivityResultf(). So if you try to make a clean exit with onStop(), it will cause nullPointers when it comes back. Is this a bug ?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: 1.1 emulator - internet problem
I have Ubuntu on AMD64. I checked that 1.5r1 is on my path when starting the emulator. On May 5, 10:33 am, Mariano Kamp mariano.k...@gmail.com wrote: At least here on Mac OSX the official release 1.5r1 supports internet access from within an 1.1 avd/emulator. And that didn't work in the preview. On Tue, May 5, 2009 at 9:15 AM, Christine christine.kar...@gmail.comwrote: In the preview release of SDK 1.5, internet didn't work on the 1.1 emulator. Is that still true in the current release? In my 1.1 emulator, I don't have internet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: 1.1 emulator - internet problem
Hmm. Must have been a temporary glitch, or something I did or didn't do. I have it working now. Sorry to have bothered you all. On May 5, 10:33 am, Mariano Kamp mariano.k...@gmail.com wrote: At least here on Mac OSX the official release 1.5r1 supports internet access from within an 1.1 avd/emulator. And that didn't work in the preview. On Tue, May 5, 2009 at 9:15 AM, Christine christine.kar...@gmail.comwrote: In the preview release of SDK 1.5, internet didn't work on the 1.1 emulator. Is that still true in the current release? In my 1.1 emulator, I don't have internet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Debugger Log information on device
Hi all I am developing an application using media player I want to print total log to printed ( with the logs in the source code of android - media player) ie. the android(os) source code is in c++ and i trace the code and see the printing of error messages. but while compiling my project source and running on device i cant see the messages printed in android source I enabled device debugging in android manifest file. I want to print the error messages those are placed in android source (os) can any one tell me how to achieve this. 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] Why cannot work correctly with Android-1.5 radio image of 1.5?
I got my G1 updated with ota-radio-2_22_19_26I.zip. Then based on the source of Android-1.5 Master, I got the boot and system images, updating them to my device. It turns out that Video Recording cannot work correctly, the generated video is white-black. Additionally, the device becomes silent thoroughly, the audio is lost. Why? Anyone could give some clues about this issue? Thanks a lot. BRs, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Move to one activity to another
Hi All, I am new to Android.I am facing some problem. Scenario: 1) I have two XML files in res/layout i.e. main.xml and play.xml. 2)main.xml contains no of buttons. 3)play.xml contains some contents (Like image,button.text etc.) objective: 1)When i will click on the buttons present in main.xml file.. (Ex:Playlist button) It should redirect to the play.xml. 2)At anytime i can go back by pressing back button which is provided by Android phone. Please provide me a code snippet (Both java as well as xml )which will help me in this regard. Waiting for your replies!!! 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: Get result from settings activity intent
The problem I have here is that after the setting is updated in the configuration dialogue I need to dynamically update the current display of all widgets, however since they are running as a pending Intent from the Widget manager I cant see how I can get a notified when the user has closed the settings dialogue, since as you say the startActivity() call does not block my current pendingIntents execution and there is no way for it to detect when the back button is pressed. Is it simply not possible to achieve in an activity launched via a pending intent or am I just going about this the wrong way? Thanks for all your help! -James On May 4, 3:48 pm, Mark Murphy mmur...@commonsware.com wrote: jrgraf...@googlemail.com wrote: I am currently trying to launch a GPS settings activity using startActivityForResulthowever it never seems to be calling my onActivityResult function after it exits. I noticed the docs mentioned that some Intent protocols are not defined to return a result, is this one such example? I would be surprised if the settings activities are built to return a result. After all, most of those activities adjust several settings, so what would the result be? are there any flags that I could set to either make the settings activity call onActivityResult, or even better make my activity block until the launched activity returns? That depends on what you mean by block. Your activity already blocks until the launched activity is closed. All activities work that way when starting up other activities. However, in this case, block does not mean startActivity() blocks. Instead, after you have called startActivity() and returned from whatever callback you are in, your activity will be stopped and the settings activity will be opened. -- 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] android audio
Hello, In the source of Android I found programs written in language C (dsp_core.c and dsp_dtmf.c) which are capable of decode DTMF. I've recorded (amr file) with my phone a conversation in which the one I'm calling dials DTMF tones from his cell and I would like to use the program to detect those tones and that my phone automatically calls the number that he dialed. My problem is I don't know how to use those two programs with the amr file I've recorded. Thanks in advance. PS: If you need the programs because you haven't downloaded Android code source tell me and I'll send you 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] How to use the ACTION_EDIT Intent to open the edit activity?
Hi I tried open a edit activity by through send a ACTION_EDIT intent, but the program catched. code: Intent intent = new Intent(Intent.ACTION_EDIT,Uri.parse(sample text)); startActivity(intent); Where am I wrong? Thanks RongJun Ying --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Bug using BroadcastReceivers in the App Widget Framework ?
No, ExampleBroadcastReceiver does not use registerReceiver(); it is registered via the xml: receiver android:name=.appwidget.ExampleBroadcastReceiver android:enabled=false intent-filter action android:name=android.intent.ACTION_TIMEZONE_CHANGED / action android:name=android.intent.ACTION_TIME / /intent-filter /receiver I suggested using the registering via the code as a last resort. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Tabs Control Code
Hi , This is anitha. I am new to android. I want the application for the creating tabs. while i was using the code in the following link http://developer.android.com/guide/tutorials/views/hello-tabwidget.html it shows that null pointer exception in our design means main.xml page .So pls send the code to me . Its a little bit of urgent for me. I am using android 1.1 version. Thanks in advance. Thanks Regards Anitha.A --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Debugger Log information on device
are you referring to the log in the traces file? On May 5, 4:18 am, Dilli dilliraomca...@gmail.com wrote: Hi all I am developing an application using media player I want to print total log to printed ( with the logs in the source code of android - media player) ie. the android(os) source code is in c++ and i trace the code and see the printing of error messages. but while compiling my project source and running on device i cant see the messages printed in android source I enabled device debugging in android manifest file. I want to print the error messages those are placed in android source (os) can any one tell me how to achieve this. 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] How to send the On Call Screen Back
Hi All, I am trying to create a application, which is capable of making phone calls to the given number at the scheduled time (someting like reminder). But at the same time once it starts to make the call, my application should take a picture from Camera. So after starting the call activity, after few seconds I want the on call screen activity should go to back ground and my own camera app(A activity with surface) should come to the foreground to take a picture. I tried the above one in the following way, 1. create a Action calll intent and started the call activity from my Applications Main Activity. 2. After few seconds I started my own camera activity from my App Mail Activity. But it's not working. Once I start the call, the on call screen only showing in the foreground, that camera Activity is not at all coming to forground. So when I give back button the camera Activity is coming to foreground. I don know the reason. Can anyone tell me what's wrong in this. I think am missing some thing inthis. any pointers to this one is highly appriciated. thanks raj --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Debugger Log information on device
Hi, If you want see the logs from your C++ application, follow these steps. 1. use fprintf(stderr,..._); to print the logs in your source code. 2. launch ./emulator -shell 3. In another prompt, Type these commands $ adb shell stop $ adb shell setprop log.redirect-stdio true $ adb shell start 4. Then type $ adb logcat It will display all the logs from the emulator. On 5/5/09, Fred Grott(shareme) fred.gr...@gmail.com wrote: are you referring to the log in the traces file? On May 5, 4:18 am, Dilli dilliraomca...@gmail.com wrote: Hi all I am developing an application using media player I want to print total log to printed ( with the logs in the source code of android - media player) ie. the android(os) source code is in c++ and i trace the code and see the printing of error messages. but while compiling my project source and running on device i cant see the messages printed in android source I enabled device debugging in android manifest file. I want to print the error messages those are placed in android source (os) can any one tell me how to achieve this. Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Debugger Log information on device
i want to see the logs of the Android OS source code (which is in c++) On Tue, May 5, 2009 at 3:47 PM, maha lakshmi maha2...@gmail.com wrote: Hi, If you want see the logs from your C++ application, follow these steps. 1. use fprintf(stderr,..._); to print the logs in your source code. 2. launch ./emulator -shell 3. In another prompt, Type these commands $ adb shell stop $ adb shell setprop log.redirect-stdio true $ adb shell start 4. Then type $ adb logcat It will display all the logs from the emulator. On 5/5/09, Fred Grott(shareme) fred.gr...@gmail.com wrote: are you referring to the log in the traces file? On May 5, 4:18 am, Dilli dilliraomca...@gmail.com wrote: Hi all I am developing an application using media player I want to print total log to printed ( with the logs in the source code of android - media player) ie. the android(os) source code is in c++ and i trace the code and see the printing of error messages. but while compiling my project source and running on device i cant see the messages printed in android source I enabled device debugging in android manifest file. I want to print the error messages those are placed in android source (os) can any one tell me how to achieve this. Thank you -- Dilli Rao. M --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Debugger Log information on device
Yes... just try it out... On 5/5/09, dillirao malipeddi dillir...@arijasoft.com wrote: i want to see the logs of the Android OS source code (which is in c++) On Tue, May 5, 2009 at 3:47 PM, maha lakshmi maha2...@gmail.com wrote: Hi, If you want see the logs from your C++ application, follow these steps. 1. use fprintf(stderr,..._); to print the logs in your source code. 2. launch ./emulator -shell 3. In another prompt, Type these commands $ adb shell stop $ adb shell setprop log.redirect-stdio true $ adb shell start 4. Then type $ adb logcat It will display all the logs from the emulator. On 5/5/09, Fred Grott(shareme) fred.gr...@gmail.com wrote: are you referring to the log in the traces file? On May 5, 4:18 am, Dilli dilliraomca...@gmail.com wrote: Hi all I am developing an application using media player I want to print total log to printed ( with the logs in the source code of android - media player) ie. the android(os) source code is in c++ and i trace the code and see the printing of error messages. but while compiling my project source and running on device i cant see the messages printed in android source I enabled device debugging in android manifest file. I want to print the error messages those are placed in android source (os) can any one tell me how to achieve this. Thank you -- Dilli Rao. M --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Playing a .mp3 file using View Intent
Hi all, I want to play a mp3 file which is stored in the /sdcard/ using ACTION_VIEW intent and I used following code to accomplish that, but I got ActivityNotFound Exception.. Intent intent = new Intent(android.content.Intent.ACTION_VIEW); Uri data = Uri.parse(file:///sdcard/abc_xyz.mp3); intent.setDataAndType(data,/audio/mp3); try { startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } But I got the following exception, 05-05 15:44:40.563: WARN/System.err(5253): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.VIEW data=file:///sdcard/Main Agar Kahoon.mp3 type=/audio/mp3 } 05-05 15:44:40.582: WARN/System.err(5253): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1471) 05-05 15:44:40.582: WARN/System.err(5253): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1441) 05-05 15:44:40.593: WARN/System.err(5253): at android.app.Activity.startActivityForResult(Activity.java:2526) 05-05 15:44:40.602: WARN/System.err(5253): at android.app.Activity.startActivity(Activity.java:2570) 05-05 15:44:40.602: WARN/System.err(5253): at test.mp3file.MusicTest.onCreate(MusicTest.java:25) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1122) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2104) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2157) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581) 05-05 15:44:40.612: WARN/System.err(5253): at android.os.Handler.dispatchMessage(Handler.java:88) 05-05 15:44:40.612: WARN/System.err(5253): at android.os.Looper.loop(Looper.java:123) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.main(ActivityThread.java:3739) 05-05 15:44:40.612: WARN/System.err(5253): at java.lang.reflect.Method.invokeNative(Native Method) 05-05 15:44:40.612: WARN/System.err(5253): at java.lang.reflect.Method.invoke(Method.java:515) 05-05 15:44:40.612: WARN/System.err(5253): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:739) 05-05 15:44:40.612: WARN/System.err(5253): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 05-05 15:44:40.612: WARN/System.err(5253): at dalvik.system.NativeStart.main(Native Method) In fact I used this approach to play file, because I want the internal music application with Gui buttons on the display during playback. Is it possible to call the internal music application when we play with the MediaPlayer object ?? Please help. Thanks in advance. Asif --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: onDraw() help needed....!
You're overwriting the previous line each time you touch so the application can only draw one line. As far as I know each onDraw() call clears the screen and, therefore, your previous strokes. Take a look at the Path class, this provides an easy way of chaining together multiple points into one long line. On May 5, 7:43 am, Sukitha Udugamasooriya suk...@gmail.com wrote: Hi all, I'm relatively new to Android. I want to draw strokes on my screen when the user touches. Next stroke should be drawn from the end point of the previous stroke. This is my code. What happens here is just only the current stroke is drawn. Previous strokes are vanished? What is wrong here? Please help.. package src.test; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; public class ActDraw extends Activity implements OnTouchListener { float x = 200; float y = 200; float x1 = 10; float y1 = 45; float prvx = 150; float prvy = 150; MyView m; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); m = new MyView(this); m.setOnTouchListener(this); setContentView(m); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { prvx = x; prvy = y; x = event.getX(); y = event.getY(); m.invalidate(); } } return false; } class MyView extends View { Paint p = new Paint(); Bitmap bm; int i; public MyView(Context context) { super(context); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); p.setColor(Color.GREEN); p.setStrokeWidth(4); canvas.drawLine(prvx, prvy, x, y, p); } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android.intent.extra.videoQuality not working for image capturing
I too really would like to know the answer to that question. Help please :) BoD On May 4, 2:41 pm, Guillaume Perrot guillaume.p...@gmail.com wrote: When looking at the documentation, we can see that the intent whose action is ACTION_IMAGE_CAPTURE can have the EXTRA_VIDEO_QUALITY argument: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 voice recognition on Emulator
Hi Dave, so... this is what I have understood about speech recognition in Android 1.5: - The only thing included (and public) in the 1.5 platform is the RecognizerIntent class, which is just a bunch of constants to standardize the use of speech recognition applications. - The actual speech recognition is performed by Google Voice Search application which is not part of the platform (nor open source) and it is not included in the emulator images (even the one with the Google APIs). - Anyone is free to implement his own recognition applications but not using the classes present in android.speech.srec because that package is private. If I'm right, then the Speech recognition framework included in 1.5 is not what I was expecting... any plans to extend it in the future? Thanks again for your support, Jose Luis. On May 5, 2:14 am, Dave Sparks davidspa...@android.com wrote: Google Voice Search is a Google application, not part of the Android platform. It will only be present on devices that have a Google license agreement. However, because it uses the intent system, it is possible for someone else to provide competing solution. On May 4, 2:12 pm, qvark joseluishuertasfernan...@gmail.com wrote: Hi Dave, I don't understand this very well... does it mean that speech recognition is not part of the platform but provided by a Google app? Can we expect it to be present in every device with Android 1.5? Is the Google Voice Search application always needed even if we are not using speech recognition to perform web searches? Thanks, Jose Luis. On 4 mayo, 20:46, Dave Sparks davidspa...@android.com wrote: This intent is handled by the Google Voice Search application. Do you have it installed? On May 4, 6:12 am, Yash Patel yashjpa...@gmail.com wrote: Hi Dave Here is the error i am getting. android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.speech.action.RECOGNIZE_SPEECH (has extras) } and here is the code sample that i am using for Sppech recognize in emulator. OnClickListener mTabButton = new OnClickListener() { public void onClick(View v) { try { ArrayListString potentialResults = new ArrayListString(); potentialResults.add(yellow); potentialResults.add(green); potentialResults.add(blue); potentialResults.add(red); // Create Intent Intent intent = new Intent(android.speech.action.RECOGNIZE_SPEECH); // Settings intent.putExtra(android.speech.extra.LANGUAGE_MODEL, free_form); intent.putExtra(android.speech.extra.PROMPT, Speak now); intent.putExtra(android.speech.extra.RESULTS, potentialResults); // Start the Recognition Activity startActivityForResult(intent, RESULT_SPEECH); } catch(Exception ex) { ex.printStackTrace(); } } On Fri, May 1, 2009 at 9:23 PM, Dave Sparks davidspa...@android.com wrote: What is the error? On May 1, 5:18 pm, Yash Patel yashjpa...@gmail.com wrote: I mean to say Speech Recognization. I tried to create one small application but it gives me error. Thanks Yash Patel On Fri, May 1, 2009 at 4:54 PM, Dave Sparks davidspa...@android.com wrote: Voice recognition is a technology. You need an application to make use of it, for example the voice dialer. On May 1, 11:17 am, Yash Patel yashjpa...@gmail.com wrote: HI, does any one know How to turn on Voice Recognition on Emulator. or is it required to have phone or dev phone to test voice recognition application? I would appreciate if you can reply. thanks Yash Patel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Debugger Log information on device
sorry for disturbing you i cant write fprintf() in java application am i doing in correct way.. On Tue, May 5, 2009 at 3:57 PM, maha lakshmi maha2...@gmail.com wrote: Yes... just try it out... On 5/5/09, dillirao malipeddi dillir...@arijasoft.com wrote: i want to see the logs of the Android OS source code (which is in c++) On Tue, May 5, 2009 at 3:47 PM, maha lakshmi maha2...@gmail.com wrote: Hi, If you want see the logs from your C++ application, follow these steps. 1. use fprintf(stderr,..._); to print the logs in your source code. 2. launch ./emulator -shell 3. In another prompt, Type these commands $ adb shell stop $ adb shell setprop log.redirect-stdio true $ adb shell start 4. Then type $ adb logcat It will display all the logs from the emulator. On 5/5/09, Fred Grott(shareme) fred.gr...@gmail.com wrote: are you referring to the log in the traces file? On May 5, 4:18 am, Dilli dilliraomca...@gmail.com wrote: Hi all I am developing an application using media player I want to print total log to printed ( with the logs in the source code of android - media player) ie. the android(os) source code is in c++ and i trace the code and see the printing of error messages. but while compiling my project source and running on device i cant see the messages printed in android source I enabled device debugging in android manifest file. I want to print the error messages those are placed in android source (os) can any one tell me how to achieve this. Thank you -- Dilli Rao. M -- Dilli Rao. M --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Debugger Log information on device
Hi, If it is a java application, u can use System.out.println or Log class and using adb logcat u can see the logs. Look at this following link http://developer.android.com/reference/android/util/Log.html Thanks, Maha On 5/5/09, dillirao malipeddi dillir...@arijasoft.com wrote: sorry for disturbing you i cant write fprintf() in java application am i doing in correct way.. On Tue, May 5, 2009 at 3:57 PM, maha lakshmi maha2...@gmail.com wrote: Yes... just try it out... On 5/5/09, dillirao malipeddi dillir...@arijasoft.com wrote: i want to see the logs of the Android OS source code (which is in c++) On Tue, May 5, 2009 at 3:47 PM, maha lakshmi maha2...@gmail.com wrote: Hi, If you want see the logs from your C++ application, follow these steps. 1. use fprintf(stderr,..._); to print the logs in your source code. 2. launch ./emulator -shell 3. In another prompt, Type these commands $ adb shell stop $ adb shell setprop log.redirect-stdio true $ adb shell start 4. Then type $ adb logcat It will display all the logs from the emulator. On 5/5/09, Fred Grott(shareme) fred.gr...@gmail.com wrote: are you referring to the log in the traces file? On May 5, 4:18 am, Dilli dilliraomca...@gmail.com wrote: Hi all I am developing an application using media player I want to print total log to printed ( with the logs in the source code of android - media player) ie. the android(os) source code is in c++ and i trace the code and see the printing of error messages. but while compiling my project source and running on device i cant see the messages printed in android source I enabled device debugging in android manifest file. I want to print the error messages those are placed in android source (os) can any one tell me how to achieve this. Thank you -- Dilli Rao. M -- Dilli Rao. M --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Obtaining/calculating process CPU usage.
Well I thought rather of any calculations using some process data. Anyway thanks for help. BR, Tomek On May 5, 9:20 am, Dianne Hackborn hack...@android.com wrote: There is no supported API for this. I am not helping people find and use unsupported APIs, and then having to deal with their apps breaking when we update the platform. On Mon, May 4, 2009 at 11:43 PM, Donald_W wojcik.to...@gmail.com wrote: So is there any possibility to calculate CPU usage? On May 4, 9:19 pm, Dianne Hackborn hack...@android.com wrote: There isn't a supported API for this. On Mon, May 4, 2009 at 7:02 AM, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage? ActivityManager provides method that returns a list of all active processes (list of RunningAppProcessInfo), but that class doesn't provide any CPU usage information. Thanks in advance, Tomek -- 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. -- 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: Playing a .mp3 file using View Intent
it's audio/mp3 not /audio/mp3 On May 5, 11:27 am, Asif k asifk1...@gmail.com wrote: Hi all, I want to play a mp3 file which is stored in the /sdcard/ using ACTION_VIEW intent and I used following code to accomplish that, but I got ActivityNotFound Exception.. Intent intent = new Intent(android.content.Intent.ACTION_VIEW); Uri data = Uri.parse(file:///sdcard/abc_xyz.mp3); intent.setDataAndType(data,/audio/mp3); try { startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } But I got the following exception, 05-05 15:44:40.563: WARN/System.err(5253): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.VIEW data=file:///sdcard/Main Agar Kahoon.mp3 type=/audio/mp3 } 05-05 15:44:40.582: WARN/System.err(5253): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1471) 05-05 15:44:40.582: WARN/System.err(5253): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1441) 05-05 15:44:40.593: WARN/System.err(5253): at android.app.Activity.startActivityForResult(Activity.java:2526) 05-05 15:44:40.602: WARN/System.err(5253): at android.app.Activity.startActivity(Activity.java:2570) 05-05 15:44:40.602: WARN/System.err(5253): at test.mp3file.MusicTest.onCreate(MusicTest.java:25) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1122) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2104) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2157) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581) 05-05 15:44:40.612: WARN/System.err(5253): at android.os.Handler.dispatchMessage(Handler.java:88) 05-05 15:44:40.612: WARN/System.err(5253): at android.os.Looper.loop(Looper.java:123) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.main(ActivityThread.java:3739) 05-05 15:44:40.612: WARN/System.err(5253): at java.lang.reflect.Method.invokeNative(Native Method) 05-05 15:44:40.612: WARN/System.err(5253): at java.lang.reflect.Method.invoke(Method.java:515) 05-05 15:44:40.612: WARN/System.err(5253): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:739) 05-05 15:44:40.612: WARN/System.err(5253): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 05-05 15:44:40.612: WARN/System.err(5253): at dalvik.system.NativeStart.main(Native Method) In fact I used this approach to play file, because I want the internal music application with Gui buttons on the display during playback. Is it possible to call the internal music application when we play with the MediaPlayer object ?? Please help. Thanks in advance. Asif --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Handling key events in a paused Activity
If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Playing a .mp3 file using View Intent
Hi MrChaz, Thanks for your help. I changed it and its working now. regards, Asif On May 5, 3:55 pm, MrChaz mrchazmob...@googlemail.com wrote: it's audio/mp3 not /audio/mp3 On May 5, 11:27 am, Asif k asifk1...@gmail.com wrote: Hi all, I want to play a mp3 file which is stored in the /sdcard/ using ACTION_VIEW intent and I used following code to accomplish that, but I got ActivityNotFound Exception.. Intent intent = new Intent(android.content.Intent.ACTION_VIEW); Uri data = Uri.parse(file:///sdcard/abc_xyz.mp3); intent.setDataAndType(data,/audio/mp3); try { startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } But I got the following exception, 05-05 15:44:40.563: WARN/System.err(5253): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.VIEW data=file:///sdcard/Main Agar Kahoon.mp3 type=/audio/mp3 } 05-05 15:44:40.582: WARN/System.err(5253): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1471) 05-05 15:44:40.582: WARN/System.err(5253): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1441) 05-05 15:44:40.593: WARN/System.err(5253): at android.app.Activity.startActivityForResult(Activity.java:2526) 05-05 15:44:40.602: WARN/System.err(5253): at android.app.Activity.startActivity(Activity.java:2570) 05-05 15:44:40.602: WARN/System.err(5253): at test.mp3file.MusicTest.onCreate(MusicTest.java:25) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1122) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2104) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2157) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581) 05-05 15:44:40.612: WARN/System.err(5253): at android.os.Handler.dispatchMessage(Handler.java:88) 05-05 15:44:40.612: WARN/System.err(5253): at android.os.Looper.loop(Looper.java:123) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.main(ActivityThread.java:3739) 05-05 15:44:40.612: WARN/System.err(5253): at java.lang.reflect.Method.invokeNative(Native Method) 05-05 15:44:40.612: WARN/System.err(5253): at java.lang.reflect.Method.invoke(Method.java:515) 05-05 15:44:40.612: WARN/System.err(5253): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:739) 05-05 15:44:40.612: WARN/System.err(5253): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 05-05 15:44:40.612: WARN/System.err(5253): at dalvik.system.NativeStart.main(Native Method) In fact I used this approach to play file, because I want the internal music application with Gui buttons on the display during playback. Is it possible to call the internal music application when we play with the MediaPlayer object ?? Please help. Thanks in advance. Asif- 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] SQlite error
Hi to all... I am creating a simple application of database... I am first time using it.. I tried sample program, But it has lot of errors... Can any one tell me how can write simple INSERT DELETE UPDATE quries...?ans also Is there any settings for the database in eclipse...? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Bug using BroadcastReceivers in the App Widget Framework ?
I have discovered a bug in ExampleAppWidgetProvider.onEnabled() and in the configuration of the ExampleBroadcastReceiver. The correct configuration of the BroadcastReceiver (BR) which leads to the Callback as desired: receiver android:name=.appwidget.ExampleBroadcastReceiver android:enabled=true intent-filter action android:name=android.intent.action.TIMEZONE_CHANGED / action android:name=android.intent.action.TIME / /intent-filter /receiver Logcat output: I/ActivityManager( 575): Displayed activity com.android.settings/.ZoneList: 405 ms D/AlarmManagerService( 575): Kernel timezone updated to 480 minutes west of GMT D/ExmampleBroadcastReceiver( 757): intent=Intent { action=android.intent.action.TIMEZONE_CHANGED comp= {com.example.android.apis/ com.example.android.apis.appwidget.ExampleBroadcastReceiver} The way in which the BR is enabled in ExampleAppWidgetProvider.onEnabled() via the PackageManager doesn't seem to work I suspect. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SQlite error
go through the Notepad tutorial @ http://developer.android.com/guide/tutorials/notepad/index.html and Notepad sample code @ http://developer.android.com/guide/samples/NotePad/index.html On May 5, 4:00 pm, N V nithi...@gmail.com wrote: Hi to all... I am creating a simple application of database... I am first time using it.. I tried sample program, But it has lot of errors... Can any one tell me how can write simple INSERT DELETE UPDATE quries...?ans also Is there any settings for the database in eclipse...? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What units does Location.getAltitude() return in?
It's in meters, but your device is fine - the issue is that that the GPS system has to make an approximation about the shape of the Earth and the average sea level, but it is only an approximation so you will find differences between the GPS average sea level and the local average sea level. See: http://www.esri.com/news/arcuser/0703/geoid1of3.html if you are interested in the details. Local grid systems (like British OS grid) often use their own datums so that the height corresponds more accurately to the local sea level. A GPS application that provides altitude in such a local grid system should do the conversion for you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: TCP (XMPP) Keep Alive and T-Mobile
Nobody can answer me ? I am still forced to leave the setting to 30s and it drains users battery. On 14 avr, 11:55, Guillaume Perrot guillaume.p...@gmail.com wrote: Hi, I just wondered which frequency is OK to send whitespace keep alive packets onto a TCP connection to keep it alive on a T-Mobile 3G connectivity (the use case is to maintain an idle XMPP session alive). On SFR in France, we are disconnected if idle for 3 minutes, but I guess T-Mobile's timeout is lower. Any idea ? By the way there is a bug in the Smack library, the keep alive setting is not enforced, e.g. if you set it to 30s, in the worst case the whitespace will not be sent until the double of this time (60s). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: viewing logcat from phone not possible in Android 1.5?
Log Collector was great (esp since end-users also can use it). Ill prob take a look at creating a su replacement as well since I sometimes need to kill an app on the road. Thanks! On Fri, May 1, 2009 at 1:32 PM, Carter ccjerni...@gmail.com wrote: You could also use Log Collector, which is available on the Android Market. On May 1, 1:26 pm, fadden fad...@android.com wrote: On May 1, 8:06 am, mathias axelsson mathias.axels...@gmail.com wrote: When running 'su', in terminal, I get 'uid X not allowed to su'. 'logcat' gives permission denied /dev/log/main. To avoid creating a situation where an app could run su and do dastardly deeds, an explicit userid check was added to su. You need to be in an adb shell. If this is inconvenient, you can create an unrestricted su replacement. One approach is to make a copy of the shell and chmod/ chown it to setuid root. This creates a security hole -- something could scan your phone for setuid binaries and speculatively execute them looking for root shells -- but it's no worse than the previous su binary. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 enable log of Android OS code - opencore
Hi I want to enable the log of of the OS (android) I enabled debugging mode to true, i downloaded android source code of opencore with pvplayer and protocols etc i cant see the errors printed in the source code in my logcat is there any way to enable those log messages need help 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] Can the Content of SlidingDrawer be a ViewGroup ???
hello world i try to make the Content view of SlidingDrawer is a ViewGroup, for example , in the Launcher example it can have two GridView in the same SlidingDrawer my sample is to make android:content = @id/layout ,which is a LinearLayout but i found only the first child in the layout will be shown so i would like to ask is there any constrain to make SlidingDrawer can not have multiple views in its content??? 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: Handling key events in a paused Activity
My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 Compile in Release Mode?
On May 5, 1:38 am, hivebrain hivebr...@gmail.com wrote: I am following the instructions on code signing on the Android Developer site, and it mentions that if you specify that you want to compile in Debug mode, it automatically signs the resulting file with a debug key. It also says that if you specify that Eclipse should compile in Release mode, that you can use the Export Wizard to generate a private key and handle the distribution signing. Can someone point me to the setting in Eclipse for Release vs. Debug compiling. When I use the Export Wizard, I am only given the option to export unsigned. I am pretty sure I am stuck in Debug mode, since my app has no problem running in the emulator or my tethered G1. There isn't really a separate mode as such for release. When the docs refer to release mode they are just talking about signing your apk with your own private key (which is required for uploading to the Market). The latest SDK has stuff in the export wizard to help with that, but in the older releases you can only export unsigned and then sign with the command-line tools. -- Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: viewing logcat from phone not possible in Android 1.5?
You could try using Logcat from http://code.google.com/p/android-random/. If you patch it, using this patch I submitted: http://code.google.com/p/android-random/issues/detail?id=4 , you can filter it and save the logcat output to /sdcard (Useful when a crash occurs). On May 5, 1:24 pm, mathias axelsson mathias.axels...@gmail.com wrote: Log Collector was great (esp since end-users also can use it). Ill prob take a look at creating a su replacement as well since I sometimes need to kill an app on the road. Thanks! On Fri, May 1, 2009 at 1:32 PM, Carter ccjerni...@gmail.com wrote: You could also use Log Collector, which is available on the Android Market. On May 1, 1:26 pm, fadden fad...@android.com wrote: On May 1, 8:06 am, mathias axelsson mathias.axels...@gmail.com wrote: When running 'su', in terminal, I get 'uid X not allowed to su'. 'logcat' gives permission denied /dev/log/main. To avoid creating a situation where an app could run su and do dastardly deeds, an explicit userid check was added to su. You need to be in an adb shell. If this is inconvenient, you can create an unrestricted su replacement. One approach is to make a copy of the shell and chmod/ chown it to setuid root. This creates a security hole -- something could scan your phone for setuid binaries and speculatively execute them looking for root shells -- but it's no worse than the previous su binary. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Handling key events in a paused Activity
perhaps is there a way to intercept all key events globally before they are dispatched to the apps? On Tue, May 5, 2009 at 8:51 AM, Taísa Cristina taisa.san...@gmail.com wrote: My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can the Content of SlidingDrawer be a ViewGroup ???
also i would like to ask is it possible to make HandleView lies on top of ContentView so far i think Handle cannot reside 'inside' Content thanks On May 5, 8:48 pm, allstars allstars@gmail.com wrote: hello world i try to make the Content view of SlidingDrawer is a ViewGroup, for example , in the Launcher example it can have two GridView in the same SlidingDrawer my sample is to make android:content = @id/layout ,which is a LinearLayout but i found only the first child in the layout will be shown so i would like to ask is there any constrain to make SlidingDrawer can not have multiple views in its content??? 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] Cube Runner game for Android
Hi Guys, Here is an iPhone classic Cube Runner game for Android! http://www.youtube.com/watch?v=GHzZOcEZOWY Some screen shots: http://www.g1port.com Enjoy! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: 1.1 emulator - internet problem
This was fixed in the final release On Tue, May 5, 2009 at 9:15 AM, Christine christine.kar...@gmail.comwrote: In the preview release of SDK 1.5, internet didn't work on the 1.1 emulator. Is that still true in the current release? In my 1.1 emulator, I don't have internet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Questions on Tab (TabWidget) Width
Any comments please? On May 2, 8:56 pm, Lewis Z. lzh...@gmail.com wrote: I'm writing applications with many tabs (at least 6 tab pages). After adding all the tabs, the tab heads become very small (i.e., screen width / # of tabs - gaps). Is there way to override this default style so to make them larger and more readable? In other words, how to make the tab heads to stay same size no matter how many tabs are added? Another question. How to make the text in each tab head multiple lines? 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] ::App submission
Hii i am in India I have developed one Game and i want to Submit in Market... its paid Application is the market Accepting Application from Indian Developers...!!! Cheers, Imran --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cannot use dependent projects in 1.5
The answer is coming into this thread: http://groups.google.com/group/android-developers/browse_thread/thread/5537ae10e4143240?pli=1 On May 5, 2:08 am, Rainer rbur...@gmail.com wrote: Hi I have 2 projects in the following layout MainActivityProject - BaseProject (i.e. MainActivityProject depends on the other project). Both are android projects created with the eclipse New Android project functionality) however, the BaseProject does not have an activity defined. However, in BaseProject I define an activity base class where MainActivityProject's Activity derives from. This used to work fine up until 1.1 but now with the 1.5 SDK I get ClassNotFoundExceptions when launching the app. Any suggestion on how to fix this? I obviously dont want to copy all the sources to a single project as I intend to reuse my Activity base class for other things (it contains some boiler plate stuff that I dont want to have in each and every activity. cheers - Rainer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Handling key events in a paused Activity
When your application is paused, which activity is in the foreground? On Tue, May 5, 2009 at 5:51 AM, Taísa Cristina taisa.san...@gmail.comwrote: My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Location of Gears Local DB
hey guys, I was wondering if anyone could direct me to where Gears is putting the local SQL Lite DBs. I can't seem to find it mentioned in the documentation anywhere! 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] Re: Obtaining/calculating process CPU usage.
You can use output of the top command, for your process Here is what I did: Runtime runtime = Runtime.getRuntime(); Process process; String res = -0-; try { String cmd = top -n 1; process = runtime.exec(cmd); InputStream is = process.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line ; while ((line = br.readLine()) != null) { String segs[] = line.trim().split([ ]+); if (segs[0].equalsIgnoreCase([Your Process ID])) { res = segs[1]; break; } } } catch (Exception e) { e.fillInStackTrace(); Log.e(Process Manager, Unable to execute top command); } On May 4, 4:02 pm, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage? ActivityManager provides method that returns a list of all active processes (list of RunningAppProcessInfo), but that class doesn't provide any CPU usage information. Thanks in advance, Tomek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Obtaining/calculating process CPU usage.
I though I sent it once, but Use out put of top linux command with java Runtime. On May 4, 4:02 pm, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage? ActivityManager provides method that returns a list of all active processes (list of RunningAppProcessInfo), but that class doesn't provide any CPU usage information. Thanks in advance, Tomek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Launch Activity
Hi, How can I launch an android activity, defined with : * public class MyActivity extends Activity {...}* from a Java method ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Location of Gears Local DB
I was wondering if anyone could direct me to where Gears is putting the local SQL Lite DBs. Probably some place that cannot be accessed on production hardware. My guess is that it is in the Browser application's private file store. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Launch Activity
Hi, I try to launch an Activity created with : public class MyActivity extends Activity { ... } from a java method. Somebody can help me please --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Keeping an application transparently on top of all other applications
If it's completely transparent, then do you also mean the user cannot interact directly with it? if so, why not use a service? What are you trying to accomplish? On May 4, 10:54 pm, Alex Jurgensen asquare...@gmail.com wrote: Hi, All, How can I keep my application which is a transparent window ontop of every other application so that the other application is seen unterneath as if beneath a pane of glass? Thanks, Alex, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Displaying a now loading image while applic is, well, loading
Yep.. it's that simple. Pls note however that whatever content you're setting will not be actually visible until onCreate() is completed. If your onCreate() processing is lengthy, as ours, you're better off placing your startup image in a dedicated activity. On May 5, 12:34 am, Marco Nelissen marc...@android.com wrote: Why not set your content view to be an ImageView with the desired image, and then once you're ready to show the real UI, call setContentView() again with the real UI? On Mon, May 4, 2009 at 2:22 PM, GiladH gila...@gmail.com wrote: Tnx but that is not what I'm looking for. I basically want to display an image (packed within form/view/ whatever) WITHOUT blocking the UI thread, Can this be done? On May 4, 8:16 pm, Jeff Sharkey jshar...@android.com wrote: Take a peek at AsyncTask, it can help you easily (and correctly) transition between UI and background threads: http://d.android.com/reference/android/os/AsyncTask.html j On Mon, May 4, 2009 at 10:02 AM,GiladHgila...@gmail.com wrote: Hey, I want to display a fancy 'loading' image at my app's startup time. The problem: my startup code is mostly GUI related, hence needs to run on UI thread. Is there a way to do both - that is run UI-related code on UI thread while an image is displayed to the user? GiladH -- Jeff Sharkey jshar...@google.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Possible to change BroadcastReceiver priority from within Activity
Hi all, I have developed a music player and the application defines a bradcast receiver that handles MediaButton intents: ... application... receiver android:name=MediaButtonIntentReceiver intent-filter android:priority=32000 action android:name=android.intent.action.MEDIA_BUTTON/ /intent-filter /receiver /application which works well. My question is if it was possible to change the priority of this receiver from within the settings activity of my application. That way people could choose if they wanted my player as default handler of the headset buttons or not. Cheers, Filipe http://abrantix.org/rockon.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Displaying a now loading image while applic is, well, loading
Well, no. If the work you're doing takes that long, you should do it in another thread. Or, if you absolutely must to do it in your main thread (you never did say why you think you need to do that), you should break it up in to smaller chunks and post messages to your main thread to tell it to process each of those chunks. On Tue, May 5, 2009 at 8:11 AM, GiladH gila...@gmail.com wrote: Yep.. it's that simple. Pls note however that whatever content you're setting will not be actually visible until onCreate() is completed. If your onCreate() processing is lengthy, as ours, you're better off placing your startup image in a dedicated activity. On May 5, 12:34 am, Marco Nelissen marc...@android.com wrote: Why not set your content view to be an ImageView with the desired image, and then once you're ready to show the real UI, call setContentView() again with the real UI? On Mon, May 4, 2009 at 2:22 PM, GiladH gila...@gmail.com wrote: Tnx but that is not what I'm looking for. I basically want to display an image (packed within form/view/ whatever) WITHOUT blocking the UI thread, Can this be done? On May 4, 8:16 pm, Jeff Sharkey jshar...@android.com wrote: Take a peek at AsyncTask, it can help you easily (and correctly) transition between UI and background threads: http://d.android.com/reference/android/os/AsyncTask.html j On Mon, May 4, 2009 at 10:02 AM,GiladHgila...@gmail.com wrote: Hey, I want to display a fancy 'loading' image at my app's startup time. The problem: my startup code is mostly GUI related, hence needs to run on UI thread. Is there a way to do both - that is run UI-related code on UI thread while an image is displayed to the user? GiladH -- Jeff Sharkey jshar...@google.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Launch Activity
http://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent) On Tue, May 5, 2009 at 8:00 AM, danielececil...@gmail.com danielececil...@gmail.com wrote: Hi, I try to launch an Activity created with : public class MyActivity extends Activity { ... } from a java method. Somebody can help me please --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Transparency on Views behaving differently in 1.5
I'm having a similar issue, except that I have an activity on top of another with AndroidManifest.xml declaring android:theme=@android:style/Theme.Translucent.NoTitleBar When I set the background color to #8800 in Android 1.1 it works nicely giving a darker transparancy... and in Android 1.5 once in a while it decides not to work making the background all back and no longer transperant. Any ideas why this happens? -Moto! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Possible to change BroadcastReceiver priority from within Activity
I don't know if you can change the priority, but you could just have your receiver do nothing when you don't want to handle the button. On Tue, May 5, 2009 at 8:22 AM, Filipe Abrantes filipe.abran...@gmail.comwrote: Hi all, I have developed a music player and the application defines a bradcast receiver that handles MediaButton intents: ... application... receiver android:name=MediaButtonIntentReceiver intent-filter android:priority=32000 action android:name=android.intent.action.MEDIA_BUTTON/ /intent-filter /receiver /application which works well. My question is if it was possible to change the priority of this receiver from within the settings activity of my application. That way people could choose if they wanted my player as default handler of the headset buttons or not. Cheers, Filipe http://abrantix.org/rockon.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Possible to change BroadcastReceiver priority from within Activity
You can also use the PackageManager API to disable or enable the component. On Tue, May 5, 2009 at 9:38 AM, Marco Nelissen marc...@android.com wrote: I don't know if you can change the priority, but you could just have your receiver do nothing when you don't want to handle the button. On Tue, May 5, 2009 at 8:22 AM, Filipe Abrantes filipe.abran...@gmail.com wrote: Hi all, I have developed a music player and the application defines a bradcast receiver that handles MediaButton intents: ... application... receiver android:name=MediaButtonIntentReceiver intent-filter android:priority=32000 action android:name=android.intent.action.MEDIA_BUTTON/ /intent-filter /receiver /application which works well. My question is if it was possible to change the priority of this receiver from within the settings activity of my application. That way people could choose if they wanted my player as default handler of the headset buttons or not. Cheers, Filipe http://abrantix.org/rockon.php -- 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: Obtaining/calculating process CPU usage.
This is very likely to break in future platform updates. On Tue, May 5, 2009 at 7:53 AM, rezar rraw...@gmail.com wrote: You can use output of the top command, for your process Here is what I did: Runtime runtime = Runtime.getRuntime(); Process process; String res = -0-; try { String cmd = top -n 1; process = runtime.exec(cmd); InputStream is = process.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line ; while ((line = br.readLine()) != null) { String segs[] = line.trim().split([ ]+); if (segs[0].equalsIgnoreCase([Your Process ID])) { res = segs[1]; break; } } } catch (Exception e) { e.fillInStackTrace(); Log.e(Process Manager, Unable to execute top command); } On May 4, 4:02 pm, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage? ActivityManager provides method that returns a list of all active processes (list of RunningAppProcessInfo), but that class doesn't provide any CPU usage information. Thanks in advance, Tomek -- 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: Handling key events in a paused Activity
No, you can't do this. The home and end call keys are trapped by the system before being delivered to the application, and handled by itself. On Tue, May 5, 2009 at 5:51 AM, Taísa Cristina taisa.san...@gmail.comwrote: My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to send the On Call Screen Back
You won't be able to do this. If nothing else, there is no way to cause the phone to hang up, so you will leave the call running for an indefinite amount of time without the user being aware. On Tue, May 5, 2009 at 3:17 AM, raj.10788 raj.10...@gmail.com wrote: Hi All, I am trying to create a application, which is capable of making phone calls to the given number at the scheduled time (someting like reminder). But at the same time once it starts to make the call, my application should take a picture from Camera. So after starting the call activity, after few seconds I want the on call screen activity should go to back ground and my own camera app(A activity with surface) should come to the foreground to take a picture. I tried the above one in the following way, 1. create a Action calll intent and started the call activity from my Applications Main Activity. 2. After few seconds I started my own camera activity from my App Mail Activity. But it's not working. Once I start the call, the on call screen only showing in the foreground, that camera Activity is not at all coming to forground. So when I give back button the camera Activity is coming to foreground. I don know the reason. Can anyone tell me what's wrong in this. I think am missing some thing inthis. any pointers to this one is highly appriciated. thanks raj -- 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: Handling key events in a paused Activity
I don't want to handle end call or home keys. I just want to handle another key, such as space bar, while my Activity is in background. Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 1:45 PM, Dianne Hackborn hack...@android.com wrote: No, you can't do this. The home and end call keys are trapped by the system before being delivered to the application, and handled by itself. On Tue, May 5, 2009 at 5:51 AM, Taísa Cristina taisa.san...@gmail.comwrote: My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. -- 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: Get result from settings activity intent
Correct there is no way to get a result back from a PendingIntent that someone else launched. But you could just write you pending intent to launch your own activity which launches the settings panel. (Though this will still leave back-doors where the user could explicitly go to settings and change something without you being aware.) On Tue, May 5, 2009 at 2:29 AM, jrgraf...@googlemail.com jrgraf...@googlemail.com wrote: The problem I have here is that after the setting is updated in the configuration dialogue I need to dynamically update the current display of all widgets, however since they are running as a pending Intent from the Widget manager I cant see how I can get a notified when the user has closed the settings dialogue, since as you say the startActivity() call does not block my current pendingIntents execution and there is no way for it to detect when the back button is pressed. Is it simply not possible to achieve in an activity launched via a pending intent or am I just going about this the wrong way? Thanks for all your help! -James On May 4, 3:48 pm, Mark Murphy mmur...@commonsware.com wrote: jrgraf...@googlemail.com wrote: I am currently trying to launch a GPS settings activity using startActivityForResulthowever it never seems to be calling my onActivityResult function after it exits. I noticed the docs mentioned that some Intent protocols are not defined to return a result, is this one such example? I would be surprised if the settings activities are built to return a result. After all, most of those activities adjust several settings, so what would the result be? are there any flags that I could set to either make the settings activity call onActivityResult, or even better make my activity block until the launched activity returns? That depends on what you mean by block. Your activity already blocks until the launched activity is closed. All activities work that way when starting up other activities. However, in this case, block does not mean startActivity() blocks. Instead, after you have called startActivity() and returned from whatever callback you are in, your activity will be stopped and the settings activity will be opened. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, 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: Handling key events in a paused Activity
You can't. On Tue, May 5, 2009 at 9:53 AM, Taísa Cristina taisa.san...@gmail.comwrote: I don't want to handle end call or home keys. I just want to handle another key, such as space bar, while my Activity is in background. Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 1:45 PM, Dianne Hackborn hack...@android.comwrote: No, you can't do this. The home and end call keys are trapped by the system before being delivered to the application, and handled by itself. On Tue, May 5, 2009 at 5:51 AM, Taísa Cristina taisa.san...@gmail.comwrote: My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. -- 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. -- 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: Handling key events in a paused Activity
Whenever I press a key, will the Bookmark activity handle it? Is it a default behavior that can *not* be configured? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 1:55 PM, Dianne Hackborn hack...@android.com wrote: You can't. On Tue, May 5, 2009 at 9:53 AM, Taísa Cristina taisa.san...@gmail.comwrote: I don't want to handle end call or home keys. I just want to handle another key, such as space bar, while my Activity is in background. Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 1:45 PM, Dianne Hackborn hack...@android.comwrote: No, you can't do this. The home and end call keys are trapped by the system before being delivered to the application, and handled by itself. On Tue, May 5, 2009 at 5:51 AM, Taísa Cristina taisa.san...@gmail.comwrote: My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. -- 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. -- 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: Handling key events in a paused Activity
I really hope that this is *not* possible. A background application that steals key-strokes is not a good idea. I won't doubt that your application only has good itentions, but the idea that i could be downloading a key-stroke sniffer is not very appealing. I'd rather not have my passwords stolen. Taisa, Can you tell us *what* the functionality/task is that you try to accomplish (not *how*)? Maybe you can accomplish the same without the need to receive key- stroke events. On May 5, 12:53 pm, Taísa Cristina taisa.san...@gmail.com wrote: I don't want to handle end call or home keys. I just want to handle another key, such as space bar, while my Activity is in background. Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 1:45 PM, Dianne Hackborn hack...@android.com wrote: No, you can't do this. The home and end call keys are trapped by the system before being delivered to the application, and handled by itself. On Tue, May 5, 2009 at 5:51 AM, Taísa Cristina taisa.san...@gmail.comwrote: My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. -- 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.- 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: Handling key events in a paused Activity
In fact I do need to handle key strokes. It would be easier if I could handle home key, so that I could prevent the user from going to home screen. I think it's not a good approach to finish my Activity when it's paused as well. And it would be very boring for the user to go back to the Activity whenever he wanted to press a key and make stuff... Is there a way to register for receiving key strokes if my application is compiled with the emulator/device image? (should I ask it on android-platform?) Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 2:01 PM, Streets Of Boston flyingdutc...@gmail.comwrote: I really hope that this is *not* possible. A background application that steals key-strokes is not a good idea. I won't doubt that your application only has good itentions, but the idea that i could be downloading a key-stroke sniffer is not very appealing. I'd rather not have my passwords stolen. Taisa, Can you tell us *what* the functionality/task is that you try to accomplish (not *how*)? Maybe you can accomplish the same without the need to receive key- stroke events. On May 5, 12:53 pm, Taísa Cristina taisa.san...@gmail.com wrote: I don't want to handle end call or home keys. I just want to handle another key, such as space bar, while my Activity is in background. Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 1:45 PM, Dianne Hackborn hack...@android.com wrote: No, you can't do this. The home and end call keys are trapped by the system before being delivered to the application, and handled by itself. On Tue, May 5, 2009 at 5:51 AM, Taísa Cristina taisa.san...@gmail.com wrote: My application behavior is similar to voice call, but I need also to handle key events. My application is still running in background and the activity is paused. Is there a way to receive key events in such situation? When the call screen is paused, it receives end call key event. Can I receive a specific key event in a similar situation? Is there a way to register my activity (or my application) for that? Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: If what you want is to have a notification that the user can swipe down and click to go back to your application, then you don't really need to be handling key events whilst your activity is paused. What you could do is create a service which displays the notification, and then use an intent to launch your activity when the notification is clicked. BUT - I'm not sure that this is good usability design. If the user has navigated away from your activity and if you don't need to do any continual background processing, then you probably shouldn't show anything in the notification panel. The user can always get back to your app from the homescreen or via a long press on the home button. -- 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.- 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 -~--~~~~--~~--~--~---