[android-developers] Broadcast for SCREEN OFF
Hi, I am trying to listen broadcast for Screen Off as follow IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_SCREEN_OFF); BroadcastReceiver mReceiver = new ScreenReceiver(); registerReceiver(mReceiver, filter); But when screen locks somehow my ScreenReceiver is not getting a braodcast. What could be wrong here? I also tried declaring it in manifest, there too it didn't work. Thanks in Advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Broadcast for SCREEN OFF
There are no messages. Even message like below is not coming which means it is not starting broadcast receiver at all. I don't see any errors even while app installed/ first time launched. Start proc com.xxx.yyy.zzz for broadcast com.xxx.yyy.zzz/.MyReceiver: I need to fix this. any pointers? On Nov 11, 5:56 am, Dianne Hackborn hack...@android.com wrote: This only works with registerReceiver(), not when declared in the manifest. Your filter looks fine, so you should be receiving it. Try looking in the log to make sure there isn't some message being printed there. On Thu, Nov 10, 2011 at 3:52 AM, Namrata puranik.namr...@gmail.com wrote: Hi, I am trying to listen broadcast for Screen Off as follow IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_SCREEN_OFF); BroadcastReceiver mReceiver = new ScreenReceiver(); registerReceiver(mReceiver, filter); But when screen locks somehow my ScreenReceiver is not getting a braodcast. What could be wrong here? I also tried declaring it in manifest, there too it didn't work. Thanks in Advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Unmarshalling unknown type code
Hi, I have one activity A with requires few values passed in intent. Those values are of type boolean int array. I am passing these these values from activity B in intent as intent.putExtra(key1, boolean) intent.putExtra(key2, int[]). In activity A I am reading it as Intent i = getIntent(); Bundle b = i.getExtras(); boolean flag = b.getBoolean(key1); int[] array = b.getIntArray(key2); It works perfect all the time but there is one case where it throws exception java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514 at offset 456 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2787) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2803) at android.app.ActivityThread.access$2300(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2136) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:144) at android.app.ActivityThread.main(ActivityThread.java:4937) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514 at offset 456 at android.os.Parcel.readValue(Parcel.java:1838) at android.os.Parcel.readSparseArrayInternal(Parcel.java:2037) at android.os.Parcel.readSparseArray(Parcel.java:1493) at android.os.Parcel.readValue(Parcel.java:1828) at android.os.Parcel.readMapInternal(Parcel.java:2008) at android.os.Bundle.unparcel(Bundle.java:208) at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167) at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java: 1493) at android.app.Activity.onRestoreInstanceState(Activity.java:850) at android.app.Activity.performRestoreInstanceState(Activity.java:822) at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java: 1142) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2765) ... 11 more I dont have exact reproducible steps for this, but this is very annoying, what to do? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Unmarshalling unknown type code
@Zsolt thanks for replying..but I didn't understand what are you saying, can u plz explain it in detail? On May 18, 12:42 pm, Zsolt Vasvari zvasv...@gmail.com wrote: The stack trace you are showing doesn't seem to involve your intent extras. It appears to be restoring the state of your screen when it's crashing. On May 18, 3:35 pm, Namrata puranik.namr...@gmail.com wrote: Hi, I have one activity A with requires few values passed in intent. Those values are of type boolean int array. I am passing these these values from activity B in intent as intent.putExtra(key1, boolean) intent.putExtra(key2, int[]). In activity A I am reading it as Intent i = getIntent(); Bundle b = i.getExtras(); boolean flag = b.getBoolean(key1); int[] array = b.getIntArray(key2); It works perfect all the time but there is one case where it throws exception java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514 at offset 456 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2787) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2803) at android.app.ActivityThread.access$2300(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2136) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:144) at android.app.ActivityThread.main(ActivityThread.java:4937) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514 at offset 456 at android.os.Parcel.readValue(Parcel.java:1838) at android.os.Parcel.readSparseArrayInternal(Parcel.java:2037) at android.os.Parcel.readSparseArray(Parcel.java:1493) at android.os.Parcel.readValue(Parcel.java:1828) at android.os.Parcel.readMapInternal(Parcel.java:2008) at android.os.Bundle.unparcel(Bundle.java:208) at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167) at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java: 1493) at android.app.Activity.onRestoreInstanceState(Activity.java:850) at android.app.Activity.performRestoreInstanceState(Activity.java:822) at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java: 1142) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2765) ... 11 more I dont have exact reproducible steps for this, but this is very annoying, what to do? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Unmarshalling unknown type code
@Kostya, thanks for replying...I am not overriding onSaveInstanceState() onRestroreInstanceState() methods. So whatever super ie Activity class has it is getting executed. Thats why I am surprised that I am using Intent extras for my purpose and not touching above 2 methods still its throwing exception in that method. Any clue? On May 18, 2:18 pm, Kostya Vasilyev kmans...@gmail.com wrote: The type code is a prefix in the data stream that tells Parcelable the type of data that follows. See Parcel.java, method readValue(), around lines 1700-1800. All the codes are small numbers, between -1 and 24. The code in your logcat is much larger. This can be caused by data being read in a different order than it's been written. For example: parcel.writeInt(...) parcel.writeString() ... parcel.readString() parcel.readInt() It can also be caused by data corruption of some sort, for some reason. You don't seem to be using parcel directly, but still, maybe this can give you some more ideas. There is a call to Activity.onRestoreInstanceState, so there is a parcelable (bundle) involved here. -- Kostya 18.05.2011 12:49, Namrata пишет: @Zsolt thanks for replying..but I didn't understand what are you saying, can u plz explain it in detail? On May 18, 12:42 pm, Zsolt Vasvarizvasv...@gmail.com wrote: The stack trace you are showing doesn't seem to involve your intent extras. It appears to be restoring the state of your screen when it's crashing. On May 18, 3:35 pm, Namratapuranik.namr...@gmail.com wrote: Hi, I have one activity A with requires few values passed in intent. Those values are of type boolean int array. I am passing these these values from activity B in intent as intent.putExtra(key1, boolean) intent.putExtra(key2, int[]). In activity A I am reading it as Intent i = getIntent(); Bundle b = i.getExtras(); boolean flag = b.getBoolean(key1); int[] array = b.getIntArray(key2); It works perfect all the time but there is one case where it throws exception java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514 at offset 456 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2787) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2803) at android.app.ActivityThread.access$2300(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2136) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:144) at android.app.ActivityThread.main(ActivityThread.java:4937) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514 at offset 456 at android.os.Parcel.readValue(Parcel.java:1838) at android.os.Parcel.readSparseArrayInternal(Parcel.java:2037) at android.os.Parcel.readSparseArray(Parcel.java:1493) at android.os.Parcel.readValue(Parcel.java:1828) at android.os.Parcel.readMapInternal(Parcel.java:2008) at android.os.Bundle.unparcel(Bundle.java:208) at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167) at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java: 1493) at android.app.Activity.onRestoreInstanceState(Activity.java:850) at android.app.Activity.performRestoreInstanceState(Activity.java:822) at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java: 1142) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2765) ... 11 more I dont have exact reproducible steps for this, but this is very annoying, what to do? Thanks in advance -- Kostya Vasilyev --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: Unmarshalling unknown type code
Latest observation, if I am on activity A then I kill app with app killer application after that I try to relaunch my app, generally here above mentioned exception comes. On May 18, 2:37 pm, Namrata puranik.namr...@gmail.com wrote: @Kostya, thanks for replying...I am not overriding onSaveInstanceState() onRestroreInstanceState() methods. So whatever super ie Activity class has it is getting executed. Thats why I am surprised that I am using Intent extras for my purpose and not touching above 2 methods still its throwing exception in that method. Any clue? On May 18, 2:18 pm, Kostya Vasilyev kmans...@gmail.com wrote: The type code is a prefix in the data stream that tells Parcelable the type of data that follows. See Parcel.java, method readValue(), around lines 1700-1800. All the codes are small numbers, between -1 and 24. The code in your logcat is much larger. This can be caused by data being read in a different order than it's been written. For example: parcel.writeInt(...) parcel.writeString() ... parcel.readString() parcel.readInt() It can also be caused by data corruption of some sort, for some reason. You don't seem to be using parcel directly, but still, maybe this can give you some more ideas. There is a call to Activity.onRestoreInstanceState, so there is a parcelable (bundle) involved here. -- Kostya 18.05.2011 12:49, Namrata пишет: @Zsolt thanks for replying..but I didn't understand what are you saying, can u plz explain it in detail? On May 18, 12:42 pm, Zsolt Vasvarizvasv...@gmail.com wrote: The stack trace you are showing doesn't seem to involve your intent extras. It appears to be restoring the state of your screen when it's crashing. On May 18, 3:35 pm, Namratapuranik.namr...@gmail.com wrote: Hi, I have one activity A with requires few values passed in intent. Those values are of type boolean int array. I am passing these these values from activity B in intent as intent.putExtra(key1, boolean) intent.putExtra(key2, int[]). In activity A I am reading it as Intent i = getIntent(); Bundle b = i.getExtras(); boolean flag = b.getBoolean(key1); int[] array = b.getIntArray(key2); It works perfect all the time but there is one case where it throws exception java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514 at offset 456 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2787) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2803) at android.app.ActivityThread.access$2300(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 2136) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:144) at android.app.ActivityThread.main(ActivityThread.java:4937) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514 at offset 456 at android.os.Parcel.readValue(Parcel.java:1838) at android.os.Parcel.readSparseArrayInternal(Parcel.java:2037) at android.os.Parcel.readSparseArray(Parcel.java:1493) at android.os.Parcel.readValue(Parcel.java:1828) at android.os.Parcel.readMapInternal(Parcel.java:2008) at android.os.Bundle.unparcel(Bundle.java:208) at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167) at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java: 1493) at android.app.Activity.onRestoreInstanceState(Activity.java:850) at android.app.Activity.performRestoreInstanceState(Activity.java:822) at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java: 1142) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2765) ... 11 more I dont have exact reproducible steps for this, but this is very annoying, what to do? Thanks in advance -- Kostya Vasilyev --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: Unmarshalling unknown type code
yes I am using one custom ViewGroup I am handling saveInstanceState restoreInstanceState in it.(I just forgot to think about this custom view). So yup I understand the probability is the exception comes here. I checked my code, it has only 1 state variable to store. So no miss-order handling is there. When I write to parcel its size is 660 when read it size is 1013. here is the code snippet protected Parcelable onSaveInstanceState() { final SavedState state = new SavedState(super.onSaveInstanceState()); state.currentState = this.currentState; return state; } /** * Restore the previous saved current screen */ @Override protected void onRestoreInstanceState(Parcelable state) { SavedState savedState = (SavedState) state; super.onRestoreInstanceState(savedState.getSuperState()); if (savedState.currentScreen != -1) { currentState = savedState.currentState; } } // = INNER CLASSES == public interface onViewChangedEvent { void onViewChange(int currentViewIndex); } /** * A SavedState which save and load the current screen */ public static class SavedState extends BaseSavedState { int currentState = -1; /** * Internal constructor * * @param superState */ SavedState(Parcelable superState) { super(superState); } /** * Private constructor * * @param in */ private SavedState(Parcel in) { super(in); Log.d(, parcelsize() in +in.dataSize()); currentState = in.readInt(); } /** * Save the current screen */ @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeInt(currentState); Log.d(, parcelsize() out +out.dataSize()); } /** * Return a Parcelable creator */ public static final Parcelable.CreatorSavedState CREATOR = new Parcelable.CreatorSavedState() { public SavedState createFromParcel(Parcel in) { return new SavedState(in); } public SavedState[] newArray(int size) { return new SavedState[size]; } }; } On May 18, 3:18 pm, Kostya Vasilyev kmans...@gmail.com wrote: The error happens while restoring view states (as already pointed out by Zsolt), do you have any custom views in this activity? Do they have methods to save / restore instance state? It's hard to be more specific. Since it happens on your phone, you could try debugging this into the framework sources. -- Kostya 18.05.2011 13:48, Namrata пишет: Latest observation, if I am on activity A then I kill app with app killer application after that I try to relaunch my app, generally here above mentioned exception comes. On May 18, 2:37 pm, Namratapuranik.namr...@gmail.com wrote: @Kostya, thanks for replying...I am not overriding onSaveInstanceState() onRestroreInstanceState() methods. So whatever super ie Activity class has it is getting executed. Thats why I am surprised that I am using Intent extras for my purpose and not touching above 2 methods still its throwing exception in that method. Any clue? On May 18, 2:18 pm, Kostya Vasilyevkmans...@gmail.com wrote: Thetypecodeis a prefix in the data stream that tells Parcelable the typeof data that follows. See Parcel.java, method readValue(), around lines 1700-1800. All the codes are small numbers, between -1 and 24. Thecodein your logcat is much larger. This can be caused by data being read in a different order than it's been written. For example: parcel.writeInt(...) parcel.writeString() ... parcel.readString() parcel.readInt() It can also be caused by data corruption of some sort, for some reason. You don't seem to be using parcel directly, but still, maybe this can give you some more ideas. There is a call to Activity.onRestoreInstanceState, so there is a parcelable (bundle) involved here. -- Kostya 18.05.2011 12:49, Namrata пишет: @Zsolt thanks for replying..but I didn't understand what are you saying, can u plz explain it in detail? On May 18, 12:42 pm, Zsolt Vasvarizvasv...@gmail.com
[android-developers] Re: Unmarshalling unknown type code
hmm..I got the clues..will try with these..thanks On May 18, 5:38 pm, Kostya Vasilyev kmans...@gmail.com wrote: Yourcodeis pretty much boilerplate, I don't see anything wrong. Perhaps the state you're getting in restore is not the state you saved? Do you have views that are dynamically instantiated? Are all views in the activity assigned unique id values? Other than that, I'd try debugging with framework sources. -- Kostya 18.05.2011 15:37, Namrata пишет: yes I am using one custom ViewGroup I am handling saveInstanceState restoreInstanceState in it.(I just forgot to think about this custom view). So yup I understand the probability is the exception comes here. I checked mycode, it has only 1 state variable to store. So no miss-order handling is there. When I write to parcel its size is 660 when read it size is 1013. here is thecodesnippet protected Parcelable onSaveInstanceState() { final SavedState state = new SavedState(super.onSaveInstanceState()); state.currentState = this.currentState; return state; } /** * Restore the previous saved current screen */ @Override protected void onRestoreInstanceState(Parcelable state) { SavedState savedState = (SavedState) state; super.onRestoreInstanceState(savedState.getSuperState()); if (savedState.currentScreen != -1) { currentState = savedState.currentState; } } // = INNER CLASSES == public interface onViewChangedEvent { void onViewChange(int currentViewIndex); } /** * A SavedState which save and load the current screen */ public static class SavedState extends BaseSavedState { int currentState = -1; /** * Internal constructor * * @param superState */ SavedState(Parcelable superState) { super(superState); } /** * Private constructor * * @param in */ private SavedState(Parcel in) { super(in); Log.d(, parcelsize() in +in.dataSize()); currentState = in.readInt(); } /** * Save the current screen */ @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeInt(currentState); Log.d(, parcelsize() out +out.dataSize()); } /** * Return a Parcelable creator */ public static final Parcelable.CreatorSavedState CREATOR = new Parcelable.CreatorSavedState() { public SavedState createFromParcel(Parcel in) { return new SavedState(in); } public SavedState[] newArray(int size) { return new SavedState[size]; } }; } On May 18, 3:18 pm, Kostya Vasilyevkmans...@gmail.com wrote: The error happens while restoring view states (as already pointed out by Zsolt), do you have any custom views in this activity? Do they have methods to save / restore instance state? It's hard to be more specific. Since it happens on your phone, you could try debugging this into the framework sources. -- Kostya 18.05.2011 13:48, Namrata пишет: Latest observation, if I am on activity A then I kill app with app killer application after that I try to relaunch my app, generally here above mentioned exception comes. On May 18, 2:37 pm, Namratapuranik.namr...@gmail.com wrote: @Kostya, thanks for replying...I am not overriding onSaveInstanceState() onRestroreInstanceState() methods. So whatever super ie Activity class has it is getting executed. Thats why I am surprised that I am using Intent extras for my purpose and not touching above 2 methods still its throwing exception in that method. Any clue? On May 18, 2:18 pm, Kostya Vasilyevkmans...@gmail.com wrote: Thetypecodeis a prefix in the data stream that tells Parcelable the typeof data that follows. See Parcel.java, method readValue(), around lines 1700-1800. All the codes are small numbers, between -1 and 24. Thecodein your logcat is much larger. This can be caused by data being read in a different order than it's been written. For example: parcel.writeInt(...) parcel.writeString() ... parcel.readString() parcel.readInt() It can also be caused by data corruption of some sort, for some reason. You don't seem to be using parcel directly, but still, maybe this can give you some more
[android-developers] Update to sdk have broken app building..
Hi, I am building an application which has one android lib. For android lib android.library=true set in default.properties. In main application have mentioned android.library.reference.1 with correct path. Using ant it was building fine prior to update sdk to 2.2. Now it is giving following error /home/xxx/project_path/android/build.xml:109: /home/xxx/lib_path/ android resolve to a path with no default.properties file for project / home/xxx/project_path/android Then I tried with new sdk installation with version 2.1 on which it was working fine, but now on it also its giving same error. I have tried with multiple combinations by changing properties file but no luck. Do anybody have idea what can be broken? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issue in importing apk lib file to application
When I created TestApp it automatically added android.library.reference.1=/home/axa/test/project entry to default.properties, and sdk.dir=/home/axa/development/android-sdk- linux_86 entry to local.properties. Its not only about TestLib I am getting errors about sdk too. I am confused seeing these errors. Any thoughts on this? On Sep 30, 10:18 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Sep 30, 2010 at 1:16 PM, Namrata puranik.namr...@gmail.com wrote: I tried setting up 2 test projects as per the instructions given in http://developer.android.com/guide/developing/other-ide.html#libraryP... TestLib (libray project) and TestApp (application). Setup is done successfully. ant compile on TestLib works perfectly. When I tried ant debug/release on TestApp it is giving me following errors. If I had to guess, TestApp does not reference TestLib: http://developer.android.com/guide/developing/other-ide.html#libraryR... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issue in importing apk lib file to application
When I created TestApp it automatically added android.library.reference.1=/home/axa/test/project entry to default.properties, and sdk.dir=/home/axa/development/android-sdk- linux_86 entry to local.properties. Its not only about TestLib I am getting errors about sdk too. I am confused seeing these errors. Any thoughts on this? On Sep 30, 10:18 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Sep 30, 2010 at 1:16 PM, Namrata puranik.namr...@gmail.com wrote: I tried setting up 2 test projects as per the instructions given in http://developer.android.com/guide/developing/other-ide.html#libraryP... TestLib (libray project) and TestApp (application). Setup is done successfully. ant compile on TestLib works perfectly. When I tried ant debug/release on TestApp it is giving me following errors. If I had to guess, TestApp does not reference TestLib: http://developer.android.com/guide/developing/other-ide.html#libraryR... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issue in importing apk lib file to application
Please help me on this..This is very important thing for me. On Oct 1, 11:34 am, Namrata puranik.namr...@gmail.com wrote: When I created TestApp it automatically added android.library.reference.1=/home/axa/test/project entry to default.properties, and sdk.dir=/home/axa/development/android-sdk- linux_86 entry to local.properties. Its not only about TestLib I am getting errors about sdk too. I am confused seeing these errors. Any thoughts on this? On Sep 30, 10:18 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Sep 30, 2010 at 1:16 PM, Namrata puranik.namr...@gmail.com wrote: I tried setting up 2 test projects as per the instructions given in http://developer.android.com/guide/developing/other-ide.html#libraryP... TestLib (libray project) and TestApp (application). Setup is done successfully. ant compile on TestLib works perfectly. When I tried ant debug/release on TestApp it is giving me following errors. If I had to guess, TestApp does not reference TestLib: http://developer.android.com/guide/developing/other-ide.html#libraryR... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Issue in importing apk lib file to application
Hi, I am trying to integrate ant script into my application as I want to use progaurd obfuscation. Currently I build from eclipse and it works fine. In my app I am using one lib which is in a apk format. I added it in libs/ folder of application. But When I run ant script it shows many compile time errors related to lib classes. Basically it considers all those classes are missing. am I missing anything which is supposed to add in ant script before running it? Thanks in Advance Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Issue in importing apk lib file to application
ok..so you mean I can't import apk..Is there a way to import complete code(src folder) of other project to current application? I have code base for the same apk. Is it possible in ant scripting? On Sep 30, 6:48 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Sep 30, 2010 at 9:38 AM, Namrata puranik.namr...@gmail.com wrote: I am trying to integrate ant script into my application as I want to use progaurd obfuscation. Currently I build from eclipse and it works fine. In my app I am using one lib which is in a apk format. I added it in libs/ folder of application. But When I run ant script it shows many compile time errors related to lib classes. Basically it considers all those classes are missing. am I missing anything which is supposed to add in ant script before running it? I am not aware that you can put an APK into the libs/ directory and have it work, regardless of Proguard or anything else. The libs/ directory is for JARs. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in Atlanta:http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Issue in importing apk lib file to application
thanks Mark..will give it a try..thank you very much On Sep 30, 7:33 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Sep 30, 2010 at 10:23 AM, Namrata puranik.namr...@gmail.com wrote: ok..so you mean I can't import apk..Is there a way to import complete code(src folder) of other project to current application? Put the common code in an Android library project and reference that library project from both applications: http://developer.android.com/guide/developing/eclipse-adt.html#librar...http://developer.android.com/guide/developing/other-ide.html#libraryP... Or, have one project build a JAR that the other project uses, though this technique does not support the use of resources and other Android-specific stuff. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issue in importing apk lib file to application
Mark, I tried setting up 2 test projects as per the instructions given in http://developer.android.com/guide/developing/other-ide.html#libraryP... TestLib (libray project) and TestApp (application). Setup is done successfully. ant compile on TestLib works perfectly. When I tried ant debug/release on TestApp it is giving me following errors. compile: [javac] Compiling 4 source files to /home/axa/test/project2/bin/ classes [javac] /home/axa/backup/project2/src/com/axa/testapp/ TestAppView.java:6: cannot find symbol [javac] symbol: class TestLib [javac] public class TestAppView extends TestLib [javac] ^ [javac] /home/axa/test/project2/src/com/axa/testapp/ TestAppView.java:12: cannot find symbol [javac] symbol : variable super [javac] location: class com.axa.testapp.TestAppView [javac] super.onCreate(savedInstanceState); [javac] ^ [javac] /home/axa/backup/project2/src/com/axa/testapp/ TestAppView.java:13: cannot find symbol [javac] symbol : method setContentView(int) [javac] location: class com.axa.testapp.TestAppView [javac] setContentView(R.layout.main); [javac] ^ [javac] /home/axa/backup/project2/src/com/axa/testapp/ TestAppView.java:9: method does not override or implement a method from a supertype [javac] @Override [javac] ^ [javac] 4 errors Did I missed anything which I supposed to do here? On Sep 30, 7:41 pm, Namrata puranik.namr...@gmail.com wrote: thanks Mark..will give it a try..thank you very much On Sep 30, 7:33 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Sep 30, 2010 at 10:23 AM, Namrata puranik.namr...@gmail.com wrote: ok..so you mean I can't import apk..Is there a way to import complete code(src folder) of other project to current application? Put the common code in an Android library project and reference that library project from both applications: http://developer.android.com/guide/developing/eclipse-adt.html#librar.. Or, have one project build a JAR that the other project uses, though this technique does not support the use of resources and other Android-specific stuff. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to get number type for a contacts number..
see if this helps..ContactsContract.PhoneLookupColumns or ContactsContract.CommonDataKinds.PhoneI haven't used it as it is a api level =5 but have used something like this for api level 4. On Sep 6, 5:27 pm, A N K ! T ankit.awasth...@gmail.com wrote: in my application it is opening phone contacts and when i choose one contact i can get all detail of the contact but not getting the number type of numbers; more specific if the user have four numbers,,, i can get all number but not getting number type of these numbers i.e. (HOME,WORK,MOBILE) please let me know how to do it... -- A N K ! T.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Accept and Cancel incoming call on Version 1.6,2.2
May be this will help you action android:name=android.intent.action.CALL_BUTTON / On Sep 3, 4:47 pm, Abhit abhitni...@gmail.com wrote: Hi all, I am stuck with this task since more then one week, Please tell me if any know how to give these actions over my native in-call screen which is the replacement of the native screen. I got success to launch my custom screen over native incall screen but can't able to provide call accept and call reject action over there. Please help me.. Thanks -- Abhit Nigam -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 start an activity from the Service
I think just FLAG_ACTIVITY_NEW_TASK would work.. On Sep 3, 2:59 pm, Pent tas...@dinglisch.net wrote: Use an intent with a set component. You need flag LAUNCHED_FROM_BACKGROUND or whatever it is and NEW_TASK if I remember right. Look in the log and see what the problem is. Pent On Sep 3, 8:31 am, Prateek finch...@gmail.com wrote: i have a launcher activity which gets activated everytime i start the application and a service which complements it. Now as i press the return key from my main activity .Its Ondestroy gets called.Now i have nullify the pointer of the my launcher activity there. now i am listening through the service any event happening on the network after closing the launcher activity thread and if any event occurs i have to relaunch my launcher activity. i have tried intent but doesnot seems to get though 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: On screen orientation changes activity restarted.
I generally use following and it works always for me android:configChanges=orientation|keyboardHidden On Aug 16, 6:40 pm, alan a...@birtles.org.uk wrote: android:configChanges=keyboard|keyboardHidden|orientation is working for me On Aug 16, 12:58 pm, pramod.deore deore.pramo...@gmail.com wrote: I am also searching for this from last 8 hours but everybody says that add this in manifest.xml as android:configChanges=orientation . But still onCreate() method is called on each time when I open or closed keyboard.I really don't understand what to do? On Aug 16, 4:52 pm, Martins Streņģis martin...@draugiem.lv wrote: sounds like daily wtf :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 MapActivity is not showing the map
Amit, I m just curious about...are you signing your app with the same certificate as that of used for MD5 generation for Map Key? On Jul 26, 2:48 pm, Amit amitmishr...@gmail.com wrote: Dear Mark, I have tried the commons guy project as well by replacing my key. But still no successdon't know where is the problem :( On Jul 26, 1:29 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 26, 2010 at 4:24 AM, Amit amitmishr...@gmail.com wrote: What does Failed to find provider info for com.google.settings means...does it implies that its not able to recognize my key to use google maps? This has nothing to do with your problem, AFAIK. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: i want to put my application in front just after incoming call
Use PhoneStateListener with state onCallStateChanged() Namrata On Jul 22, 6:27 pm, A N K ! T ankit.awasth...@gmail.com wrote: am trying to make my application in front just after incoming call.i mean when user cut the phone my application should come in front can it be possible -- A N K ! T.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Permanent socket connection drains battery
@Jens I am not explicitly holding WakeLock. If running service which runs a thread with a infinite loop blocking at inputsream read implicitly holds wake lock then I am not sure about it. @Jokin Have registered for C2DM waiting for their reply from 2 days. I can not use chrometophone as I want to support all platforms starting from 1.5 On Jul 16, 3:09 pm, Jokin Cuadrado joki...@gmail.com wrote: the best and easier way i can figure is to use the Android Cloud to Device Messaging service, using the underlying google sync connection that it's already running. http://code.google.com/android/c2dm/index.html You can see also the chrometophone extension code to see a working implementation:http://code.google.com/p/chrometophone/ This has a drawback, it only works on 2.2 devices. If you need to work without the google assistance, you have to do something like the google sync client does in the device, and i think that it's not part from the android open source, so you can't see the code. As far as I know, it works also with a service, opening a connection, but it's a special kind of connection because it has a long timeout, and it let the device to go to sleep, wakening it when it receive a response. It has also some alarms to reopen the connection if it is closed. I have found this blog post that explain a lot better and have some code examples:http://devtcg.blogspot.com/2009/01/push-services-implementing-persist... On 15 jul, 15:41, Namrata puranik.namr...@gmail.com wrote: Do you really need to have a socket open at all times? yes, my application is based on push technique for which I always need to keep it open only keep the socket open while the user is actually using the application. yup I am doing it. Actually the fuctionality of app includes minimization of app and still listening to server push. On Jul 15, 6:24 pm, Miguel Morales therevolti...@gmail.com wrote: Do you really need to have a socket open at all times? Why not periodically check the server using an Alarm, or only keep the socket open while the user is actually using the application. Also, any loop will drain your battery, you might try sleeping at the end of it. On Thu, Jul 15, 2010 at 5:39 AM, Namrata puranik.namr...@gmail.com wrote: Thanks Mark.. On Jul 15, 5:06 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 15, 2010 at 7:56 AM, Namrata puranik.namr...@gmail.com wrote: any answer?..This is blocking issue for me as it drains batter in couple of hours. You may wish to watch the C2DM presentation from Google I|O 2010, as they provide a few hints on how they try to minimize battery usage. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --http://developingthedream.blogspot.com/,http://diastrofunk.com,http:/..., ~Isaiah 55:8-9 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: horizontal scrolling in GridView control
I had the same issue, I am using gallery instead of grid for this. On Jul 16, 3:17 pm, CMF manf...@gmail.com wrote: i have the same question, anybody know the answer? On Jun 23, 3:39 am, dharmveer dharmv...@gmail.com wrote: Hi, Instead of the currently implemented verticalscrollingin theGridViewcontrol, I want to scroll horizontally. So, I want to be able to move left and right by swiping left/right so the contents scroll horizontally. I have tried setting the setNumColumns() but that did not help. Is there any other way that can help me scroll it horizontally. Thanks in advance. -Dharmveer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Permanent socket connection drains battery
any answer?..This is blocking issue for me as it drains batter in couple of hours. On Jul 15, 2:29 pm, Namrata puranik.namr...@gmail.com wrote: Hi, I am developing an app which has one service running in the background even if the application is closed. This service basically listens to the server via socket connection. It is an app's requirement to keep one consistent connection open. but this drains battery liek anything. I know socket is costly affair in the sense of battery life. Do anybody know any other way to keep communication channel open? or any optimization in using socket? Thanks in Advance Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Permanent socket connection drains battery
Thanks Mark.. On Jul 15, 5:06 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 15, 2010 at 7:56 AM, Namrata puranik.namr...@gmail.com wrote: any answer?..This is blocking issue for me as it drains batter in couple of hours. You may wish to watch the C2DM presentation from Google I|O 2010, as they provide a few hints on how they try to minimize battery usage. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Permanent socket connection drains battery
Do you really need to have a socket open at all times? yes, my application is based on push technique for which I always need to keep it open only keep the socket open while the user is actually using the application. yup I am doing it. Actually the fuctionality of app includes minimization of app and still listening to server push. On Jul 15, 6:24 pm, Miguel Morales therevolti...@gmail.com wrote: Do you really need to have a socket open at all times? Why not periodically check the server using an Alarm, or only keep the socket open while the user is actually using the application. Also, any loop will drain your battery, you might try sleeping at the end of it. On Thu, Jul 15, 2010 at 5:39 AM, Namrata puranik.namr...@gmail.com wrote: Thanks Mark.. On Jul 15, 5:06 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 15, 2010 at 7:56 AM, Namrata puranik.namr...@gmail.com wrote: any answer?..This is blocking issue for me as it drains batter in couple of hours. You may wish to watch the C2DM presentation from Google I|O 2010, as they provide a few hints on how they try to minimize battery usage. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --http://developingthedream.blogspot.com/,http://diastrofunk.com,http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Nexus one gps issue
thanks Streets, I will try this solution.. On May 11, 9:08 pm, Streets Of Boston flyingdutc...@gmail.com wrote: You probably do NOT want to put the starting and stopping of the location (GPS) providers in the onStart() and onStop(). The onStop() may not be called when your activity goes to the background: - It is not called because your activity remains active in the background - It is not called because the OS just killed your entire process. (this would actually kill the GPS provider as well). Instead, start and stop the GPS provider in the onResume() and onPause(). On May 11, 10:14 am, Namrata puranik.namr...@gmail.com wrote: Please anybody knows about it?? On May 11, 1:42 pm, Namrata puranik.namr...@gmail.com wrote: Hi, I am working app for nexus one which uses gps. I have placed turning on code of gps in onStart() of Activity and and turning off code in onStop(). As per logs On/Off works fine specially turning off. But then gps icon stays forever on notification bar. Is there any bug/ issue with Nexus One GPS? or am I doing anything wrong? Tunrning on/ off code is as follows onStart(){ ... String[] providers = { LocationManager.GPS_PROVIDER, LocationManager.NETWORK_PROVIDER }; int noOfProviders = providers.length; for (int i = 0; i noOfProviders; i++) { final String currentProvider = providers[i]; if (locManager.isProviderEnabled(currentProvider)) { locManager.requestLocationUpdates(currentProvider, 100L, 0.0f, _instance); } } ... } onStop(){ ... if (locManager != null) { locManager.removeUpdates(_instance); } ... } and the logs for turning off gps are.. LocationManager( 369): removeUpdates: listener = com.xxx.xxx@4495e330 D/NetworkLocationProvider( 76): removeListener(): com.xxx.xxx D/GpsLocationProvider( 76): stopNavigating D/libgps ( 76): qct_gps_stop Thanks in advance Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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 athttp://groups.google.com/group/android-developers?hl=en-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 athttp://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] Nexus one gps issue
Hi, I am working app for nexus one which uses gps. I have placed turning on code of gps in onStart() of Activity and and turning off code in onStop(). As per logs On/Off works fine specially turning off. But then gps icon stays forever on notification bar. Is there any bug/ issue with Nexus One GPS? or am I doing anything wrong? Tunrning on/ off code is as follows onStart(){ ... String[] providers = { LocationManager.GPS_PROVIDER, LocationManager.NETWORK_PROVIDER }; int noOfProviders = providers.length; for (int i = 0; i noOfProviders; i++) { final String currentProvider = providers[i]; if (locManager.isProviderEnabled(currentProvider)) { locManager.requestLocationUpdates(currentProvider, 100L, 0.0f, _instance); } } ... } onStop(){ ... if (locManager != null) { locManager.removeUpdates(_instance); } ... } and the logs for turning off gps are.. LocationManager( 369): removeUpdates: listener = com.xxx.xxx@4495e330 D/NetworkLocationProvider( 76): removeListener(): com.xxx.xxx D/GpsLocationProvider( 76): stopNavigating D/libgps ( 76): qct_gps_stop Thanks in advance Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Nexus one gps issue
Hi, I am working app for nexus one which uses gps. I have placed turning on code of gps in onStart() of Activity and and turning off code in onStop(). As per logs On/Off works fine specially turning off. But then gps icon stays forever on notification bar. Is there any bug/ issue with Nexus One GPS? or am I doing anything wrong? Tunrning on/ off code is as follows onStart(){ ... String[] providers = { LocationManager.GPS_PROVIDER, LocationManager.NETWORK_PROVIDER }; int noOfProviders = providers.length; for (int i = 0; i noOfProviders; i++) { final String currentProvider = providers[i]; if (locManager.isProviderEnabled(currentProvider)) { locManager.requestLocationUpdates(currentProvider, 100L, 0.0f, _instance); } } ... } onStop(){ ... if (locManager != null) { locManager.removeUpdates(_instance); } ... } and the logs for turning off gps are.. LocationManager( 369): removeUpdates: listener = com.xxx.xxx@4495e330 D/NetworkLocationProvider( 76): removeListener(): com.xxx.xxx D/GpsLocationProvider( 76): stopNavigating D/libgps ( 76): qct_gps_stop Thanks in advance Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Nexus one gps issue
Please anybody knows about it?? On May 11, 1:42 pm, Namrata puranik.namr...@gmail.com wrote: Hi, I am working app for nexus one which uses gps. I have placed turning on code of gps in onStart() of Activity and and turning off code in onStop(). As per logs On/Off works fine specially turning off. But then gps icon stays forever on notification bar. Is there any bug/ issue with Nexus One GPS? or am I doing anything wrong? Tunrning on/ off code is as follows onStart(){ ... String[] providers = { LocationManager.GPS_PROVIDER, LocationManager.NETWORK_PROVIDER }; int noOfProviders = providers.length; for (int i = 0; i noOfProviders; i++) { final String currentProvider = providers[i]; if (locManager.isProviderEnabled(currentProvider)) { locManager.requestLocationUpdates(currentProvider, 100L, 0.0f, _instance); } } ... } onStop(){ ... if (locManager != null) { locManager.removeUpdates(_instance); } ... } and the logs for turning off gps are.. LocationManager( 369): removeUpdates: listener = com.xxx.xxx@4495e330 D/NetworkLocationProvider( 76): removeListener(): com.xxx.xxx D/GpsLocationProvider( 76): stopNavigating D/libgps ( 76): qct_gps_stop Thanks in advance Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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] Issue with GPS Droid, Hero CDMA
Hi, I am developing an app which uses GPS to find current location. ASAP I get location I shut down GPS listener..For some of the phones like droid, hero on CDMA, it is not getting closed. Following is the code snipset.. final String currentProvider = LocationManager.GPS_PROVIDER; if(locManager.isProviderEnabled(currentProvider)) { HandlerThread mThread = new HandlerThread(GPS Thread); mThread.start(); new Handler(mThread.getLooper()).post ( new Runnable() { public void run() { locManager.requestLocationUpdates(currentProvider, 1L, 0.0f, this); } }); currentLocation = locManager.getLastKnownLocation(currentProvider); try { if(currentLocation != null) { // Do anything with current location. } } catch (Exception e) { } finally { try { if (locManager != null) { locManager.removeUpdates(this); } if (mThread != null) { mThread.getLooper().quit(); } } catch (Exception e) { } } } Even though I am calling removeUpdate() it keeps gps icon on notification bar. What am I doing wrong? Thanks in advance.. Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Overriding AutoCompleteTextView
Hi, I am trying to override AutoCompleteTextView for custom UI. I want to change x,y position of list items and make it horizontal list instead of vertical. But I don't know the way by which I can access these child views in my new custom class. CustomAutoList extends AutoCompleteTextView{ @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { // change top, left for all child views here } } Please anybody has idea how to do it? Thanks Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Overriding AutoCompleteTextView
So basically I want a component like auto suggest list which appears with virtual keyboard on typing in EditTextView... On Feb 24, 4:04 pm, Namrata puranik.namr...@gmail.com wrote: Hi, I am trying to override AutoCompleteTextView for custom UI. I want to change x,y position of list items and make it horizontal list instead of vertical. But I don't know the way by which I can access these child views in my new custom class. CustomAutoList extends AutoCompleteTextView{ @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { // change top, left for all child views here } } Please anybody has idea how to do it? Thanks Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: App not visable on a 1.5 device
Following works for me try with removing android:targetSdkVersion=4 uses-sdk android:minSdkVersion=3/ -- Namrata On Feb 24, 4:51 pm, rackham dorian.cus...@googlemail.com wrote: Hello all. I have recieved feedback that my app is not visible to a user on a 1.5 device, 30% of my users use 1.5 according to my analytics, and the relavent line in my manifest is as below uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4 / the app is free so i cant see any paid market location issues being the cause. Is there any other reason this user would not be able to see my app? If anyone out there has a 1.5 device they can check this on i would be much appreciated, the app is called Goigo thanks for any help Dori -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Downloading images in ListView
thanks Nithin On Jan 19, 4:07 pm, Nithin nithin.war...@gmail.com wrote: Just now found one API setImageURI() for ImageView. You can try this too.. setImageURI(Uri.parse(http://abc.com;)); Nithin On Jan 19, 3:59 pm, Nithin nithin.war...@gmail.com wrote: AFAIK, no API like that. You need to download as a inputstream, convert to bitmap, set the bitmap to imageview using the API setImageBitmap() to the imageView. Nithin On Jan 19, 3:47 pm, Namrata puranik.namr...@gmail.com wrote: Hi, I am using ListView to show 1 TextView and 1 ImageView. I want to download images for this ImageView from server. Is there any api in android like setImageURI() which will take url e.g. http://abc.com/ myimage.png, otherwise i'll have to write my own http code downloading images in for loop. Thanks in advance. Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Downloading images in ListView
Hi, I am using ListView to show 1 TextView and 1 ImageView. I want to download images for this ImageView from server. Is there any api in android like setImageURI() which will take url e.g. http://abc.com/ myimage.png, otherwise i'll have to write my own http code downloading images in for loop. Thanks in advance. Namrata -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 in accessing ConnectionManager.getAllNetworkInfo()
Hi guys, I am writing 1 application which has one service class. This service class uses ConnectionManager.getAllNetworkInfo() api to access network related info. But if I use this api i get error like 01-04 20:05:58.243: WARN/System.err(711): java.lang.SecurityException: ConnectivityService: Neither user 10023 nor current process has android.permission.ACCESS_NETWORK_STATE. Declaration of Service in manifest is as follows service android:name=com.abc.xyz.MyService intent-filter action android:name=com.abc.xyz.IMyServiceListener / /intent-filter /service Also have included uses-permission android:name=android.permission.ACESS_NETWORK_STATE / in manifest. Tried using same permission tag in service tag but of no use. The way I am starting this service in activity is private void startService() { try { startService(new Intent(this, MyService.class)); bindService(new Intent(IMyServiceListener.class.getName()), mConnection, Context.BIND_AUTO_CREATE); } catch (Throwable th) { } } public IPushServiceListener mService = null; private ServiceConnection mConnection = new ServiceConnection() { //@override public void onServiceConnected(ComponentName className, IBinder service) { mService = IMyServiceListener.Stub.asInterface(service); } //@override public void onServiceDisconnected(ComponentName name) { mService = null; } }; Now the MyService class code where I am accessing ConnectionManager.getAllNetworkInfo() public static void IsConnectable() { ConnectivityManager cm = (ConnectivityManager) _instance.get ().getSystemService(CONNECTIVITY_SERVICE); //I am getting error here NetworkInfo infos[] = cm.getAllNetworkInfo(); for (NetworkInfo info : infos) { //TODO: any action can be taken; } } May be I am missing something here..Anybody knows what I am doing wrong? Or what else needs to add/remove in/from code to make it working? 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] Problem in accessing ConnectionManager.getAllNetworkInfo()
I am writing 1 application which has one service class. This service class uses ConnectionManager.getAllNetworkInfo() api to access network related info. But if I use this api i get error like 01-04 20:05:58.243: WARN/System.err(711): java.lang.SecurityException: ConnectivityService: Neither user 10023 nor current process has android.permission.ACCESS_NETWORK_STATE. Declaration of Service in manifest is as follows service android:name=com.abc.xyz.MyService intent-filter action android:name=com.abc.xyz.IMyServiceListener / /intent-filter /service Also have included uses-permission android:name=android.permission.ACESS_NETWORK_STATE / in manifest. Tried using same permission tag in service tag but of no use. The way I am starting this service in activity is private void startService() { try { startService(new Intent(this, MyService.class)); bindService(new Intent(IMyServiceListener.class.getName()), mConnection, Context.BIND_AUTO_CREATE); } catch (Throwable th) { } } public IMyServiceListener mService = null; private ServiceConnection mConnection = new ServiceConnection() { //@override public void onServiceConnected(ComponentName className, IBinder service) { mService = IMyServiceListener.Stub.asInterface(service); } //@override public void onServiceDisconnected(ComponentName name) { mService = null; } }; Now the MyService class code where I am accessing ConnectionManager.getAllNetworkInfo() public static void IsConnectable() { ConnectivityManager cm = (ConnectivityManager) _instance.get ().getSystemService(CONNECTIVITY_SERVICE); //I am getting error here NetworkInfo infos[] = cm.getAllNetworkInfo(); for (NetworkInfo info : infos) { //TODO: any action can be taken; } } May be I am missing something here..Anybody knows what I am doing wrong? Or what else needs to add/remove in/from code to make it working? Thanks in Advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem in accessing ConnectionManager.getAllNetworkInfo()
@Mark, it worked..thanks a lot..it was just a typo which i overlooked.. On Jan 4, 8:07 pm, Namrata puranik.namr...@gmail.com wrote: I am writing 1 application which has one service class. This service class uses ConnectionManager.getAllNetworkInfo() api to access network related info. But if I use this api i get error like 01-04 20:05:58.243: WARN/System.err(711): java.lang.SecurityException: ConnectivityService: Neither user 10023 nor current process has android.permission.ACCESS_NETWORK_STATE. Declaration of Service in manifest is as follows service android:name=com.abc.xyz.MyService intent-filter action android:name=com.abc.xyz.IMyServiceListener / /intent-filter /service Also have included uses-permission android:name=android.permission.ACESS_NETWORK_STATE / in manifest. Tried using same permission tag in service tag but of no use. The way I am starting this service in activity is private void startService() { try { startService(new Intent(this, MyService.class)); bindService(new Intent(IMyServiceListener.class.getName()), mConnection, Context.BIND_AUTO_CREATE); } catch (Throwable th) { } } public IMyServiceListener mService = null; private ServiceConnection mConnection = new ServiceConnection() { //@override public void onServiceConnected(ComponentName className, IBinder service) { mService = IMyServiceListener.Stub.asInterface(service); } //@override public void onServiceDisconnected(ComponentName name) { mService = null; } }; Now the MyService class code where I am accessing ConnectionManager.getAllNetworkInfo() public static void IsConnectable() { ConnectivityManager cm = (ConnectivityManager) _instance.get ().getSystemService(CONNECTIVITY_SERVICE); //I am getting error here NetworkInfo infos[] = cm.getAllNetworkInfo(); for (NetworkInfo info : infos) { //TODO: any action can be taken; } } May be I am missing something here..Anybody knows what I am doing wrong? Or what else needs to add/remove in/from code to make it working? 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] Getting callback of menu key pressed in
Hi, I am a newbie to android. I have written a small application to intercept calls. My call listening service always runs in background. When i pick up the call i get call state which is != CALL_STATE_RINGING. Till this everything is ok. Now if user presses Menu key I want a callback of this event to my service class. Is it possible to get callback? If yes what is the api for it? 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] Getting callback of menu key pressed in service class
Hi, I am a newbie to android. I have written a small application to intercept calls. My call listening service always runs in background. When i pick up the call i get call state which is != CALL_STATE_RINGING. Till this everything is ok. Now if user presses Menu key I want a callback of this event to my service class. Is it possible to get callback? If yes what is the api for it? 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 -~--~~~~--~~--~--~---