[android-developers] Re: Please guide me how to send data(datastream, not files) from a PC to a real android phone via USB.
Thanks to your advice, I made it at last. //While on the Simulator use 10.0.2.2 it works That is, when I tried to send data stream from Simulator to PC, as PC's address being 10.0.2.2, the PC can receive data stream from Simulator(10.0.2.2). I just guess there is somewhat THREAD running on the Simulator. And you said that I should setup a network between the PC and the android phone, I tried the Internet Tethering. And now, it works! I don't get what is reverse tethering yet, but I will go in deeper steps. PS: ag means I will try again. On 2月19日, 上午2时49分, Lew lewbl...@gmail.com wrote: vvis wrote: Thx [sic] a lot, I will try reverse tethering via USB, and connect the PC and the mobile phone ag.. I think that is the most immediate way to go. What does ag mean? Let me remind you: Lew wrote: There are problems with reverse tethering; tread carefully. Make sure you understand the Dark Side before you engage. For one, it only works on rooted phones. You didn't answer what I asked. Why is that? -- Lew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] stopping a thread after particular time.
you can asynctask just extend your class with asynctask ,check the condition(if it finds any location then return true there) in the doinbackground() method of asynctask and then dismiss the progressbar in postexecute()method of asynctask. Ch.B.Sagar. On Fri, Mar 2, 2012 at 12:39 PM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: better you use handler if your finds out any location then just call the handler.sendEmptyMessage() from there and handle that message and dismiss the progress bar in the handleMessage() method of handler. Thanks Sagar, Plz suggest if there exists any other possible method for achieving my goal, rather than doing it with threads. In short, is there any provision here in android to make any delay or pause, just like Thread.sleep() ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can i make my texture (or polygon) transparent when i want? (opengl es 1.1)
How can i do that? El viernes 2 de marzo de 2012 07:44:42 UTC+1, Yan escribió: Using the alpha values would add a huge layer of complexity to your program. Perhaps instead you may consider having a switch in your code to throw those polygons in your color buffer rather than your texture buffer... On Thursday, March 1, 2012 9:53:44 AM UTC-7, saex wrote: I have a square polygon with a texture (opengl es 1.1), and i need that when i want the polygon get's invisible and when i want the polygon turn's visible again. It's frustrating because seems to be a very easy thing but i can't find any tutorials or examples for do it on google or stackoverflow. please, can someone give me a sample to do it? thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: draw texture in OpenGL Android from 0,0 coordinates
Thanks for the reply. I did the same thing but its getting difficult to manage the coordinates in floating points. Is there a way out to use the absolute screen coordinates in OpenGL? if so can you provide with some example to do it. On Feb 10, 6:44 pm, niko20 nikolatesl...@yahoo.com wrote: No, you shouldn't change the vertices if you don't have to. To move an image just perform a glTranslate. So what you do is like this: glTranslate(0,0); DrawYourImage(); glTranslate(x,x); DrawYourImage(); glTranslate(x,x); DrawYourImage(); Etc. -niko On Feb 8, 12:58 am,Rikkitteam...@gmail.com wrote: I'm new to opengGL and excuse if the questions are too naive. I'm going through some tuturials for seeking help on learning this. I have a small program written where i'm drawing a texture on a GLSurfaceView. I want to draw a number of textures(bitmap images) in a sequential order starting from 0,0 coordinates. Also I need some gap in images on the screen. Please help. Do I need to change the positioning of vertices buffer. please suggest. For more code details, checkout hte below link: http://stackoverflow.com/questions/9188857/draw-texture-in-opengl-and...- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Memory leak and GC
Hi, I would like to post the same question I have done on android ndk googlegroups. Please see this link: http://groups.google.com/group/android-ndk/browse_frm/thread/7bfffc2591ecb49b Thank you, B.Arunkumar Hi, Thank you for your reply. The byte array we get is converted into a Bitmap in Android and rendered on ImageView (The entire app is about rendering H.264 Video from IP Caamera on Android mobile). Sometimes we are running into memory leaks. I am not sure if this is the right forum to ask this question but sometimes we get this message in the logcat on the OnDestory of Activity class: E/WindowManager( 9859): Activity com.example.OnVRViewer.AsyncRecordTrial has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@405aeeb8 that was originally added here E/WindowManager( 9859): android.view.WindowLeaked: Activity com.example.OnVRViewer.AsyncRecordTrial has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@405aeeb8 that was originally added here E/WindowManager( 9859): at android.view.ViewRoot.init(ViewRoot.java: 266) E/WindowManager( 9859): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:174) E/WindowManager( 9859): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:117) E/WindowManager( 9859): at android.view.Window $LocalWindowManager.addView(Window.java:424) E/WindowManager( 9859): at android.app.Dialog.show(Dialog.java: 241) E/WindowManager( 9859): at android.app.AlertDialog $Builder.show(AlertDialog.java:802) E/WindowManager( 9859): at com.example.OnVRViewer.AsyncRecordTrial $7.handleMessage(AsyncRecordTrial.java:1581) E/WindowManager( 9859): at android.os.Handler.dispatchMessage(Handler.java:99) E/WindowManager( 9859): at android.os.Looper.loop(Looper.java: 123) E/WindowManager( 9859): at android.app.ActivityThread.main(ActivityThread.java:3691) E/WindowManager( 9859): at java.lang.reflect.Method.invokeNative(Native Method) E/WindowManager( 9859): at java.lang.reflect.Method.invoke(Method.java:507) E/WindowManager( 9859): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:847) E/WindowManager( 9859): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605) E/WindowManager( 9859): at dalvik.system.NativeStart.main(Native Method) This error appears once in 30 times on testing and sometimes results in a crash (the alert dialog is dismissed and it appears this is not the error and is due to some other problem). My question is this byte array coversion could be the problem? sometimes not properly GC'ed or something of that sort?? Thank you, B.Arunkumar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 : Spinner from Database
Hi members, How to retrieve xml data from xml database and display in spinner? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Camera cannot get frame data if the attached SurfaceView is hidden in Galaxy Nexus
Anyone have any ideas? 在 2012年2月28日星期二UTC+8下午5时35分20秒,驼峰写道: I open camera using the following code: mCamera.open(); //set parameters. ... mCamera.setPreviewCallback(cameraPreviewCallback); mCamera.setPreviewDisplay(msurfaceHolder); mSurfaceHolder.addCallback(surfaceHolderCallback); The SurfaceHolder.Callback is implemented as following: @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } @Override public void surfaceCreated(SurfaceHolder holder) { mCamera.setPreviewDisplay(holder); } @Override public void surfaceDestroyed(SurfaceHolder holder) { mCamera.setPreviewDisplay(null); } If I hide the preview surface view, the surfaceDestroyed will be called. In Galaxy Nexus, the API would make camera servcie crash. But this code work correctly in Nexus S 2.3.6. Does anyone know how to let camera can capture video data even if preview surface view is hidden in Android 4.0? I attach the crash dump. = D/Camera ( 2294): app passed NULL surface E/IMGSRV ( 2050): :0: gralloc_unregister_buffer: Cannot unregister a locked buffer (ID=316) W/GraphicBufferMapper( 2050): unregisterBuffer(0x2bd58) failed -22 (Invalid argument) E/IMGSRV ( 2050): :0: gralloc_unregister_buffer: Cannot unregister a locked buffer (ID=318) W/GraphicBufferMapper( 2050): unregisterBuffer(0x3b7f0) failed -22 (Invalid argument) E/IMGSRV ( 2050): :0: gralloc_unregister_buffer: Cannot unregister a locked buffer (ID=322) W/GraphicBufferMapper( 2050): unregisterBuffer(0x3bbb0) failed -22 (Invalid argument) E/IMGSRV ( 2050): :0: gralloc_unregister_buffer: Cannot unregister a locked buffer (ID=326) W/GraphicBufferMapper( 2050): unregisterBuffer(0x3b738) failed -22 (Invalid argument) D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: encountered NULL buffer in slot 0 looking for buffer 0x3b7f0 D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 00: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 01: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 02: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 03: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 04: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 05: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 06: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 07: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 08: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 09: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 10: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 11: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 12: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 13: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 14: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 15: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 16: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 17: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 18: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 19: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 20: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 21: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 22: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 23: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 24: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 25: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 26: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 27: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 28: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 29: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 30: NULL D/SurfaceTextureClient( 2050): getSlotFromBufferLocked: 31: NULL E/SurfaceTextureClient( 2050): getSlotFromBufferLocked: unknown buffer: 0x3b7f0 E/CameraHAL( 2050): Surface::queueBuffer returned error -22 E/IMGSRV ( 2050): :0: gralloc_module_lock: Buffer cannot be locked for any write operation when it is already locked W/GraphicBufferMapper( 2050): lock(...) failed -22 (Invalid argument) E/CameraHAL( 2050): Gralloc Lock FrameReturn Error: Sleeping 15ms E/IMGSRV ( 2050): :0: gralloc_module_lock: Buffer cannot be locked for any write operation when it is already locked W/GraphicBufferMapper( 2050): lock(...) failed -22 (Invalid argument) E/CameraHAL( 2050): Gralloc Lock FrameReturn Error: Sleeping 15ms E/IMGSRV ( 2050): :0:
Re: [android-developers] put application in background run
hello but i had never use the service and also i want to comeback on front the application when call will come in my application. If you have code then please tell me how get in front. On Fri, Mar 2, 2012 at 11:46 AM, abhijeet tomar abhijeet...@gmail.comwrote: Hi Jagruti, I think you should make Service for thatbecause services runs in background. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] back button in Tabactivity going to previous activity rather than dismissing the soft keyboard
HI friends, Under my tabactivity in the activity group ,i have an edittext , when i touch on it the soft keyboard appears,but when i press back button, the keyboard dismisses but it goes to the previous activity.It is happening in HTC mobile,in emulator it works fine. How to resolve this? -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] setTranslationX() and getX() on previous API
Howdy, I've developed an application that uses setTranslationX() and getX() methods that are only available after API 11. However, I discovered that my app must support android 2.1 that is way back API 11. Is there any chance that I can achieve the same result? How? Thanks in advance, Walter. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to get alert dialog on home screen?
hello all developers, for incoming call notification i am using alert dialog but problem is that when i am on home or main screen the dialog does not appears. it resides in the application. how to get that alert dialog on main or home home screen. so i can get notify of incoming calls. any idea about this. any suggestion and advice will 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
Re: [android-developers] how to get alert dialog on home screen?
hai juned khan use *broadcastreceivers* it will help you to achieve your task. On Fri, Mar 2, 2012 at 3:30 PM, Juned Khan jkhan6...@gmail.com wrote: hello all developers, for incoming call notification i am using alert dialog but problem is that when i am on home or main screen the dialog does not appears. it resides in the application. how to get that alert dialog on main or home home screen. so i can get notify of incoming calls. any idea about this. any suggestion and advice will 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 -- WITH REGARDS ARUN KUMAR P D +91-9663471079 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Unable to Upload new apps
i thought you are developing an App, sorry ma bad. Soyer. On Mon, Feb 27, 2012 at 1:42 PM, Anirudh Loya loya.anir...@gmail.comwrote: Kumar, Pls change your clock date n time and try once. It will work out. Rahul, Nops nuthing to do with logcat.! Thanks On Sun, Feb 26, 2012 at 7:39 PM, Raghav Sood raghavs...@androidactivist.org wrote: Have a look on what the LogCat is suggesting, it can be for many reasons. Since when do we get LogCat messages when uploading new apps? Did I miss an update to the market? Thanks -- Raghav Sood http://www.androidactivist.org/ - Author http://www.appaholics.in/ - Founder -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to get alert dialog on home screen?
thanks arun kumar, if you know any link or source regarding this task please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] positioning a view based on it's calculated dimensions
I've got a tiled pan-n-zoom component that uses several FrameLayouts to position image tiles (that scale), markers (that move, but don't scale) and controls (which neither move nor scale). It works fine. Markers are positioned in a FrameLayout with topMargin and leftMargin. So far so good. When a marker is touched, I need to open a little popup, at the same position as the marker that was touched *but offset by the dimensions of the popup*. That's to say that if the popup is 100 pixels wide and 50 pixels tall, and the marker touched was at 800 x and 1100 y, the popup should be at 750 x (postion of marker minus half the width of the popup) and 1050 y (position of the marker minus the full height of the popup). The effect is like a tooltip - a little nub points down at the marker, etc. the ideal logic would be x position is layoutParams.leftMargin - (getWidth() / 2), y position is layoutParams.topMargin - getHeight() - but obviously that wouldn't work. the popups should be in a separate layer (viewgroup) than the markers. The popup dimensions are flexible, based on the text to be displayed, and need to be calculated. Obviously the dimensions aren't available until after layout happens. It looks like I can get the dimensions of the children during onLayout and the second pass of onMeasure, but if I update and re-assign LayoutParams (with modified top/leftMargins), during onLayout, sounds like an infinite loop. I tried setting a flag so I could catch just the first pass, but this failed - I don't really expect this to be the right approach in any case. I also tried getting the dimensions during onLayout, then in onDraw using canvas.translate(offsetX, offsetY), but this caused it to be clipped and drawn outside the available region. What's the best way to get these dimensions and position these views accordingly? (should mention that a RelativeLayout is not an option - the popups should be in a different viewgroup than the markers). TYIA. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can you give me the answer...about 'Unable to stop activity'...
thank you for helping me :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can you give me the answer...about 'Unable to stop activity'...
thank you for answering~~ i catch the bug! :)) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: TalkBack interactions with Android widgets
Finally, I managed it by mixing both Talkback(with the use android:setcontentDescription for each widget) and text to speech (android.speech.tts). On Feb 24, 11:54 pm, kalgik kal...@gmail.com wrote: Dear all, I have installedTalkBackapplication in Samsung Galaxy S II in order to see the interaction with a sample application of mine. I added contentDescritpion to any of the widget of my application. As I saw, it does not make any difference for Button, ImageView and Spinner widgets if you added contentDescription.For example, when I click the Button, TalkBacks says clicked without mentioning the valued from the contentDescription. Moreover, when I focus to ImageView (by just touching a bit the screen or touching continuosuly),talkbackdoes not say anything. Is this the right way that an ImageView is getting focus on, on touch screen devices? Do I have to create my own custom components overriding the corresponding methods and implement AccessibilityEventSource? For example, is it possible for theTalkBackto say the spinner's current selection?Currently, I manage it by showing the selected value on an EditText which is focused on. Or can I alternatively use the Text to Speech engine API (from the example) in order to manually enable text to speech? Regards,kalgik -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android widget: dinamically list from own combiled string (as template)
Hi all, I would like to do Windget, with dynamic strings (notActivityApplication!) from template, template should be combined(mixed), like: img text text, need to generating more strings from one template on widget. My template should be as (for example) 10 times/rows or 39 times/rows or more... and it's depends from size of widget. Size of widget can be any and should be selected by user, by finger- taping. I want to generate content (inside of form, on main LenearLayout), as content should be my template where Image+TextView+TextView. Obviously it need generate from Java code. but I cant understood how to do it is correct. ...my current template is: LinearLayout android:id=@+id/linearLayout1 android:minWidth=300dp android:minHeight=229dp android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical android:paddingTop=2dip android:paddingLeft=2dip android:paddingRight=2dip android:paddingBottom=2dip android:layout_weight=2 android:gravity=fill|top android:singleLine=false LinearLayout android:id=@+id/relativeLayout01 android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=top|left android:orientation=horizontal android:scaleType=fitXY LinearLayout android:id=@+id/relativeLayout001 android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=center|left android:scaleType=fitXY android:padding=2dp ImageButton android:id=@+id/ImageButton001 android:src=@drawable/ic_red_dot android:layout_width=7dp android:layout_height=6dp android:layout_marginLeft=0dp android:layout_marginRight=0dp android:layout_gravity=center|left android:background=@android:color/transparent android:padding=0dp android:scaleType=fitXY android:gravity=center|left / /LinearLayout LinearLayout android:id=@+id/relativeLayout001 android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=center|left|fill_horizontal android:scaleType=fitXY android:orientation=vertical TextView android:id=@+id/textView00 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=left android:focusable=false android:paddingLeft=0dip android:text=First string, hello! 4x3 - sdfgds fgds 1234567890 android:textColor=# android:textSize=10dp android:layout_marginLeft=0dp android:layout_marginRight=0dp android:singleLine=false android:lines=3 android:minLines=1 android:maxLines=2 android:gravity=top|left android:scrollbars=vertical android:layout_weight=0 android:orientation=vertical android:scaleType=fitXY / /LinearLayout LinearLayout android:id=@+id/relativeLayout0002 android:layout_width=5dp android:layout_height=14dp android:layout_weight=0 android:gravity=right|top android:orientation=horizontal /LinearLayout LinearLayout android:id=@+id/relativeLayout002 android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginRight=2dp android:layout_weight=0 android:gravity=right android:orientation=horizontal TextView android:id=@+id/textView01 android:layout_width=fill_parent android:layout_height=14dp android:focusable=true android:text=(23:55) android:textColor=# android:textSize=10dp android:gravity=right
Re: [android-developers] Re: Android widget: dinamically list from own combiled string (as template)
Hi all, I would like to do Windget, with dynamic strings (notActivityApplication!) from template, template should be combined(mixed), like: img text text, need to generating more strings from one template on widget. My template should be as (for example) 10 times/rows or 39 times/rows or more... and it's depends from size of widget. Size of widget can be any and should be selected by user, by finger-taping. I want to generate content (inside of form, on main LenearLayout), as content should be my template where Image+TextView+TextView. Obviously it need generate from Java code. but I cant understood how to do it is correct. ...my current template is: LinearLayout android:id=@+id/linearLayout1 android:minWidth=300dp android:minHeight=229dp android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical android:paddingTop=2dip android:paddingLeft=2dip android:paddingRight=2dip android:paddingBottom=2dip android:layout_weight=2 android:gravity=fill|top android:singleLine=false LinearLayout android:id=@+id/relativeLayout01 android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=top|left android:orientation=horizontal android:scaleType=fitXY LinearLayout android:id=@+id/relativeLayout001 android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=center|left android:scaleType=fitXY android:padding=2dp ImageButton android:id=@+id/ImageButton001 android:src=@drawable/ic_red_dot android:layout_width=7dp android:layout_height=6dp android:layout_marginLeft=0dp android:layout_marginRight=0dp android:layout_gravity=center|left android:background=@android:color/transparent android:padding=0dp android:scaleType=fitXY android:gravity=center|left / /LinearLayout LinearLayout android:id=@+id/relativeLayout001 android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=center|left|fill_horizontal android:scaleType=fitXY android:orientation=vertical TextView android:id=@+id/textView00 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=left android:focusable=false android:paddingLeft=0dip android:text=First string, hello! 4x3 - sdfgds fgds 1234567890 android:textColor=# android:textSize=10dp android:layout_marginLeft=0dp android:layout_marginRight=0dp android:singleLine=false android:lines=3 android:minLines=1 android:maxLines=2 android:gravity=top|left android:scrollbars=vertical android:layout_weight=0 android:orientation=vertical android:scaleType=fitXY / /LinearLayout LinearLayout android:id=@+id/relativeLayout0002 android:layout_width=5dp android:layout_height=14dp android:layout_weight=0 android:gravity=right|top android:orientation=horizontal /LinearLayout LinearLayout android:id=@+id/relativeLayout002 android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginRight=2dp android:layout_weight=0 android:gravity=right android:orientation=horizontal TextView android:id=@+id/textView01 android:layout_width=fill_parent android:layout_height=14dp android:focusable=true android:text=(23:55) android:textColor=# android:textSize=10dp android:gravity=right android:layout_gravity=right / /LinearLayout /LinearLayout /LinearLayout 1 марта 2012 г. 12:18 пользователь
Re: [android-developers] how to get alert dialog on home screen?
http://mylifewithandroid.blogspot.in/2008/01/phonecalls.html This site will help you :) On Fri, Mar 2, 2012 at 4:15 PM, Juned Khan jkhan6...@gmail.com wrote: thanks arun kumar, if you know any link or source regarding this task please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- WITH REGARDS ARUN KUMAR P D +91-9663471079 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Prevent multiple copies of an Android service
On Thu, Mar 1, 2012 at 11:51 PM, Alan Smith gpsanima...@gmail.com wrote: The doco for startService states If this service is not already running, it will be instantiated and started (creating a process for it if needed); if it is running then it remains running. I'm finding that each call to startService appears to be starting a separate instance of the service, in that the work that the service is doing (in my test case, trivially writing to a new log file) is being done again for each call. That does not mean that there are multiple instances of the service. onStartCommand() will be called for each startService() call, so if your work is there (or, say, in onHandleIntent() of an IntentService), N calls to startService() will result in N runs through your work. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to use one Apps in Another as .Jar/Lib Projects
Hi all, i have a problem, i have a PdfViewer apps i call it in another activity where i have put the hard-coded path to sdcard i have stored one pdf file in sdcard. so the problem is now i would like to use that PdfViewer apps in another project as a jar. but after bit of googling i came to know that the jar will not work , as a library project i can use it. finally i have use it to open pdf files but , it doesn't work. what else i'll do regarding the above problem ? any help'll be appreciated !! Regards, Subrat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] stopping a thread after particular time.
On Fri, Mar 2, 2012 at 12:26 AM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: May you please suggest any good tutorial for it? Google it - I assure you, you will find plenty of information on the topic. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Memory allocation for a process, when the that application is not really active
Hi, I have a receiver which sets an alarm for 4hours. The code snippet is below. Intent myIntent = new Intent(context,XYZService.class); myIntent.setAction(com.android.LavaDeviceTracker.SEND_SMS_SERVICE); pendingIntent = PendingIntent.getService(context, 0,myIntent, 0); AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, 4*60*1000, pendingIntent); The receiver sets the alarm and stops. Until the 4 hours I mean until the alarm goes off, believe there is no action is going on. Still I can see chunks of 4-8 bytes getting allocated to the PSS and “shared dirty” in Native and Other. (Dalvik allocation seems unchanged) continuously. After probably 5-10minutes the PSS value becomes almost static for “Native” but “other” usage keeps multiplying. Does the Alarm Manager perform any action during this period? Due to which the memory allocation keeps increasing? Also when I tried using AlarmManager.RTC instead of AlarmManager.ELAPSED_REALTIME_WAKEUP, the frequency of memory allocation was considerably less. Any idea on this? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Memory allocation for a process, when the that application is not really active
On Fri, Mar 2, 2012 at 8:33 AM, pop muthamma8...@gmail.com wrote: Does the Alarm Manager perform any action during this period? Due to which the memory allocation keeps increasing? The AlarmManager is not in your process. The AlarmManager object that *is* in your process is merely a proxy to the real implementation that resides in an OS process. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to use one Apps in Another as .Jar/Lib Projects
On Fri, Mar 2, 2012 at 7:09 AM, subrat kumar panda evergreen.sub...@gmail.com wrote: i came to know that the jar will not work , as a library project i can use it. Then make it a library project. What's the problem? finally i have use it to open pdf files but , it doesn't work. what else i'll do regarding the above problem ? No one here is going to know what doesn't work means. http://www.catb.org/~esr/faqs/smart-questions.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re : Spinner from Database
On Fri, Mar 2, 2012 at 3:00 AM, vivek elangovan elangovan.vi...@gmail.comwrote: How to retrieve xml data from xml database Google that. and display in spinner? Google that too. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Platform Library Example - The Details I Don't Get
Did you found the answer? On Sunday, November 14, 2010 6:06:55 AM UTC+5:30, Hayley Dawson wrote: Folks, I've spent a couple days now googling this and trying to figure out all the steps, and I'm getting really frustrated. I'm using the Platform Library example and trying to figure out how to add my own library to android. It resides in my own namespace, and is intended for a full image build so that it's already on a device ready for other applications to use. I have a Unix system that I can compile the android source code on, and have my library already designed. What I can't figure out is the following - 1. Where do I put my library in the file system so that it will get compiled? Do I put it under framework and create a new folder there or somewhere else? The README.txt mentions a file to be put in /system/ etc/permissions to declare things to the framework - however nowhere under mydroid (top level folder), can I find anything that looks like it goes to /system/etc/ on the device. I know it's got to be there somewhere. 2. What base build system files do I have to change so that this jar will compile and be included correctly? The top level android.mk file for the whole system? I'm confused on this point. 3. When an application uses my library, is there anyway to tell Eclipse about this? I know the Android.mk is how you specify LOCAL_JAVA_LIBRARIES, but there is no Android.mk for eclipse projects. Does using a custom library preclude the ability to use eclipse? Any help at all would be very appreciated. Thanks. On Sunday, November 14, 2010 6:06:55 AM UTC+5:30, Hayley Dawson wrote: Folks, I've spent a couple days now googling this and trying to figure out all the steps, and I'm getting really frustrated. I'm using the Platform Library example and trying to figure out how to add my own library to android. It resides in my own namespace, and is intended for a full image build so that it's already on a device ready for other applications to use. I have a Unix system that I can compile the android source code on, and have my library already designed. What I can't figure out is the following - 1. Where do I put my library in the file system so that it will get compiled? Do I put it under framework and create a new folder there or somewhere else? The README.txt mentions a file to be put in /system/ etc/permissions to declare things to the framework - however nowhere under mydroid (top level folder), can I find anything that looks like it goes to /system/etc/ on the device. I know it's got to be there somewhere. 2. What base build system files do I have to change so that this jar will compile and be included correctly? The top level android.mk file for the whole system? I'm confused on this point. 3. When an application uses my library, is there anyway to tell Eclipse about this? I know the Android.mk is how you specify LOCAL_JAVA_LIBRARIES, but there is no Android.mk for eclipse projects. Does using a custom library preclude the ability to use eclipse? Any help at all would be very appreciated. Thanks. On Sunday, November 14, 2010 6:06:55 AM UTC+5:30, Hayley Dawson wrote: Folks, I've spent a couple days now googling this and trying to figure out all the steps, and I'm getting really frustrated. I'm using the Platform Library example and trying to figure out how to add my own library to android. It resides in my own namespace, and is intended for a full image build so that it's already on a device ready for other applications to use. I have a Unix system that I can compile the android source code on, and have my library already designed. What I can't figure out is the following - 1. Where do I put my library in the file system so that it will get compiled? Do I put it under framework and create a new folder there or somewhere else? The README.txt mentions a file to be put in /system/ etc/permissions to declare things to the framework - however nowhere under mydroid (top level folder), can I find anything that looks like it goes to /system/etc/ on the device. I know it's got to be there somewhere. 2. What base build system files do I have to change so that this jar will compile and be included correctly? The top level android.mk file for the whole system? I'm confused on this point. 3. When an application uses my library, is there anyway to tell Eclipse about this? I know the Android.mk is how you specify LOCAL_JAVA_LIBRARIES, but there is no Android.mk for eclipse projects. Does using a custom library preclude the ability to use eclipse? Any help at all would be very 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
Re: [android-developers] Platform Library Example - The Details I Don't Get
On Sat, Nov 13, 2010 at 6:36 PM, Hayley Dawson hayley.daw...@gmail.comwrote: Any help at all would be very appreciated. This all sounds like it should go to list having to do with building the platform. This one is for developing at the SDK level. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] lockdown
I'm making a movieplayer for a specific Android tablet (not for Android market), and I want to make all 3 buttons non-functional. The 3 buttons are back menu home. Menu is non-functional since I don't implement a menu. I overrode onBackPressed() with an empty method to make the back button not function. However, I can't figure out what to do about the home button. Is there a way to take over this button? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] lockdown
On Fri, Mar 2, 2012 at 9:48 AM, bob b...@coolfone.comze.com wrote: I'm making a movieplayer for a specific Android tablet (not for Android market), and I want to make all 3 buttons non-functional. The 3 buttons are back menu home. Menu is non-functional since I don't implement a menu. I overrode onBackPressed() with an empty method to make the back button not function. However, I can't figure out what to do about the home button. Is there a way to take over this button? Be the home screen. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layout text justificaiton question:
This is my latest attempt to get what I want. It still doesn't work, unfortunately. ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=match_parent EditText android:id=@+id/inputEdit android:layout_height=wrap_content android:layout_width=400dp android:width=400dp android:inputType=numberSigned|numberDecimal android:layout_alignParentRight=true android:layout_centerVertical=true android:layout_marginLeft=0dip android:layout_marginRight=0dip /EditText Spinner android:id=@+id/inputSpinner android:layout_height=wrap_content android:layout_width=400dp android:width=400dp android:layout_alignParentRight=true android:layout_centerVertical=true android:layout_marginLeft=0dip android:layout_marginRight=0dip/ TextView android:id=@+id/editLabelTV android:layout_height=wrap_content android:layout_width=wrap_content android:gravity=right android:layout_centerVertical=true android:layout_toLeftOf=@id/inputEdit android:layout_marginLeft=0dip android:layout_marginRight=0dip/ TextView android:id=@+id/spinLabelTV android:layout_height=wrap_content android:layout_width=wrap_content android:gravity=right android:layout_centerVertical=true android:layout_toLeftOf=@id/inputSpinner android:layout_marginLeft=0dip android:layout_marginRight=0dip/ /RelativeLayout In an attempt to be able to use the toLeftOf property, I created another label, and hide both the extra label and unused control. I'm still getting the same result. This is kindof what I'm getting, now: Input 1:__ Another Input: __ Input Three: __ Where all the input controls are lined up, right, but the labels are pretty much centered in the remaining room. I feel like I'm missing something simple, because it doesn't seem like this should be so difficult. -Mark On Thursday, March 1, 2012 6:21:57 PM UTC-6, TreKing wrote: On Thu, Mar 1, 2012 at 5:33 PM, Mark Winchester wrote: I can get the text/spinners lined up correctly by setting the width of the TextView, but the text on the TextView doesn't bump up against the input controls, like I want it to. Can anybody suggest a way to get this looking like I'm wanting? What does it do now? What does your code / layouts look like right now that does not work? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Please guide me how to send data(datastream, not files) from a PC to a real android phone via USB.
On Friday, March 2, 2012 3:16:12 AM UTC-5, vvis wrote: That is, when I tried to send data stream from Simulator to PC, as PC's address being 10.0.2.2, the PC can receive data stream from Simulator(10.0.2.2). I just guess there is somewhat THREAD running on the Simulator. The 10.0.2.2 etc capabilities are unique to the emulator and not ordinarily shared by real devices. The adb port forwards you were trying to use earlier do work on real devices, but you have to make the phone the server and the pc the client, ie, the PC can initiate a connection to the phone, but the phone cannot initiate a connection to the pc. When using port forwards you do indeed use the loopback address, since you are actually contact a local port, which gets forwarded to a remote one by adb. And you said that I should setup a network between the PC and the android phone, I tried the Internet Tethering. And now, it works! I don't get what is reverse tethering yet, but I will go in deeper steps. Various tether capabilities may enable this, or have the side effect of putting the phone and computer on a network segment. Just be sure you don't accidentally route all the pc's network traffic through the phone's mobile network (unless you mean to) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layout text justificaiton question:
On Fri, Mar 2, 2012 at 9:11 AM, Mark Winchester mwinches...@gmail.comwrote: Where all the input controls are lined up, right, but the labels are pretty much centered in the remaining room. I feel like I'm missing something simple, because it doesn't seem like this should be so difficult. Seems to me that you need either a Table, with two columns, or probably even simpler, Three LinearLayouts: - A root parent (horizontal) - A left child for your inputs, with right gravity to move its children to the right - A right child for your labels Some crude ascii art: --- | |-|---| | | | Input 1 | ___ | | | | Another Input | ___ | | | |-|---| | --- Feel me? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Odd issue involving hardware acceleration
thank you for the replies, I will do what you suggested with the UI. Romain guy, I use drawPicture to cache complex drawing commands. The number of commands range from a few hundred drawing commands to a few hundred thousand. I find the Picture object to be an efficient way to store these cached commands, and the drawPicture to be a responsive way of rendering them. The Picture is particularly useful in my case because my app allows zooming and scrolling within the rendering; so I can easily just draw certain portions of the picture at certain scales using Canvas' clip and scale options. Any suggestions of how to use display lists for this purpose, or documentation on their uses? On Thursday, 1 March 2012 23:45:52 UTC-5, Romain Guy (Google) wrote: Also note that drawPicture() is a lot less useful since the framework will create display lists (the equivalent of Picture) automatically for you under the scene. On Thu, Mar 1, 2012 at 6:48 PM, Dianne Hackborn hack...@android.com wrote: What that call is doing is not turning off HW drawing, it is creating a separate layer (bitmap) which that specific view can do software drawing in to, but it is then drawn to the window with the GPU. My first answer would be that this option is a developer option, and users shouldn't be changing it, and they get what they deserve when apps crash. I know that doesn't help with you getting crash reports from users messing with things they shouldn't. You could check in your app if hardware acceleration is being used, and if in that case just change your UI to a simple message telling them they need to turn off that developer debugging tool. On Thu, Mar 1, 2012 at 12:46 PM, Ab abe.oppenh...@gmail.com wrote: My app allows the user to draw on the screen by capturing and processing touch events. Additionally, my application makes use of Canvas.drawPicture and some other methods not supported by hardware acceleration. On some ICS devices there is an option to force hardware acceleration in settings: force gpu rendering, use 2d harware acceleartion in applciations. When this is enabled, my application crashes with error: android.view.GLES20Canvas.drawPicture(GLES20Canvas.java:895). So, I explicitly disabled hardware acceleration on the View that uses this method with: View.setLayerType(View.LAYER_TYPE_SOFTWARE, null); However, disabling hardware acceleration in this way impacts the performance of my drawing, the drawing gets choppy, as if less MotionEvent.ACTION_MOVE are being generated. This happens on all 3.0+ devices, regardless of if the force acceleration setting is on. So, I figure that there was something in the View's LayerType which was assisting my drawing, and that this is lost when I call View.setLayerType(...). Prior to my call to View.setLayerType(...), View.getLayerType() evaluates to LAYER_TYPE_NONE. Any suggestions as to how to explicitly prevent Hardware Acceleration while preserving whatever it is that was assisting my touch input? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Romain Guy Android framework engineer romain...@android.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Service Being paused on screen off.
The issue is that the accelerometer sensor is turning off. So the listener will not detect any changes while it is off. Your CPU isnt sleeping while the screen is off, maybe slowing down to save power, but it will not completely shut off. So a service running should still be running. The best work around is on a kernel level, not really an app level. On Thu, Jan 19, 2012 at 3:38 PM, Kristopher Micinski krismicin...@gmail.com wrote: I didn't see the original thread you're responding to, so what's your question? As in you want your service to stop using resources when the screen is off, or the opposite. In one of those situations you can hold a wake lock to keep the cpu on, but not the screen, I believe. kris On Thu, Jan 19, 2012 at 11:18 AM, crennie cmren...@gmail.com wrote: I found the same thing. The accelerometer still fires when the screen is off but connected to USB and logcat. There might be a work around here somewhere. I'm just not savy enough to figure it out. Andyone else care to hack 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android SQLite Example Project
I have created an open source Google Android App, hosted on Google Projects to help new Android Developers get up to speed with how to do some various development tasks, and provide some reusable code that all developers may use. The Google Project URL is code.google.com/p/my-android-sqlite-example- project/. I am looking for some constructive feedback, suggestions on how improve the code, to help ensure good solutions are being provided. The audience for this project is intended to be software developers who are new to developing Google Android Applications, and also for those developers that are searching for a clean and simple SQLiteOpenHelper Database Adapter implementation. I have provided some documentation in the downloads section of this project, to help you get started, including the full downloadable Eclipse Android Project source file in a .ZIP file format, and an executable Android .APK file, built from this project (refer to the description for installation instructions). The project consists of a simple list activity for demonstrating how to do different things in Android, including: - A SQLiteOpenHelper database adapter, how to properly open and close it, etc. - A custom AlertDialog?.Builder message box - Logging messages, warnings, errors, etc. - How to export SQLite database data - How to sort data through a custom Preference Activity - How to clean up objects in onDestroy - How to make menu icons - How to add animation to buttons - How to create User Interfaces - How to use the string.xml file to populate labels, text, etc. - How to create a date-select button - And more. Have fun, this is meant to be educational, and constructive feedback is appreciated. Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Passing ArrayListString in BroadcastReceiver in Android
I'm using LocalBroadcastManager to send data between classes. I'm trying to send an ArrayList of String objects, 1 dimensional, in one of them. The array has all my strings when I send it, but on the receiving end it is empty. Has anyone seen this before? Here's my code. Send Message (I can print the array here and it has 5 items): Intent updatedIdsIntent = new Intent(Common.ContentIdsUpdatedNotification); updatedIdsIntent.putStringArrayListExtra(Common.UpdatedContentIdsKey, this.updatedContentIds); LocalBroadcastManager.getInstance(ctx).sendBroadcast(updatedIdsIntent); Retrieve Message (always empty): Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.UpdatedContentIdsKey)); Why are the items gone from the array in the broadcast receiver? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] spliting srings
Hello sorry for the simple and i guess basic question but how would i get some lines ot text saved in a .txt file on a sd card. then split the line and display word 1 and word 3. the words are separated by commas. i have spent a good few hours looking through google for the answer but have not come up with any code that works. i can read a file and display it and i can split a string but i cant seem to merge these two parts and get it to work regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: spliting srings
You mean you have accomplished the two individual tasks reading from a file and splitting a string, but can't put them together? I assume your read from file code is a loop, reading the file line by line, which you assign to a String variable. Why can't you just use your split a string code on this variable that was assigned to while reading from a file? I guess I find it hard to believe that you've accomplished the two tasks separately yet can't put them together. What error do you receive when you try? On Friday, 2 March 2012 11:26:42 UTC-5, leigh8347 wrote: Hello sorry for the simple and i guess basic question but how would i get some lines ot text saved in a .txt file on a sd card. then split the line and display word 1 and word 3. the words are separated by commas. i have spent a good few hours looking through google for the answer but have not come up with any code that works. i can read a file and display it and i can split a string but i cant seem to merge these two parts and get it to work regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Layout text justificaiton question:
I finally figured out what my problem was. My data source was appending a bunch of extra white space at the end of input names that it was giving me. So, even though I had my layouts set up like they were supposed to be (I'm not absolutely sure the one that I posted would have worked, but I feel reasonably confident), my junked up data was screwing up how it looked. There is a moral there, somewhere, I'm just not entirely sure what it is. -Mark On Thursday, March 1, 2012 5:33:19 PM UTC-6, Mark Winchester wrote: I've got a GUI coded up, and it works pretty well, but I'm having an issue getting everything formatted just right. Currently, there exists a ListView on the page. This list view is then filled with horizontal LinearLayouts that have a TextView (label) a either an EditText or Spinner, depending on the type of input. When I populate the list, I'm setting the visibility of the unused control to GONE, so that only the correct control appears on the screen. What I'm having trouble with, is that I'd like for the left edge of the text/spinners to be lined up, down the list, and the labels to appear right justified next to them. I can get the text/spinners lined up correctly by setting the width of the TextView, but the text on the TextView doesn't bump up against the input controls, like I want it to. Can anybody suggest a way to get this looking like I'm wanting? Any help is appreciated. This is kindof like what I'm looking for: Input 1: __ Another Input: __ Input Three: __ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: java.lang.SecurityException: Permission Denial, but my app does not change settings
Blackberry? And I thought that an HTC HD2 running 4.0.3 was weird :) 02.03.2012 5:05 пользователь Nikolay Elenkov nikolay.elen...@gmail.com написал: On Fri, Mar 2, 2012 at 7:34 AM, Kostya Vasilyev kmans...@gmail.com wrote: My advice -- still the same, just ignore. As your app gets mode downloads, there'll be stranger and stranger crash and ANR reports. +1 Just wait till someone tries to run it on BlackBerry, then you'll get some really weird stuff. (People are converting apps and posting to BB forums and what not, and there isn't much you could do about 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Passing ArrayListString in BroadcastReceiver in Android
Are you sure you are looking at the right Intent? On Fri, Mar 2, 2012 at 11:25 AM, tatebn brandonnt...@gmail.com wrote: I'm using LocalBroadcastManager to send data between classes. I'm trying to send an ArrayList of String objects, 1 dimensional, in one of them. The array has all my strings when I send it, but on the receiving end it is empty. Has anyone seen this before? Here's my code. Send Message (I can print the array here and it has 5 items): Intent updatedIdsIntent = new Intent(Common.ContentIdsUpdatedNotification); updatedIdsIntent.putStringArrayListExtra(Common.UpdatedContentIdsKey, this.updatedContentIds); LocalBroadcastManager.getInstance(ctx).sendBroadcast(updatedIdsIntent); Retrieve Message (always empty): Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.UpdatedContentIdsKey)); Why are the items gone from the array in the broadcast receiver? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Layout text justificaiton question:
Sanitize your inputs? http://xkcd.com/327/ On Thursday, 1 March 2012 18:33:19 UTC-5, Mark Winchester wrote: I've got a GUI coded up, and it works pretty well, but I'm having an issue getting everything formatted just right. Currently, there exists a ListView on the page. This list view is then filled with horizontal LinearLayouts that have a TextView (label) a either an EditText or Spinner, depending on the type of input. When I populate the list, I'm setting the visibility of the unused control to GONE, so that only the correct control appears on the screen. What I'm having trouble with, is that I'd like for the left edge of the text/spinners to be lined up, down the list, and the labels to appear right justified next to them. I can get the text/spinners lined up correctly by setting the width of the TextView, but the text on the TextView doesn't bump up against the input controls, like I want it to. Can anybody suggest a way to get this looking like I'm wanting? Any help is appreciated. This is kindof like what I'm looking for: Input 1: __ Another Input: __ Input Three: __ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Layout text justificaiton question:
Sanitize your inputs? http://xkcd.com/327/ On Friday, 2 March 2012 11:49:21 UTC-5, Mark Winchester wrote: I finally figured out what my problem was. My data source was appending a bunch of extra white space at the end of input names that it was giving me. So, even though I had my layouts set up like they were supposed to be (I'm not absolutely sure the one that I posted would have worked, but I feel reasonably confident), my junked up data was screwing up how it looked. There is a moral there, somewhere, I'm just not entirely sure what it is. -Mark On Thursday, March 1, 2012 5:33:19 PM UTC-6, Mark Winchester wrote: I've got a GUI coded up, and it works pretty well, but I'm having an issue getting everything formatted just right. Currently, there exists a ListView on the page. This list view is then filled with horizontal LinearLayouts that have a TextView (label) a either an EditText or Spinner, depending on the type of input. When I populate the list, I'm setting the visibility of the unused control to GONE, so that only the correct control appears on the screen. What I'm having trouble with, is that I'd like for the left edge of the text/spinners to be lined up, down the list, and the labels to appear right justified next to them. I can get the text/spinners lined up correctly by setting the width of the TextView, but the text on the TextView doesn't bump up against the input controls, like I want it to. Can anybody suggest a way to get this looking like I'm wanting? Any help is appreciated. This is kindof like what I'm looking for: Input 1: __ Another Input: __ Input Three: __ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 change default HIPRI connection expiry?
Has anyone played with TYPE_MOBILE_HIPRI? Is there a way to set the RestoreDefaultNetworkDelay or any other way to increase the duration of HIPRI connection? On Feb 29, 5:55 pm, flumby jay.mojni...@gmail.com wrote: In my project, I need to access an IP Address through mobile connection --irrespective of whether it is connected to mobile or WIFI network. My code is similar to below: connMan = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); int res = connMan.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, enableHIPRI); Then when I get the notification that HIPRI is available, I call: boolean reqRes = connMan.requestRouteToHost(ConnectivityManager.TYPE_MOBILE_HIPRI, ipAddress); This is working fine. My app can connect to the URL specified in the ipAddress. My app can send requests, and receive responses. However, the connection gets disconnected after about a minute. Is there a way to have HIPRI connection for longer time? To make a short story long, I see the following in the log: D/ConnectivityService( 1640): ignoring as dup is found stopUsingNetworkFeature for net 5: enableHIPRI by 9683/10033(expire - created 60026 mSec ago) I took a look at the source and I see that in ConnectivityService.java, in the implementation of requestRouteToHost method, it calls: mHandler.sendMessageDelayed (mHandler.obtainMessage (NetworkStateTracker.EVENT_RESTORE_DEFAULT_NETWORK, f), getRestoreDefaultNetworkDelay()); And I see that getRestoreDefaultNetworkDelay is returning 6. So, I know why my app is getting disconnected after about a minute. My question is, how can I have HIPRI connection for a longer period -at least 30 minutes? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Passing ArrayListString in BroadcastReceiver in Android
It's the intent in the broadcast receiver's onReceive message /** Handler for content ids updated. */ private BroadcastReceiver mContentIdsUpdated = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, received + intent.getStringArrayListExtra(Common.CDCUpdatedContentIdsKey).size() + items in receiver); // 0 Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.CDCUpdatedContentIdsKey)); // empty array } }; // In oncreate LocalBroadcastManager.getInstance(this).registerReceiver(mContentIdsUpdated, new IntentFilter(Common.ContentIdsUpdatedNotification)); On Mar 2, 12:15 pm, Mark Murphy mmur...@commonsware.com wrote: Are you sure you are looking at the right Intent? On Fri, Mar 2, 2012 at 11:25 AM, tatebn brandonnt...@gmail.com wrote: I'm using LocalBroadcastManager to send data between classes. I'm trying to send an ArrayList of String objects, 1 dimensional, in one of them. The array has all my strings when I send it, but on the receiving end it is empty. Has anyone seen this before? Here's my code. Send Message (I can print the array here and it has 5 items): Intent updatedIdsIntent = new Intent(Common.ContentIdsUpdatedNotification); updatedIdsIntent.putStringArrayListExtra(Common.UpdatedContentIdsKey, this.updatedContentIds); LocalBroadcastManager.getInstance(ctx).sendBroadcast(updatedIdsIntent); Retrieve Message (always empty): Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.UpdatedContentIdsKey)); Why are the items gone from the array in the broadcast receiver? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Passing ArrayListString in BroadcastReceiver in Android
Accidentally left that prefix in the code there. That's not the issue in the actual app. On Mar 2, 1:17 pm, tatebn brandonnt...@gmail.com wrote: It's the intent in the broadcast receiver's onReceive message /** Handler for content ids updated. */ private BroadcastReceiver mContentIdsUpdated = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, received + intent.getStringArrayListExtra(Common.CDCUpdatedContentIdsKey).size() + items in receiver); // 0 Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.CDCUpdatedContentIdsKey)); // empty array } }; // In oncreate LocalBroadcastManager.getInstance(this).registerReceiver(mContentIdsUpdated , new IntentFilter(Common.ContentIdsUpdatedNotification)); On Mar 2, 12:15 pm, Mark Murphy mmur...@commonsware.com wrote: Are you sure you are looking at the right Intent? On Fri, Mar 2, 2012 at 11:25 AM, tatebn brandonnt...@gmail.com wrote: I'm using LocalBroadcastManager to send data between classes. I'm trying to send an ArrayList of String objects, 1 dimensional, in one of them. The array has all my strings when I send it, but on the receiving end it is empty. Has anyone seen this before? Here's my code. Send Message (I can print the array here and it has 5 items): Intent updatedIdsIntent = new Intent(Common.ContentIdsUpdatedNotification); updatedIdsIntent.putStringArrayListExtra(Common.UpdatedContentIdsKey, this.updatedContentIds); LocalBroadcastManager.getInstance(ctx).sendBroadcast(updatedIdsIntent); Retrieve Message (always empty): Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.UpdatedContentIdsKey)); Why are the items gone from the array in the broadcast receiver? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Prevent multiple copies of an Android service
Thanks. I had my code in the onHandleIntent() method, so it was, as you suggest, being executed on each call to startService. I've now got my code in the onCreate method and things are moving forward. On Fri, Mar 2, 2012 at 11:49 PM, Mark Murphy mmur...@commonsware.comwrote: On Thu, Mar 1, 2012 at 11:51 PM, Alan Smith gpsanima...@gmail.com wrote: The doco for startService states If this service is not already running, it will be instantiated and started (creating a process for it if needed); if it is running then it remains running. I'm finding that each call to startService appears to be starting a separate instance of the service, in that the work that the service is doing (in my test case, trivially writing to a new log file) is being done again for each call. That does not mean that there are multiple instances of the service. onStartCommand() will be called for each startService() call, so if your work is there (or, say, in onHandleIntent() of an IntentService), N calls to startService() will result in N runs through your work. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Passing ArrayListString in BroadcastReceiver in Android
What's confusing to me is that it actually gets an ArrayListString. It's just been emptied out somehow. On Mar 2, 1:25 pm, tatebn brandonnt...@gmail.com wrote: Accidentally left that prefix in the code there. That's not the issue in the actual app. On Mar 2, 1:17 pm, tatebn brandonnt...@gmail.com wrote: It's the intent in the broadcast receiver's onReceive message /** Handler for content ids updated. */ private BroadcastReceiver mContentIdsUpdated = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, received + intent.getStringArrayListExtra(Common.CDCUpdatedContentIdsKey).size() + items in receiver); // 0 Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.CDCUpdatedContentIdsKey)); // empty array } }; // In oncreate LocalBroadcastManager.getInstance(this).registerReceiver(mContentIdsUpdated , new IntentFilter(Common.ContentIdsUpdatedNotification)); On Mar 2, 12:15 pm, Mark Murphy mmur...@commonsware.com wrote: Are you sure you are looking at the right Intent? On Fri, Mar 2, 2012 at 11:25 AM, tatebn brandonnt...@gmail.com wrote: I'm using LocalBroadcastManager to send data between classes. I'm trying to send an ArrayList of String objects, 1 dimensional, in one of them. The array has all my strings when I send it, but on the receiving end it is empty. Has anyone seen this before? Here's my code. Send Message (I can print the array here and it has 5 items): Intent updatedIdsIntent = new Intent(Common.ContentIdsUpdatedNotification); updatedIdsIntent.putStringArrayListExtra(Common.UpdatedContentIdsKey, this.updatedContentIds); LocalBroadcastManager.getInstance(ctx).sendBroadcast(updatedIdsIntent); Retrieve Message (always empty): Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.UpdatedContentIdsKey)); Why are the items gone from the array in the broadcast receiver? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Passing ArrayListString in BroadcastReceiver in Android
As it turns out, I'm emptying that array after I send it off. For some reason the broadcast receiver is either using a reference to it, so it gets the cleared one, or is sending after it's cleared. Either way, not clearing the array after allows it to show up correctly. On Mar 2, 2:13 pm, tatebn brandonnt...@gmail.com wrote: What's confusing to me is that it actually gets an ArrayListString. It's just been emptied out somehow. On Mar 2, 1:25 pm, tatebn brandonnt...@gmail.com wrote: Accidentally left that prefix in the code there. That's not the issue in the actual app. On Mar 2, 1:17 pm, tatebn brandonnt...@gmail.com wrote: It's the intent in the broadcast receiver's onReceive message /** Handler for content ids updated. */ private BroadcastReceiver mContentIdsUpdated = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, received + intent.getStringArrayListExtra(Common.CDCUpdatedContentIdsKey).size() + items in receiver); // 0 Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.CDCUpdatedContentIdsKey)); // empty array } }; // In oncreate LocalBroadcastManager.getInstance(this).registerReceiver(mContentIdsUpdated , new IntentFilter(Common.ContentIdsUpdatedNotification)); On Mar 2, 12:15 pm, Mark Murphy mmur...@commonsware.com wrote: Are you sure you are looking at the right Intent? On Fri, Mar 2, 2012 at 11:25 AM, tatebn brandonnt...@gmail.com wrote: I'm using LocalBroadcastManager to send data between classes. I'm trying to send an ArrayList of String objects, 1 dimensional, in one of them. The array has all my strings when I send it, but on the receiving end it is empty. Has anyone seen this before? Here's my code. Send Message (I can print the array here and it has 5 items): Intent updatedIdsIntent = new Intent(Common.ContentIdsUpdatedNotification); updatedIdsIntent.putStringArrayListExtra(Common.UpdatedContentIdsKey, this.updatedContentIds); LocalBroadcastManager.getInstance(ctx).sendBroadcast(updatedIdsIntent); Retrieve Message (always empty): Log.i(TAG, content ids updated in activity + intent.getStringArrayListExtra(Common.UpdatedContentIdsKey)); Why are the items gone from the array in the broadcast receiver? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Passing ArrayListString in BroadcastReceiver in Android
On Fri, Mar 2, 2012 at 2:23 PM, tatebn brandonnt...@gmail.com wrote: As it turns out, I'm emptying that array after I send it off. For some reason the broadcast receiver is either using a reference to it, so it gets the cleared one, or is sending after it's cleared. Either way, not clearing the array after allows it to show up correctly. Ah, that's an interesting point. With classic broadcasts, the Intents get, um, parcelized (v.t., to convert into Parcels). With LocalBroadcastManager, they are just passed around. Hence, you have to be very careful that you do not modify things that you put into the Intent, or explicitly copy them as you are putting them in the Intent. I have a section on LocalBroadcastManager in a book update coming out shortly, and I'll add in more material on this. Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Any way to change one color to another on a bitmap?
I have a bitmap and want to be able to change all black pixels to all blue. I know you can do this via Bitmap.setPixel but that process is extremely slow (believe me, I tried it). Researching this is see where people recommend using PorterDuff Xor, but there isn't any posts on how this was successfully done. Lots of people asking...no one spelling out the answer. So using, paint, bitmap, and canvas, how do you change every black pixel to all blue ones? 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: positioning a view based on it's calculated dimensions
the answer is to manage positioning by override onLayout of the containing ViewGroup, rather than the View itself. E.g., @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { int count = getChildCount(); for (int i = 0; i count; i++) { View child = getChildAt(i); if (child.getVisibility() != GONE) { MyCustomLayout.LayoutParams lp = (MyCustomLayout.LayoutParams) child.getLayoutParams(); int w = child.getMeasuredWidth(); int h = child.getMeasuredHeight(); int x = lp.left - (int) (w / 2f); int y = lp.top - h; child.layout(x, y, x + w, y + h); } } } (note that the above example specifically is untested, but i've tested the basic premise and it works) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: OpenGL es and min3d - textures only load on certain hardware and how to fix.
Hey thanks for the reply :) I figured out that it was on certain builds of android even when you have images that are in the power of two, once you pull them from a stream and pass them by reference some how theres a chance that they will be resized. I went through and made sure that anywhere I was making a copy by reference I used BitmapFactory.Options ops = new BitmapFactory.Options(); ops.inScaled = false; And this prevents the system from messing with the images. On Thursday, March 1, 2012 10:53:42 PM UTC-8, Yan wrote: Well there's an API calls that can easily load several different standard graphics file formats, for example: //Get the texture from the Android resource directory InputStream is = context.getResources().openRawResource(R.drawable.onlylowercasefilenameshere); Bitmap bitmap = null; try { //BitmapFactory is an Android graphics utility for images bitmap = BitmapFactory.decodeStream(is); } finally { //Always clear and close try { is.close(); is = null; } catch (IOException e) { } } If you are concerned about people replacing your image files with something else, then you can make that more difficult by doing some sort of checksum before using them. Otherwise, if you are concerned with people getting exact copies of standard image files, I don't know what to tell you. I wonder if anybody can suggest an efficient solution for that? On Thursday, March 1, 2012 4:34:00 AM UTC-7, Jim Andresakis wrote: Im using min3d to draw 3d boxes and Im applying textures to them in the updateScene method which works great on some devices and on others the textures wont load. Ive tried debugging by turning on the glflags but I dont see any errors what so ever. Ive done a lot of reading and googling the past two days on the matter and it looks like theres no real good answer on why opengl would work on one device and not on another. So far Ive tried making sure the images were in the power of two and that wasnt it. The way that Im accessing the images to use as bitmaps is by pulling bitmaps from images that are stored on the devices internal file system. I read in one thread some where that instead of decoding a file to make a bitmap you could turn the file into a stream and then decode that as a bitmap and that would work but I havent even tried doing that since I spent most of my time trying to debug to find any nullpointers or anything. At first I thought I had found some null textures but they were just textures that hadnt initialized yet. So as this is a common problem on android I was hoping others could help me out by shedding some light on how they tackled the problem of opengl textures not loading on certain devices. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Display problems with Galaxy Notes?
This sounds like the app getting displayed in compatibility mode. Is your minSdk or targetSdk set to 4 or above in the manfest? -- K 2 марта 2012 г. 11:46 пользователь Terry terb...@gmail.com написал: I am unable to reproduce the problem using the Android Tools on Eclipse - with the actual xml layout files. But there does not seem to exist an option for a screen similar to that of the Galaxy Notes (5.7 inch, 1280x800 pixels). Has anybody else experienced this problem? Regards, Terry. On Mar 1, 11:18 am, Terry terb...@gmail.com wrote: What do you mean by change the apn value ? Terry On 1 Mar, 09:57, MOHANAKRISHNAN remokri...@gmail.com wrote: i think it may depends upon the apn problems, just change apn value to desired devices value. On Thu, Mar 1, 2012 at 1:41 PM, Terry terb...@gmail.com wrote: I have an app which shows reasonably well on the screen of all devices I have tested - until one user complained about it on a new Samsung GalaxyNotes. He sent me some screenshots, which shows that my UIs are displayed in a somewhat compressed form at the upper 3/4 of the screen. The lower 1/4 of the screen is black/unused. Does anyone know if this could be a general problem with theGalaxy Notes, or is it only occuring with my UI displays? Regards, Terry -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] AccountManager object on Archos 101 Tablet
Hi all, I currently have an app I'm beta testing and one of the test users has an Archos 101 tablet. I'm implementing an in-app store and one of the things I need is the account name they're using. I have logic to handle if they've got multiple accounts, but I seem to be getting only a null result from this code: public String[] getAccountList(Activity activity) { int numAccounts= 0; AccountManager accountManager = AccountManager.get(activity); Account[] accounts = accountManager.getAccountsByType(com.google); numAccounts= accounts.length; if (numAccounts 1) { return null; } String[] accountList = new String[numAccounts]; int i = 0; for (Account account : accounts) { accountList[i] = account.name; i++; } return accountList; } The accountManager.getAccountsByType() method keeps returning no results (same goes for getAccounts), so it just returns null. Is there a step I'm missing to allow my app to get account information on 2.2.x devices? The code works fine on a Toshiba Thrive (AT100) and the in- app store functions as I expect. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AccountManager object on Archos 101 Tablet
Does that device have the Android Market on it from the factory? I know early ARCHOS tablets didn't, but I don't know if that one does. If it does not, are you sure there's supposed to be a com.google account? On Fri, Mar 2, 2012 at 5:22 PM, Peter wolfenm...@gmail.com wrote: Hi all, I currently have an app I'm beta testing and one of the test users has an Archos 101 tablet. I'm implementing an in-app store and one of the things I need is the account name they're using. I have logic to handle if they've got multiple accounts, but I seem to be getting only a null result from this code: public String[] getAccountList(Activity activity) { int numAccounts= 0; AccountManager accountManager = AccountManager.get(activity); Account[] accounts = accountManager.getAccountsByType(com.google); numAccounts= accounts.length; if (numAccounts 1) { return null; } String[] accountList = new String[numAccounts]; int i = 0; for (Account account : accounts) { accountList[i] = account.name; i++; } return accountList; } The accountManager.getAccountsByType() method keeps returning no results (same goes for getAccounts), so it just returns null. Is there a step I'm missing to allow my app to get account information on 2.2.x devices? The code works fine on a Toshiba Thrive (AT100) and the in- app store functions as I expect. 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Having a Problem using a Library in My Project
I have an Android project, which is a library. The project compiles and works in an example project. However, the example project has the same package name (but a separate project). In my current project, which has a completely different package name, I am trying to use the same library. I set up the current project as follows: * the library project is in the eclipse build path as a project * the manifest.xml file has this inside the application tag - uses-library android:name=com.markupartist.android.widget.ActionBar android:required=true / * I added these lines to the layout file for my activity: com.markupartist.android.widget.ActionBar android:id=@+id/actionbar style=@style/ActionBar / I get the error in eclipse - error: Error: No resource found that matches the given name (at 'style' with value '@style/ActionBar'). The ActionBar library has a syle.xml file with the ActionBar tag. I also tried putting the ActionBar library as a jar in the build path, and I get the same error. What am I missing to include the ActionBar library in my current project? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: AccountManager object on Archos 101 Tablet
I suppose it's probably helpful to mention that I have the GET_ACCOUNTS permission specified in the manifest. Thanks! On Mar 2, 3:22 pm, Peter wolfenm...@gmail.com wrote: Hi all, I currently have an app I'm beta testing and one of the test users has an Archos 101 tablet. I'm implementing an in-app store and one of the things I need is the account name they're using. I have logic to handle if they've got multiple accounts, but I seem to be getting only a null result from this code: public String[] getAccountList(Activity activity) { int numAccounts= 0; AccountManager accountManager = AccountManager.get(activity); Account[] accounts = accountManager.getAccountsByType(com.google); numAccounts= accounts.length; if (numAccounts 1) { return null; } String[] accountList = new String[numAccounts]; int i = 0; for (Account account : accounts) { accountList[i] = account.name; i++; } return accountList; } The accountManager.getAccountsByType() method keeps returning no results (same goes for getAccounts), so it just returns null. Is there a step I'm missing to allow my app to get account information on 2.2.x devices? The code works fine on a Toshiba Thrive (AT100) and the in- app store functions as I expect. 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: AccountManager object on Archos 101 Tablet
I've got an e-mail with the tester to look up what version of the Market app he has on the device in question. There should be a Google account on the device, but I get the same result whether I filter by account type or not. Since the app is using in-app billing, I believe it will require a google account. On Mar 2, 3:29 pm, Mark Murphy mmur...@commonsware.com wrote: Does that device have the Android Market on it from the factory? I know early ARCHOS tablets didn't, but I don't know if that one does. If it does not, are you sure there's supposed to be a com.google account? On Fri, Mar 2, 2012 at 5:22 PM, Peter wolfenm...@gmail.com wrote: Hi all, I currently have an app I'm beta testing and one of the test users has an Archos 101 tablet. I'm implementing an in-app store and one of the things I need is the account name they're using. I have logic to handle if they've got multiple accounts, but I seem to be getting only a null result from this code: public String[] getAccountList(Activity activity) { int numAccounts= 0; AccountManager accountManager = AccountManager.get(activity); Account[] accounts = accountManager.getAccountsByType(com.google); numAccounts= accounts.length; if (numAccounts 1) { return null; } String[] accountList = new String[numAccounts]; int i = 0; for (Account account : accounts) { accountList[i] = account.name; i++; } return accountList; } The accountManager.getAccountsByType() method keeps returning no results (same goes for getAccounts), so it just returns null. Is there a step I'm missing to allow my app to get account information on 2.2.x devices? The code works fine on a Toshiba Thrive (AT100) and the in- app store functions as I expect. 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Having a Problem using a Library in My Project
On Fri, Mar 2, 2012 at 5:30 PM, Mark Phillips m...@phillipsmarketing.biz wrote: I have an Android project, which is a library. Is this a true Android library project (http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject)? * the library project is in the eclipse build path as a project Yes, but did you add it to Eclipse as an Android library project (http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject)? * the manifest.xml file has this inside the application tag - uses-library android:name=com.markupartist.android.widget.ActionBar android:required=true / Delete this, unless your library is really a firmware add-on that you have built into custom firmware (in which case, you're outside the scope of this list). I also tried putting the ActionBar library as a jar in the build path, and I get the same error. JARs don't have resources. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Custom layout - why is behavior different when laying out a ViewGroup (vs View) as a child
I've got a custom layout for positioning tooltips on a pan-n-zoom tiled map (also custom), in reaction to touch events. The tooltips should appear above and centered to the marker that fired it. Everything works perfectly when using normal Views (ImageView, TextView) as children. However, when trying to use a ViewGroup (e.g., a RelativeLayout), the child does not appear at all. I added some logging to onLayout, and it was reporting 0 for child.getMeasuredWidth()/Height(), so I extended RelativeLayout and overrode onMeasure in order to supply the correct dimensions. The dimensions are now logging correctly, but still the child ViewGroup does not appear. This doesn't seem like it's a necessary step in any case - I'd expect to be able to use layouts as children normally. Why is there a difference? Why would a simple View appear and position exactly as expected, but child layouts fail to render at all? Here's a summarized version of the custom layout: public class TooltipLayout extends ViewGroup { public TooltipLayout(Context context) { super(context); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { //... } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { int count = getChildCount(); for (int i = 0; i count; i++) { View child = getChildAt(i); if (child.getVisibility() != GONE) { TooltipLayout.LayoutParams lp = (TooltipLayout.LayoutParams) child.getLayoutParams(); child.layout(lp.x, lp.y, lp.x + child.getMeasuredWidth(), lp.y + child.getMeasuredHeight()); } } } public static class LayoutParams extends ViewGroup.LayoutParams { public int x; public int y; public LayoutParams(int width, int height, int left, int top) { super(width, height); x = left; y = top; } } } TYIA. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Approved/recommended/best way to write to GENUINE external storage
There have been a few threads on the subject and I have not yet found a good answer. Is there a recommended way to identify a list of real *external* storage media? Like many people we need to export data to an sdcard so that users can copy it, edit it, or use it elsewhere. And copy it back. Short of embedding a file browser in every app, the current situation seems untenable: we have manufacturers who make the internal sdcard non-writiable when mounted on a PC, we have a variety of different mount points that manufacturers use for external sdcards, and we have these same manufacturers shipping phones with android 2.3 installed, so new APIs are not likely to be all that useful unless that go into a compatibility library as well. Does anyone have a good solution to 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: Regarding apk installation programatically getting callback for successful installation.
There's the ACTION_PACKAGE_ADDEDhttp://developer.android.com/intl/de/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED broadcast you could use to see when it's installed. I don't think there's one for if it was declined, but you could use some trickery in your onResume(). The only problem is if they hit the home button when the installer is showing and then somehow navigate back to your app in such a way that they can still get back to the installer. On Thursday, March 1, 2012 7:08:58 AM UTC-8, ashiq sayyad wrote: Hi, Hope all doing well. I am trying to install app using following intent.. Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(apkUri, application/vnd.android.package- archive); startActivity(intent); This will launch package installer screen with ok cancel commands (depends on device) for user approval. If the user press Ok ,app will install if user press cancel,installation will decline.. Can I get these callbacks to my programme depending on user selection means whether installation is successful or declined... Do I need to specify some key in the intent to acieve this Thanks Regards, Ashiq sayyad On Thursday, March 1, 2012 7:08:58 AM UTC-8, ashiq sayyad wrote: Hi, Hope all doing well. I am trying to install app using following intent.. Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(apkUri, application/vnd.android.package- archive); startActivity(intent); This will launch package installer screen with ok cancel commands (depends on device) for user approval. If the user press Ok ,app will install if user press cancel,installation will decline.. Can I get these callbacks to my programme depending on user selection means whether installation is successful or declined... Do I need to specify some key in the intent to acieve this Thanks Regards, Ashiq sayyad On Thursday, March 1, 2012 7:08:58 AM UTC-8, ashiq sayyad wrote: Hi, Hope all doing well. I am trying to install app using following intent.. Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(apkUri, application/vnd.android.package- archive); startActivity(intent); This will launch package installer screen with ok cancel commands (depends on device) for user approval. If the user press Ok ,app will install if user press cancel,installation will decline.. Can I get these callbacks to my programme depending on user selection means whether installation is successful or declined... Do I need to specify some key in the intent to acieve this Thanks Regards, Ashiq sayyad -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Regarding apk installation programatically getting callback for successful installation.
On Friday, March 2, 2012 8:24:33 PM UTC-5, Josh Brown wrote: There's the ACTION_PACKAGE_ADDEDhttp://developer.android.com/intl/de/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED broadcast you could use to see when it's installed. I don't think there's one for if it was declined, but you could use some trickery in your onResume(). The only problem is if they hit the home button when the installer is showing and then somehow navigate back to your app in such a way that they can still get back to the installer. Can't you just ask the package manager if it's (already) installed ? If not you fire off another view intent to begin a new installation attempt. You can't force the user to agree, but then your app doesn't have to go beyond that point if they don'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 use one Apps in Another as .Jar/Lib Projects
Don't hard-coded any file to the root directory of sdcard because it can be cluttered up. Just put any file in data/your package name/ directory. On Friday, March 2, 2012 8:09:43 AM UTC-5, evergree...@gmail.com wrote: Hi all, i have a problem, i have a PdfViewer apps i call it in another activity where i have put the hard-coded path to sdcard i have stored one pdf file in sdcard. so the problem is now i would like to use that PdfViewer apps in another project as a jar. but after bit of googling i came to know that the jar will not work , as a library project i can use it. finally i have use it to open pdf files but , it doesn't work. what else i'll do regarding the above problem ? any help'll be appreciated !! Regards, Subrat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Having a Problem using a Library in My Project
On Fri, Mar 2, 2012 at 3:36 PM, Mark Murphy mmur...@commonsware.com wrote: On Fri, Mar 2, 2012 at 5:30 PM, Mark Phillips m...@phillipsmarketing.biz wrote: I have an Android project, which is a library. Is this a true Android library project ( http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject )? Yes. * the library project is in the eclipse build path as a project Yes, but did you add it to Eclipse as an Android library project ( http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject )? Nope, this was my problem. Thanks for the information!! * the manifest.xml file has this inside the application tag - uses-library android:name=com.markupartist.android.widget.ActionBar android:required=true / Delete this, unless your library is really a firmware add-on that you have built into custom firmware (in which case, you're outside the scope of this list). I was looking at the manifest docs and found library, and not a lot of clear explanation, so I tried it. I also tried putting the ActionBar library as a jar in the build path, and I get the same error. JARs don't have resources. I discovered that by looking in the jar file. Thanks!!! Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] spinner style from 4.0.3 to 2.3.3
hi, i'm a newbie. i made this app for 4.0.3 that has some spinners an textviews. it looks fine - everything has a black background. my target phone is a 2.3.3. spinner has grey/and white backgrounds. changing the background color works for the dropdown view and for the text view on the spinner, but not for the spinner itself. i belive this is because they us 9patches or something. looking in the platforms file and doing some diffs (please see below), it seems that the most of the xml files are the same except for one small difference. also the level 15 api has some extra files. is it possible to somehow make my app use these level 15 files (just for the spinners) on a level 10 platform? or is there a way to use a darker theme on the 2.3.3? thanks diff ./android-10/data/res/drawable/search_spinner.xml ./android-15/data/res/drawable/search_spinner.xml ./android-10/data/res/drawable/spinner_background.xml ./android-15/data/res/drawable/spinner_background.xml ./android-10/data/res/drawable/spinner_dropdown_background.xml ./android-15/data/res/drawable/spinner_dropdown_background.xml ./android-10/data/res/layout/simple_spinner_dropdown_item.xml ./android-15/data/res/layout/simple_spinner_dropdown_item.xml 25c25 android:layout_height=?android:attr/listPreferredItemHeight --- android:layout_height=?android:attr/dropdownListPreferredItemHeight ./android-10/data/res/layout/simple_spinner_item.xml ./android-15/data/res/layout/simple_spinner_item.xml 22c22 style=?android:attr/spinnerItemStyle --- style=?android:attr/spinnerItemStyle file: ./android-15/data/res/drawable/spinner_ab_holo_dark.xml ?xml version=1.0 encoding=utf-8? !-- Copyright (C) 2011 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_enabled=false android:drawable=@drawable/spinner_ab_disabled_holo_dark / item android:state_pressed=true android:drawable=@drawable/spinner_ab_pressed_holo_dark / item android:state_pressed=false android:state_focused=true android:drawable=@drawable/spinner_ab_focused_holo_dark / item android:drawable=@drawable/spinner_ab_default_holo_dark / /selector file: ./android-15/data/res/drawable/spinner_ab_holo_light.xml ?xml version=1.0 encoding=utf-8? !-- Copyright (C) 2010 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_enabled=false android:drawable=@drawable/spinner_ab_disabled_holo_light / item android:state_pressed=true android:drawable=@drawable/spinner_ab_pressed_holo_light / item android:state_pressed=false android:state_focused=true android:drawable=@drawable/spinner_ab_focused_holo_light / item android:drawable=@drawable/spinner_ab_default_holo_light / /selector file: ./android-15/data/res/drawable/spinner_background_holo_dark.xml ?xml version=1.0 encoding=utf-8? !-- Copyright (C) 2010 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_enabled=false android:drawable=@drawable/spinner_disabled_holo_dark / item android:state_pressed=true
[android-developers] Re: reading pdf file in my android app
You are looking at the wrong part of the vogella tutorial. Look a little further down at section 5, titled, 5. Read an existing pdf On Wednesday, February 29, 2012 5:16:03 AM UTC-8, Jags wrote: hi all, i am trying to read a pdf file in my android app. i realised, unlike safari in iphone android webview does not render pdf file as a local url . hence i am exploring itextpdf. i followed following tutorial http://www.vogella.de/articles/JavaPDF/article.html#installation while reading file, the author is trying to create a file using PDFWriter. he also uses writer to get a page as in Image. My question is, is it essential to use a writer ? cant we use only reader to extract entire page as an image ? what i plan here, is get all pages as an image and put them in a scroll view. thanks in advance jags -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Failed to register input channel?
I also experiencing this problem on my Nexus S 4g, but I am running 2.3.7. I am trying to write a simple live wallpaper, but it seems that this crash is happening when the preview live wallpaper gets cleaned up (I could totally be wrong, but that's what it seems like). Interestingly the live wallpaper does actually work and assigns my wallpaper as you would expect. In my case the exception is being thrown for some reason after using the WallpaperManager class. Please no comments about how wrong this code is... I am trying to reduce this down to the barest reproducible code bits, and I have also just started trying to make a live wallpaper an hour ago when I got hit with this issue. If you want to duplicate the behavior, just point the relevant path to an image on your sdcard. W/InputQueue-JNI(16794): Input channel is not initialized. W/WindowManager(14622): Attempted to add wallpaper window with unknown token android.os.Binder@40a1fe70. Aborting. D/AndroidRuntime(16794): Shutting down VM W/dalvikvm(16794): threadid=1: thread exiting with uncaught exception (group=0x40015560) E/AndroidRuntime(16794): FATAL EXCEPTION: main E/AndroidRuntime(16794): java.lang.RuntimeException: Failed to register input channel. Check logs for details. E/AndroidRuntime(16794): at android.view.InputQueue.nativeRegisterInputChannel(Native Method) E/AndroidRuntime(16794): at android.view.InputQueue.registerInputChannel(InputQueue.java:92) E/AndroidRuntime(16794): at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:521) E/AndroidRuntime(16794): at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:651) E/AndroidRuntime(16794): at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:875) E/AndroidRuntime(16794): at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61) E/AndroidRuntime(16794): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(16794): at android.os.Looper.loop(Looper.java:130) E/AndroidRuntime(16794): at android.app.ActivityThread.main(ActivityThread.java:3683) E/AndroidRuntime(16794): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(16794): at java.lang.reflect.Method.invoke(Method.java:507) E/AndroidRuntime(16794): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) E/AndroidRuntime(16794): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) E/AndroidRuntime(16794): at dalvik.system.NativeStart.main(Native Method) The WallpaperService: *package* com.bubbletastic.wallpapercycler; *import* java.io.IOException; *import* android.app.WallpaperManager; *import* android.graphics.Bitmap; *import* android.graphics.BitmapFactory; *import* android.os.Environment; *import* android.os.Handler; *import* android.service.wallpaper.WallpaperService; *import* android.util.Log; *public* *class* WallpaperCycler *extends* WallpaperService { Handler handler = *new* Handler(); @Override *public* Engine onCreateEngine() { *return* *new* WallpaperCyclerEngine(); } *private* *class* WallpaperCyclerEngine *extends* Engine { *public* WallpaperCyclerEngine() { *super*(); *try* { String path = Environment.*getExternalStorageDirectory*()+ /Wallpapers/1_black-wood.png; Bitmap wallpaper = BitmapFactory.*decodeFile*(path); *if* (wallpaper != *null*) { WallpaperManager.*getInstance*(WallpaperCycler.*this* ).setBitmap(wallpaper); } *else* { Log.*d*(WallpaperCycler, bitmap was null, tried to decode path: +path); } } *catch* (IOException e) { // *TODO* Auto-generated catch block e.printStackTrace(); } } } } And the manifest of the app: ?xml version=*1.0* encoding=*utf-8*? manifest xmlns:android=*http://schemas.android.com/apk/res/android* package=*com.bubbletastic.wallpapercycler* android:versionCode=*1* android:versionName=*1.0* uses-sdk android:minSdkVersion=*7* / uses-permission android:name=*android.permission.SET_WALLPAPER* / uses-permission android:name=* android.permission.WRITE_EXTERNAL_STORAGE* / uses-feature android:name=*android.software.live_wallpaper* / application service android:name=*.WallpaperCycler* android:permission=*android.permission.BIND_WALLPAPER* intent-filter action android:name=* android.service.wallpaper.WallpaperService* / /intent-filter meta-data android:name=*android.service.wallpaper* android:resource=*@xml/xmlnsref* / /service /application /manifest And the meta-data resource: ?xml version=*1.0* encoding=*utf-8*? wallpaper xmlns:android=*http://schemas.android.com/apk/res/android* / -- You received this message because you are subscribed to the Google Groups Android Developers group. To
[android-developers] Re: reading pdf
Please do not post essentially the same question under slightly different titles. It tends to attract trolls. As for how to read a PDF file, please see the answer I gave in the other thread on that. Use the same tutorial, but look further down: you are looking at the part where he is teaching how to write files, look where he teaches how to read them. On Wednesday, February 29, 2012 5:14:24 AM UTC-8, Jags wrote: hi all, i am trying to read a pdf file in my android app. i realised, unlike safari in iphone android webview does not render pdf file as a local url . hence i am exploring itextpdf. i followed following tutorial http://www.vogella.de/articles/JavaPDF/article.html#installation while reading file, the author is trying to create a file using PDFWriter. he also uses writer to get a page as in Image. My question is, is it essential to use a writer ? cant we use only reader to extract entire page as an image ? what i plan here, is get all pages as an image and put them in a scroll view. thanks in advance jags -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Beam demo on PC
Got the error fixed! Refer to following post: http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips Eclipse is defaulting to Java 1.5 and you have classes implementing interface methods (which in Java 1.6 can be annotated with @Override, but in Java 1.5 can only be applied to methods overriding a superclass method). Go to your project/ide preferences and set the java compiler level to 1.6 and also make sure you select JRE 1.6 to execute your program from eclipse. With Eclipse Galileo you go to Eclipse - Preferences menu item, then select Java and Compiler in the dialog. Now it still may show compiler compliance level at 1.6, yet you still see this problem. So now select the link Configure Project Specific Settings... and in there you'll see the project is set to 1.5, now change this to 1.6. You'll need to do this for all affected projects. This byzantine menu / dialog interface is typical of Eclipse's poor UI design. -Goodline On Jan 29, 7:08 pm, goodline surekh...@gmail.com wrote: Hi, I am a student and new to android development. I am planning to do a project on android nfc peer-to-peer mode. I was wondering if it is possible to create two virtual devices(AVD's) on a windows machine and send data from one device to another with nfc as the medium? Also, when I try to run the sample AndroidBeamDemo project, I see some errors in Beam.java: 1. The method createNdefMessage(NfcEvent) of type Beam must override a superclass method 2. The method onNdefPushComplete(NfcEvent) of type Beam must override a superclass method Any help is appreciated. -Goodline -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Progress bar dialog in splash screen
Hi all, I want to perform the progress bar dialog loading operation when the page splashing.I'm having the application for page splashing and progress bar dialog loading operations individually.How can i combine this two applications? Otherwise give the solution for full application development. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Creating multiselect ListView in android
Dear friends, This is the example code for creating multiselect listview. I have searched over all internet but i didn't get good one. Now i have made this code it is working pretty fine. I just want to share this code with all who is interested to know something new. *visit this link for code* *Creating multiselect ListView in android*http://kalandarandroid.blogspot.in/2012/03/creating-multiselect-listview-in.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CursorAdapter? or OtherAdapter?
Hello, If I have a cursor and need to display as a list through adapter, then which adapter is best under below condition? The cursor have datas(of course). But this cursor contains some of rows which should not be displayed. For example, totally 10 records, but index 1, 4, 5, 8 should not be displayed. (Means, not sequentially sorted. and also cannot sort it by sort order.). With above cursor data, how to filter out only available datas(which index 0, 2, 3, 6, 7, 9) in adapter? Any ideas or way to do??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Display problems with Galaxy Notes?
Hi, Kostya. You may be right. The minSdkversion is set to 7 in the manifest. I have started reading about compatibility mode, but it is a confusing subject. AND - I am unable to reproduce the incorrect screen display using any of the Android tools I get find. If you are right - and I try to disable compatibility mode, how can I know if it will work or not - when it seems impossible to test it without having the actual device? Terry On Mar 2, 10:57 pm, Kostya Vasilyev kmans...@gmail.com wrote: This sounds like the app getting displayed in compatibility mode. Is your minSdk or targetSdk set to 4 or above in the manfest? -- K 2 ÍÁÒÔÁ 2012šÇ. 11:46 ÐÏÌØÚÏ×ÁÔÅÌØ Terry terb...@gmail.com ÎÁÐÉÓÁÌ: I am unable to reproduce the problem using the Android Tools on Eclipse - with the actual xml layout files. But there does not seem to exist an option for a screen similar to that of theGalaxyNotes(5.7 inch, 1280x800 pixels). Has anybody else experienced this problem? Regards, Terry. On Mar 1, 11:18šam, Terry terb...@gmail.com wrote: What do you mean by change the apn value ? Terry On 1 Mar, 09:57, MOHANAKRISHNAN remokri...@gmail.com wrote: i think it may depends upon the apn problems, just change apn value to desired devices value. On Thu, Mar 1, 2012 at 1:41 PM, Terry terb...@gmail.com wrote: I have an app which shows reasonably well on the screen of all devices I have tested - until one user complained about it on a new Samsung GalaxyNotes. He sent me some screenshots, which shows that my UIs are displayed in a somewhat compressed form at the upper 3/4 of the screen. The lower 1/4 of the screen is black/unused. Does anyone know if this could be a general problem with theGalaxy Notes, or is it only occuring with my UI displays? Regards, Terry -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to display panormic images on Android/
Hi, Can anyone telll me how to display panormic images on Android? i tried a lot but didnt get any help. Regards dileep -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en