Re: [android-developers] Re: What is the name of this widget?
On Tue, Jan 11, 2011 at 11:55 PM, mort m...@sto-helit.de wrote: But Date- and TimePicker are public and using the NumberPicker as well. Many classes that are public make use of private classes for implementation. That isn't a reason to make those other classes public. And you should be aware that everything that already exists in the core system will be seen as standard template, and so there are already several apps which copied the NumberPicker or wrote own, similar looking ones. Um. Yeah. It's open source. If there is something in the open source code you like but isn't in the SDK, copy it out, make sure it builds against the SDK, and use it. That's one of the benefits for developers of things being open source. Isn't the big advantage of Widgets that you can completely replace code and appearance as long as you keep the interface compatible? No. You can only modify it so far as it doesn't break existing applications. That can be very limiting. I'm afraid you'll now see the bad old NumberPicker way longer in apps which copied it than it would've been the case if you offered a public interface and one day replaced it with another implementation - just like it might happen with the date and time pickers. We can live with that. Admit it - you just wanted to lead developers to the wonderful world of the Android source code and git by forcing them to get the NumberPicker from there. ;) People are absolutely welcome to pull stuff out of the open source code that they find useful. One of the gratifying things about working on Android is that all of our work is available to everyone to freely do what they want with it. No, seriously. I appeciate your work. I might think different in some topics, but you did a wonderful job with Android. Thanks, I appreciate it. :) -- 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: Services and battery life
On 11 Jan., 17:37, TreKing treking...@gmail.com wrote: The likelihood of your Service running un-interrupted for 30 minutes, especially if you're not running in the foreground, is extremely low. Well, if really necessary, one could show a notification and use startForeground. I for one would go for a compromise: Use AlarmManager for the timing, unless you really, really need to be as exact as possible (Android is a multitasking system, and services usually don't have highest priority, so there'll always be some lack). But don't stop the service until after the 30 minutes are over. This way, you only have to do all the initialization work if the system killed your service, while AlarmManager saves you from aborted updates and having to use wake locks while idle. I think for as short as 30 minutes it's OK to keep the service running mostly idle if this saves the system from having to load and initialize every 5 minutes. Esp. if this might be connected with restarting GPS and searching for sattellites again and again... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Theme.Dialog bug in 2.1?
That is the intended behavior and has been the case since 1.0. The common case is that you have one application with one task that goes together. If you want to split it into separate tasks, you need to explicitly do so. On Tue, Jan 11, 2011 at 11:27 PM, Schoel samuelsson.j...@gmail.com wrote: Thank you very much, Dianne Hackborn! That helped. Still seems like a bug though, doesn't it? Maybe a fixed one at that since it seems to work in 2.2. On 11 Jan, 18:33, Dianne Hackborn hack...@android.com wrote: This is because all activities in an .apk are given the same task affinity by default, so they will try to stay together on the same stack. You can use android:taskAffinity on an activity to change this. Use if you don't want a task affinity for an activity (probably what you want for the dialog). There is some description of this here: http://developer.android.com/guide/topics/fundamentals.html#afftask On Tue, Jan 11, 2011 at 4:52 AM, Schoel samuelsson.j...@gmail.com wrote: Hello, I have found some weird behaviour which might be a bug. I found it while developing a quite large application but I've been able to reproduce the behaviour in a minimal approach so that I can provide source code. I have a service that is constantly running and at certain times it pops up an activity with Theme.Dialog as theme for the user. Everything works fine if the main activity of the program has been destroyed (via back button) or if the main activity is currently running. However, if the main activity of the app has been created and then minimized (e.g. via Home button), the main activity shows up. It is not possible to click the buttons of the main activity because it seems to be hidden behind an invisible dialog activity. It is possible to click the buttons of the dialog if you know where they are and if you click the back button, you can see the dialog flashing by as it disappears and it is then possible to click the main activity buttons. I've tested this on HTC Desire 2.2, HTC Wildfire 2.1, HTC Legend 2.1, Sony x10 mini pro 2.1 and on emulators 2.1 and 2.2. The behaviour described happens on all 2.1 devices and emulator but not on emulator 2.2 nor on the Desire with 2.2. Source code is provided below. There are 2 buttons in the main activity, the first, called Finish asks the service to popup the dialog in 3 seconds and then finishes the main activity. This button is for illustrative purposes only, it works fine. The second button, called Post later just asks the service to popup the dialog in 3 seconds. If the second button is clicked and before the 3 seconds have passed, the home button is clicked, the bug appears. Source code: Main.java: -- package com.myapp.DialogBugTest; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.View; public class Main extends Activity { private Handler handler = new Handler(); private final Runnable runnable = new Runnable() { public void run() { DialogBugTestService.getInstance().showDialog(); } }; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); startService(new Intent(this, DialogBugTestService.class)); } public void onFinishButton(View aView) { handler.postDelayed(runnable, 3000); finish(); } public void onLaterButton(View aView) { handler.postDelayed(runnable, 3000); } } -- main.xml: -- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent Button android:id=@+id/finish_button android:layout_width=fill_parent android:layout_height=wrap_content android:text=Finish android:onClick=onFinishButton / Button android:id=@+id/later_button android:layout_width=fill_parent android:layout_height=wrap_content android:text=Post later android:onClick=onLaterButton / /LinearLayout -- DialogBugTestService.java: -- package
Re: [android-developers] BootStrapService
On 12 January 2011 08:03, Ken H hunt1...@gmail.com wrote: It's been about a year since I've done anything with the .BootStrapService. Has anything changed? My service no longer seems to set its alarm after the phone restarts -- it use to. Anything basic I've missed? if you want your app when phone starts you shall create broadcast receiver: receiver android:name=.BootReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver and add uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Services and battery life
There is absolutely no benefit to keeping the service running during that time. If you want to avoid work when it starts every 5 minutes, keep your previous work in static globals to re-use the next time the service is created. All you do by keeping the service running is that if the system is running low on RAM it can't do as good a job at deciding which processes to throw away, because you are not giving it good information about how expendable your process is. This also makes it more likely that in such a situation it will decide to kill your process while it is actually actively doing stuff, because it will think that the service has been sitting there running for a long time. Android considers long-running services to be better candidates to kill than those that were more recently started. On Wed, Jan 12, 2011 at 12:13 AM, mort m...@sto-helit.de wrote: On 11 Jan., 17:37, TreKing treking...@gmail.com wrote: The likelihood of your Service running un-interrupted for 30 minutes, especially if you're not running in the foreground, is extremely low. Well, if really necessary, one could show a notification and use startForeground. I for one would go for a compromise: Use AlarmManager for the timing, unless you really, really need to be as exact as possible (Android is a multitasking system, and services usually don't have highest priority, so there'll always be some lack). But don't stop the service until after the 30 minutes are over. This way, you only have to do all the initialization work if the system killed your service, while AlarmManager saves you from aborted updates and having to use wake locks while idle. I think for as short as 30 minutes it's OK to keep the service running mostly idle if this saves the system from having to load and initialize every 5 minutes. Esp. if this might be connected with restarting GPS and searching for sattellites again and again... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] How to record audio..?
Hi friends, How can we record the voice and save it to sdcard. I tried but getting *unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value,* * VerifyAndSetParameter failed and PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handle..* * * * * if anybody know how capture audio..?send me the code snippets and useful links... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Call Recording issue
Hi All, I am writing an application to record the call. I have created an Activity for UI and a Service to start and stop record. In Service to start record, the code is MediaRecorder recorder=new MediaRecorder(); File root=Environment.getExternalStorageDirectory(); File recordfile=new File(root,call_file.3gp); Log.d(TAG,FilePath::+recordfile.getAbsolutePath().toString()); recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); //recorder.setOutputFile(/data/data/com.example.CallRecorder/ call_file); //this.getFilesDir(); Log.d(TAG,set path to sdcard); recorder.setOutputFile(/sdcard/call_file.3gp); try { recorder.prepare(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } recorder.start(); /// After executing a call and starting record, my app is hang and then ANR alert is coming to close it. Even i am destroying record service and release recorder , the app is still hang. It seems that my app loose the control. The logs coming in loop are: 01-12 11:21:13.159: WARN/AudioRecord(1955): obtainBuffer timed out (is the CPU pegged?) user=, server= 01-12 11:21:14.164: WARN/AudioRecord(1955): obtainBuffer timed out (is the CPU pegged?) user=, server= 01-12 11:21:15.169: WARN/AudioRecord(1955): obtainBuffer timed out (is the CPU pegged?) user=, server= 01-12 11:21:16.173: WARN/AudioRecord(1955): obtainBuffer timed out (is the CPU pegged?) user=, server= 01-12 11:21:17.173: WARN/AudioRecord(1955): obtainBuffer timed out (is the CPU pegged?) user=, server= 01-12 11:21:18.180: WARN/AudioRecord(1955): obtainBuffer timed out (is the CPU pegged?) user=, server=000 Please help me to resolve the same. Thank Chetan Chauhna -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Theme.Dialog bug in 2.1?
Is the topmost activity intended to occupy the screen without being visible? I don't mind the entire activity stack popping up when this happens, but the topmost dialog is not even visible but it's still there. This is not the case when using 2.2, like I described above, so something has been changed. On 12 Jan, 09:13, Dianne Hackborn hack...@android.com wrote: That is the intended behavior and has been the case since 1.0. The common case is that you have one application with one task that goes together. If you want to split it into separate tasks, you need to explicitly do so. On Tue, Jan 11, 2011 at 11:27 PM, Schoel samuelsson.j...@gmail.com wrote: Thank you very much, Dianne Hackborn! That helped. Still seems like a bug though, doesn't it? Maybe a fixed one at that since it seems to work in 2.2. On 11 Jan, 18:33, Dianne Hackborn hack...@android.com wrote: This is because all activities in an .apk are given the same task affinity by default, so they will try to stay together on the same stack. You can use android:taskAffinity on an activity to change this. Use if you don't want a task affinity for an activity (probably what you want for the dialog). There is some description of this here: http://developer.android.com/guide/topics/fundamentals.html#afftask On Tue, Jan 11, 2011 at 4:52 AM, Schoel samuelsson.j...@gmail.com wrote: Hello, I have found some weird behaviour which might be a bug. I found it while developing a quite large application but I've been able to reproduce the behaviour in a minimal approach so that I can provide source code. I have a service that is constantly running and at certain times it pops up an activity with Theme.Dialog as theme for the user. Everything works fine if the main activity of the program has been destroyed (via back button) or if the main activity is currently running. However, if the main activity of the app has been created and then minimized (e.g. via Home button), the main activity shows up. It is not possible to click the buttons of the main activity because it seems to be hidden behind an invisible dialog activity. It is possible to click the buttons of the dialog if you know where they are and if you click the back button, you can see the dialog flashing by as it disappears and it is then possible to click the main activity buttons. I've tested this on HTC Desire 2.2, HTC Wildfire 2.1, HTC Legend 2.1, Sony x10 mini pro 2.1 and on emulators 2.1 and 2.2. The behaviour described happens on all 2.1 devices and emulator but not on emulator 2.2 nor on the Desire with 2.2. Source code is provided below. There are 2 buttons in the main activity, the first, called Finish asks the service to popup the dialog in 3 seconds and then finishes the main activity. This button is for illustrative purposes only, it works fine. The second button, called Post later just asks the service to popup the dialog in 3 seconds. If the second button is clicked and before the 3 seconds have passed, the home button is clicked, the bug appears. Source code: Main.java: -- package com.myapp.DialogBugTest; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.View; public class Main extends Activity { private Handler handler = new Handler(); private final Runnable runnable = new Runnable() { public void run() { DialogBugTestService.getInstance().showDialog(); } }; /** Called when the activity is first created. */ �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); startService(new Intent(this, DialogBugTestService.class)); } public void onFinishButton(View aView) { handler.postDelayed(runnable, 3000); finish(); } public void onLaterButton(View aView) { handler.postDelayed(runnable, 3000); } } -- main.xml: -- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent Button android:id=@+id/finish_button android:layout_width=fill_parent android:layout_height=wrap_content android:text=Finish android:onClick=onFinishButton / Button
Re: [android-developers] Re: Accessing Facebook photos from the Contacts provider
Devices with Android 2.0 or newer support it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] image background - how to repeat an image rather than strech it
Hi, I have an image I want to use as a background to some layout. the problem is the image contains a texture of slant lines, so if i use a 1 pixel width image or a 9 patch the image is stretched and the texture is Twitching, so i can see the slant lines as latitude lines. I saw that he android emulator uses a similar texture in the progress bar indeterminate animation, is there a special/simple definition to order the background image to repeat itself rather than stretch? is there a way to do it with 9 patch, cause eventualy i also need the corners to be round. thanks for the 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] 2D game BallBraker
Hey guys I have to make the game like this :- http://www.1980-games.com/us/action-games/block-breaker/ballbraker.php I have to make this in 5 days and i have no idea how to make a game. Even tiny help will be appreciated -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 record audio..?
any help... On Wed, Jan 12, 2011 at 1:55 PM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi friends, How can we record the voice and save it to sdcard. I tried but getting *unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value,* * VerifyAndSetParameter failed and PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handle..* * * * * if anybody know how capture audio..?send me the code snippets and useful links... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: My App should get information of every Http Get.
Can we have packet sniffer or analyzer in android as application part. Can i get design to implement the packet sniffer or analyzer . On Dec 25 2010, 2:32 am, Frank Weiss fewe...@gmail.com wrote: It's not possible from the SDK. You'll need to root the phone or run it on a Wifi network with a packet sniffer or proxy. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 keyboard alters layout
Hi all. I have a layout which comprises a central section (for listview etc) and a navigation bar which is fixed at the bottom. When the soft keyboard pops up, the view is compacted to make way for it, and my nav bar gets pushed halfway up the screen which just looks daft. Is there a way I can stop this? Surely the keyboard can act as a frame and overlay the existing views? 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
Re: [android-developers] Re: My App should get information of every Http Get.
On 12 January 2011 10:12, chetan chetanchauha...@gmail.com wrote: Can we have packet sniffer or analyzer in android as application part. Can i get design to implement the packet sniffer or analyzer . You got the answer in previous post. On Dec 25 2010, 2:32 am, Frank Weiss fewe...@gmail.com wrote: It's not possible from the SDK. You'll need to root the phone or run it on a Wifi network with a packet sniffer or proxy. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Can I launch executable file under Jni level?
I write some code by c language and build it for arm platform - imx51. I can run this file under command line like this. start machine. adb push ./hello / adb shell ./hello and I can see the following information Hello World! I write some code on JNI. #include jni.h #include stdlib.h #include unistd.h #include utils/Log.h JNIEXPORT void JNICALL Java_rtk_main_atp_BrakeDetect_RunJniBrakeDetect(JNIEnv *env, jobject jobj) { int ret = execv(/hello, (char *)NULL); char buff[100]; memset(buff, 0, sizeof(100)); sprintf(buff, [libhello] Hello %d \n, ret ); LOGD( buff ); } but it must have something wrong, because I can't get any result from logcat. I got follow message AndroidRuntime( 2688): D/AndroidRuntime( 2688): AndroidRuntime START D/AndroidRuntime( 2688): CheckJNI is OFF D/dalvikvm( 2688): creating instr width table D/AndroidRuntime( 2688): --- registering native functions --- I/ActivityManager( 2136): Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=2696 uid=10013 gids={1015, 2001} D/dalvikvm( 2696): GC_EXPLICIT freed 742 objects / 54664 bytes in 53ms D/PackageParser( 2136): Scanning package: /data/app/vmdl13306.tmp D/dalvikvm( 2136): GC_FOR_MALLOC freed 6299 objects / 286008 bytes in 105ms I/PackageManager( 2136): Removing non-system package:rtk.main.atp I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 D/dalvikvm( 2136): GC_FOR_MALLOC freed 1619 objects / 115552 bytes in 104ms D/PackageManager( 2136): Scanning package rtk.main.atp I/PackageManager( 2136): /data/app/rtk.main.atp-2.apk changed; unpacking I/PackageManager( 2136): Package rtk.main.atp codePath changed from / data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk; Retaining data and using new D/installd( 2069): DexInv: --- BEGIN '/data/app/rtk.main.atp-2.apk' --- D/dalvikvm( 2718): creating instr width table D/dalvikvm( 2718): DexOpt: load 14ms, verify 6ms, opt 0ms D/installd( 2069): DexInv: --- END '/data/app/ rtk.main.atp-2.apk' (success) --- D/PackageManager( 2136): Activities: rtk.main.atp.BrakeDetect I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 W/PackageManager( 2136): Code path for pkg : rtk.main.atp changing from /data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk W/PackageManager( 2136): Resource path for pkg : rtk.main.atp changing from /data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk D/dalvikvm( 2136): GC_FOR_MALLOC freed 1695 objects / 115832 bytes in 96ms I/installd( 2069): move /data/dalvik-cache/ d...@app@rtk.main.atp-2@classes.dex - /data/dalvik-cache/ d...@app@rtk.main.atp-2@classes.dex D/PackageManager( 2136): New package installed in /data/app/ rtk.main.atp-2.apk D/dalvikvm( 2136): GC_FOR_MALLOC freed 1253 objects / 92008 bytes in 100ms I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 D/dalvikvm( 2296): GC_EXPLICIT freed 3866 objects / 240360 bytes in 104ms W/RecognitionManagerService( 2136): no available voice recognition services found D/dalvikvm( 2136): GC_FOR_MALLOC freed 1961 objects / 121864 bytes in 117ms I/ActivityManager( 2136): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=2720 uid=10014 gids={} D/dalvikvm( 2136): GC_EXPLICIT freed 412 objects / 21232 bytes in 81ms I/ActivityThread( 2720): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider I/installd( 2069): unlink /data/dalvik-cache/ d...@app@rtk.main.atp-1@classes.dex D/AndroidRuntime( 2688): Shutting down VM D/jdwp( 2688): Got wake-up signal, bailing out of select D/dalvikvm( 2688): Debugger has detached; object registry had 1 entries D/AndroidRuntime( 2731): D/AndroidRuntime( 2731): AndroidRuntime START D/AndroidRuntime( 2731): CheckJNI is OFF D/dalvikvm( 2731): creating instr width table D/AndroidRuntime( 2731): --- registering native functions --- I/ActivityManager( 2136): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1000 cmp=rtk.main.atp/.BrakeDetect } D/AndroidRuntime( 2731): Shutting down VM D/jdwp( 2731): Got wake-up signal, bailing out of select D/dalvikvm( 2731): Debugger has detached; object registry had 1 entries I/ActivityManager( 2136): Start proc rtk.main.atp for activity rtk.main.atp/.BrakeDetect: pid=2749 uid=10034 gids={} D/dalvikvm( 2749): No JNI_OnLoad found in /system/lib/ libBrakeDetect.so 0x46123a68, skipping init I/ActivityManager( 2136): Process rtk.main.atp (pid 2749) has died. I/ActivityManager( 2136): Displayed activity android/ com.android.internal.app.ResolverA after I modify some code under JNI #include jni.h #include stdlib.h #include unistd.h #include utils/Log.h JNIEXPORT void JNICALL Java_rtk_main_atp_BrakeDetect_RunJniBrakeDetect(JNIEnv *env, jobject jobj) { int ret = 55;//execv(/hello, (char *)NULL); //fail char buff[100];
[android-developers] Re: 2D game BallBraker
First of all, you will not have that working in 5 days if this is your first game. Any one little thing will get you hung up and you'll slip. You will need much more time than that to get acquainted with game development. I published an article here about android game development - http://www.rbgrn.net/content/54-getting-started-android-game-development Mario Zechner has lots of great info for beginning game development at his blog - http://www.badlogicgames.com/wordpress/ On Jan 12, 1:01 am, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: Hey guys I have to make the game like this :-http://www.1980-games.com/us/action-games/block-breaker/ballbraker.php I have to make this in 5 days and i have no idea how to make a game. Even tiny help will be appreciated -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: JNI working
hmm I don't know but am I right if I think that the code written in C+ + will be the same for both of processores. And OS will be the same too. And as I know the android app is compilated by virtual machine which is running under the android. So I don'tunderstand why deppends on type of processor. But it could be true, I'm only asking. thanks for answers On 12. Jan, 01:28 h., John Gaby jg...@gabysoft.com wrote: I believe that there are devices (e.g. some tablets) out there that use MIPS processors rather than ARM. Correct me if I am wrong, but I do not believe that code compiled for an ARM device will work on a MIPS device. On Jan 11, 11:35 am, Kumar Bibek coomar@gmail.com wrote: Yes, It will work on all devices... Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 1:03 AM, Richard Sámela feromak...@gmail.comwrote: Hi, I would like to know something about JNI. How it works in android? does it work on all devices? does it work on tablest with android? I want to use toolkit in C++ programing language. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email toandroid-develop...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: JNI working
Native code is... well native. An .so packaged within an application contains machine code and runs directly on the processor (unlike .dex code). -- Kostya 12.01.2011 13:36, Richard Sámela пишет: hmm I don't know but am I right if I think that the code written in C+ + will be the same for both of processores. And OS will be the same too. And as I know the android app is compilated by virtual machine which is running under the android. So I don'tunderstand why deppends on type of processor. But it could be true, I'm only asking. thanks for answers On 12. Jan, 01:28 h., John Gabyjg...@gabysoft.com wrote: I believe that there are devices (e.g. some tablets) out there that use MIPS processors rather than ARM. Correct me if I am wrong, but I do not believe that code compiled for an ARM device will work on a MIPS device. On Jan 11, 11:35 am, Kumar Bibekcoomar@gmail.com wrote: Yes, It will work on all devices... Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 1:03 AM, Richard Sámelaferomak...@gmail.comwrote: Hi, I would like to know something about JNI. How it works in android? does it work on all devices? does it work on tablest with android? I want to use toolkit in C++ programing language. -- You received this message because you are subscribed to the Google Groups Android Developers group.To post to this group, send email toandroid-develop...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] In android how to programmatically list the apps that uses Data connection?
Hi, can any one please tell me in android, Is it possible to access the list application names that is using Data connection in background/ foreground.? If possible how? note: I came to know it is possible to access the Total data consumption in bytes by reading TX/RX files. But i couldn't find which application are using the data connection. Thanks in advance, - Harsha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Calculating screen coordiantes in augmented reality???
Hi Iam developing an augmented reality browser on my ownn...But not able to get the screen cooridinates I will discuss my whole problem here.as im not sure at which point i stuck up... I hav a set of latitude longitude values for different points.Taking them Iam calculating x,y,z coordinates for each point.Using left handed rule ie.x towards east y towards north and z upwards values which i get are:- x=(a+altitude)*(Math.cos(latitude)*Math.sin(longitude));//x y=(a+altitude)*Math.sin(latitude);//y z=(a+altitude)*(Math.cos(latitude)*Math.cos(longitude));//z where a=app 80m i have taken radius of earth.The origin is defined to be at centre of earth(ECEF) SensorManager.getRotationMatrix(RTmp, I, grav, mag); SensorManager.remapCoordinateSystem(RTmp, SensorManager.AXIS_X, SensorManager.AXIS_Z, R); SensorManager.getOrientation(R, values); azimuth = (float)((values[0])*(180/Math.PI)); //in degree pitch = (float)((values[1])*(180/Math.PI)); //in degree roll = (float)((values[2])*(180/Math.PI)); //in degree Then using perspective projection Iam calculating screen coordinates. Iam refering below link for perspective projection:-- http://en.wikipedia.org/wiki/3D_projection#Perspective_projection In the above link Iam replacing thetax with pitch,thetay with roll,thetaz with azimuth. Watever screen coordinates i got from above calculations Iam plotting a circle using canvas.But Iam unable to see anything. Pleae help as Iam stuck up with this for the past 3 dayzzz :( :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] In android how to programmatically list the apps that uses Data connection?
You could start by searching for applications that have INTERNET permission: http://developer.android.com/reference/android/content/pm/PackageManager.html -- Kostya 12.01.2011 13:55, Harsha пишет: note: I came to know it is possible to access the Total data consumption in bytes by reading TX/RX files. But i couldn't find which application are using the data connection. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] In android how to programmatically list the apps that uses Data connection?
Hi, can any one please tell me in android, Is it possible to access the list application names that is using Data connection in background/ foreground.? If possible how? note: I came to know it is possible to access the Total data consumption in bytes by reading TX/RX files. But i couldn't find which application are using the data connection. Thanks in advance, - Harsha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Does emulator support video recording(camera input)?
Hi All, I am trying to record a video from Android. I am currently developing it in Eclipse and would like to know if I can test the camera input by accessing my Laptop's web camera instead of device camera. I tried to run the camerapreview of APIDEmos sample applications and other few sample application and it just shows a blank screen. Jeev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 2D game BallBraker
@Rob: nice post, I'll read it. I am pretty curious about game development. @Abhishek: you could give andengine framework a try. I think it could make your life easier. For example, it handles element collision (which I'm pretty sure it can be useful in a game like the one you want to devel). Hope this helps. Federico On 12 Gen, 11:30, Robert Green rbgrn@gmail.com wrote: First of all, you will not have that working in 5 days if this is your first game. Any one little thing will get you hung up and you'll slip. You will need much more time than that to get acquainted with game development. I published an article here about android game development -http://www.rbgrn.net/content/54-getting-started-android-game-development Mario Zechner has lots of great info for beginning game development at his blog -http://www.badlogicgames.com/wordpress/ On Jan 12, 1:01 am, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: Hey guys I have to make the game like this :-http://www.1980-games.com/us/action-games/block-breaker/ballbraker.php I have to make this in 5 days and i have no idea how to make a game. Even tiny help will be appreciated -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] about content provider physical store location
hi all, I have a question about content provider, for example, I used the *Telephony.Carriers.CURRENT* this URI to store all APN nodes, maybe it will has 100 nodes(records) in it. but when I insert the 100 rows data via *ContentResolver.insert* pragramatically, instead of inserting records in every product by code, I wish my every product can have these 100 rows data atomatically, so I think there must exist a *real physical store location* to store the *Telephony.Carriers.CURRENT* URI all records, like xxx.db. so that I can just copy the xxx.db to every products, and used these records. is there have a physical location to store records in URI? please give me some suggestion. thanks a lot!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: 2D game BallBraker
Thanks guys for the links and suggestions. I am going through your article also robert it seems to be quite helpfull. Regards On Wed, Jan 12, 2011 at 4:50 PM, Federico Paolinelli fedep...@gmail.comwrote: @Rob: nice post, I'll read it. I am pretty curious about game development. @Abhishek: you could give andengine framework a try. I think it could make your life easier. For example, it handles element collision (which I'm pretty sure it can be useful in a game like the one you want to devel). Hope this helps. Federico On 12 Gen, 11:30, Robert Green rbgrn@gmail.com wrote: First of all, you will not have that working in 5 days if this is your first game. Any one little thing will get you hung up and you'll slip. You will need much more time than that to get acquainted with game development. I published an article here about android game development - http://www.rbgrn.net/content/54-getting-started-android-game-development Mario Zechner has lots of great info for beginning game development at his blog -http://www.badlogicgames.com/wordpress/ On Jan 12, 1:01 am, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: Hey guys I have to make the game like this :- http://www.1980-games.com/us/action-games/block-breaker/ballbraker.php I have to make this in 5 days and i have no idea how to make a game. Even tiny help will be appreciated -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Services and battery life
On Wed, Jan 12, 2011 at 3:17 AM, Dianne Hackborn hack...@android.com wrote: If you want to avoid work when it starts every 5 minutes, keep your previous work in static globals to re-use the next time the service is created. To clarify, you will need to ensure that you can reload those static globals as needed. While the process probably sticks around between alarms, it might not, in which case those globals will be null and you will have to regenerate that data. Consider these static globals to be an optimization, not a load-bearing beam of your app. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 analytics jar does not seem to work now
On Jan 10, 8:30 am, David Liebman david.c.lieb...@gmail.com wrote: HI, I have google analytics incorporated in my android app. When I first added the code, and then updated my app on android market I got lots of hits. Now I get none. I know people might just be not using my app, but I started up the gingerbread emulator and did everything that was necessary for my app to report using analytics. When I looked at my google analytics page the next day there was nothing. I could swear that this worked (from the emulator) before. Unfortunately I have no access to an actual phone right now. Has anyone else had these problems? Below are the links to the google analytics android jar file instructions. http://www.google.com/url?sa=Dq=http://android-developers.blogspot.c... http://code.google.com/mobile/analytics/docs/android/ Here is a link to the barcode for my app on the market if anyone would like to try it out. http://android-awesomeguy.blogspot.com/2010/10/awesomeguy-on-android-... Thanks. Does anyone else out there use this google analytics jar?? Is it that no-one even uses it? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What is the name of this widget?
No. You can only modify it so far as it doesn't break existing applications. That can be very limiting. But you can replace the entire thing with NumberChooser when you need to make a clean break. On Jan 12, 2:12 am, Dianne Hackborn hack...@android.com wrote: On Tue, Jan 11, 2011 at 11:55 PM, mort m...@sto-helit.de wrote: But Date- and TimePicker are public and using the NumberPicker as well. Many classes that are public make use of private classes for implementation. That isn't a reason to make those other classes public. And you should be aware that everything that already exists in the core system will be seen as standard template, and so there are already several apps which copied the NumberPicker or wrote own, similar looking ones. Um. Yeah. It's open source. If there is something in the open source code you like but isn't in the SDK, copy it out, make sure it builds against the SDK, and use it. That's one of the benefits for developers of things being open source. Isn't the big advantage of Widgets that you can completely replace code and appearance as long as you keep the interface compatible? No. You can only modify it so far as it doesn't break existing applications. That can be very limiting. I'm afraid you'll now see the bad old NumberPicker way longer in apps which copied it than it would've been the case if you offered a public interface and one day replaced it with another implementation - just like it might happen with the date and time pickers. We can live with that. Admit it - you just wanted to lead developers to the wonderful world of the Android source code and git by forcing them to get the NumberPicker from there. ;) People are absolutely welcome to pull stuff out of the open source code that they find useful. One of the gratifying things about working on Android is that all of our work is available to everyone to freely do what they want with it. No, seriously. I appeciate your work. I might think different in some topics, but you did a wonderful job with Android. Thanks, I appreciate it. :) -- 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] How to optimize an image app for various devices and screen resolutions
Hi there, I'm working on an app which displays various images. I want to optimize this for the various screen resolutions. The MultiResolution (1) tutorial uses many resource qualifiers in the res folder to display the appropriate images for the various device resolutions, but how do you package this? I don't want to ship the images for all devices (or do I?). I want to keep the download size as small as possibel, so I only want to package the ones for that particular screen resolution. Or, should I forget packaging images and put the images on-line somewhere? Any opinions on this subject would be appreciated (1) http://developer.android.com/resources/samples/MultiResolution/index.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Is it possible to upload?
Hi friends, I want to upload a file like mp3 or 3gp to *youtube* from my application. Is it possible if yes can anyone send me code snippet or links which is useful regarding this issue. Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Is it possible to upload?
Sure. Look at the youtube official APIs. You will find a few code snippets as well Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Jan 12, 2011 at 6:50 PM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi friends, I want to upload a file like mp3 or 3gp to *youtube* from my application. Is it possible if yes can anyone send me code snippet or links which is useful regarding this issue. Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Can I launch executable file under Jni level?
You want to just run the c program without launching any application? I don't think you can do that. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Jan 12, 2011 at 3:31 PM, nelsonchung chihchun.ch...@gmail.comwrote: I write some code by c language and build it for arm platform - imx51. I can run this file under command line like this. start machine. adb push ./hello / adb shell ./hello and I can see the following information Hello World! I write some code on JNI. #include jni.h #include stdlib.h #include unistd.h #include utils/Log.h JNIEXPORT void JNICALL Java_rtk_main_atp_BrakeDetect_RunJniBrakeDetect(JNIEnv *env, jobject jobj) { int ret = execv(/hello, (char *)NULL); char buff[100]; memset(buff, 0, sizeof(100)); sprintf(buff, [libhello] Hello %d \n, ret ); LOGD( buff ); } but it must have something wrong, because I can't get any result from logcat. I got follow message AndroidRuntime( 2688): D/AndroidRuntime( 2688): AndroidRuntime START D/AndroidRuntime( 2688): CheckJNI is OFF D/dalvikvm( 2688): creating instr width table D/AndroidRuntime( 2688): --- registering native functions --- I/ActivityManager( 2136): Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=2696 uid=10013 gids={1015, 2001} D/dalvikvm( 2696): GC_EXPLICIT freed 742 objects / 54664 bytes in 53ms D/PackageParser( 2136): Scanning package: /data/app/vmdl13306.tmp D/dalvikvm( 2136): GC_FOR_MALLOC freed 6299 objects / 286008 bytes in 105ms I/PackageManager( 2136): Removing non-system package:rtk.main.atp I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 D/dalvikvm( 2136): GC_FOR_MALLOC freed 1619 objects / 115552 bytes in 104ms D/PackageManager( 2136): Scanning package rtk.main.atp I/PackageManager( 2136): /data/app/rtk.main.atp-2.apk changed; unpacking I/PackageManager( 2136): Package rtk.main.atp codePath changed from / data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk; Retaining data and using new D/installd( 2069): DexInv: --- BEGIN '/data/app/rtk.main.atp-2.apk' --- D/dalvikvm( 2718): creating instr width table D/dalvikvm( 2718): DexOpt: load 14ms, verify 6ms, opt 0ms D/installd( 2069): DexInv: --- END '/data/app/ rtk.main.atp-2.apk' (success) --- D/PackageManager( 2136): Activities: rtk.main.atp.BrakeDetect I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 W/PackageManager( 2136): Code path for pkg : rtk.main.atp changing from /data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk W/PackageManager( 2136): Resource path for pkg : rtk.main.atp changing from /data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk D/dalvikvm( 2136): GC_FOR_MALLOC freed 1695 objects / 115832 bytes in 96ms I/installd( 2069): move /data/dalvik-cache/ d...@app@rtk.main.atp-2@classes.dex - /data/dalvik-cache/ d...@app@rtk.main.atp-2@classes.dex D/PackageManager( 2136): New package installed in /data/app/ rtk.main.atp-2.apk D/dalvikvm( 2136): GC_FOR_MALLOC freed 1253 objects / 92008 bytes in 100ms I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 D/dalvikvm( 2296): GC_EXPLICIT freed 3866 objects / 240360 bytes in 104ms W/RecognitionManagerService( 2136): no available voice recognition services found D/dalvikvm( 2136): GC_FOR_MALLOC freed 1961 objects / 121864 bytes in 117ms I/ActivityManager( 2136): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=2720 uid=10014 gids={} D/dalvikvm( 2136): GC_EXPLICIT freed 412 objects / 21232 bytes in 81ms I/ActivityThread( 2720): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider I/installd( 2069): unlink /data/dalvik-cache/ d...@app@rtk.main.atp-1@classes.dex D/AndroidRuntime( 2688): Shutting down VM D/jdwp( 2688): Got wake-up signal, bailing out of select D/dalvikvm( 2688): Debugger has detached; object registry had 1 entries D/AndroidRuntime( 2731): D/AndroidRuntime( 2731): AndroidRuntime START D/AndroidRuntime( 2731): CheckJNI is OFF D/dalvikvm( 2731): creating instr width table D/AndroidRuntime( 2731): --- registering native functions --- I/ActivityManager( 2136): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1000 cmp=rtk.main.atp/.BrakeDetect } D/AndroidRuntime( 2731): Shutting down VM D/jdwp( 2731): Got wake-up signal, bailing out of select D/dalvikvm( 2731): Debugger has detached; object registry had 1 entries I/ActivityManager( 2136): Start proc rtk.main.atp for activity rtk.main.atp/.BrakeDetect: pid=2749 uid=10034 gids={} D/dalvikvm( 2749): No JNI_OnLoad found in /system/lib/ libBrakeDetect.so 0x46123a68, skipping init I/ActivityManager( 2136): Process rtk.main.atp (pid 2749) has died. I/ActivityManager( 2136): Displayed
Re: [android-developers] Android Twitter client to share Images
You will have to write the code yourself if you don't find any working samples. Sorry Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Jan 12, 2011 at 1:12 PM, jayavenkat jaia...@gmail.com wrote: Hi, I am using Twitter Oauth and everything is working fine now I want to upload and share Images with Twitpic Api key and Oauth,can anyone send me some sample code over that. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Calculating screen coordiantes in augmented reality???
On Jan 12, 2:59 am, prachi prachi.tya...@wipro.com wrote: Hi Iam developing an augmented reality browser on my ownn...But not able to get the screen cooridinates I will discuss my whole problem here.as im not sure at which point i stuck up... I hav a set of latitude longitude values for different points.Taking them Iam calculating x,y,z coordinates for each point.Using left handed rule ie.x towards east y towards north and z upwards values which i get are:- x=(a+altitude)*(Math.cos(latitude)*Math.sin(longitude));//x y=(a+altitude)*Math.sin(latitude);//y z=(a+altitude)*(Math.cos(latitude)*Math.cos(longitude));//z where a=app 80m i have taken radius of earth.The origin is defined to be at centre of earth(ECEF) SensorManager.getRotationMatrix(RTmp, I, grav, mag); SensorManager.remapCoordinateSystem(RTmp, SensorManager.AXIS_X, SensorManager.AXIS_Z, R); SensorManager.getOrientation(R, values); azimuth = (float)((values[0])*(180/Math.PI)); //in degree pitch = (float)((values[1])*(180/Math.PI)); //in degree roll = (float)((values[2])*(180/Math.PI)); //in degree Then using perspective projection Iam calculating screen coordinates. Iam refering below link for perspective projection:-- http://en.wikipedia.org/wiki/3D_projection#Perspective_projection In the above link Iam replacing thetax with pitch,thetay with roll,thetaz with azimuth. Watever screen coordinates i got from above calculations Iam plotting a circle using canvas.But Iam unable to see anything. Pleae help as Iam stuck up with this for the past 3 dayzzz :( :( Hard to give a direct answer from that far. Did you fire up the debugger and check the coordinate values you get? If they hit the screen and you do not see anything, the problem is some place else, drawing the overlay. (This doesn't mean you've necessarily got the math right, but at least it's a start). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Scanner USB and android tablet
hi everyone, does anyone know of a bar code scanner that can connect via USB or mini USB to a tablet of Android? thanks! Felipe -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone know how to calculate speed WITHOUT GPS?
Well you pretty much need distance traveled over time to find speed, so anything you can do to determine distance travelled should allow you to calculate the speed. For instance you could use cell tower location, but I wouldn't class it as even remotely accurate. If you want to give an actual real value, your going to need the accuracy of the GPS unit. - Brill Pappin On Jan 11, 11:13 pm, darrinps darri...@gmail.com wrote: All the examples I see use GPS, and I have that working just fine but I've noticed that every time I'm in a car, that unless the phone is close to a window or the windshield the GPS does not work so... I thought that there should be a way using course grained location between cell towers. Does anyone know if this is possible and if so might know where I could find some sample code please? Thanks! Darrin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone know how to calculate speed WITHOUT GPS?
Yah, that is used a lot in simple robotics. You can't actually get anything accurate though. the longer the distance traveled the more inaccurate it becomes. - Brill On Jan 12, 1:16 am, keyboardr keyboa...@gmail.com wrote: You could also try integrating the readings from the accelerometers, but I suspect this would give you even worse accuracy and you'd have to have some way to calibrate the zero point. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Services and battery life
I asked (quite) the same question some time ago, and maybe it can help you https://groups.google.com/group/android-developers/browse_thread/thread/35f963dd905052c7/e7c3a28b1ed28230?hl=itlnk=gst As the always helpful Mark pointed out, you can't be sure that gps is not still around between updates, but maybe this PendingIntent approach can be of some interest. Federico On 12 Gen, 13:07, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jan 12, 2011 at 3:17 AM, Dianne Hackborn hack...@android.com wrote: If you want to avoid work when it starts every 5 minutes, keep your previous work in static globals to re-use the next time the service is created. To clarify, you will need to ensure that you can reload those static globals as needed. While the process probably sticks around between alarms, it might not, in which case those globals will be null and you will have to regenerate that data. Consider these static globals to be an optimization, not a load-bearing beam of your app. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: My App should get information of every Http Get.
You don't need to do that on the phone. Simply set up a linux box as a router and you can monitor all traffic. Trying to do this on a phone is a waste of time, in fact I'd say the only reason to do this was for hacking other peoples phones. Whats your app called? I want to make sure I never download it. - Brill Pappin On Dec 20 2010, 2:02 am, chetan chetanchauha...@gmail.com wrote: Hi guys, Wish you all Merry Christmas and Happy New Year in advance. I am planning to make an app. There is a requirement to get every Http Get information and notification to my App. Like user open google.com from borwser, at the same time my app should get notification or broadcast that google.com has been opened. Basically, My App should get information of every url which would be accessed from browser. Please give some ideas. Thanks Chetan Chauhan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Strange NoClassDefFoundError from Bitmap.compress()
I've got a real head-scratcher here, folks. At least it is for me. Quite recently (last couple of days?), I've begun to see the following error in my Console: FATAL EXCEPTION: main java.lang.NoClassDefFoundError: android.graphic3.Bitmap$CompressFormat and the line that's throwing it looks like this: bitmap.compress(CompressFormat.PNG, 100, fos); where bitmap is, not surprisingly, and ordinary Bitmap, and fos was declared like this: FileOutputStream fos = new FileOutputStream(filename); Now, this Bitmap.compress() call has been working fine, without modification, for a year and a half. Given it's writing to the filesystem, I could imagine it might be an IO error of some sort - except that I'm trapping IOException already, and of course, the error thrown is NoClassDefFoundError. So I'm stumped. It looks like the system is suddenly unable to find either CompressFormat or CompressFormat.PNG, but that doesn't make any sense at all. Any ideas? String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] pause AudioTrack correctly
Hello, I hope that somebody can explain how to pause AudioTrack correctly. I am recording and playing back a pcm file with the OnPlaybackPositionUpdateListener in a remote service. This works fine. Now when I call pause() on the audioTrack object, the playback pauses and if I want to resume I call start() again. This works in general, but some frames are skipped and the playback does not resume from the point it paused but from a few frames later. Why is that? Please show me how to pause a AudioTrack correctly without losing frames. Here is my code for the PlaybackListener audioTrack.setPlaybackPositionUpdateListener(new OnPlaybackPositionUpdateListener() { @Override public void onPeriodicNotification(AudioTrack track) { try { int error=0; if(ramfile!=null) { error = ramfile.read(buffer); } if(error==-1) { audioTrack.stop(); audioTrack.flush(); if(ramfile!=null) ramfile = null; audioTrack=null; playing=false; } if(audioTrack!=null audioTrack.getPlayState()==AudioTrack.PLAYSTATE_PLAYING) audioTrack.write(buffer, 0, buffer.length); } catch (IOException e) { Log.d(EX,We run into an Exception); e.printStackTrace(); } } @Override public void onMarkerReached(AudioTrack track) { } }); Greetings, Markus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] HTML5 audio and video support
I am trying to figure out of android (at least Froyo) has any audio and video HTML5 tag support in any form or shape. I read from many sources and http://www.html5test.com confirms that although Android Web browser does support both tags it does not support any audio or video codecs which basically makes these tags not supported. At the same time I read in some references that some people may have found a workaround how to play audio inside a Web browser for instance by specifying mp3 file source for video tag. http://code.google.com/p/android/issues/detail?id=10546 I tried this on my Droid and no clip is played or displayed, only a placeholder is shown. Can someone point me to at least one working example (link to a page) that plays any sort of audio inside a Web browser on Android. If it is absolutely not possible to play audio via HTML5, is there any way to launch Android music player to play the mp3 link in some sort of hidden or minimized form so it does not take over entire screen and navigate user away from a Web page? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone know how to calculate speed WITHOUT GPS?
couldn't you use the accelerometer? Integrate that? Use time. s=Integral(a dt) If that doesn't work, look to skyhook wireless! -cellurl On Jan 12, 8:20 am, Brill Pappin br...@pappin.ca wrote: Well you pretty much need distance traveled over time to find speed, so anything you can do to determine distance travelled should allow you to calculate the speed. For instance you could use cell tower location, but I wouldn't class it as even remotely accurate. If you want to give an actual real value, your going to need the accuracy of the GPS unit. - Brill Pappin On Jan 11, 11:13 pm, darrinps darri...@gmail.com wrote: All the examples I see use GPS, and I have that working just fine but I've noticed that every time I'm in a car, that unless the phone is close to a window or the windshield the GPS does not work so... I thought that there should be a way using course grained location between cell towers. Does anyone know if this is possible and if so might know where I could find some sample code please? Thanks! Darrin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone know how to calculate speed WITHOUT GPS?
or try an external gps receiver with bluetooth interface to phone. On Jan 12, 9:22 am, cellurl gpscru...@gmail.com wrote: couldn't you use the accelerometer? Integrate that? Use time. s=Integral(a dt) If that doesn't work, look to skyhook wireless! -cellurl On Jan 12, 8:20 am, Brill Pappin br...@pappin.ca wrote: Well you pretty much need distance traveled over time to find speed, so anything you can do to determine distance travelled should allow you to calculate the speed. For instance you could use cell tower location, but I wouldn't class it as even remotely accurate. If you want to give an actual real value, your going to need the accuracy of the GPS unit. - Brill Pappin On Jan 11, 11:13 pm, darrinps darri...@gmail.com wrote: All the examples I see use GPS, and I have that working just fine but I've noticed that every time I'm in a car, that unless the phone is close to a window or the windshield the GPS does not work so... I thought that there should be a way using course grained location between cell towers. Does anyone know if this is possible and if so might know where I could find some sample code please? Thanks! Darrin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SQLiteDiskIOException in SQLiteDatabase.delete
Hi, In my application, in very very rare cases, some users get this kind of exception: Caused by: android.database.sqlite.SQLiteDiskIOException: error code 10: disk I/O error at android.database.sqlite.SQLiteStatement.native_execute(Native Method) at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:66) at android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:1362) at com.tlegras.freeboxrec.FBRBroadcastDBAdapter.deleteOldEntries(FBRBroadcastDBAdapter.java:194) ... Indeed something similar than this one: http://code.google.com/p/android/issues/detail?id=7260 Can any other reason than corrupted DB generate such exception? if no what should i do in such cases? advise the user to try to uninstall and reinstall the applications? Thanks for any help, Thierry. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Is it possible to upload?
Hi Kumar Bibek, if you don't mind Can you help me out more to solve this problem. On Wed, Jan 12, 2011 at 7:17 PM, Kumar Bibek coomar@gmail.com wrote: Sure. Look at the youtube official APIs. You will find a few code snippets as well Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Jan 12, 2011 at 6:50 PM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi friends, I want to upload a file like mp3 or 3gp to *youtube* from my application. Is it possible if yes can anyone send me code snippet or links which is useful regarding this issue. Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HTML5 audio and video support
Are you using the inherit browser that comes with the phone or a third party browser like Opera? Since HTML5 is not standard across all browser it depends on which one you are using. On Jan 12, 10:21 am, ls02 agal...@audible.com wrote: I am trying to figure out of android (at least Froyo) has any audio and video HTML5 tag support in any form or shape. I read from many sources andhttp://www.html5test.comconfirms that although Android Web browser does support both tags it does not support any audio or video codecs which basically makes these tags not supported. At the same time I read in some references that some people may have found a workaround how to play audio inside a Web browser for instance by specifying mp3 file source for video tag. http://code.google.com/p/android/issues/detail?id=10546 I tried this on my Droid and no clip is played or displayed, only a placeholder is shown. Can someone point me to at least one working example (link to a page) that plays any sort of audio inside a Web browser on Android. If it is absolutely not possible to play audio via HTML5, is there any way to launch Android music player to play the mp3 link in some sort of hidden or minimized form so it does not take over entire screen and navigate user away from a Web page? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HTML5 audio and video support
Default Android Web browser that comes with the phone. On Jan 12, 10:37 am, Leon Moreyn-Android Development lmor...@earthcam.com wrote: Are you using the inherit browser that comes with the phone or a third party browser like Opera? Since HTML5 is not standard across all browser it depends on which one you are using. On Jan 12, 10:21 am, ls02 agal...@audible.com wrote: I am trying to figure out of android (at least Froyo) has any audio and video HTML5 tag support in any form or shape. I read from many sources andhttp://www.html5test.comconfirmsthat although Android Web browser does support both tags it does not support any audio or video codecs which basically makes these tags not supported. At the same time I read in some references that some people may have found a workaround how to play audio inside a Web browser for instance by specifying mp3 file source for video tag. http://code.google.com/p/android/issues/detail?id=10546 I tried this on my Droid and no clip is played or displayed, only a placeholder is shown. Can someone point me to at least one working example (link to a page) that plays any sort of audio inside a Web browser on Android. If it is absolutely not possible to play audio via HTML5, is there any way to launch Android music player to play the mp3 link in some sort of hidden or minimized form so it does not take over entire screen and navigate user away from a Web page?- 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
Re: [android-developers] Is it possible to upload?
Have you looed into the APIs? If yes, what are the problems that you are facing. If no, please go through it first. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Jan 12, 2011 at 8:59 PM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi Kumar Bibek, if you don't mind Can you help me out more to solve this problem. On Wed, Jan 12, 2011 at 7:17 PM, Kumar Bibek coomar@gmail.com wrote: Sure. Look at the youtube official APIs. You will find a few code snippets as well Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Jan 12, 2011 at 6:50 PM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi friends, I want to upload a file like mp3 or 3gp to *youtube* from my application. Is it possible if yes can anyone send me code snippet or links which is useful regarding this issue. Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Database in the APK
Hi, I want to create an database for my service . as of now we are creating the database on invocation of the service. Here we create the Database and add default values and it works. My Need : I want to have a database as part of the system image ( That is when i flash the image/APK) . The database should be present already rather than me populating when i launch the service.here my use case is that database can be accessed by any app in read only mode but the database value is written by my service only.so i just want the database being present , before my service is launched so that any app can access the database. Gs -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can I launch executable file under Jni level?
This is the wrong list to be discussing this. But just as learning Java by programming in Android is hard, learning C by programming in Android is definitely doing it the hard way! Doing this sort of experimentation under Ubuntu, say, would let you use a real debugger. You're passing a null pointer to execv. The second argument must be an array of char* pointers, the last of which should be a null pointer. An array of one null pointer is NOT the same as a null pointer! In fact, it shouldn't have even compiled, since char* is not char**! You're only initializing the first 4 bytes of your buff array. sizeof(100) = 4 most likely. You want 100*sizeof(char). You didn't really do the right test under adb. If you're going to execv the /hello command, that's what you should have typed if you want to test that /hello would work! Yes, typing /hello should have worked too, but if there'd been a problem there, you'd have missed it. On Jan 12, 2:01 am, nelsonchung chihchun.ch...@gmail.com wrote: I write some code by c language and build it for arm platform - imx51. I can run this file under command line like this. start machine. adb push ./hello / adb shell ./hello and I can see the following information Hello World! I write some code on JNI. #include jni.h #include stdlib.h #include unistd.h #include utils/Log.h JNIEXPORT void JNICALL Java_rtk_main_atp_BrakeDetect_RunJniBrakeDetect(JNIEnv *env, jobject jobj) { int ret = execv(/hello, (char *)NULL); char buff[100]; memset(buff, 0, sizeof(100)); sprintf(buff, [libhello] Hello %d \n, ret ); LOGD( buff ); } but it must have something wrong, because I can't get any result from logcat. I got follow message AndroidRuntime( 2688): D/AndroidRuntime( 2688): AndroidRuntime START D/AndroidRuntime( 2688): CheckJNI is OFF D/dalvikvm( 2688): creating instr width table D/AndroidRuntime( 2688): --- registering native functions --- I/ActivityManager( 2136): Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=2696 uid=10013 gids={1015, 2001} D/dalvikvm( 2696): GC_EXPLICIT freed 742 objects / 54664 bytes in 53ms D/PackageParser( 2136): Scanning package: /data/app/vmdl13306.tmp D/dalvikvm( 2136): GC_FOR_MALLOC freed 6299 objects / 286008 bytes in 105ms I/PackageManager( 2136): Removing non-system package:rtk.main.atp I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 D/dalvikvm( 2136): GC_FOR_MALLOC freed 1619 objects / 115552 bytes in 104ms D/PackageManager( 2136): Scanning package rtk.main.atp I/PackageManager( 2136): /data/app/rtk.main.atp-2.apk changed; unpacking I/PackageManager( 2136): Package rtk.main.atp codePath changed from / data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk; Retaining data and using new D/installd( 2069): DexInv: --- BEGIN '/data/app/rtk.main.atp-2.apk' --- D/dalvikvm( 2718): creating instr width table D/dalvikvm( 2718): DexOpt: load 14ms, verify 6ms, opt 0ms D/installd( 2069): DexInv: --- END '/data/app/ rtk.main.atp-2.apk' (success) --- D/PackageManager( 2136): Activities: rtk.main.atp.BrakeDetect I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 W/PackageManager( 2136): Code path for pkg : rtk.main.atp changing from /data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk W/PackageManager( 2136): Resource path for pkg : rtk.main.atp changing from /data/app/rtk.main.atp-1.apk to /data/app/rtk.main.atp-2.apk D/dalvikvm( 2136): GC_FOR_MALLOC freed 1695 objects / 115832 bytes in 96ms I/installd( 2069): move /data/dalvik-cache/ d...@a...@rtk.main.atp-2@classes.dex - /data/dalvik-cache/ d...@a...@rtk.main.atp-2@classes.dex D/PackageManager( 2136): New package installed in /data/app/ rtk.main.atp-2.apk D/dalvikvm( 2136): GC_FOR_MALLOC freed 1253 objects / 92008 bytes in 100ms I/ActivityManager( 2136): Force stopping package rtk.main.atp uid=10034 D/dalvikvm( 2296): GC_EXPLICIT freed 3866 objects / 240360 bytes in 104ms W/RecognitionManagerService( 2136): no available voice recognition services found D/dalvikvm( 2136): GC_FOR_MALLOC freed 1961 objects / 121864 bytes in 117ms I/ActivityManager( 2136): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=2720 uid=10014 gids={} D/dalvikvm( 2136): GC_EXPLICIT freed 412 objects / 21232 bytes in 81ms I/ActivityThread( 2720): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider I/installd( 2069): unlink /data/dalvik-cache/ d...@a...@rtk.main.atp-1@classes.dex D/AndroidRuntime( 2688): Shutting down VM D/jdwp ( 2688): Got wake-up signal, bailing out of select D/dalvikvm( 2688): Debugger has detached; object registry had 1 entries D/AndroidRuntime( 2731): D/AndroidRuntime( 2731): AndroidRuntime START D/AndroidRuntime( 2731): CheckJNI is OFF D/dalvikvm( 2731):
[android-developers] Re: Strange NoClassDefFoundError from Bitmap.compress()
ClassNotFoundError can mean it got an error while loading the class. Perhaps it ran out of memory, just as it was loading this class? You could try doing this first thing in your app on some small bitmap, to preload the class, and see if that changes things. I wouldn't consider that a workaround -- just a way to investigate the cause. On Jan 12, 6:51 am, String sterling.ud...@googlemail.com wrote: I've got a real head-scratcher here, folks. At least it is for me. Quite recently (last couple of days?), I've begun to see the following error in my Console: FATAL EXCEPTION: main java.lang.NoClassDefFoundError: android.graphic3.Bitmap$CompressFormat and the line that's throwing it looks like this: bitmap.compress(CompressFormat.PNG, 100, fos); where bitmap is, not surprisingly, and ordinary Bitmap, and fos was declared like this: FileOutputStream fos = new FileOutputStream(filename); Now, this Bitmap.compress() call has been working fine, without modification, for a year and a half. Given it's writing to the filesystem, I could imagine it might be an IO error of some sort - except that I'm trapping IOException already, and of course, the error thrown is NoClassDefFoundError. So I'm stumped. It looks like the system is suddenly unable to find either CompressFormat or CompressFormat.PNG, but that doesn't make any sense at all. Any ideas? String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Sqlite Database in the APK
If you need to provide data to other applications, consider implementing a ContentProvider: http://developer.android.com/reference/android/content/ContentProvider.html This has the following benefits in your described use scenario: - You can protect your data by declaring read and/or write permissions for the content provider in your manifest; - CP lifecycle is managed by Android, it will be loaded and initialized as soon as it's needed (based on the authority URI); - You keep implementation details private to your CP code (the database schema, the mapping between URIs and tables, etc.); - Your CP will be instantiated only once, so you won't need to solve any problems like is the database already open, and in which process; - The framework provides URI-based data update notifications that can be observed by ListViews and their CursorAdapters, so you can get live views into your data at little or no extra effort. If you're creating custom firmware with your application pre-installed, you can still use a CP and get the benefits described above, but in addition, you can require that only applications signed with the firmware key are able to get write access to your data (for an example, look at the standard email application in Android source). -- Kostya 12.01.2011 18:54, androiddevelopers пишет: Hi, I want to create an database for my service . as of now we are creating the database on invocation of the service. Here we create the Database and add default values and it works. My Need : I want to have a database as part of the system image ( That is when i flash the image/APK) . The database should be present already rather than me populating when i launch the service.here my use case is that database can be accessed by any app in read only mode but the database value is written by my service only.so i just want the database being present , before my service is launched so that any app can access the database. Gs -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] EditText with Cross
Hi, I saw an app where was EditText and if you put some text into EditText there was a Cross Button (or something like that) on the left side. And if I click on this Button the text from EditText was deleted. Can you help me or explain me how to to this? I would like to use EditText with the same effect. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] EditText with Cross
- Add a button to your layout; - Add an OnClickListener to the button; - In the listener's onClick, call editText.getText() to get the Editable object and call clear() on that. -- Kostya 12.01.2011 19:45, Richard Sámela пишет: Hi, I saw an app where was EditText and if you put some text into EditText there was a Cross Button (or something like that) on the left side. And if I click on this Button the text from EditText was deleted. Can you help me or explain me how to to this? I would like to use EditText with the same effect. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Scanner USB and android tablet
I highly doubt such a thing exists as Android does not currently support USB host mode Regards, Lewis On Jan 12, 2:15 pm, ftovalle ftova...@gmail.com wrote: hi everyone, does anyone know of a bar code scanner that can connect via USB or mini USB to a tablet of Android? thanks! Felipe -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Scanner USB and android tablet
On 12 January 2011 17:59, Lewis lewisandrewba...@googlemail.com wrote: I highly doubt such a thing exists as Android does not currently support USB host mode There're some BT barcode scanners which may look like solution (if no technical obstacles lurk in darkness) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] EditText with Cross
It might just be a regular button beside the EditText. And I guess that's very simple to implement. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Jan 12, 2011 at 10:15 PM, Richard Sámela feromak...@gmail.comwrote: Hi, I saw an app where was EditText and if you put some text into EditText there was a Cross Button (or something like that) on the left side. And if I click on this Button the text from EditText was deleted. Can you help me or explain me how to to this? I would like to use EditText with the same effect. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem changing Activity title in onActivityResult()
I posted this over at StackOverflow, but not much of a response... maybe someone else can run this on their testbed and verify? A strange problem... == Hi all. I have a simple app based on the Notepad demo application, and when a user is viewing/editing a note they can launch a dialog activity (TitleEditor) that allows them to change the title of a note. Currently in the app, when viewing/editing a note, the notes' current title is shown as the activity title. So, I launch the TitleEditor dialog activity with startActivityForResult(), and in onActivityResult() I am successfully getting the new title back, no problem. The issue relates to then updating the notes view/edit (the active activity) title... using setTitle() in onActivityResult() with the data passed back does seem to set the title internally (a subsequent call to getTitle() shows the new title has been set), but the actual UI title is not updated until the activity is closed and then re- launched. I've used setTitle() in onResume(), onPrepareOptionsMenu(), etc and it worked like a charm, but not working here... any ideas or suggestions? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Problem changing Activity title in onActivityResult()
It's a relatively simple problem. I am not sure what are you doing wrong. The title can be changed anytime from anywhere. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Jan 12, 2011 at 10:43 PM, Paul pmmen...@gmail.com wrote: I posted this over at StackOverflow, but not much of a response... maybe someone else can run this on their testbed and verify? A strange problem... == Hi all. I have a simple app based on the Notepad demo application, and when a user is viewing/editing a note they can launch a dialog activity (TitleEditor) that allows them to change the title of a note. Currently in the app, when viewing/editing a note, the notes' current title is shown as the activity title. So, I launch the TitleEditor dialog activity with startActivityForResult(), and in onActivityResult() I am successfully getting the new title back, no problem. The issue relates to then updating the notes view/edit (the active activity) title... using setTitle() in onActivityResult() with the data passed back does seem to set the title internally (a subsequent call to getTitle() shows the new title has been set), but the actual UI title is not updated until the activity is closed and then re- launched. I've used setTitle() in onResume(), onPrepareOptionsMenu(), etc and it worked like a charm, but not working here... any ideas or suggestions? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Accessing Facebook photos from the Contacts provider
After scouring the web and confirming it myself, Facebook's photos are stored in a manner that prevents access by other apps. This inability to access Facebook sync'd photos is a side effect of how Facebook syncs contacts. Facebook creates an account on the device using Android's AccountManager (http://developer.android.com/reference/android/ accounts/AccountManager.html) which creates a secure space in which an app can store sync'd contact information. Using AccountManager to create accounts for storing contact information is the Android recommended way to sync contact information. Short of it then? Facebook's uses the standard Account/Contact syncing functions built into Androidand these functions prevent us from getting those photos. Makes sense from a security and permissions perspective. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Scanner USB and android tablet
It's much simpler to get open source barcode image reader Java classes and have the user snap a picture of the barcode. On Jan 12, 9:07 am, Marcin Orlowski webnet.andr...@gmail.com wrote: On 12 January 2011 17:59, Lewis lewisandrewba...@googlemail.com wrote: I highly doubt such a thing exists as Android does not currently support USB host mode There're some BT barcode scanners which may look like solution (if no technical obstacles lurk in darkness) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Scanner USB and android tablet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/12/2011 08:59 AM, Lewis wrote: I highly doubt such a thing exists as Android does not currently support USB host mode One solution is to use a Bluetooth scanner. Regards, Lewis On Jan 12, 2:15 pm, ftovalle ftova...@gmail.com wrote: hi everyone, does anyone know of a bar code scanner that can connect via USB or mini USB to a tablet of Android? thanks! Felipe -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk0t6G4ACgkQ9RoMZyVa61f/KwCeP+3ePdImP5EVP1oXU13kfTvP 9tEAn1TTzFqEkwsP5uF9NDg9SFULGa5K =CSAU -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Soft keyboard alters layout
On Wed, Jan 12, 2011 at 3:18 AM, Neilz neilhorn...@gmail.com wrote: Is there a way I can stop this? Surely the keyboard can act as a frame and overlay the existing views? See if this helps: http://developer.android.com/resources/articles/on-screen-inputs.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to record audio..?
On Wed, Jan 12, 2011 at 2:25 AM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: if anybody know how capture audio..?send me the code snippets and useful links... I would assume this would be a good starting point: http://developer.android.com/reference/android/media/AudioRecord.html On Wed, Jan 12, 2011 at 3:11 AM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: any help... Please wait more than an hour to bump your post - especially when you're posting in the middle of the night in the US, which I think is where most of us are. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Scanner USB and android tablet
One solution is to use a Bluetooth scanner. Well, there's quite nice Barcode scanner app on Market so it also a solution however I'd bet it will be a bit too slow and uncomfortable to use (not to mention focus issues most devices have) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Particularity running modified standard app
Hello, I have downloaded and slightly modified the Android 2.2 version of Camera and have begun to make some changes to it. Let's say I have renamed the app to X in Eclipse If I run X from Eclipse (Helios), it behaves more or less the way I expect. Running from Eclipse installs X on my device (Nexus One). But when I run X from the app launcher, I get Camera! I would be thankful to 1) know why 2) general info on modifying a standard app TIA Bernard Higonnet -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Particularity running modified standard app
Did you change the package name in the code and in the manifest? 12.01.2011 20:52, higonnet пишет: Hello, I have downloaded and slightly modified the Android 2.2 version of Camera and have begun to make some changes to it. Let's say I have renamed the app to X in Eclipse If I run X from Eclipse (Helios), it behaves more or less the way I expect. Running from Eclipse installs X on my device (Nexus One). But when I run X from the app launcher, I get Camera! I would be thankful to 1) know why 2) general info on modifying a standard app TIA Bernard Higonnet -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Seeking experiences doing mobile/sync of lists using syncML or other
In our Android application we'd like to allow users to edit lists (text) on one or more mobile devices (in parallel) and also on the web, and have them all synced. Can anyone share their experiences of doing something similar on Android? Have you used SyncML for such a solution (our own defined list of things, not contacts calendar)? Any recommendations for libraries (tolerant, Apache-style license)? thanks in advance. Andrew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Sqlite Database in the APK
Hi, thanks for the reply. Can i have the database preloaded, that is as aprt of my APk rather than me populating/creating on start of the activity. just like we have for icons or some files we can add as part of the drawable or in raw folder. Gautham -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Question About GPS while on the phone
Ah that makes a little more sense than my assumption thinking that Verizon was just being difficult. Well I hope that gets fixed at some point b/c it is kind of a drawback. And IMO that is the only reason I like my att phone better even though I really really hate att -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Andrew Brampton Sent: Tuesday, January 11, 2011 10:38 PM To: android-developers@googlegroups.com Subject: Re: [android-developers] Question About GPS while on the phone From what I understand, ATT uses GSM and Verizon uses CDMA, which are different technologies. So it is some what carrier specific only because each US carrier offers a different technology. Andrew On 11 January 2011 14:50, Tommy droi...@gmail.com wrote: Very cool. That makes sense. Are you sure it's not carrier specific? The reason I ask is because I have 2 phones both with 3g service one on Verizon and one on ATT. The ATT android phone can surf the net and what not while on the phone, my Verizon phone and my boss's phones cannot. That part isn't a huge deal though. Again thank you for your time! -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Marcin Orlowski Sent: Tuesday, January 11, 2011 2:44 PM To: android-developers@googlegroups.com Subject: Re: [android-developers] Question About GPS while on the phone On 11 January 2011 20:04, Tommy droi...@gmail.com wrote: I know that with some providers you can't be on the phone and use Internet at the same time. One example would be my moto droid on verizon. Not a big deal as we can put in a broadcast receiver to listen to the phone state. My question is is the GPS provider affected the same way? In otherwords if I am on the phone will the GPS work no matter what? It's not a carrier fault. Some data xfer standards (i.e. EDGE) cannot operate while doing phone call. If you use GPS receiver then it's completely different hardware and not interfere with phone radio. However if you want to use cell traingulation instead of GPS receiver then it needs data connection to map cells to certain location. And it of course may be not available when on the call if the situation I formerly described occur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Sqlite Database in the APK
12.01.2011 21:05, androiddevelopers пишет: Can i have the database preloaded, that is as aprt of my APk rather than me populating/creating on start of the activity. just like we have for icons or some files we can add as part of the drawable or in raw folder. Yes, you can create your database anywhere using SQLite tools, and package it with your application (assets / raw). The first the app is run, open the packaged database as a stream, and copy it into a file where your application has read/write access. This can be the memory card or the path returned by Context.getDatabasePath(). If it's the latter, you'll then be able to use SQLiteOpenHelper to open the database. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
Re: [android-developers] Re: Scanner USB and android tablet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/12/2011 09:49 AM, Marcin Orlowski wrote: One solution is to use a Bluetooth scanner. Well, there's quite nice Barcode scanner app on Market so it also a solution however I'd bet it will be a bit too slow and uncomfortable to use (not to mention focus issues most devices have) I assumed that the OP wanted to use the Android tablet in a professional environment (inventory, etc...), in which case having an hand held scanner is mandatory. A Bluetooth scanner (or a scanner with a serial port and a Bluetooth/Serial bridge, like the Iogear GBS301), is a good solution in this case, and writing the Android app should be simple. - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog: http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk0t7MQACgkQ9RoMZyVa61eXXACfScMX6ODJAVBzNPASCfTuoiH3 EXEAmQEkKGuBy43C4eJGprrqiVzLKYiH =qJl4 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem changing Activity title in onActivityResult()
Agreed, which is why it's so frustrating. As a test, in onCreateOptionsMenu() @Override public boolean onCreateOptionsMenu(Menu menu) { setTitle(changed); . . . return super.onCreateOptionsMenu(menu); } Works fine. In onActivityResult() (this is the code, verbatim) @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // check the activity results switch (requestCode) { case RESULT_RENAME: if (resultCode == -1) { // activity ended successfully Log.d(LOG_TAG, onActivityResult(): Changing title from + getTitle() + to + data.getStringExtra(StylePad.Notes.TITLE)); setTitle(data.getStringExtra(StylePad.Notes.TITLE)); Log.d(LOG_TAG, onActivityResult(): New title + getTitle()); } break; } } And the logging tells me that the title's been changed, but yet the UI is NOT updated... Have tried this on both a Galaxy Tab (2.2) and the 2.2 emulator. On Jan 12, 12:16 pm, Kumar Bibek coomar@gmail.com wrote: It's a relatively simple problem. I am not sure what are you doing wrong. The title can be changed anytime from anywhere. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 10:43 PM, Paul pmmen...@gmail.com wrote: I posted this over at StackOverflow, but not much of a response... maybe someone else can run this on their testbed and verify? A strange problem... == Hi all. I have a simple app based on the Notepad demo application, and when a user is viewing/editing a note they can launch a dialog activity (TitleEditor) that allows them to change the title of a note. Currently in the app, when viewing/editing a note, the notes' current title is shown as the activity title. So, I launch the TitleEditor dialog activity with startActivityForResult(), and in onActivityResult() I am successfully getting the new title back, no problem. The issue relates to then updating the notes view/edit (the active activity) title... using setTitle() in onActivityResult() with the data passed back does seem to set the title internally (a subsequent call to getTitle() shows the new title has been set), but the actual UI title is not updated until the activity is closed and then re- launched. I've used setTitle() in onResume(), onPrepareOptionsMenu(), etc and it worked like a charm, but not working here... any ideas or suggestions? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Seeking experiences doing mobile/sync of lists using syncML or other
Any recommendations for libraries (tolerant, Apache-style license)? See the list on: http://en.wikipedia.org/wiki/SyncML as a start. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 screen density in pixels-per-inch or equivalent
Note that some devices don't correctly report actual resolution (xdpi / ydpi). Does some devices include anything that I care about? How wrong is the value? Answering my own question: yes, it is wrong on my Motorola Defy, which returns 96. Googling tells me it is wrong on quite a lot of devices from Motorola. Aaarrgg. So: is the value 96 that I see a sentinel that I can use to detect this bug? I.e. do all/most devices with this bug return 96? If so, I'll trap 96 and substitute something else, e.g. DisplayMetrics.displayDpi(), which I trust is more reliable. If 96 is not the only wrong answer, can anyone suggest some other way to detect a bogus value here? Thanks, Phil. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem changing Activity title in onActivityResult()
UPDATE: Ok, so it looks like the following is happening... User starts the activity, title is X. As a test, I then change the title in onCreateOptionsMenu to Y, and the UI changes immediately. Finally, when the options-menu launched activity returns it's value, Z to onActivityResult, I then attempt to change the UI title again from the currently shown Y to Z... but the title is instead changed back to X..., even though an immediate call to getTitle tells me that it should be Z... Any ideas why this may be happening? Paul On Jan 12, 1:26 pm, Paul pmmen...@gmail.com wrote: Agreed, which is why it's so frustrating. As a test, in onCreateOptionsMenu() @Override public boolean onCreateOptionsMenu(Menu menu) { setTitle(changed); . . . return super.onCreateOptionsMenu(menu); } Works fine. In onActivityResult() (this is the code, verbatim) @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // check the activity results switch (requestCode) { case RESULT_RENAME: if (resultCode == -1) { // activity ended successfully Log.d(LOG_TAG, onActivityResult(): Changing title from + getTitle() + to + data.getStringExtra(StylePad.Notes.TITLE)); setTitle(data.getStringExtra(StylePad.Notes.TITLE)); Log.d(LOG_TAG, onActivityResult(): New title + getTitle()); } break; } } And the logging tells me that the title's been changed, but yet the UI is NOT updated... Have tried this on both a Galaxy Tab (2.2) and the 2.2 emulator. On Jan 12, 12:16 pm, Kumar Bibek coomar@gmail.com wrote: It's a relatively simple problem. I am not sure what are you doing wrong. The title can be changed anytime from anywhere. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 10:43 PM, Paul pmmen...@gmail.com wrote: I posted this over at StackOverflow, but not much of a response... maybe someone else can run this on their testbed and verify? A strange problem... == Hi all. I have a simple app based on the Notepad demo application, and when a user is viewing/editing a note they can launch a dialog activity (TitleEditor) that allows them to change the title of a note. Currently in the app, when viewing/editing a note, the notes' current title is shown as the activity title. So, I launch the TitleEditor dialog activity with startActivityForResult(), and in onActivityResult() I am successfully getting the new title back, no problem. The issue relates to then updating the notes view/edit (the active activity) title... using setTitle() in onActivityResult() with the data passed back does seem to set the title internally (a subsequent call to getTitle() shows the new title has been set), but the actual UI title is not updated until the activity is closed and then re- launched. I've used setTitle() in onResume(), onPrepareOptionsMenu(), etc and it worked like a charm, but not working here... any ideas or suggestions? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] onItemSelectedListener causes gallery to jump, stick and pop...
I have a gallery on my screen. Works great and scrolls smoothly ... until I set the OnItemSelectedListener. When I do, Gallery gets really jerkey. It seems to stick. I think I know why, but I was wondering if others have found a better solution they would be willing to share. Here's my onItemSelectedListener: myGallery.setOnItemSelectedListener(new OnItemSelectedListener(){ @Override public void onItemSelected(AdapterView? parent, View view, int position, long id) { // do nothing on purpose to see what the effect is if (view == null) return; Message msg = Message.obtain(); msg.obj = view.getTag(); _handler.sendMessage(msg); } }}); And here is the handler: private Handler _handler = new Handler(){ public void handleMessage(Message msg){ if (msg.obj != null msg.obj instanceof String){ textView1.setText(msg.toString()); textView2.setText(msg.toString().length(); } } }; When the UI thread updates the controls with the data, it seems to interrupt the scrolling of the gallery itself and causes the gallery to not scroll smoothly. Commenting out the handler code eliminates the problem. So, I know the problem has to do with the fact that the UI just can't update the text controls and keep the gallery scrolling smoothly at the same time. Does anyone have a work around for this problem? 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] Sharing preferences between apps?
I have an app that needs to be able to pass a set of settings to my Live Wallpaper. The Live Wallpaper already saves these in a Shared Preferences file. I did a bunch of searches, and found a possible way for the app to access the wallpapers Shared prefs was: (I've also set both apps to have the same uid in their manifest files.) Context context = this.createPackageContext(com.casadelgato.lifewallpaper, 0); SharedPreferences wPrefs = context.getSharedPreferences(Constants.LW_SHARED_PREFS, 0); Editor editor = wPrefs.edit(); editor.putBoolean(Constants.PREF_RANDCOLORS, engine.isRandColors()); etc... When I try, I get: 01-12 10:37:20.728: WARN/ApplicationContext(293): Attempt to read preferences file /data/data/com.casadelgato.lifewallpaper/shared_prefs/lifewallpapersettings.xml without permission 01-12 10:37:20.757: ERROR/ApplicationContext(293): Couldn't rename file /data/data/com.casadelgato.lifewallpaper/shared_prefs/lifewallpapersettings.xml to backup file /data/data/com.casadelgato.lifewallpaper/shared_prefs/lifewallpapersettings.xml.bak Am I missing something? Or is this just the wrong way to do it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Problem changing Activity title in onActivityResult()
Maybe you can glean something from the source: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/Activity.java;h=f25c4c385e4f510bec426fbef801243e4c149f69;hb=cb8427538dfdc5eae941e377b11bfd11a95fc5a5 Looks like the title will only be changed if mTitleReady is true, which is set in onPostCreate. You could add logging to onCreate, onActivityResult and your own overriden onPostCreate, just to see in what order they get called. If the order is not what you expect, try saving the title in onActivityResult and change it in your overriden onPostCreate. -- Kostya 12.01.2011 21:39, Paul пишет: UPDATE: Ok, so it looks like the following is happening... User starts the activity, title is X. As a test, I then change the title in onCreateOptionsMenu to Y, and the UI changes immediately. Finally, when the options-menu launched activity returns it's value, Z to onActivityResult, I then attempt to change the UI title again from the currently shown Y to Z... but the title is instead changed back to X..., even though an immediate call to getTitle tells me that it should be Z... Any ideas why this may be happening? Paul On Jan 12, 1:26 pm, Paulpmmen...@gmail.com wrote: Agreed, which is why it's so frustrating. As a test, in onCreateOptionsMenu() @Override public boolean onCreateOptionsMenu(Menu menu) { setTitle(changed); . . . return super.onCreateOptionsMenu(menu); } Works fine. In onActivityResult() (this is the code, verbatim) @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // check the activity results switch (requestCode) { case RESULT_RENAME: if (resultCode == -1) { // activity ended successfully Log.d(LOG_TAG, onActivityResult(): Changing title from + getTitle() + to + data.getStringExtra(StylePad.Notes.TITLE)); setTitle(data.getStringExtra(StylePad.Notes.TITLE)); Log.d(LOG_TAG, onActivityResult(): New title + getTitle()); } break; } } And the logging tells me that the title's been changed, but yet the UI is NOT updated... Have tried this on both a Galaxy Tab (2.2) and the 2.2 emulator. On Jan 12, 12:16 pm, Kumar Bibekcoomar@gmail.com wrote: It's a relatively simple problem. I am not sure what are you doing wrong. The title can be changed anytime from anywhere. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 10:43 PM, Paulpmmen...@gmail.com wrote: I posted this over at StackOverflow, but not much of a response... maybe someone else can run this on their testbed and verify? A strange problem... == Hi all. I have a simple app based on the Notepad demo application, and when a user is viewing/editing a note they can launch a dialog activity (TitleEditor) that allows them to change the title of a note. Currently in the app, when viewing/editing a note, the notes' current title is shown as the activity title. So, I launch the TitleEditor dialog activity with startActivityForResult(), and in onActivityResult() I am successfully getting the new title back, no problem. The issue relates to then updating the notes view/edit (the active activity) title... using setTitle() in onActivityResult() with the data passed back does seem to set the title internally (a subsequent call to getTitle() shows the new title has been set), but the actual UI title is not updated until the activity is closed and then re- launched. I've used setTitle() in onResume(), onPrepareOptionsMenu(), etc and it worked like a charm, but not working here... any ideas or suggestions? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: How to get screen density in pixels-per-inch or equivalent
Did you try fetching the scale that will allow you to convert from DPI to actual screen pixels? I found this very reliable: final scale = getContext().getResources().getDisplayMetrics().density; Then multiply scale by one inch of pixels in DPI resolution (depending on the screen you're on) - 120, 160, 240, 320. This API call ... int densityDpi = getContext().getResources().getDisplayMetrics().densityDpi; will tell you the density of the screen you're on. See http://developer.android.com/reference/android/util/DisplayMetrics.html#densityDpi for more information. So, this will tell you how many screen pixels equate to an inch. Then you can use that to lay out your ruler markings: int pxPerInch = 340; // default value - note it's a new density in API version 9. switch(densityDpi){ case DisplayMetrics.DENSITY_LOW: pxPerInch = 120 * scale; break; case DisplayMetrics.DENSITY_MEDIUM: pxPerInch = 160 * scale; break; case DisplayMetrics.DENSITY_HIGH: pxPerInch = 240 * scale; break; } I haven't tested that but it, or some derivation of this should tell you how many screen pixels comprise one inch on the screen. Reference: http://developer.android.com/guide/practices/screens_support.html Richard On Jan 12, 10:38 am, Phil Endecott spam_from_goo...@chezphil.org wrote: Note that some devices don't correctly report actual resolution (xdpi / ydpi). Does some devices include anything that I care about? How wrong is the value? Answering my own question: yes, it is wrong on my Motorola Defy, which returns 96. Googling tells me it is wrong on quite a lot of devices from Motorola. Aaarrgg. So: is the value 96 that I see a sentinel that I can use to detect this bug? I.e. do all/most devices with this bug return 96? If so, I'll trap 96 and substitute something else, e.g. DisplayMetrics.displayDpi(), which I trust is more reliable. If 96 is not the only wrong answer, can anyone suggest some other way to detect a bogus value here? Thanks, Phil. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Problem changing Activity title in onActivityResult()
I just tried a sample program, and it seems fine. There must be something going on in your onResume part... Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 12:09 AM, Paul pmmen...@gmail.com wrote: UPDATE: Ok, so it looks like the following is happening... User starts the activity, title is X. As a test, I then change the title in onCreateOptionsMenu to Y, and the UI changes immediately. Finally, when the options-menu launched activity returns it's value, Z to onActivityResult, I then attempt to change the UI title again from the currently shown Y to Z... but the title is instead changed back to X..., even though an immediate call to getTitle tells me that it should be Z... Any ideas why this may be happening? Paul On Jan 12, 1:26 pm, Paul pmmen...@gmail.com wrote: Agreed, which is why it's so frustrating. As a test, in onCreateOptionsMenu() @Override public boolean onCreateOptionsMenu(Menu menu) { setTitle(changed); . . . return super.onCreateOptionsMenu(menu); } Works fine. In onActivityResult() (this is the code, verbatim) @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // check the activity results switch (requestCode) { case RESULT_RENAME: if (resultCode == -1) { // activity ended successfully Log.d(LOG_TAG, onActivityResult(): Changing title from + getTitle() + to + data.getStringExtra(StylePad.Notes.TITLE)); setTitle(data.getStringExtra(StylePad.Notes.TITLE)); Log.d(LOG_TAG, onActivityResult(): New title + getTitle()); } break; } } And the logging tells me that the title's been changed, but yet the UI is NOT updated... Have tried this on both a Galaxy Tab (2.2) and the 2.2 emulator. On Jan 12, 12:16 pm, Kumar Bibek coomar@gmail.com wrote: It's a relatively simple problem. I am not sure what are you doing wrong. The title can be changed anytime from anywhere. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 10:43 PM, Paul pmmen...@gmail.com wrote: I posted this over at StackOverflow, but not much of a response... maybe someone else can run this on their testbed and verify? A strange problem... == Hi all. I have a simple app based on the Notepad demo application, and when a user is viewing/editing a note they can launch a dialog activity (TitleEditor) that allows them to change the title of a note. Currently in the app, when viewing/editing a note, the notes' current title is shown as the activity title. So, I launch the TitleEditor dialog activity with startActivityForResult(), and in onActivityResult() I am successfully getting the new title back, no problem. The issue relates to then updating the notes view/edit (the active activity) title... using setTitle() in onActivityResult() with the data passed back does seem to set the title internally (a subsequent call to getTitle() shows the new title has been set), but the actual UI title is not updated until the activity is closed and then re- launched. I've used setTitle() in onResume(), onPrepareOptionsMenu(), etc and it worked like a charm, but not working here... any ideas or suggestions? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit
[android-developers] Listview highlight problem
Hi, when I set listener like row.setOnLongClickListener(new OnLongClickListener() { @Override public boolean onLongClick(View v) { my listview doesn't highlights items on touch. Does anyone knows what could be source of this problem and how to resolve it? tnx. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem changing Activity title in onActivityResult()
Yes! I was changing the title of a note in the db in the called activity, but failing to update the cursor in onActivityResult... so in onResume, it was pulling the old title. .requery()ing the cursor in onActivityResult got it, thanks all! Paul On Jan 12, 1:47 pm, Kumar Bibek coomar@gmail.com wrote: I just tried a sample program, and it seems fine. There must be something going on in your onResume part... Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Thu, Jan 13, 2011 at 12:09 AM, Paul pmmen...@gmail.com wrote: UPDATE: Ok, so it looks like the following is happening... User starts the activity, title is X. As a test, I then change the title in onCreateOptionsMenu to Y, and the UI changes immediately. Finally, when the options-menu launched activity returns it's value, Z to onActivityResult, I then attempt to change the UI title again from the currently shown Y to Z... but the title is instead changed back to X..., even though an immediate call to getTitle tells me that it should be Z... Any ideas why this may be happening? Paul On Jan 12, 1:26 pm, Paul pmmen...@gmail.com wrote: Agreed, which is why it's so frustrating. As a test, in onCreateOptionsMenu() @Override public boolean onCreateOptionsMenu(Menu menu) { setTitle(changed); . . . return super.onCreateOptionsMenu(menu); } Works fine. In onActivityResult() (this is the code, verbatim) @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // check the activity results switch (requestCode) { case RESULT_RENAME: if (resultCode == -1) { // activity ended successfully Log.d(LOG_TAG, onActivityResult(): Changing title from + getTitle() + to + data.getStringExtra(StylePad.Notes.TITLE)); setTitle(data.getStringExtra(StylePad.Notes.TITLE)); Log.d(LOG_TAG, onActivityResult(): New title + getTitle()); } break; } } And the logging tells me that the title's been changed, but yet the UI is NOT updated... Have tried this on both a Galaxy Tab (2.2) and the 2.2 emulator. On Jan 12, 12:16 pm, Kumar Bibek coomar@gmail.com wrote: It's a relatively simple problem. I am not sure what are you doing wrong. The title can be changed anytime from anywhere. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 10:43 PM, Paul pmmen...@gmail.com wrote: I posted this over at StackOverflow, but not much of a response... maybe someone else can run this on their testbed and verify? A strange problem... == Hi all. I have a simple app based on the Notepad demo application, and when a user is viewing/editing a note they can launch a dialog activity (TitleEditor) that allows them to change the title of a note. Currently in the app, when viewing/editing a note, the notes' current title is shown as the activity title. So, I launch the TitleEditor dialog activity with startActivityForResult(), and in onActivityResult() I am successfully getting the new title back, no problem. The issue relates to then updating the notes view/edit (the active activity) title... using setTitle() in onActivityResult() with the data passed back does seem to set the title internally (a subsequent call to getTitle() shows the new title has been set), but the actual UI title is not updated until the activity is closed and then re- launched. I've used setTitle() in onResume(), onPrepareOptionsMenu(), etc and it worked like a charm, but not working here... any ideas or suggestions? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more
[android-developers] Re: How to get screen density in pixels-per-inch or equivalent
Hi Richard, On Jan 12, 6:54 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: Did you try fetching the scale that will allow you to convert from DPI to actual screen pixels? I found this very reliable: final scale = getContext().getResources().getDisplayMetrics().density; The description of that says: on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc. Then multiply scale by one inch of pixels in DPI resolution (depending on the screen you're on) - 120, 160, 240, 320. This API call ... int densityDpi = getContext().getResources().getDisplayMetrics().densityDpi; will tell you the density of the screen you're on. Approximately. So, this will tell you how many screen pixels equate to an inch. I'm not at all sure that it does. Then you can use that to lay out your ruler markings: int pxPerInch = 340; // default value - note it's a new density in API version 9. switch(densityDpi){ case DisplayMetrics.DENSITY_LOW: pxPerInch = 120 * scale; break; case DisplayMetrics.DENSITY_MEDIUM: pxPerInch = 160 * scale; break; case DisplayMetrics.DENSITY_HIGH: pxPerInch = 240 * scale; break; } Note that the values of those constants DENSITY_* are their numeric values, so there is no need for the case statement; you can just write: pxPerInch = densityDpi * scale; However, I really don't think that does what you believe it does. I think that densityDpi reliably gives the approximate dpi, and density just gives densityDpi/160. Multiplying them together doesn't do anything useful. But I could be wrong! Thanks, Phil. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] HttpURLConnection gives UnknownHostException
Hi All, I am developing an application on Android. I have seen that at times when I try to connect using HttpURLConnection, for getting an Image or anydata, I get the following error: 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException: Host is unresolved: www.XXX.com:80. Note: I get this error on my Motorolla Droid and not in emulator. Any ideas? Thanks, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HttpURLConnection gives UnknownHostException
This error/exception comes because of no network connectivity. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani ankuravl...@gmail.com wrote: Hi All, I am developing an application on Android. I have seen that at times when I try to connect using HttpURLConnection, for getting an Image or anydata, I get the following error: 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException: Host is unresolved: www.XXX.com:80. Note: I get this error on my Motorolla Droid and not in emulator. Any ideas? Thanks, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Particularity running modified standard app
Hello, I have downloaded and slightly modified the Android 2.2 version of Camera and have begun to make some changes to it. Let's say I have renamed the app to X in Eclipse If I run X from Eclipse (Helios), it behaves more or less the way I expect. Running from Eclipse installs X on my device (Nexus One). But when I run X from the app launcher, I get Camera! I would be thankful to 1) know why 2) general info on modifying a standard app TIA Bernard Higonnet -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HttpURLConnection gives UnknownHostException
I am connected to network, I am on Wifi. If i try again it works. Its just random. On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.com wrote: This error/exception comes because of no network connectivity. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani ankuravl...@gmail.comwrote: Hi All, I am developing an application on Android. I have seen that at times when I try to connect using HttpURLConnection, for getting an Image or anydata, I get the following error: 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException: Host is unresolved: www.XXX.com:80. Note: I get this error on my Motorolla Droid and not in emulator. Any ideas? Thanks, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] HttpClient on Android?
Hi, has anyone successfully used Apache HttpClient library on Android platform? PS: Any remarks , problems that I should be aware of? tnx. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HttpURLConnection gives UnknownHostException
Yup, then it's a problem with your Wi-Fi. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani ankuravl...@gmail.com wrote: I am connected to network, I am on Wifi. If i try again it works. Its just random. On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.comwrote: This error/exception comes because of no network connectivity. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani ankuravl...@gmail.comwrote: Hi All, I am developing an application on Android. I have seen that at times when I try to connect using HttpURLConnection, for getting an Image or anydata, I get the following error: 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException: Host is unresolved: www.XXX.com:80. Note: I get this error on my Motorolla Droid and not in emulator. Any ideas? Thanks, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HttpURLConnection gives UnknownHostException
I am sorry, that somehow doesn't convince me. I am connected to the same wifi on my laptop and i never see any web page load error on my laptop. On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek coomar@gmail.com wrote: Yup, then it's a problem with your Wi-Fi. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani ankuravl...@gmail.comwrote: I am connected to network, I am on Wifi. If i try again it works. Its just random. On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.comwrote: This error/exception comes because of no network connectivity. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani ankuravl...@gmail.comwrote: Hi All, I am developing an application on Android. I have seen that at times when I try to connect using HttpURLConnection, for getting an Image or anydata, I get the following error: 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException: Host is unresolved: www.XXX.com:80. Note: I get this error on my Motorolla Droid and not in emulator. Any ideas? Thanks, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HttpClient on Android?
It works just fine. Most of us use HttpClient :) Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:07 AM, Nikola nikola1...@gmail.com wrote: Hi, has anyone successfully used Apache HttpClient library on Android platform? PS: Any remarks , problems that I should be aware of? tnx. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HttpURLConnection gives UnknownHostException
By Wi-Fi, I meant, you phone's Wi-Fi could be turning on and off. There is no other reason I can think of. It happens for me as well, sometimes. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:10 AM, Ankur Avlani ankuravl...@gmail.com wrote: I am sorry, that somehow doesn't convince me. I am connected to the same wifi on my laptop and i never see any web page load error on my laptop. On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek coomar@gmail.comwrote: Yup, then it's a problem with your Wi-Fi. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani ankuravl...@gmail.comwrote: I am connected to network, I am on Wifi. If i try again it works. Its just random. On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.comwrote: This error/exception comes because of no network connectivity. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani ankuravl...@gmail.comwrote: Hi All, I am developing an application on Android. I have seen that at times when I try to connect using HttpURLConnection, for getting an Image or anydata, I get the following error: 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException: Host is unresolved: www.XXX.com:80. Note: I get this error on my Motorolla Droid and not in emulator. Any ideas? Thanks, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HttpClient on Android?
On Wed, Jan 12, 2011 at 8:40 PM, Kumar Bibek coomar@gmail.com wrote: It works just fine. Most of us use HttpClient Tnx for quick reply. Just want to be sure :) -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: EditText with Cross
Yes that I know but I would like to do that the Button will be inside of EdiText. The Button will be a little bit like a cover of EditText. Is it possible to set the Button position to be above the EditText?? thanks for answering. On 12. Jan, 17:49 h., Kumar Bibek coomar@gmail.com wrote: It might just be a regular button beside the EditText. And I guess that's very simple to implement. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 10:15 PM, Richard Sámela feromak...@gmail.comwrote: Hi, I saw an app where was EditText and if you put some text into EditText there was a Cross Button (or something like that) on the left side. And if I click on this Button the text from EditText was deleted. Can you help me or explain me how to to this? I would like to use EditText with the same effect. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email toandroid-develop...@googlegroups.com To unsubscribe from this group, send email toandroid-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HttpURLConnection gives UnknownHostException
Somehow I have this feeling it is related to my app only. Other apps on the phone, I don't see any such issue. Even when browsing on my phone, I don't see any error. On Wed, Jan 12, 2011 at 11:41 AM, Kumar Bibek coomar@gmail.com wrote: By Wi-Fi, I meant, you phone's Wi-Fi could be turning on and off. There is no other reason I can think of. It happens for me as well, sometimes. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:10 AM, Ankur Avlani ankuravl...@gmail.comwrote: I am sorry, that somehow doesn't convince me. I am connected to the same wifi on my laptop and i never see any web page load error on my laptop. On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek coomar@gmail.comwrote: Yup, then it's a problem with your Wi-Fi. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani ankuravl...@gmail.comwrote: I am connected to network, I am on Wifi. If i try again it works. Its just random. On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.comwrote: This error/exception comes because of no network connectivity. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani ankuravl...@gmail.comwrote: Hi All, I am developing an application on Android. I have seen that at times when I try to connect using HttpURLConnection, for getting an Image or anydata, I get the following error: 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException: Host is unresolved: www.XXX.com:80. Note: I get this error on my Motorolla Droid and not in emulator. Any ideas? Thanks, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: EditText with Cross
Well, it's possible, but it will be more complex. You have to give some padding in the edit text so that the button doesn't overlap the text on the edit text. And then, there might be focus problems. Another workaround is: Change the background of the edittext and the parent layout to whatever you want it to look like. And then have this layout. Parent Layout --Button-- --EditText-- Code the listeners for the button, and it should work. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Thu, Jan 13, 2011 at 1:23 AM, Richard Sámela feromak...@gmail.comwrote: Yes that I know but I would like to do that the Button will be inside of EdiText. The Button will be a little bit like a cover of EditText. Is it possible to set the Button position to be above the EditText?? thanks for answering. On 12. Jan, 17:49 h., Kumar Bibek coomar@gmail.com wrote: It might just be a regular button beside the EditText. And I guess that's very simple to implement. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Jan 12, 2011 at 10:15 PM, Richard Sámela feromak...@gmail.com wrote: Hi, I saw an app where was EditText and if you put some text into EditText there was a Cross Button (or something like that) on the left side. And if I click on this Button the text from EditText was deleted. Can you help me or explain me how to to this? I would like to use EditText with the same effect. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email toandroid-develop...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en