[android-developers] Re: BroadcastReceiver not working for Car Dock
I think actoin should be android.intent.category.CAR_DOCK. On Oct 11, 7:57 am, zachariahyoung zpyo...@gmail.com wrote: I'm trying to write a program to send an email when the phone is placed in the car dock. I have create a Android Project with no Activities. Below is the one class I have created. It just has a Toast so I can see that it is working. Below is the code which I think is correct. package com.demo.carmode; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; import android.widget.Toast; public class CarMode extends BroadcastReceiver { @Override public void onReceive(Context arg0, Intent intent) { Toast.makeText(arg0, Hello Car Mode, Toast.LENGTH_SHORT).show(); Log.d(ExmampleBroadcastReceiver, intent= + intent); Log.i(CarMod, hello world); } } My mainfest is real simple also. ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.demo.carmode android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name receiver android:name=.CarMode android:enabled=true intent-filter action android:name=android.intent.action.MAIN/action category android:name=android.intent.category.CAR_DOCK/ category /intent-filter /receiver /application /manifest I'm testing the code by click on the phone Car Home app. Would this not be the same thing as docking the phone? Have I not setup my manifest correctly? Could I be missing something else. Seems like this should work. I also see the active and category appear on my logcat. Thanks for the help Zach -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: BroadcastReceiver
Could you please prodice the log events of crash?? i think you may be missing some permissions.. On Sep 22, 8:37 am, perumal316 perumal...@gmail.com wrote: Hi All, I have written an application to read all incoming SMS and if the SMS contains certain string, I will also send a copy of the message to my another phone for backup purposes. I used the reference from the following website: http://www.anddev.org/novice-tutorials-f8/recognize-react-on-incoming... It uses BroadcastReceiver to get the incoming SMS, but when I tried to send it using the following method: private void sendingSMS(String phoneNo,String message){ SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phoneNo, null, message,null,null); } It always crashes. Any idea how to resolve it? Is it because of using BroadcastReceiver. Thanks In Advance, Perumal -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: BroadcastReceiver
probably these? uses-permission android:name=android.permission.SEND_SMS / uses-permission android:name=android.permission.RECEIVE_SMS / On Sep 22, 8:37 am, perumal316 perumal...@gmail.com wrote: Hi All, I have written an application to read all incoming SMS and if the SMS contains certain string, I will also send a copy of the message to my another phone for backup purposes. I used the reference from the following website: http://www.anddev.org/novice-tutorials-f8/recognize-react-on-incoming... It uses BroadcastReceiver to get the incoming SMS, but when I tried to send it using the following method: private void sendingSMS(String phoneNo,String message){ SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phoneNo, null, message,null,null); } It always crashes. Any idea how to resolve it? Is it because of using BroadcastReceiver. Thanks In Advance, Perumal -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Debugging on a real device
u can try ./adb kill-server after that ./adb start-server. Make sure that u have ebabled the USB Debugging in settings- applications-Development. On Sep 17, 10:27 am, John Gaby jg...@gabysoft.com wrote: I have gotten to to the point where I need to test my application on a real Android device. I have obtained an Motorola Droid phone and attached it to my computer (Windows). I have installed the USB driver, and I believe that my computer can see the phone. When I start up the DDMS it shows my device as 'Online'. I cannot, however, figure out how to get the debugger to use the device instead of the emulator. The Android documentation states that when I run my program from within Eclipse that I should be presented with a 'Device Chooser', but that does not happen. I read somewhere else that pressing F11 will bring up the Device Chooser, but it only runs the application on the emulator. I know there is probably something obvious that I am missing here, but I cannot figure out what it is. Any help would be appreciated. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Browser: Keyboard disappears.
Please somebody help me to solve this.. On Aug 31, 2:57 pm, KANTESH BABANNAVAR kantesh...@gmail.com wrote: Hi Androidians, This is a magic happening with browser. When i touch the URL field in the browser, a fake tittle bar comes up and it is a so called search dialog, and start typing some letters fast, the keyboard disappears. And the Log events* say the following. Once it is happened, especially in land scape, the edit text field (Integrated with keyboard itself), does not reflects the letters typed afterwards, but gets reflected in the fake tittle bar behind it. I am not able categorize where and how its happening. Could anybody help me. Thank you, With Regards Kantesh Log Events: / / D/dalvikvm( 3742): GC freed 6726 objects / 252560 bytes in 86ms E/SurfaceFlinger( 2061): createSurface() failed, generateId = -12 W/WindowManager( 2061): OutOfResourcesException creating surface I/WindowManager( 2061): Out of memory for surface! Looking for leaks... W/WindowManager( 2061): No leaked surfaces; killing applicatons! W/ActivityManager( 2061): Killing processes for memory at adjustment 1 W/ActivityManager( 2061): Killing for memory: ProcessRecord{47fb9be8 2142:com.android.inputmethod.latin/10015} (adj 1) I/Process ( 2061): Sending signal. PID: 2142 SIG: 9 W/WindowManager( 2061): Looks like we have reclaimed some memory, clearing surface for retry. W/WindowManager( 2061): Due to memory failure, waiting a bit for next layout I/ActivityManager( 2061): Process com.android.inputmethod.latin (pid 2142) has died. W/ActivityManager( 2061): Scheduling restart of crashed service com.android.inputmethod.latin/.LatinIME in 5000ms I/WindowManager( 2061): WIN DEATH: Window{480d1bf8 InputMethod paused=false} I/WindowManager( 2061): WIN DEATH: Window{48138248 PopupWindow: 47e21b10 paused=false} E/ActivityThread( 2061): Failed to find provider info for android.server.checkin W/Checkin ( 2061): Can't log event SYSTEM_SERVICE_LOOPING: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/events I/ActivityManager( 2061): Start proc com.android.inputmethod.latin for service com.android.inputmethod.latin/.LatinIME: pid=4285 uid=10015 gids={3003, 1015} D/ddm-heap( 4285): Got feature list request D/dalvikvm( 4285): Trying to load lib /system/lib/libjni_latinime.so 0x47f5fd70 D/dalvikvm( 4285): Added shared lib /system/lib/libjni_latinime.so 0x47f5fd70 W/InputMethodManager( 2061): Ignoring onBind: cur seq=18, given seq=38 D/dalvikvm( 4285): GC freed 1235 objects / 88664 bytes in 45ms -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can i access the /data/data/my_project_name/files/my_file.txt on a real android device
d- type of file rwx - permissions for root rwx - permissions for group --x - permissions for you/your app As per this your cant operate with the file I think. On Sep 17, 2:10 pm, Lidia lidyp...@yahoo.com wrote: Hello to all, I wrote a file o the phone from my application in the following path: /data/data/my_project_name/files/my_file.txt If i run the application in emulator, i can see my file created in this path. but if i run the application on a real device, i can't see this file. Using DDMS from the eclipse the data folder from the phone has permissions drwxrwx--x - what does this mean? and when i try to expend the +data , it seems to be empty. I use the Astro programm to access the data folder from the phone, and it seems to be empty. Is the content hidden of this folder, and there is not a way to see what it contains? Thanks Lidia -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do I refer to a drawable with a variable
I think it may help you.. getresources().getDrawable(TeamArray[position]); Where TeamArray[position] = { R.drawable.drawable1, R.drawable.drawable2, . . R.drawable.drawableN, } These links may help you.. http://developer.android.com/resources/tutorials/views/hello-gridview.html http://developer.android.com/resources/tutorials/views/hello-gallery.html On Sep 14, 8:49 am, nextgen nextgenfant...@comcast.net wrote: I am doing an app related to football. I have a list view that will have various rows representing teams. In my custom array adapter I want to write some code that will present an icon for the team represented by the row. I have a drawable resource for each team (for instance for Indianapolis, Ind.png). In my code I can't refer to R.drawable.Ind because the Ind part is dynamic. That value would be in an array, like TeamArray[position]. As I expected, I certainly can't use R.drawable.TeamArray[position] because it won't even compile, it expects a literal name from the drawable folder. Is there a way to do this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 include progress dialogue..?
please refer this link. http://developer.android.com/guide/topics/ui/dialogs.html On Sep 14, 8:24 am, Rubin jeff.rubi...@gmail.com wrote: Hi I have to show progress dialog while button click. Is there any sample code to show this. Cheers, Rubin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Browser: Keyboard disappears.
Hi Androidians, This is a magic happening with browser. When i touch the URL field in the browser, a fake tittle bar comes up and it is a so called search dialog, and start typing some letters fast, the keyboard disappears. And the Log events* say the following. Once it is happened, especially in land scape, the edit text field (Integrated with keyboard itself), does not reflects the letters typed afterwards, but gets reflected in the fake tittle bar behind it. I am not able categorize where and how its happening. Could anybody help me. Thank you, With Regards Kantesh Log Events: / / D/dalvikvm( 3742): GC freed 6726 objects / 252560 bytes in 86ms E/SurfaceFlinger( 2061): createSurface() failed, generateId = -12 W/WindowManager( 2061): OutOfResourcesException creating surface I/WindowManager( 2061): Out of memory for surface! Looking for leaks... W/WindowManager( 2061): No leaked surfaces; killing applicatons! W/ActivityManager( 2061): Killing processes for memory at adjustment 1 W/ActivityManager( 2061): Killing for memory: ProcessRecord{47fb9be8 2142:com.android.inputmethod.latin/10015} (adj 1) I/Process ( 2061): Sending signal. PID: 2142 SIG: 9 W/WindowManager( 2061): Looks like we have reclaimed some memory, clearing surface for retry. W/WindowManager( 2061): Due to memory failure, waiting a bit for next layout I/ActivityManager( 2061): Process com.android.inputmethod.latin (pid 2142) has died. W/ActivityManager( 2061): Scheduling restart of crashed service com.android.inputmethod.latin/.LatinIME in 5000ms I/WindowManager( 2061): WIN DEATH: Window{480d1bf8 InputMethod paused=false} I/WindowManager( 2061): WIN DEATH: Window{48138248 PopupWindow: 47e21b10 paused=false} E/ActivityThread( 2061): Failed to find provider info for android.server.checkin W/Checkin ( 2061): Can't log event SYSTEM_SERVICE_LOOPING: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/events I/ActivityManager( 2061): Start proc com.android.inputmethod.latin for service com.android.inputmethod.latin/.LatinIME: pid=4285 uid=10015 gids={3003, 1015} D/ddm-heap( 4285): Got feature list request D/dalvikvm( 4285): Trying to load lib /system/lib/libjni_latinime.so 0x47f5fd70 D/dalvikvm( 4285): Added shared lib /system/lib/libjni_latinime.so 0x47f5fd70 W/InputMethodManager( 2061): Ignoring onBind: cur seq=18, given seq=38 D/dalvikvm( 4285): GC freed 1235 objects / 88664 bytes in 45ms -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Scrolling in a ListView
One of the data you are providing to the list view may not be initialized or null. Put event log n check all values. On Aug 20, 12:06 am, Sebastian Muehr sebastian.mu...@googlemail.com wrote: In one of my projects I've got a ListView with hundreds of elements. But when scrolling through this list I get the following error: 08-19 18:58:57.269: ERROR/AndroidRuntime(261): java.lang.NullPointerException 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java: 355) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.AbsListView.obtainView(AbsListView.java:1256) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.ListView.measureHeightOfChildren(ListView.java:1147) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.ListView.onMeasure(ListView.java:1060) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.View.measure(View.java:7964) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java: 888) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.LinearLayout.measureVertical(LinearLayout.java:350) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.LinearLayout.onMeasure(LinearLayout.java:278) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.View.measure(View.java:7964) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.View.measure(View.java:7964) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.LinearLayout.measureVertical(LinearLayout.java:464) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.LinearLayout.onMeasure(LinearLayout.java:278) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.View.measure(View.java:7964) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.View.measure(View.java:7964) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.ViewRoot.performTraversals(ViewRoot.java:763) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.os.Handler.dispatchMessage(Handler.java:99) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.os.Looper.loop(Looper.java:123) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at android.app.ActivityThread.main(ActivityThread.java:4363) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at java.lang.reflect.Method.invokeNative(Native Method) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at java.lang.reflect.Method.invoke(Method.java:521) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 08-19 18:58:57.269: ERROR/AndroidRuntime(261): at dalvik.system.NativeStart.main(Native Method) Can anyone help me with this issue? I'm glad about any hint that you can give me. - Sebastian Muehr - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: enable/dissable fullscreen for lifetime of the app?
this may help u.. try it out..i am not sure..:) getApplicationContext().setTheme(android.R.style.Theme_NoTitleBar_Fullscree n); On Aug 20, 10:27 am, Kantesh kantesh@gmail.com wrote: this may help u.. try it out..i am not sure..:) getApplicationContext().setTheme(android.R.style.Theme_NoTitleBar_Fullscree n); On Aug 20, 3:26 am, Moto medicalsou...@gmail.com wrote: Currently my application allows the user to set the application to run in full screen. I than check in every activity at onCreate() if the user has set to make the app run in full screen. Is there a better way to do this? I have many other settings that I do and I find this method a little bad in terms of code design. Is there a way to set full screen for the lifetime of app or until I set it back to not full screen? One way to do it would be to have a custom Activity class that does these checks and all my activities can just implement it? would that be slow is it recommended? Thanks! -Moto -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en