[android-developers] Re: Strange exception
That's what the first three lines of your stacktrace suggest. Yahel On 16 juin, 18:33, Felix Garcia Lainez fgarcialai...@gmail.com wrote: Umm... So the error is on one of my touchevents implementations for textview objects (and subclass like edittext)? On 16 jun, 15:00, Yahel kaye...@gmail.com wrote: really would be crazy, no? Crazy ? Yes ! Tedious ? Yes ! But you can probably narrow it down since it is raised by a TextView ontouch event. Have fun :) Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] installation URL in apk
do you mean install apk from internet? On Fri, Jun 17, 2011 at 8:34 AM, Mark Murphy mmur...@commonsware.comwrote: On Thu, Jun 16, 2011 at 11:44 AM, Robert Slama robsl...@gmail.com wrote: exist any way how I can get URL from what was apk installed direct in instaled application? No, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Michael Leung http://www.itblogs.info http://www.michaelleung.info -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 celebrites api
The Ice Cream Sandwich Android team ??? These guys never stop, I eagerly wait of their Tomorrow Lottery Numbers API. Such an helpful piece of coding. Do you think they'll include a getCellPhoneNumberForStalkingPurposes() and a howToGetInHerPantsToBeACelebrityToo() method in the celebrity one ? I sure could you use the fame :s Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] When should I leave a service running?
Ok, thanks. When the documentation says one thing and existing (popular and high rated) apps do something else it just makes me think I've missed something. Guess I haven't then. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Text view over image gallery
Anyone help me please... On May 24, 9:16 am, Randy rendy.hadin...@gmail.com wrote: How can i makeTextviewoverimagegallery like pulse news reader's UI? Anyone can help 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
Re: [android-developers] Re: Is there a launchMode or an Intent flag for this?
I've already tried that, it doesn't. And to answer my question: 1 - There is a new Intent flag in API 11, FLAG_ACTIVITY_CLEAR_TASK, which does just what I need, clears the existing task before launching the activity as its root. Too bad I can't use that. 2 - Again in API 11, there is a whole new way of launching the application into the middle of its activity stack with PendingIntent, specifically built for use with widgets and status bar notifications. This is actually my case: the reason B ever exists all by itself in the task stack is because it was launched from a widget / status bar, and I'd prefer to launch A and B both in this case. -- Kostya 2011/6/17 Yong Ma itop...@gmail.com Set B's finishOnTaskLaunch true. It may help you. On Jun 17, 2:23 am, Kostya Vasilyev kmans...@gmail.com wrote: Does anyone know if there is a way to start a new activity into an existing task, so it becomes the new task root if it doesn't already exist within the task? It might look like this: Let's say, the package has two activities, A (which is a LAUNCHER / MAIN) and B (which is not). Now at some point, the task stack has either A, and B on top of it, or just B all by itself. I'd like to launch A from outside the task (a status bar notification, etc.) so that: - If A already exists with the task (A - B), I'd like B to be finished. Settting FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP or clearTaskOnLaunch does this quite nicely. - If the task only has B, I'd like B to also be finished, and A to become the new task root. I'm having trouble finding anything that would let me implement this second case. It seems to me that clearTaskOnLaunch for A in the manifest should do this, but it doesn't: B stays within the task as its root, and A is launched on top of it. Am I missing something and it can be done, or is this really not possible with just something in the manifest / intent flags? Thanks, -- Kostya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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]
Hi all , I am searching tutorials for developing android games from scratch , i have found couple of them but nothing that suffices my interests . Can anyone please help me get the tutorials or at the least send me the links ? thanks in advance :) -- ThanksRegards Kaushik Pendurthi http://kaushikpendurthi.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Shape having two sided border
I am still getting the four boundaries on the layout. On Jun 16, 11:58 am, Rajiv rajiv...@gmail.com wrote: Use the following shape tag: padding android:left=1dp android:top=0dp android:right=1dp android:bottom=0dp / On Thu, Jun 16, 2011 at 12:06 PM, Sapna Srivastav sapna.ari...@gmail.comwrote: Hi all. I would like to create a layout having a shape that has border only on 2 sides: left and right, i.e. I want top and bottom to be open. How can I achieve that defining shape in XML? Currently I have a normal 4 side border using the following shape XML definition: ?xml version=1.0 encoding=utf-8? shape xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent solid android:color=#FF / stroke android:width=1dp android:color=#FF / padding android:left=1dp android:top=1dp android:right=1dp android:bottom=1dp / /shape Please help, its urgent. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Radio App
Thanks Date: Thu, 16 Jun 2011 22:26:25 +0100 Subject: Re: [android-developers] Radio App From: fred.nig...@googlemail.com To: android-developers@googlegroups.com Try here: http://androidforums.com/developer-101/181868-how-stream-music-internet-radio-station.html Hope this is of use, Fred On 16/06/2011, Ruddee ruy...@hotmail.com wrote: Hi Guys, I am looking for help with the build of a basic Internet Radio App that plays back an internet Radio station from an IPhone,Blackberry and Andriod, I will be very grateful if this can be developed for me. I am running on a tight Budget at the moment but all I am looking for is something quite basic as described above. Any pointers will be helpful. Thanks for your help in Advance Rudde -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Re: android celebrites api
Actually, I was going to suggest subsuming all those categories under a new class, 'Scandals', so that the class looks like: public class CelebrityInfo { String name; int fame; // scale from 0 to 10: 10 being like Michelle Obama's fame int health; // on a scale from 1 to 10? Or negative numbers allowed for smokers? ArrayListScandal scandals; // Oh, and how could we forget? String twitterId; String phoneNumber; // no doubt available from wikileads or Lulz String facebookId; // for those who don't care about what little privacy they have left class Scandal { int year; String scandalDescription; url tmzSiteOnScandal; } // somehow, making this a nested class has such a great hidden message... } On Jun 16, 9:50 pm, TreKing treking...@gmail.com wrote: On Thu, Jun 16, 2011 at 11:33 PM, Dianne Hackborn hack...@android.comwrote: public class CelebrityInfo { String name; int fame; int health; } This API looks awesome. Please consider including int mentalHealth, int numIllegitimateChildren, int numSexTapes, and int numNudeTwitterPics which shall be crucial in tracking today's modern celebrity. - 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: Any way Application Publisher get to know details on users who bought the application from Market?
You mean me trying to buy an application? when I try for that it directly take me to Payment method. We are coming up with first application which needs to be placed in Market. So I wanted to know if there is any way we get to know which are the users who have bought the application from the market. Zsolt Vasvari wrote: Have you tried clicking on an order and see what it shows? On Jun 16, 9:03 pm, vaidyanet vaidya...@gmail.com wrote: I am happy to know that Android now provides the LVL for the license verification. How ever there so many discussions on the net over how easily it can be breaked. So I was plannng to have the double check over licensing. We have a cloud server which application communicates to get some processing done. During this time, I was thinking of verifying the registered users. So Any way publisher can query either Android market or License server for the users who purchased application though market? if so what details publisher can get? Thanks in advance. Sandeep -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: STL android
I don't pass any STL structures across JNI, I pack/unpack just the data I need in to basic types or arrays of basic types, doing my own simple streaming as required. My application is a board game with the next move calculator in C++ and the UI (and game state) in Java, so there is not much to transfer between the two layers. If you have a lot of state you need to pass back and forth between C++ and Java I suggest you have a look at NativeActivity (I am just starting this myself - so I can be much help here). It looks like it by subclassing the Java NativeActivity class it should be possible to keep my entire engine (and it's state) in C++ and pass just the UI events across the JNI interface. I have not tried this yet - I can feel a test project coming on. On Jun 16, 10:06 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hey Richard, thanks for helping ... in fact, i have installed SDK-NDK, read the CPLUSPLUS-SUPPORT.html doc, and preparing to compile my C++ STL stuff, but what i really am afraid is of JNI. There are interfaces depending of the filed's types, and i dont realize how to pass STL structures or pointers to them. I wonder if you have a kind of hello- jni example which you can share in this thread ? kriss, i agree with you, but development time is a real constraint :- ( On Jun 16, 3:25 pm, RichardC richard.crit...@googlemail.com wrote: Hi, I have a big lump of STL code that is building sucessfully using the latest release of the Android-ndk (r5c). It just need a few tweaks. It is called from Java via JNI as needed. I sugguest you download the NDK:http://developer.android.com/sdk/ndk/index.html and read the docs specifically CPLUSPLUS-SUPPORT.html If you have any questions I will try and help. On Jun 16, 4:55 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hi guys, I would like to migrate a c/c++ (linux fedora 14) application to android 2.2. Because this will be my first migration, i have some questions about the procedure: 1. considering it has some STL stuff, i wonder if it will work. I specially use vector, set, map and algoritms (set_union, set_intersection, set_difference). 2. as i understand i have to write -first- a Java-JNI application which declares and interface my c functions and c++ methods. Those methods willl be included into one (or many) shared libraries ... is it ok ? ... may somebody advise me a good JNI tutorial ? ... i don like the ones i've found :-( 3- once ready, i must use the NDK toolset in order to generate the android application ... hopefully i will works.. I am worried because the NDK info says to have a A Minimal set of headers for C++ support ... and i wonder if STL works or not ... but, NDK r5 - android - suposse to also hav support for STLport ... does any body has the hello-jni file modifyied for STL suppport ? NDK Doc also says that Applications that use native activities must be run on Android 2.3 (API Level 9) or later, but as i understand, i will also needs JNI .. may somebody make some comments about it ? finally, may somebody share me a JNI example in order to pass some STL functions between java and c++ ? comments are wellcome. regards, thanks in advance hector -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Error inflating class in custum relativelayout
Hi, I'm trying to make a custom relativelayout but when I start the activity it fails: 06-17 09:57:23.253: ERROR/AndroidRuntime(526): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.es/com.es.KkActivity}: android.view.InflateException: Binary XML file line #4: Error inflating class com.es.kk.TransparentPanel 06-17 09:57:23.253: ERROR/AndroidRuntime(526): Caused by: android.view.InflateException: Binary XML file line #4: Error inflating class com.es.kk.TransparentPanel 06-17 09:57:23.253: ERROR/AndroidRuntime(526): Caused by: java.lang.ClassNotFoundException: com.es.kk.TransparentPanel in loader dalvik.system.PathClassLoader[/data/app/com.es-2.apk] .. My layout is: ?xml version=1.0 encoding=utf-8? !-- Broadcast Receiver que hay que definir para la actualizacion del widget -- !-- RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android -- com.es.kk.TransparentPanel xmlns:android=http://schemas.android.com/ apk/res/android android:id=@+id/relativo android:layout_width=wrap_content android:layout_height=wrap_content ImageView android:id=@+id/imagenWidget android:src=@drawable/tv android:layout_height=fill_parent android:layout_alignParentLeft=true android:layout_width=42dip/ ImageView android:id=@+id/barra android:src=@drawable/vertical android:layout_height=100dip android:layout_toRightOf=@id/imagenWidget android:layout_width=5dip/ TextView android:id=@+id/textoWidget android:layout_toRightOf=@id/barra android:layout_height=50dip android:gravity=center android:layout_width=50dip android:inputType=textMultiLine android:textSize=8sp /TextView ImageView android:id=@+id/barrahor android:src=@drawable/vvh android:layout_toRightOf=@id/barra android:layout_below=@+id/textoWidget android:layout_width=50dip android:layout_height=wrap_content android:adjustViewBounds=true/ Button android:id=@+id/btnborrarCron android:layout_below=@+id/barrahor android:layout_toRightOf=@id/ barra android:background=@drawable/custom_widget_button android:layout_height=match_parent android:drawableLeft=@drawable/ borrado android:layout_width=50dip android:textSize=8sp android:layout_centerVertical=true android:gravity=center_vertical android:paddingLeft=10dip /Button ImageView android:id=@+id/barra2 android:src=@drawable/vertical android:layout_height=100dip android:layout_toRightOf=@id/textoWidget android:layout_width=5dip/ Button android:id=@+id/textoWidgetCron android:layout_toRightOf=@id/barra2 android:text=hola android:background=@drawable/custom_widget_button android:layout_height=fill_parent android:gravity=center android:paddingTop=2dip android:layout_width=match_parent android:textSize=8sp /Button /com.es.kk.TransparentPanel Could you help me please? Many thanks and sorry for my english! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 database file
Hi, I implemented an database application on device. But i am unable to find where the database file is stored on sdcard. Please any one help me. Thanking you, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 sqlite database file
I implemented an database application on device. But i am unable to find where the database file is stored on sdcard. It's not stored on the SD card. Why do you think it should be there? Does your phone have internal memory? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Android sqlite database file
Hi, yeah my phone has internal memory, but how can i access the database file. Thanking you, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Extending RelativeLayout, overriding dispatchDraw() to create a zoomable ViewGroup - problem with child view clipping
Thanks Romain. I'm certainly well aware that the problem is my code and not in ViewGroup, and that one of the individual child Views will certainly not receive a scaled Canvas if it is invalidated. I think the reason for my confusion here -- and this will be down to my lack of knowledge about what goes on behind the scenes between invalidate() being called and the View's onDraw() subsequently being invoked -- is that I thought that the invalidation of a child View was somehow always cascaded down from the ViewGroup. My reason for thinking this is that, when a child view has invalidate() called, I can see that the ViewGroups's dispatchDraw() gets invoked first, prior to the child View's onDraw(). Furthermore, when I zoom in, I can see that the parts of the child Views that are being redrawn on the screen are always being drawn to the correct scale; it's just as though the clipping isn't being scaled. This was a further reason why I've perhaps mistakenly thought that the child View was aways being provided a scaled Canvas from my ViewGroup to draw on each time it was called to onDraw() following invalidate() being called on that child. Perhaps I'll just have to have my child Views all reference the parent View's zoom scale factor variable and individually scale themselves, perhaps having the ViewGroup and child Views all implementing an Interface that provides methods to delegate down the scale factor. No big deal in doing that; I was perhaps just trying to be too clever in my first approach, certainly too ambitious considering my Java / Android inexperience. Thanks, Trev On Jun 17, 2:22 am, Romain Guy romain...@android.com wrote: You are scaling the Canvas and not the View itself, the children have absolutely no knowledge that you are doing so. When invalidate() is invoked on the children, how could they know that you intend to scale them? They can't (unless you use Android 3.0+ and the new scale() method.) The problem is not in ViewGroup, it's in your code: you need to take the scale factor into account when you invalidate the children (call invalidate(left, top, right, bottom) on the parent instead.) On Thu, Jun 16, 2011 at 6:08 PM, Trev16v trev...@googlemail.com wrote: Hello, In my application I need to have a floor plan diagram which can be panned and zoomed. On this diagram are to be a series of small markers. Those little marker Views need to have invalidate() called frequently on them because the graphics drawn to their Canvas is being animated. I have been trying to implement an extended RelativeLayout, which I call ZoomableRelativeLayout, which would enable me to perform simultaneous zooming on all child Views of the ViewGroup. That is, the large floor plan graphic and its markers, all of which are child Views, will simultaneously zoom and pan together. In my ZoomableRelativeLayout, I have attempted to perform scaling (zooming) to the Canvas within the overridden dispatchDraw() method, like this: protected void dispatchDraw(Canvas canvas){ canvas.save(Canvas.MATRIX_SAVE_FLAG); canvas.scale(mScaleFactor, mScaleFactor); super.dispatchDraw(canvas); canvas.restore(); } The mScaleFactor is manipulated by a ScaleListener in the same class. It does actually work. I can pinch to zoom the ZoomableRelativeLayout, and all of the views held within properly rescale together. Except there's a problem. When the scale is 1, the animated child views are seen to redraw periodically perfectly fine. However, when the scale is other than 1, (e.g. when zooming in), those animated child views are only seen to update in a small clipped portion of their area - or not at all - depending on the zoom scale. The problem appears to be that the 'invalid area', or clipping area, for each view seems to remain as if no scaling had been applied to the Canvas in dispatchDraw(). If for example my ZoomableRelativeLayout were to contain a single, simple View that draws a filled rectangle, and it animated by flipping its colour every second via invalidate() and onDraw(), then at a zoom of 1 it'll appear as it should do. However, begin to gradually zoom in, the size of the square expands and moves away from its original position. The only part of the square that animates is whatever part of it still sits underneath that square's original 'area'. I have tried looking over the source for ViewGroup to see if I could spot any solution to this problem, and the best thing I could spot was to clear the FLAG_CLIP_CHILDREN via setClipChildren(false). Inspection of the source of ViewGroup seemed to suggest that clipping would no longer be applied, but unfortunately this change has had no visible effect and the problem persists. Probably worth mentioning is the fact that whenever I am actually zooming in and out, or when I'm panning the ViewGroup, all of the marker child View graphics *do* periodically redraw properly.
Re: [android-developers] Android sqlite database file
HI, its simple to check ur all data. use sqlite database browser. download it from its website. Steps to find the sqlite data from sdcard. - Go to DDMS-file explorer - click on mnt- Sdcard - choose ur desired project's data - and pull from sdcard(this option is in the corner of file explorer) - store ur database file in hard drive - Browse it using sqlite database browser. - :) - On Fri, Jun 17, 2011 at 2:29 PM, nageswara rao rajana nagu.raj...@gmail.com wrote: Hi, I implemented an database application on device. But i am unable to find where the database file is stored on sdcard. Please any one help me. Thanking you, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Error inflating class in custum relativelayout
The layout inflater is unable to find your transparent panel class. Make sure the class name is correct, and that the class is public. -- Kostya Vasilyev 17.06.2011 12:01 пользователь ABSOLUT davidt...@gmail.com написал: Hi, I'm trying to make a custom relativelayout but when I start the activity it fails: 06-17 09:57:23.253: ERROR/AndroidRuntime(526): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.es/com.es.KkActivity}: android.view.InflateException: Binary XML file line #4: Error inflating class com.es.kk.TransparentPanel 06-17 09:57:23.253: ERROR/AndroidRuntime(526): Caused by: android.view.InflateException: Binary XML file line #4: Error inflating class com.es.kk.TransparentPanel 06-17 09:57:23.253: ERROR/AndroidRuntime(526): Caused by: java.lang.ClassNotFoundException: com.es.kk.TransparentPanel in loader dalvik.system.PathClassLoader[/data/app/com.es-2.apk] .. My layout is: ?xml version=1.0 encoding=utf-8? !-- Broadcast Receiver que hay que definir para la actualizacion del widget -- !-- RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android -- com.es.kk.TransparentPanel xmlns:android=http://schemas.android.com/ apk/res/android android:id=@+id/relativo android:layout_width=wrap_content android:layout_height=wrap_content ImageView android:id=@+id/imagenWidget android:src=@drawable/tv android:layout_height=fill_parent android:layout_alignParentLeft=true android:layout_width=42dip/ ImageView android:id=@+id/barra android:src=@drawable/vertical android:layout_height=100dip android:layout_toRightOf=@id/imagenWidget android:layout_width=5dip/ TextView android:id=@+id/textoWidget android:layout_toRightOf=@id/barra android:layout_height=50dip android:gravity=center android:layout_width=50dip android:inputType=textMultiLine android:textSize=8sp /TextView ImageView android:id=@+id/barrahor android:src=@drawable/vvh android:layout_toRightOf=@id/barra android:layout_below=@+id/textoWidget android:layout_width=50dip android:layout_height=wrap_content android:adjustViewBounds=true/ Button android:id=@+id/btnborrarCron android:layout_below=@+id/barrahor android:layout_toRightOf=@id/ barra android:background=@drawable/custom_widget_button android:layout_height=match_parent android:drawableLeft=@drawable/ borrado android:layout_width=50dip android:textSize=8sp android:layout_centerVertical=true android:gravity=center_vertical android:paddingLeft=10dip /Button ImageView android:id=@+id/barra2 android:src=@drawable/vertical android:layout_height=100dip android:layout_toRightOf=@id/textoWidget android:layout_width=5dip/ Button android:id=@+id/textoWidgetCron android:layout_toRightOf=@id/barra2 android:text=hola android:background=@drawable/custom_widget_button android:layout_height=fill_parent android:gravity=center android:paddingTop=2dip android:layout_width=match_parent android:textSize=8sp /Button /com.es.kk.TransparentPanel Could you help me please? Many thanks and sorry for my english! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android sqlite database file
Hi, I want to extract db file from device. Thanking you, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android sqlite database file
Hi, i think you find you ans on this site http://pa.rezendi.com/2010/04/sqlite-on-android.html http://stackoverflow.com/questions/1209469/storing-android-application-data-on-sd-card On Fri, Jun 17, 2011 at 2:50 PM, nageswara rao rajana nagu.raj...@gmail.com wrote: Hi, I want to extract db file from device. Thanking you, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks and Regards, Ankit Kasliwal kasliwalankit2...@gmail.com +91-9300-940-136 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android sqlite database file
Hi Ankit, Thanks for the links. I will work on it and i will get back to you, if i get any issues. Thanking you, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android sqlite database file
Hi, Ok. On Fri, Jun 17, 2011 at 3:00 PM, nageswara rao rajana nagu.raj...@gmail.com wrote: Hi Ankit, Thanks for the links. I will work on it and i will get back to you, if i get any issues. Thanking you, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks and Regards, Ankit Kasliwal kasliwalankit2...@gmail.com +91-9300-940-136 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] click on component of ListView items
Hi All, I have five (5) component on my list items, i want to perform click action on a particular component of list items, not to the list. ex- My list have - checkcomp1textcomp2 Imagecomp3 textcomp4 imagecom5 --- checkcomp1textcomp2 Imagecomp3 textcomp4 imagecom5 --- checkcomp1textcomp2 Imagecomp3 textcomp4 imagecom5 --- checkcomp1textcomp2 Imagecomp3 textcomp4 imagecom5 --- checkcomp1textcomp2 Imagecomp3 textcomp4 imagecom5 --- checkcomp1textcomp2 Imagecomp3 textcomp4 imagecom5 --- I want to perform the click event on ImageCom3 component not to entire list items. Please help on this issue. -- Thanks Regards Rakesh Kumar Jha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] layout background image with full display
Hi all! When I'm setting a background image to an Linearlayout, it is displaying only while it necessary, depending on the displaying content in the layout. I would like t display the hole background image, independently on the inside content! Any idea?! Thanks guys: Károly Holczhauser -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Aw: click on component of ListView items
hi, just set the onclicklistener for the image view in the list adapter. something like that: ResourceCursorAdapter adapter = new ResourceCursorAdapter(getApplicationContext(), R.layout.list_events_entry, cursor, true) { public void bindView(View view, Context context, Cursor cursor) { ImageView status = (ImageView) view.findViewById(R.id.events_entry_status); status.setOnClickListener(l) hope it helps. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Aw: layout background image with full display
Did you set the property *android:layout_height* to *fill_parent* for the linearlayout? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Error inflating class in custum relativelayout
Many thanks! I don't notice that :-( Now I have other error but I cant understand why: 06-17 11:55:19.280: ERROR/AndroidRuntime(359): FATAL EXCEPTION: main 06-17 11:55:19.280: ERROR/AndroidRuntime(359): java.lang.NullPointerException 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.graphics.Canvas.drawRoundRect(Canvas.java:938) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.es.TransparentPanel.dispatchDraw(TransparentPanel.java:53) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1644) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.View.draw(View.java:6883) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.widget.FrameLayout.draw(FrameLayout.java:357) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1646) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1644) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.View.draw(View.java:6883) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.widget.FrameLayout.draw(FrameLayout.java:357) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1862) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.draw(ViewRoot.java:1522) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.performTraversals(ViewRoot.java:1258) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.handleMessage(ViewRoot.java:1859) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.os.Handler.dispatchMessage(Handler.java:99) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.os.Looper.loop(Looper.java:123) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.app.ActivityThread.main(ActivityThread.java:3683) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at java.lang.reflect.Method.invokeNative(Native Method) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at java.lang.reflect.Method.invoke(Method.java:507) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:839) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at dalvik.system.NativeStart.main(Native Method) My custom relativelayout is: package com.es; import android.content.Context; public class TransparentPanel extends RelativeLayout { private Paint innerPaint, borderPaint; public TransparentPanel(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub } public TransparentPanel (Context context) { super(context); init(); } private void init() { innerPaint = new Paint(); innerPaint.setARGB(225, 75, 75, 75); //gray innerPaint.setAntiAlias(true); borderPaint = new Paint(); borderPaint.setARGB(255, 255, 255, 255); borderPaint.setAntiAlias(true); borderPaint.setStyle(Style.STROKE); borderPaint.setStrokeWidth(2); } public void setInnerPaint(Paint innerPaint) { this.innerPaint = innerPaint; } public void setBorderPaint(Paint borderPaint) { this.borderPaint = borderPaint; } @Override protected void dispatchDraw(Canvas canvas) { RectF drawRect = new RectF(); drawRect.set(0,0, getMeasuredWidth(), getMeasuredHeight()); canvas.drawRoundRect(drawRect, 5, 5, innerPaint); canvas.drawRoundRect(drawRect, 5, 5, borderPaint); super.dispatchDraw(canvas); } } Could you help me? Many thanks again On 17 jun, 11:17, Kostya Vasilyev kmans...@gmail.com wrote: The layout inflater is unable to find your transparent panel class. Make sure the class name is correct, and that the class is public. -- Kostya Vasilyev 17.06.2011 12:01 пользователь ABSOLUT davidt...@gmail.com написал: Hi, I'm trying to make a custom relativelayout but when I start the activity it fails: 06-17 09:57:23.253: ERROR/AndroidRuntime(526): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.es/com.es.KkActivity}: android.view.InflateException: Binary XML file line #4: Error inflating
Re: [android-developers] layout background image with full display
set layout.width and height to fill_parent 2011/6/17 Károly Holczhauser holczhau...@gmail.com: Hi all! When I'm setting a background image to an Linearlayout, it is displaying only while it necessary, depending on the displaying content in the layout. I would like t display the hole background image, independently on the inside content! Any idea?! Thanks guys: Károly Holczhauser -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Nasreen Ustad -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: layout background image with full display
r u creating some splash screen type form, or what exactly u r doing? 2011/6/17 Károly Holczhauser holczhau...@gmail.com: Hi! I'm have to do this task on runtime, but yes, of course I had set the fill parent parameters! On jún. 17, 11:52, jjoe64 g.jjo...@googlemail.com wrote: Did you set the property *android:layout_height* to *fill_parent* for the linearlayout? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Nasreen Ustad -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 background image with full display
Hi! I'm have to do this task on runtime, but yes, of course I had set the fill parent parameters! On jún. 17, 11:52, jjoe64 g.jjo...@googlemail.com wrote: Did you set the property *android:layout_height* to *fill_parent* for the linearlayout? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 change image in android while switching between activities
in my app in activity A i have a list view showing some details along with an image at the bottom and a button at the top. When the user clicks in the list it opens a new activity B. If the user clicks the back button he returns back to activity A and there i want to show a new Image in the image View. In iPhone we are to use a method called View will appear. like that is there any method in android. How to do this, please help me friends. -- K Siva Sankar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Aw: how to change image in android while switching between activities
hi when you click the back button and the activity A comes, the code method ActivityA#onResume will be called. maybe that helps you. furthermore you should have a look at the method Activity#startActivityForResult http://developer.android.com/reference/android/app/Activity.html#StartingActivities for more information -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 library to use camera in android
I want to know is there any common library for camera that can be used in all android devices. Because when i started my app in that works on image capture i write my own code and others code from some blogs, but the response differs for each devices. In motorola milestone the default image capture is to be landscape but i needed it for portrait because of that images look blurred. The same code works good in HTC and Nexus so i thought it to be the problem with the motorola device. Later i found the default camera works good and fine. So i changed the code as follows public void camera() { Log.e(camera action,Strated); String fileName = temp.jpg; ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE,fileName); mCapturedImageURI = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.ACTION_IMAGE_CAPTURE, capturedImage); intent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageURI); startActivityForResult(intent, Appconstant.CAPTURE_PICTURE_INTENT); } this time the code works good in all device but i am unable to locate the path were the image gets stored. So i created the external directory to save my images with a timeStampFormat as a name for my images. And now in my HTC device, only the name seems to be appeared and not the image. Image gets stored in its default position as sdcard/dcim/camera When i checked with all devices the default position for saving the images gets varied. How to get my camera app fit for all android device. Else how to know the place where the images getting stored in the all android devices. -- K Siva Sankar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: revoke permissions to access google auth tokens
Well, I came here only after realizing how bad I was at it in this particular case. Should the accounts administration help revoke access even for android devices/apps? The list there doesn't show android apps allowed access to the google account. https://www.google.com/accounts/IssuedAuthSubTokens Nor does google apps dashboard help. Help me revoke access to an android app already granted access to a google account either through the device or google accounts through any browser. Thanks RS On Jun 16, 5:01 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Fri, Jun 17, 2011 at 12:47 AM, RS rajeshs...@gmail.com wrote: community seemingly has no idea on this ... could anybody from google perhaps answer Use your Google powers to google it. Hint: it's not done on the phone. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Error inflating class in custum relativelayout
The logcat says: 06-17 11:55:19.280: ERROR/AndroidRuntime(359): *java.lang.NullPointerException* 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.graphics.Canvas.drawRoundRect(Canvas.java:938) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at *com.es.TransparentPanel.dispatchDraw(TransparentPanel.java:53) * Your code calls canvas.drawRoundRect with something that's null. Specifically, it's the paint object. It's null because you code doesn't call init() from the first constructor. And the first constructor is what's used for loading views from XML. Whenever you see the Auto-generated constructor stub comment, it's a hint to examine the code and make sure it makes sense. The TODO is there to remind about this, and shows in Eclipse's task view. -- Kostya 2011/6/17 ABSOLUT davidt...@gmail.com Many thanks! I don't notice that :-( Now I have other error but I cant understand why: 06-17 11:55:19.280: ERROR/AndroidRuntime(359): FATAL EXCEPTION: main 06-17 11:55:19.280: ERROR/AndroidRuntime(359): java.lang.NullPointerException 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.graphics.Canvas.drawRoundRect(Canvas.java:938) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.es.TransparentPanel.dispatchDraw(TransparentPanel.java:53) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1644) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.View.draw(View.java:6883) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.widget.FrameLayout.draw(FrameLayout.java:357) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1646) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1644) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.View.draw(View.java:6883) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.widget.FrameLayout.draw(FrameLayout.java:357) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1862) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.draw(ViewRoot.java:1522) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.performTraversals(ViewRoot.java:1258) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.handleMessage(ViewRoot.java:1859) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.os.Handler.dispatchMessage(Handler.java:99) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.os.Looper.loop(Looper.java:123) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.app.ActivityThread.main(ActivityThread.java:3683) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at java.lang.reflect.Method.invokeNative(Native Method) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at java.lang.reflect.Method.invoke(Method.java:507) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:839) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at dalvik.system.NativeStart.main(Native Method) My custom relativelayout is: package com.es; import android.content.Context; public class TransparentPanel extends RelativeLayout { private Paint innerPaint, borderPaint; public TransparentPanel(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub } public TransparentPanel (Context context) { super(context); init(); } private void init() { innerPaint = new Paint(); innerPaint.setARGB(225, 75, 75, 75); //gray innerPaint.setAntiAlias(true); borderPaint = new Paint(); borderPaint.setARGB(255, 255, 255, 255); borderPaint.setAntiAlias(true); borderPaint.setStyle(Style.STROKE); borderPaint.setStrokeWidth(2); } public void setInnerPaint(Paint innerPaint) { this.innerPaint = innerPaint; } public void setBorderPaint(Paint borderPaint) { this.borderPaint = borderPaint; } @Override protected void dispatchDraw(Canvas canvas) { RectF drawRect = new RectF();
[android-developers] Re: layout background image with full display
Hi everybody! Okay, I'm now doing a video gallery, which have a lot of Thumbnail picture. When a user click on an item a new Activity is starting: I have to display the Thumbnail picture (layout bg) for the user (in a full size) and I also need to place an play icon over it. I don't know how can I do the overlaying, but first I would be happy with the background. please see the design: http://digitus.itk.ppke.hu/~holkazs/videogallery Here you see the expected result after the click. I'm trying to display the picture as the bg of a layout. If anybody can give me a WORKING overlay example then it will be okay too :) Thank you so much: Károly -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Aw: Object Structure
hi you shouldn't hold munch data structure in objects because of the low memory on mobile devices. Instead you should use the sqlite feature and query, update, delete through a Content Provider. Don't work with Lists of Maps (ListMapString, Object) or something like that for data storing. I'm currently refactoring my app because I did that (similar) mistake. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Object Structure
Hi I have few data in object structure and the same is being used to display the data on GUI. Is it a good idea to maintain my data and make all updates on the data object itself? - In other words MVC pattern. Or I should not keep any values in object (in-memory) since it might hold some of the system resources? What is the best practice? -- - Prakash. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Aw: Object Structure
Hi I am using ArrayListHashMapString, String mylist = new ArrayListHashMapString, String(); to assign data into ListView So rather than doing this are you advising that we can directly talk to GUI components and display the content? Thanks Siva On Fri, Jun 17, 2011 at 4:46 PM, jjoe64 g.jjo...@googlemail.com wrote: hi you shouldn't hold munch data structure in objects because of the low memory on mobile devices. Instead you should use the sqlite feature and query, update, delete through a Content Provider. Don't work with Lists of Maps (ListMapString, Object) or something like that for data storing. I'm currently refactoring my app because I did that (similar) mistake. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- - Prakash. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android sqlite database file
u easily get exact db file . use these steps On Fri, Jun 17, 2011 at 3:04 PM, Ankit Kasliwal kasliwalankit2...@gmail.com wrote: Hi, Ok. On Fri, Jun 17, 2011 at 3:00 PM, nageswara rao rajana nagu.raj...@gmail.com wrote: Hi Ankit, Thanks for the links. I will work on it and i will get back to you, if i get any issues. Thanking you, Nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks and Regards, Ankit Kasliwal kasliwalankit2...@gmail.com +91-9300-940-136 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Re: revoke permissions to access google auth tokens
On Fri, Jun 17, 2011 at 8:07 PM, RS rajeshs...@gmail.com wrote: Well, I came here only after realizing how bad I was at it in this particular case. You should probably says so and say what you tried so far, instead of just 'oh you guys obviously have no clue'. Might not be the best strategy to gen an answer. Should the accounts administration help revoke access even for android devices/apps? The list there doesn't show android apps allowed access to the google account. https://www.google.com/accounts/IssuedAuthSubTokens Nor does google apps dashboard help. Help me revoke access to an android app already granted access to a google account either through the device or google accounts through any browser. Which particular app? At least for me, Chrome to Phone shows in the IssuedAuthSubTokens page. If the app is using ClientLogin, it won't show up there though. I don't think there is an UI for manging granted tokens in Android, but if you are doing this in code, you might want to look at AccountManager. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Aw: Re: [android-developers] Aw: Object Structure
oh that's really bad practice. your listview has to use a listadapter (e.g. ResourceCursorAdapter) that adapter connects your content provider and there you can perform SQL queries to read the data from db. first it looks a little bit complicated but you should really use this, not only for performance. this is an article about implementing a content provider. http://thinkandroid.wordpress.com/2010/01/13/writing-your-own-contentprovider/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Text view over image gallery
Hi u can use frame layout. On Fri, Jun 17, 2011 at 12:42 PM, Randy rendy.hadin...@gmail.com wrote: Anyone help me please... On May 24, 9:16 am, Randy rendy.hadin...@gmail.com wrote: How can i makeTextviewoverimagegallery like pulse news reader's UI? Anyone can help 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Broadcasts within an APK
I tested it and it seems to work. Another great benefit is it allows you to target APKs other than your own. Also, it has been around since Android 1.6 (API 4) http://developer.android.com/reference/android/content/Intent.html#setPackage(java.lang.String) Thank you for your help! On Jun 16, 6:35 pm, Mark Murphy mmur...@commonsware.com wrote: Use setPackage() on the Intent, though I think this only showed up with Android 2.2. On Thu, Jun 16, 2011 at 11:57 AM, Alan alan.gard...@gmail.com wrote: Hi, Is it possible to have broadcasts that are only sent within an APK? I know that I can secure a broadcast using a custom permission string that I declare in the manifest. However, I do not want the user to have to approve a random permission just for internal usage. Also, I definitely don't want other APKs to have access to the broadcasts by using that permission. The broadcasts will have very sensitive data in them. The only idea I have to get around this issue is to emulate broadcasts using service Intents and an observer pattern. Any other ideas? Best, Alan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with Handlers and Thread to change the UI.
I need to use Thread / Runnable / sleep() because in future I have to use a Controller that manages many widgets. I've tried with your suggestion, and it works very nice. Now it works with the following code : do{ message1 = Message.obtain(); SystemClock.sleep(sleep_time); message1.what=x + 10; x=message1.what; handler1.sendMessage(message1); } while (!Thread.currentThread().isInterrupted()); Can you explain me why it didn't work without Message.obtain() at each sendMessage() Thank you very much !!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Display tearing Issue
Hi, I have an display tearing issue when move from setting application to home screen. Steps: Open setting application in portrait Move back to home screen using home key button. Issue: For 1 ~ 2 second, part of home screen displayed as black and after that it getting displayed correctly. Question: What could be reason for the above behavior? It would be better if i can get components which might be involved? This behavior not observer at all time. 5 out of 10. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Broadcasts within an APK
On Fri, Jun 17, 2011 at 8:37 AM, Alan alan.gard...@gmail.com wrote: I tested it and it seems to work. Another great benefit is it allows you to target APKs other than your own. Also, it has been around since Android 1.6 (API 4) http://developer.android.com/reference/android/content/Intent.html#setPackage(java.lang.String) Huh. Wonder why I have it in my head that it showed up more recently than that... Anyway, glad it works for you! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Aw: Display tearing Issue
is there anything relevant in the logcat? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Problem with Handlers and Thread to change the UI.
It's pretty much what it said in your original logcat: 06-15 15:49:11.467: ERROR/AndroidRuntime(271): android.util.AndroidRuntimeException: { what=6 when=56421 } *This message is already in use.* A message posted to a Handler is in use until it's delivered to the other side, at which point it becomes free again. -- Kostya 2011/6/17 andorid.italia giancarlo.capon...@gmail.com I need to use Thread / Runnable / sleep() because in future I have to use a Controller that manages many widgets. I've tried with your suggestion, and it works very nice. Now it works with the following code : do{ message1 = Message.obtain(); SystemClock.sleep(sleep_time); message1.what=x + 10; x=message1.what; handler1.sendMessage(message1); } while (!Thread.currentThread().isInterrupted()); Can you explain me why it didn't work without Message.obtain() at each sendMessage() Thank you very much !!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Text view over image gallery
If you use a FrameLayout, the views are layered by the time they are defined. For example, if you have a FrameLayout with a TextView and an ImageView, the one that is defined FIRST will be on the bottom, and the one that is defined second would be on top. Take a look at the developer docs for more details. http://developer.android.com/reference/android/widget/FrameLayout.html On May 23, 10:16 pm, Randy rendy.hadin...@gmail.com wrote: How can i make Text view over image gallery like pulse news reader's UI? Anyone can help 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: revoke permissions to access google auth tokens
Sorry if that reply instigated these comments. Am glad you still had patience to respond. Chrome to phone is probably showing up there having a server side component. As explained in the fist post, am looking for ways to revoke google account access granted to android apps on the phone. Nope, account manager doesn't help users. Once an app has gained the cookie/token through the account manager, it is pretty much out of the way. While I found revoking is possible for google app engine based apps, am still hunting for the right answer w.r.t android apps. And including this thread, there is no relevant answer on the Internet. And am hoping that is incorrect and that it would be possible for an user to clear access granted for individual android apps to a particular google account. But cold somebody confirm this to be true or false: Since the same auth token as the android system's is shared with third party apps, there is no way to distinguish requests from arbitrary apps using this token. Hence revoking on per app basis is ruled out. The app has access to all google stuff till the android system's token remains valid on the server. Okay that is acceptable but in any case, how to revoke access granted to an android app (account by account)? On first attempt by an app, the android system throws its own activity asking user to allow or deny an app from accessing tokens of a particular google account. Don't tokens expire? Second time on, the android system doesn't invoke user interaction to grant access. The app simply gets a copy of the (new) token. Clearing out access to all android apps allowed access to tokens is an acceptable workaround. But for which google's android apps should I clear data/cache on android? Please clarify. AccountManager document doesn't answer this. AOSP on source.android.com doesn't have relevant code to clear tokens etc. Thanks for your time, RS On Jun 17, 12:35 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Fri, Jun 17, 2011 at 8:07 PM, RS rajeshs...@gmail.com wrote: Well, I came here only after realizing how bad I was at it in this particular case. You should probably says so and say what you tried so far, instead of just 'oh you guys obviously have no clue'. Might not be the best strategy to gen an answer. Should the accounts administration help revoke access even for android devices/apps? The list there doesn't show android apps allowed access to the google account. https://www.google.com/accounts/IssuedAuthSubTokens Nor does google apps dashboard help. Help me revoke access to an android app already granted access to a google account either through the device or google accounts through any browser. Which particular app? At least for me, Chrome to Phone shows in the IssuedAuthSubTokens page. If the app is using ClientLogin, it won't show up there though. I don't think there is an UI for manging granted tokens in Android, but if you are doing this in code, you might want to look at AccountManager. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 tearing Issue
Thanks for your response. Actually, The tearing happens because I see the overlapping of the background wall paper on top of the home screen image. From logs, I can observe calls related to copybit and libagl and wallpaper service along with intent=HOME. For composition of surfaces I use display engine instead of graphics. On Jun 17, 5:54 pm, jjoe64 g.jjo...@googlemail.com wrote: is there anything relevant in the logcat? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: revoke permissions to access google auth tokens
Simplifying the question: Am looking for answers from developers (or google engineers) who have used accountManager.getAuthToken() and have come across such a screen for their own apps: http://www.appbrain.com/info/fastweb2.png or http://chiarg.com/?p=429 Once the user clicks 'allow', how could they undo this action for that particular android app+account? Regards, RS On Jun 17, 2:59 pm, RS rajeshs...@gmail.com wrote: Sorry if that reply instigated these comments. Am glad you still had patience to respond. Chrome to phone is probably showing up there having a server side component. As explained in the fist post, am looking for ways to revoke google account access granted to android apps on the phone. Nope, account manager doesn't help users. Once an app has gained the cookie/token through the account manager, it is pretty much out of the way. While I found revoking is possible for google app engine based apps, am still hunting for the right answer w.r.t android apps. And including this thread, there is no relevant answer on the Internet. And am hoping that is incorrect and that it would be possible for an user to clear access granted for individual android apps to a particular google account. But cold somebody confirm this to be true or false: Since the same auth token as the android system's is shared with third party apps, there is no way to distinguish requests from arbitrary apps using this token. Hence revoking on per app basis is ruled out. The app has access to all google stuff till the android system's token remains valid on the server. Okay that is acceptable but in any case, how to revoke access granted to an android app (account by account)? On first attempt by an app, the android system throws its own activity asking user to allow or deny an app from accessing tokens of a particular google account. Don't tokens expire? Second time on, the android system doesn't invoke user interaction to grant access. The app simply gets a copy of the (new) token. Clearing out access to all android apps allowed access to tokens is an acceptable workaround. But for which google's android apps should I clear data/cache on android? Please clarify. AccountManager document doesn't answer this. AOSP on source.android.com doesn't have relevant code to clear tokens etc. Thanks for your time, RS On Jun 17, 12:35 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Fri, Jun 17, 2011 at 8:07 PM, RS rajeshs...@gmail.com wrote: Well, I came here only after realizing how bad I was at it in this particular case. You should probably says so and say what you tried so far, instead of just 'oh you guys obviously have no clue'. Might not be the best strategy to gen an answer. Should the accounts administration help revoke access even for android devices/apps? The list there doesn't show android apps allowed access to the google account. https://www.google.com/accounts/IssuedAuthSubTokens Nor does google apps dashboard help. Help me revoke access to an android app already granted access to a google account either through the device or google accounts through any browser. Which particular app? At least for me, Chrome to Phone shows in the IssuedAuthSubTokens page. If the app is using ClientLogin, it won't show up there though. I don't think there is an UI for manging granted tokens in Android, but if you are doing this in code, you might want to look at AccountManager. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 does launcher get the applications' icons and corresponding text
Dear all, I encountered with a question. Where and how does the launcher get the icon and text of the application which has be installed in the phone, Is this information stored in database, or any other way else? and how can I get another app's icon which is showed on launcher from another my own. Best 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
Re: [android-developers] Re: Market total # of downloads stuck?
They seem to be stuck again. I did get an email from them when I contacted them and they said that the numbers were fixed, and they were. But it seems that they just get stuck for a while and update, so I'm not really that worried anymore, unless it persists for a few more days. On Thu, Jun 16, 2011 at 10:18 PM, patw pmk...@gmail.com wrote: I got email from Google that my download count was fixed on Monday 11am PST. I checked and it was fixed. However it is broken again. I have not gotten any updates since Monday. I have sent them another request for help. I wonder how everyone else is doing? Have your problem been fixed? On Jun 10, 10:09 am, patw pmk...@gmail.com wrote: Here's how I filed my problem report: developer console - Help - Publishing Issues - Fill in the Publishing Issues Form. On Jun 10, 7:15 am, Adam Ratana adam.rat...@gmail.com wrote: If you don't mind, what facility did you use to contact them? I would like to also ask some questions about some uncharged (and now expired) authorizations that have happened, as well as add to their reports about this problem. On Thu, Jun 9, 2011 at 10:17 PM, patw pmk...@gmail.com wrote: I contacted the Android Market Team. They responded pretty quickly. They said they are aware of reports of this problem from some developers and are striving to resolve the problem as soon as possible. On Jun 9, 10:26 am, Stephen Damm shinhalsa...@gmail.com wrote: On 6/9/2011 10:48 AM, Mike wrote: yes, I have one at 133% On Jun 9, 8:09 am, Adam Ratanaadam.rat...@gmail.com wrote: Has anyone else notice the total # of downloads has beenstuckthe last few days in the market stats? Mine has stayed the same for my apps, while the # of active installs has increased. For example, for one app, the # of active installs is now than the total # of downloads and the active install% is 101%. Mine isstuckas well over the last week. I'm expecting the numbers to flood in eventually with a flood of comments... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Adam Ratana adam.rat...@gmail.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 -- Adam Ratana adam.rat...@gmail.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: Facebook social plugin in android.
If this upcoming API doesn't work, there is a facebook API, you can find it. Kris On Jun 17, 2011 1:55 AM, Zsolt Vasvari zvasv...@gmail.com wrote: I believe this will be part of the upcoming Bollywood API: http://groups.google.com/group/android-developers/browse_thread/thread/3e7d0716e2d29605# On Jun 17, 1:43 pm, maliha malihamari...@gmail.com wrote: After implementing the facebook rec... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Why does home screen widget confuse land/port images?
I think there is a bug somehow on the Android OS. I'm using HTC EVO which on the home screen it never goes to landscape as it was intended by HTC. *Here is my setup:* drawable-port/button_image_on.png drawable-port/button_image_off.png drawable-land/button_image_on.png drawable-land/button_image_off.png On my home screen widget I toggle the images depending on the received broadcast intent. This is what I use to change the image from within the AppWidgetProvider: if (toggleOn) { views.setImageViewResource(R.id.button_image_on, R.drawable.button_image_on); } else { views.setImageViewResource(R.id.button_image_on, R.drawable.button_image_off); } The problem I'm having is that some cases the land images are shown when the phone is in port mode. To reproduce easily from my application I send a broadcast intent to toggle image state on the widget. I send this intent while the app is in landscape mode. Than when I got to the homescreen bam! the widget in port mode is using a land image! Odd right? Anyone run into a similar issue? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Can Android destroy my Activity without killing the process in which it's created?
Hi, I have a question: Can Android destroy my Activity without killing the process in which it's created? According to the documentation (http://developer.android.com/guide/ topics/fundamentals/activities.html) it seems possible. onDestroy() method could be called: either because the activity is finishing (someone called finish() on it), or because the system is temporarily destroying this instance of the activity to save space. Could you give me a possible scenario if it happens? What about service? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why does home screen widget confuse land/port images?
You might have different images for different screen orientations, but the names of the images are the same: button_image_on.png button_image_off.png Because the names are the same the OS doesn't know which you want it to show. Putting the images in different subfolders doesn't matter, as the Resource file that is created for you doesn't consider those, only the names of the items in the folders (which are set as the id). The only way you get what you want is to change the names of the images... Maybe you could use: button_port_on.png button_port_off.png button_land_on.png button_land_off.png On 17 jun, 16:48, Jona medicalsou...@gmail.com wrote: I think there is a bug somehow on the Android OS. I'm using HTC EVO which on the home screen it never goes to landscape as it was intended by HTC. *Here is my setup:* drawable-port/button_image_on.png drawable-port/button_image_off.png drawable-land/button_image_on.png drawable-land/button_image_off.png On my home screen widget I toggle the images depending on the received broadcast intent. This is what I use to change the image from within the AppWidgetProvider: if (toggleOn) { views.setImageViewResource(R.id.button_image_on, R.drawable.button_image_on);} else { views.setImageViewResource(R.id.button_image_on, R.drawable.button_image_off); } The problem I'm having is that some cases the land images are shown when the phone is in port mode. To reproduce easily from my application I send a broadcast intent to toggle image state on the widget. I send this intent while the app is in landscape mode. Than when I got to the homescreen bam! the widget in port mode is using a land image! Odd right? Anyone run into a similar issue? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Couldn't be excuted after a button click
Hi, i wonder what's wrong with this part of the code,,please it's couldn't be executed , the button in which is done is still static. Peace, Gaara final Thread checkUpdate = new Thread() { public void run() { EditText name = (EditText) findViewById(R.id.userName); EditText firstname = (EditText) findViewById(R.id.userFirstName); EditText mail = (EditText) findViewById(R.id.userMail); EditText phone = (EditText) findViewById(R.id.userPhone); User u = new User(); u.setFirstname(firstname.getText().toString()); u.setLastname(name.getText().toString()); u.setMail(mail.getText().toString()); u.setPhone(phone.getText().toString()); final UserController uc = new UserController(); try { uc.create(u); } catch (Exception e) { return; final Intent intent = new Intent(AddUserActivity.this, GaeHomeScreen.class); startActivity(intent); } }; checkUpdate.start(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Shape having two sided border
I'm not sure there is any XML way of doing this. You can extend TextView (or whatever is the view that you are looking to have this border on) and implement this in the onDraw. There should also be a way to write a Drawable and do this which can then be extended to any View but I don't know enough to suggest. On Fri, Jun 17, 2011 at 3:41 AM, Sapna Srivastav sapna.ari...@gmail.comwrote: I am still getting the four boundaries on the layout. On Jun 16, 11:58 am, Rajiv rajiv...@gmail.com wrote: Use the following shape tag: padding android:left=1dp android:top=0dp android:right=1dp android:bottom=0dp / On Thu, Jun 16, 2011 at 12:06 PM, Sapna Srivastav sapna.ari...@gmail.comwrote: Hi all. I would like to create a layout having a shape that has border only on 2 sides: left and right, i.e. I want top and bottom to be open. How can I achieve that defining shape in XML? Currently I have a normal 4 side border using the following shape XML definition: ?xml version=1.0 encoding=utf-8? shape xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent solid android:color=#FF / stroke android:width=1dp android:color=#FF / padding android:left=1dp android:top=1dp android:right=1dp android:bottom=1dp / /shape Please help, its urgent. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Re: Why does home screen widget confuse land/port images?
Using -port and -land qualifiers, with same image name, is the right thing to do. This leverages the usual resource loading mechanism when those images are accessed by the launcher. Managing images per orientation from code is a path leading only to pain and madness, as that requires tracking the home screen's orientation (which, in the general sense, may not be the same as the device's, and often is not). Jona, Make sure that every single RemoteViews object you push to the widget has all the images (and text and pending intents) that bring it up to date. Do not push one update for a button, another for a line of text, and then yet another for a pending intent. All but the most recent one will be lost after an orientation change. -- Kostya 2011/6/17 ThaMe90 theprophes...@gmail.com You might have different images for different screen orientations, but the names of the images are the same: button_image_on.png button_image_off.png Because the names are the same the OS doesn't know which you want it to show. Putting the images in different subfolders doesn't matter, as the Resource file that is created for you doesn't consider those, only the names of the items in the folders (which are set as the id). The only way you get what you want is to change the names of the images... Maybe you could use: button_port_on.png button_port_off.png button_land_on.png button_land_off.png On 17 jun, 16:48, Jona medicalsou...@gmail.com wrote: I think there is a bug somehow on the Android OS. I'm using HTC EVO which on the home screen it never goes to landscape as it was intended by HTC. *Here is my setup:* drawable-port/button_image_on.png drawable-port/button_image_off.png drawable-land/button_image_on.png drawable-land/button_image_off.png On my home screen widget I toggle the images depending on the received broadcast intent. This is what I use to change the image from within the AppWidgetProvider: if (toggleOn) { views.setImageViewResource(R.id.button_image_on, R.drawable.button_image_on);} else { views.setImageViewResource(R.id.button_image_on, R.drawable.button_image_off); } The problem I'm having is that some cases the land images are shown when the phone is in port mode. To reproduce easily from my application I send a broadcast intent to toggle image state on the widget. I send this intent while the app is in landscape mode. Than when I got to the homescreen bam! the widget in port mode is using a land image! Odd right? Anyone run into a similar issue? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why does home screen widget confuse land/port images?
Unless I'm not understanding, I don't think what you are saying is valid. If you are trying to provide a different look/image for a view in land and port, you should name the file the same and place them inside the respective drawable folders. drawable-land and drawable-port. This should technically work but in this particular scenario it doesn'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
Re: [android-developers] Re: Why does home screen widget confuse land/port images?
Thanks for your reply. Yes, I currently update everything at once. What I'm seeing is that I also have a different design layout for land and port... I'm wondering how that could affect it... final RemoteViews views = new RemoteViews(ctx.getPackageName(), R.layout.widget_main_4x1); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Couldn't be excuted after a button click
Hi, i wonder what's wrong with this part of the code,,please it's couldn't be executed , the button in which is done is still static. Peace, Gaara final Thread checkUpdate = new Thread() { public void run() { EditText name = (EditText) findViewById(R.id.userName); EditText firstname = (EditText) findViewById(R.id.userFirstName); EditText mail = (EditText) findViewById(R.id.userMail); EditText phone = (EditText) findViewById(R.id.userPhone); User u = new User(); u.setFirstname(firstname.getText().toString()); u.setLastname(name.getText().toString()); u.setMail(mail.getText().toString()); u.setPhone(phone.getText().toString()); final UserController uc = new UserController(); try { uc.create(u); } catch (Exception e) { return; final Intent intent = new Intent(AddUserActivity.this, GaeHomeScreen.class); startActivity(intent); } }; checkUpdate.start(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How does launcher get the applications' icons and corresponding text
On Fri, Jun 17, 2011 at 9:31 AM, June_Hello junehelloworld.he...@gmail.comwrote: I encountered with a question. Where and how does the launcher get the icon and text of the application which has be installed in the phone, Is this information stored in database, or any other way else? and how can I get another app's icon which is showed on launcher from another my own. Any time you want information about other packages installed on the device, first stop should be PackageManager. - 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: Why does home screen widget confuse land/port images?
Having different designs for port and land is fine, as long as you have two files with the same name (for land and port). If you are using res/layout-land and res/layout-port, you might want to try and rename res/layout-port to just res/layout. -- Kostya 2011/6/17 Jona medicalsou...@gmail.com Thanks for your reply. Yes, I currently update everything at once. What I'm seeing is that I also have a different design layout for land and port... I'm wondering how that could affect it... final RemoteViews views = new RemoteViews(ctx.getPackageName(), R.layout.widget_main_4x1); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Couldn't be excuted after a button click
ok, i'll bite. at least i have no clue what you are asking and hence cannot help. you say it couldn't be executed. what do you actually mean? as an example the below code start's the activity only when there is an exception. is that what you wanted? or is that how you cut paste? On Fri, Jun 17, 2011 at 11:18 AM, gaara amellal.kamili...@gmail.com wrote: Hi, i wonder what's wrong with this part of the code,,please it's couldn't be executed , the button in which is done is still static. Peace, Gaara final Thread checkUpdate = new Thread() { public void run() { EditText name = (EditText) findViewById(R.id.userName); EditText firstname = (EditText) findViewById(R.id.userFirstName); EditText mail = (EditText) findViewById(R.id.userMail); EditText phone = (EditText) findViewById(R.id.userPhone); User u = new User(); u.setFirstname(firstname.getText().toString()); u.setLastname(name.getText().toString()); u.setMail(mail.getText().toString()); u.setPhone(phone.getText().toString()); final UserController uc = new UserController(); try { uc.create(u); } catch (Exception e) { return; final Intent intent = new Intent(AddUserActivity.this, GaeHomeScreen.class); startActivity(intent); } }; checkUpdate.start(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: revoke permissions to access google auth tokens
On Fri, Jun 17, 2011 at 11:21 PM, RS rajeshs...@gmail.com wrote: Simplifying the question: Am looking for answers from developers (or google engineers) who have used accountManager.getAuthToken() and have come across such a screen for their own apps: http://www.appbrain.com/info/fastweb2.png or http://chiarg.com/?p=429 Once the user clicks 'allow', how could they undo this action for that particular android app+account? It seems that there is no public API to do this. AccountMangerService has a revokeAppPermission() method which is both hidden (with @hide) and not accessible via public APIs. You could probably call it using reflection, but that is usually not recommended. BTW, access to tokens is granted by UID, so it's not global for all applications. Check out /data/system/accounts.db for more details if you have a rooted device. HTH -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: STL android
yeah! i need to pass a pointer to a STL structure which is updated by each user interaction :-( I also have readen about NativeActivity but it also needs JNI in some way ... and passing the STL structures will be a requirement, yet. I only can package data into an own streaming if there is a second (concurrent) application runnning (implementing the STL functionality). Is it possible ? or .. does it nedd natibe activity regards Hector Other pssibility On Jun 17, 2:54 am, RichardC richard.crit...@googlemail.com wrote: I don't pass any STL structures across JNI, I pack/unpack just the data I need in to basic types or arrays of basic types, doing my own simple streaming as required. My application is a board game with the next move calculator in C++ and the UI (and game state) in Java, so there is not much to transfer between the two layers. If you have a lot of state you need to pass back and forth between C++ and Java I suggest you have a look at NativeActivity (I am just starting this myself - so I can be much help here). It looks like it by subclassing the Java NativeActivity class it should be possible to keep my entire engine (and it's state) in C++ and pass just the UI events across the JNI interface. I have not tried this yet - I can feel a test project coming on. On Jun 16, 10:06 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hey Richard, thanks for helping ... in fact, i have installed SDK-NDK, read the CPLUSPLUS-SUPPORT.html doc, and preparing to compile my C++ STL stuff, but what i really am afraid is of JNI. There are interfaces depending of the filed's types, and i dont realize how to pass STL structures or pointers to them. I wonder if you have a kind of hello- jni example which you can share in this thread ? kriss, i agree with you, but development time is a real constraint :- ( On Jun 16, 3:25 pm, RichardC richard.crit...@googlemail.com wrote: Hi, I have a big lump of STL code that is building sucessfully using the latest release of the Android-ndk (r5c). It just need a few tweaks. It is called from Java via JNI as needed. I sugguest you download the NDK:http://developer.android.com/sdk/ndk/index.html and read the docs specifically CPLUSPLUS-SUPPORT.html If you have any questions I will try and help. On Jun 16, 4:55 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hi guys, I would like to migrate a c/c++ (linux fedora 14) application to android 2.2. Because this will be my first migration, i have some questions about the procedure: 1. considering it has some STL stuff, i wonder if it will work. I specially use vector, set, map and algoritms (set_union, set_intersection, set_difference). 2. as i understand i have to write -first- a Java-JNI application which declares and interface my c functions and c++ methods. Those methods willl be included into one (or many) shared libraries ... is it ok ? ... may somebody advise me a good JNI tutorial ? ... i don like the ones i've found :-( 3- once ready, i must use the NDK toolset in order to generate the android application ... hopefully i will works.. I am worried because the NDK info says to have a A Minimal set of headers for C++ support ... and i wonder if STL works or not ... but, NDK r5 - android - suposse to also hav support for STLport ... does any body has the hello-jni file modifyied for STL suppport ? NDK Doc also says that Applications that use native activities must be run on Android 2.3 (API Level 9) or later, but as i understand, i will also needs JNI .. may somebody make some comments about it ? finally, may somebody share me a JNI example in order to pass some STL functions between java and c++ ? comments are wellcome. regards, thanks in advance hector -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Couldn't be excuted after a button click
Thanks for replay, i want to execute the thread when i click a button, but still no response it normally must pass to GaeHomeScreen activity . On Jun 17, 3:25 pm, Prakash Iyer thei...@gmail.com wrote: ok, i'll bite. at least i have no clue what you are asking and hence cannot help. you say it couldn't be executed. what do you actually mean? as an example the below code start's the activity only when there is an exception. is that what you wanted? or is that how you cut paste? On Fri, Jun 17, 2011 at 11:18 AM, gaara amellal.kamili...@gmail.com wrote: Hi, i wonder what's wrong with this part of the code,,please it's couldn't be executed , the button in which is done is still static. Peace, Gaara final Thread checkUpdate = new Thread() { public void run() { EditText name = (EditText) findViewById(R.id.userName); EditText firstname = (EditText) findViewById(R.id.userFirstName); EditText mail = (EditText) findViewById(R.id.userMail); EditText phone = (EditText) findViewById(R.id.userPhone); User u = new User(); u.setFirstname(firstname.getText().toString()); u.setLastname(name.getText().toString()); u.setMail(mail.getText().toString()); u.setPhone(phone.getText().toString()); final UserController uc = new UserController(); try { uc.create(u); } catch (Exception e) { return; final Intent intent = new Intent(AddUserActivity.this, GaeHomeScreen.class); startActivity(intent); } }; checkUpdate.start(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: STL android
yeah! i need to pass a pointer to a STL structure which is updated by each user interaction :-( I also have readen about NativeActivity but it also needs JNI in some way ... and passing the STL structures will be a requirement, yet. I only can package data into an own streaming if there is a second (concurrent) application runnning (implementing the STL functionality). Is it possible ? or .. does it nedd natibe activity regards Hector Other pssibility On Jun 17, 2:54 am, RichardC richard.crit...@googlemail.com wrote: I don't pass any STL structures across JNI, I pack/unpack just the data I need in to basic types or arrays of basic types, doing my own simple streaming as required. My application is a board game with the next move calculator in C++ and the UI (and game state) in Java, so there is not much to transfer between the two layers. If you have a lot of state you need to pass back and forth between C++ and Java I suggest you have a look at NativeActivity (I am just starting this myself - so I can be much help here). It looks like it by subclassing the Java NativeActivity class it should be possible to keep my entire engine (and it's state) in C++ and pass just the UI events across the JNI interface. I have not tried this yet - I can feel a test project coming on. On Jun 16, 10:06 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hey Richard, thanks for helping ... in fact, i have installed SDK-NDK, read the CPLUSPLUS-SUPPORT.html doc, and preparing to compile my C++ STL stuff, but what i really am afraid is of JNI. There are interfaces depending of the filed's types, and i dont realize how to pass STL structures or pointers to them. I wonder if you have a kind of hello- jni example which you can share in this thread ? kriss, i agree with you, but development time is a real constraint :- ( On Jun 16, 3:25 pm, RichardC richard.crit...@googlemail.com wrote: Hi, I have a big lump of STL code that is building sucessfully using the latest release of the Android-ndk (r5c). It just need a few tweaks. It is called from Java via JNI as needed. I sugguest you download the NDK:http://developer.android.com/sdk/ndk/index.html and read the docs specifically CPLUSPLUS-SUPPORT.html If you have any questions I will try and help. On Jun 16, 4:55 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hi guys, I would like to migrate a c/c++ (linux fedora 14) application to android 2.2. Because this will be my first migration, i have some questions about the procedure: 1. considering it has some STL stuff, i wonder if it will work. I specially use vector, set, map and algoritms (set_union, set_intersection, set_difference). 2. as i understand i have to write -first- a Java-JNI application which declares and interface my c functions and c++ methods. Those methods willl be included into one (or many) shared libraries ... is it ok ? ... may somebody advise me a good JNI tutorial ? ... i don like the ones i've found :-( 3- once ready, i must use the NDK toolset in order to generate the android application ... hopefully i will works.. I am worried because the NDK info says to have a A Minimal set of headers for C++ support ... and i wonder if STL works or not ... but, NDK r5 - android - suposse to also hav support for STLport ... does any body has the hello-jni file modifyied for STL suppport ? NDK Doc also says that Applications that use native activities must be run on Android 2.3 (API Level 9) or later, but as i understand, i will also needs JNI .. may somebody make some comments about it ? finally, may somebody share me a JNI example in order to pass some STL functions between java and c++ ? comments are wellcome. regards, thanks in advance hector -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 does launcher get the applications' icons and corresponding text
Does launcher load icons by using PackageManager as well, I think I need to learn the source code. Thanks a lot for your help On Fri, Jun 17, 2011 at 11:22 PM, TreKing treking...@gmail.com wrote: On Fri, Jun 17, 2011 at 9:31 AM, June_Hello junehelloworld.he...@gmail.com wrote: I encountered with a question. Where and how does the launcher get the icon and text of the application which has be installed in the phone, Is this information stored in database, or any other way else? and how can I get another app's icon which is showed on launcher from another my own. Any time you want information about other packages installed on the device, first stop should be PackageManager. - 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: STL android
yeah! i need to pass a pointer to a STL structure which is updated by each user interaction :-( I also have readen about NativeActivity but it also needs JNI in some way ... and passing the STL structures will be a requirement, yet. I only can package data into an own streaming if there is a second (concurrent) application runnning (implementing the STL functionality). Is it possible ? or .. does it nedd natibe activity regards Hector Other pssibility On Jun 17, 2:54 am, RichardC richard.crit...@googlemail.com wrote: I don't pass any STL structures across JNI, I pack/unpack just the data I need in to basic types or arrays of basic types, doing my own simple streaming as required. My application is a board game with the next move calculator in C++ and the UI (and game state) in Java, so there is not much to transfer between the two layers. If you have a lot of state you need to pass back and forth between C++ and Java I suggest you have a look at NativeActivity (I am just starting this myself - so I can be much help here). It looks like it by subclassing the Java NativeActivity class it should be possible to keep my entire engine (and it's state) in C++ and pass just the UI events across the JNI interface. I have not tried this yet - I can feel a test project coming on. On Jun 16, 10:06 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hey Richard, thanks for helping ... in fact, i have installed SDK-NDK, read the CPLUSPLUS-SUPPORT.html doc, and preparing to compile my C++ STL stuff, but what i really am afraid is of JNI. There are interfaces depending of the filed's types, and i dont realize how to pass STL structures or pointers to them. I wonder if you have a kind of hello- jni example which you can share in this thread ? kriss, i agree with you, but development time is a real constraint :- ( On Jun 16, 3:25 pm, RichardC richard.crit...@googlemail.com wrote: Hi, I have a big lump of STL code that is building sucessfully using the latest release of the Android-ndk (r5c). It just need a few tweaks. It is called from Java via JNI as needed. I sugguest you download the NDK:http://developer.android.com/sdk/ndk/index.html and read the docs specifically CPLUSPLUS-SUPPORT.html If you have any questions I will try and help. On Jun 16, 4:55 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hi guys, I would like to migrate a c/c++ (linux fedora 14) application to android 2.2. Because this will be my first migration, i have some questions about the procedure: 1. considering it has some STL stuff, i wonder if it will work. I specially use vector, set, map and algoritms (set_union, set_intersection, set_difference). 2. as i understand i have to write -first- a Java-JNI application which declares and interface my c functions and c++ methods. Those methods willl be included into one (or many) shared libraries ... is it ok ? ... may somebody advise me a good JNI tutorial ? ... i don like the ones i've found :-( 3- once ready, i must use the NDK toolset in order to generate the android application ... hopefully i will works.. I am worried because the NDK info says to have a A Minimal set of headers for C++ support ... and i wonder if STL works or not ... but, NDK r5 - android - suposse to also hav support for STLport ... does any body has the hello-jni file modifyied for STL suppport ? NDK Doc also says that Applications that use native activities must be run on Android 2.3 (API Level 9) or later, but as i understand, i will also needs JNI .. may somebody make some comments about it ? finally, may somebody share me a JNI example in order to pass some STL functions between java and c++ ? comments are wellcome. regards, thanks in advance hector -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why does home screen widget confuse land/port images?
I removed the land and port layouts and placed just one layout under layout folder and the issue was reproducible again. So, I guess layout is not the issue... By the way, I cleaned up the whole project and recompiled freshly to get a new R file. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why does home screen widget confuse land/port images?
I'm going to do some more tests see if I can figure out the main cause... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why does home screen widget confuse land/port images?
Well, not sure if this is going to be helpful, but i've got multiple widgets that use slightly different designs in land and port, and they all work fine. I don't have different images for different orientations, but I have different layouts and @dimen values. -- Kostya 2011/6/17 Jona medicalsou...@gmail.com I'm going to do some more tests see if I can figure out the main cause... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Difference between localhost and applicatiin_ID.appspot.com
Hi, i wonder why my link in localhost work and we i deploy the resource or the link as application_ID.appspot.com/resource i have an error that the link was broken. Peace, Gaara -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why does home screen widget confuse land/port images?
Thanks for your help, I really appreciate it! The hard part was trying to reproduce this weird issue, but as the post mentioned I discovered how to reproduce it every time... Right now I'm stripping everything apart and start freshly adding things... I'll post once I find out what is the cause or if I can't find the cause... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: revoke permissions to access google auth tokens
Thanks Nikolay. Very useful pointers. Thank goodness it isn't global (UID). Though am using this permission as a developer the question is from a user point of view who wishes to revoke access, so I'd rather not call this directly or through reflection. Wish the system had a settings screen for this instead. Something the user could trust irrespective of the apps installed. I do see a couple of bugs requests where people would like to deny access to specific security permissions to an app (eg: network, camera, call status, ...) on the whole. This auth token stuff though, falls in a different sub-category and might be quicker to solve. Hope a google employee could comment on any future updates to the account management flow that they might have. Thanks, RS On Jun 17, 4:28 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Fri, Jun 17, 2011 at 11:21 PM, RS rajeshs...@gmail.com wrote: Simplifying the question: Am looking for answers from developers (or google engineers) who have used accountManager.getAuthToken() and have come across such a screen for their own apps: http://www.appbrain.com/info/fastweb2.png or http://chiarg.com/?p=429 Once the user clicks 'allow', how could they undo this action for that particular android app+account? It seems that there is no public API to do this. AccountMangerService has a revokeAppPermission() method which is both hidden (with @hide) and not accessible via public APIs. You could probably call it using reflection, but that is usually not recommended. BTW, access to tokens is granted by UID, so it's not global for all applications. Check out /data/system/accounts.db for more details if you have a rooted device. HTH -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Android destroy my Activity without killing the process in which it's created?
Yes the system can destroy activities without killing the process. Real world: I guess it depends and what your are doing and the amount of free memory available. Emulator: Dev Tools Development Settings Immediatly destroy activities This is a very useful option to have set when checking if you have implemented the activity lifecycle correctly. On Jun 17, 3:55 pm, Andrey Mandychev andreymandyc...@gmail.com wrote: Hi, I have a question: Can Android destroy my Activity without killing the process in which it's created? According to the documentation (http://developer.android.com/guide/ topics/fundamentals/activities.html) it seems possible. onDestroy() method could be called: either because the activity is finishing (someone called finish() on it), or because the system is temporarily destroying this instance of the activity to save space. Could you give me a possible scenario if it happens? What about service? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Aw: Object Structure
Thanks for your info. So my understanding is, We build our own Content Provider with the help of our own data structure. These content will be persisted in the device memory (NOT in memory) and using content resolver we have to do data operations. Am I right? Thanks Siva On Fri, Jun 17, 2011 at 4:57 PM, Sivaprakash sivaprakashshanmu...@gmail.com wrote: Hi I am using ArrayListHashMapString, String mylist = new ArrayListHashMapString, String(); to assign data into ListView So rather than doing this are you advising that we can directly talk to GUI components and display the content? Thanks Siva On Fri, Jun 17, 2011 at 4:46 PM, jjoe64 g.jjo...@googlemail.com wrote: hi you shouldn't hold munch data structure in objects because of the low memory on mobile devices. Instead you should use the sqlite feature and query, update, delete through a Content Provider. Don't work with Lists of Maps (ListMapString, Object) or something like that for data storing. I'm currently refactoring my app because I did that (similar) mistake. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- - Prakash. -- - Prakash. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Please review check my newly launched app.
Can any one please test my newly launched app ? Thanks, Abdul Mateen. On Wed, Jun 15, 2011 at 11:14 PM, Abdul Mateen abmat...@gmail.com wrote: package com.falx.icollage.main On Wed, Jun 15, 2011 at 11:00 PM, Mohammed Hossain Doula hossaindo...@gmail.com wrote: What is the package name details? On Wed, Jun 15, 2011 at 11:50 PM, Abdul Mateen abmat...@gmail.comwrote: Hi All, I have recently launched an imaging application on Android Market named Collage Art. I request from the developers please review and test my application and please give feedback to me so that I can fix any bug / feature missing / things not working there in my app. Thanks for your support.. Thanks -- Regards, Abdul Mateen, Embedded Software Engineer , CoreZee Ltd. Linux Administrator at Addictive Mobility Inc Mobile : +92-333-3265875. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *-- Mohammed Hossain Doula Software Engineer desme INC.* *www: http://www.hossaindoula.com @: ron...@desme.com* *facebook: http://www.facebook.com/ROnyWorld* *twitter: http://www.twitter.com/hossaindoula* *blogspot: hossaindoula.blogspot.com GSM: 00880-167-4347101* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Abdul Mateen, Embedded Software Engineer , CoreZee Ltd. Linux Administrator at Addictive Mobility Inc Mobile : +92-333-3265875. -- Regards, Abdul Mateen, Embedded Software Engineer , CoreZee Ltd. Linux Administrator at Addictive Mobility Inc Mobile : +92-333-3265875. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Shape having two sided border
You can also use a nine-patch drawable as the background, most of it transparent, the top-left edges having some pixels. -- Kostya 2011/6/17 Prakash Iyer thei...@gmail.com I'm not sure there is any XML way of doing this. You can extend TextView (or whatever is the view that you are looking to have this border on) and implement this in the onDraw. There should also be a way to write a Drawable and do this which can then be extended to any View but I don't know enough to suggest. On Fri, Jun 17, 2011 at 3:41 AM, Sapna Srivastav sapna.ari...@gmail.comwrote: I am still getting the four boundaries on the layout. On Jun 16, 11:58 am, Rajiv rajiv...@gmail.com wrote: Use the following shape tag: padding android:left=1dp android:top=0dp android:right=1dp android:bottom=0dp / On Thu, Jun 16, 2011 at 12:06 PM, Sapna Srivastav sapna.ari...@gmail.comwrote: Hi all. I would like to create a layout having a shape that has border only on 2 sides: left and right, i.e. I want top and bottom to be open. How can I achieve that defining shape in XML? Currently I have a normal 4 side border using the following shape XML definition: ?xml version=1.0 encoding=utf-8? shape xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent solid android:color=#FF / stroke android:width=1dp android:color=#FF / padding android:left=1dp android:top=1dp android:right=1dp android:bottom=1dp / /shape Please help, its urgent. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Can Android destroy my Activity without killing the process in which it's created?
On Fri, Jun 17, 2011 at 10:55 AM, Andrey Mandychev andreymandyc...@gmail.com wrote: Can Android destroy my Activity without killing the process in which it's created? Absolutely. Could you give me a possible scenario if it happens? The user presses the BACK button. Or, the user presses the HOME button and does not return to the activity for some time. And so on. What about service? If your service has been around too long, particularly if it is not in the foreground, it too can be destroyed (and possibly recreated, depending on what you return from onStartCommand()). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Difference between localhost and applicatiin_ID.appspot.com
Google App Engine support is on some other list. On Fri, Jun 17, 2011 at 11:50 AM, gaara amellal.kamili...@gmail.com wrote: Hi, i wonder why my link in localhost work and we i deploy the resource or the link as application_ID.appspot.com/resource i have an error that the link was broken. Peace, Gaara -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Difference between localhost and applicatiin_ID.appspot.com
oh sorry i have confused between it ,sorry 2011/6/17 Mark Murphy mmur...@commonsware.com Google App Engine support is on some other list. On Fri, Jun 17, 2011 at 11:50 AM, gaara amellal.kamili...@gmail.com wrote: Hi, i wonder why my link in localhost work and we i deploy the resource or the link as application_ID.appspot.com/resource i have an error that the link was broken. Peace, Gaara -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] NullpointerException using put method on a LinkedHashMap
I'm using a LinkedHashMap as cache. I've overridden removeEldestEntry in order to force this cache to have a fixed size. Older values will be removed. This is how my map is initialized: sBackgroundBitmapCache = new LinkedHashMapString, Bitmap(backgroundCacheSize) { private static final long serialVersionUID = 287204858147490218L; @Override protected boolean removeEldestEntry(LinkedHashMap.EntryString, Bitmap eldest) { if (size() backgroundCacheSize) { Log.d(TAG, Removing hash + eldest.getKey() + from background cache); return true; } else { return false; } } }; So obviously I'm going to use that cache using put method. But I'm getting crash reports, when using put method: java.lang.NullPointerException at java.util.LinkedHashMap.postRemove(LinkedHashMap.java:291) at java.util.HashMap.remove(HashMap.java:637) at java.util.LinkedHashMap.addNewEntry(LinkedHashMap.java:186) at java.util.HashMap.put(HashMap.java:411) I haven't been able to find why, using put method, may cause a nullpointer exception. I'm 100% sure, key and value are not nulls. Any help will be appreciated. -f4 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Please review check my newly launched app.
On Fri, Jun 17, 2011 at 11:47 AM, Abdul Mateen abmat...@gmail.com wrote: Can any one please test my newly launched app ? Dude, this group is not your personal QA department. Wait until you get emails, comments, or bug reports from your users like the rest of us. - 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: STL android
yeah! i need to pass a pointer to a STL structure which is updated by each user interaction :-( I also have readen about NativeActivity but it also needs JNI in some way ... and passing the STL structures will be a requirement, yet. I only can package data into an own streaming if there is a second (concurrent) application runnning (implementing the STL functionality). Is it possible ? or .. does it nedd natibe activity regards Hector Other pssibility On Jun 17, 2:54 am, RichardC richard.crit...@googlemail.com wrote: I don't pass any STL structures across JNI, I pack/unpack just the data I need in to basic types or arrays of basic types, doing my own simple streaming as required. My application is a board game with the next move calculator in C++ and the UI (and game state) in Java, so there is not much to transfer between the two layers. If you have a lot of state you need to pass back and forth between C++ and Java I suggest you have a look at NativeActivity (I am just starting this myself - so I can be much help here). It looks like it by subclassing the Java NativeActivity class it should be possible to keep my entire engine (and it's state) in C++ and pass just the UI events across the JNI interface. I have not tried this yet - I can feel a test project coming on. On Jun 16, 10:06 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hey Richard, thanks for helping ... in fact, i have installed SDK-NDK, read the CPLUSPLUS-SUPPORT.html doc, and preparing to compile my C++ STL stuff, but what i really am afraid is of JNI. There are interfaces depending of the filed's types, and i dont realize how to pass STL structures or pointers to them. I wonder if you have a kind of hello- jni example which you can share in this thread ? kriss, i agree with you, but development time is a real constraint :- ( On Jun 16, 3:25 pm, RichardC richard.crit...@googlemail.com wrote: Hi, I have a big lump of STL code that is building sucessfully using the latest release of the Android-ndk (r5c). It just need a few tweaks. It is called from Java via JNI as needed. I sugguest you download the NDK:http://developer.android.com/sdk/ndk/index.html and read the docs specifically CPLUSPLUS-SUPPORT.html If you have any questions I will try and help. On Jun 16, 4:55 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hi guys, I would like to migrate a c/c++ (linux fedora 14) application to android 2.2. Because this will be my first migration, i have some questions about the procedure: 1. considering it has some STL stuff, i wonder if it will work. I specially use vector, set, map and algoritms (set_union, set_intersection, set_difference). 2. as i understand i have to write -first- a Java-JNI application which declares and interface my c functions and c++ methods. Those methods willl be included into one (or many) shared libraries ... is it ok ? ... may somebody advise me a good JNI tutorial ? ... i don like the ones i've found :-( 3- once ready, i must use the NDK toolset in order to generate the android application ... hopefully i will works.. I am worried because the NDK info says to have a A Minimal set of headers for C++ support ... and i wonder if STL works or not ... but, NDK r5 - android - suposse to also hav support for STLport ... does any body has the hello-jni file modifyied for STL suppport ? NDK Doc also says that Applications that use native activities must be run on Android 2.3 (API Level 9) or later, but as i understand, i will also needs JNI .. may somebody make some comments about it ? finally, may somebody share me a JNI example in order to pass some STL functions between java and c++ ? comments are wellcome. regards, thanks in advance hector -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 does launcher get the applications' icons and corresponding text
It does. Source for Launcher2 is available: https://android.git.kernel.org/?p=platform/packages/apps/Launcher2.git;a=summary On Jun 17, 10:37 am, June Hello junehelloworld.he...@gmail.com wrote: Does launcher load icons by using PackageManager as well, I think I need to learn the source code. Thanks a lot for your help On Fri, Jun 17, 2011 at 11:22 PM, TreKing treking...@gmail.com wrote: On Fri, Jun 17, 2011 at 9:31 AM, June_Hello junehelloworld.he...@gmail.com wrote: I encountered with a question. Where and how does the launcher get the icon and text of the application which has be installed in the phone, Is this information stored in database, or any other way else? and how can I get another app's icon which is showed on launcher from another my own. Any time you want information about other packages installed on the device, first stop should be PackageManager. --- -- 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Extending RelativeLayout, overriding dispatchDraw() to create a zoomable ViewGroup - problem with child view clipping
An invalidate() cascades up, all the way to the root of the tree, and a draw() call comes back down (this is not quite true anymore with Android 3.0 and hardware acceleration though.) The clip does get scaled, but only at the level where you put scale() call. But the default clipRect() calls creates the intersection of the current clip rect and the new clip rect. You end up clipping with a larger rectangle, but the ancestors have already set a clip rect the size of your invalidated view. On Fri, Jun 17, 2011 at 2:17 AM, Trev16v trev...@googlemail.com wrote: Thanks Romain. I'm certainly well aware that the problem is my code and not in ViewGroup, and that one of the individual child Views will certainly not receive a scaled Canvas if it is invalidated. I think the reason for my confusion here -- and this will be down to my lack of knowledge about what goes on behind the scenes between invalidate() being called and the View's onDraw() subsequently being invoked -- is that I thought that the invalidation of a child View was somehow always cascaded down from the ViewGroup. My reason for thinking this is that, when a child view has invalidate() called, I can see that the ViewGroups's dispatchDraw() gets invoked first, prior to the child View's onDraw(). Furthermore, when I zoom in, I can see that the parts of the child Views that are being redrawn on the screen are always being drawn to the correct scale; it's just as though the clipping isn't being scaled. This was a further reason why I've perhaps mistakenly thought that the child View was aways being provided a scaled Canvas from my ViewGroup to draw on each time it was called to onDraw() following invalidate() being called on that child. Perhaps I'll just have to have my child Views all reference the parent View's zoom scale factor variable and individually scale themselves, perhaps having the ViewGroup and child Views all implementing an Interface that provides methods to delegate down the scale factor. No big deal in doing that; I was perhaps just trying to be too clever in my first approach, certainly too ambitious considering my Java / Android inexperience. Thanks, Trev On Jun 17, 2:22 am, Romain Guy romain...@android.com wrote: You are scaling the Canvas and not the View itself, the children have absolutely no knowledge that you are doing so. When invalidate() is invoked on the children, how could they know that you intend to scale them? They can't (unless you use Android 3.0+ and the new scale() method.) The problem is not in ViewGroup, it's in your code: you need to take the scale factor into account when you invalidate the children (call invalidate(left, top, right, bottom) on the parent instead.) On Thu, Jun 16, 2011 at 6:08 PM, Trev16v trev...@googlemail.com wrote: Hello, In my application I need to have a floor plan diagram which can be panned and zoomed. On this diagram are to be a series of small markers. Those little marker Views need to have invalidate() called frequently on them because the graphics drawn to their Canvas is being animated. I have been trying to implement an extended RelativeLayout, which I call ZoomableRelativeLayout, which would enable me to perform simultaneous zooming on all child Views of the ViewGroup. That is, the large floor plan graphic and its markers, all of which are child Views, will simultaneously zoom and pan together. In my ZoomableRelativeLayout, I have attempted to perform scaling (zooming) to the Canvas within the overridden dispatchDraw() method, like this: protected void dispatchDraw(Canvas canvas){ canvas.save(Canvas.MATRIX_SAVE_FLAG); canvas.scale(mScaleFactor, mScaleFactor); super.dispatchDraw(canvas); canvas.restore(); } The mScaleFactor is manipulated by a ScaleListener in the same class. It does actually work. I can pinch to zoom the ZoomableRelativeLayout, and all of the views held within properly rescale together. Except there's a problem. When the scale is 1, the animated child views are seen to redraw periodically perfectly fine. However, when the scale is other than 1, (e.g. when zooming in), those animated child views are only seen to update in a small clipped portion of their area - or not at all - depending on the zoom scale. The problem appears to be that the 'invalid area', or clipping area, for each view seems to remain as if no scaling had been applied to the Canvas in dispatchDraw(). If for example my ZoomableRelativeLayout were to contain a single, simple View that draws a filled rectangle, and it animated by flipping its colour every second via invalidate() and onDraw(), then at a zoom of 1 it'll appear as it should do. However, begin to gradually zoom in, the size of the square expands and moves away from its original position. The only part of the square that animates is whatever part of it still sits underneath that square's original 'area'.
[android-developers] Re: Error inflating class in custum relativelayout
Other Mistake :-/. Many thanks Kostya, it works On 17 jun, 13:13, Kostya Vasilyev kmans...@gmail.com wrote: The logcat says: 06-17 11:55:19.280: ERROR/AndroidRuntime(359): *java.lang.NullPointerException* 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.graphics.Canvas.drawRoundRect(Canvas.java:938) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at *com.es.TransparentPanel.dispatchDraw(TransparentPanel.java:53) * Your code calls canvas.drawRoundRect with something that's null. Specifically, it's the paint object. It's null because you code doesn't call init() from the first constructor. And the first constructor is what's used for loading views from XML. Whenever you see the Auto-generated constructor stub comment, it's a hint to examine the code and make sure it makes sense. The TODO is there to remind about this, and shows in Eclipse's task view. -- Kostya 2011/6/17 ABSOLUT davidt...@gmail.com Many thanks! I don't notice that :-( Now I have other error but I cant understand why: 06-17 11:55:19.280: ERROR/AndroidRuntime(359): FATAL EXCEPTION: main 06-17 11:55:19.280: ERROR/AndroidRuntime(359): java.lang.NullPointerException 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.graphics.Canvas.drawRoundRect(Canvas.java:938) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.es.TransparentPanel.dispatchDraw(TransparentPanel.java:53) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1644) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.View.draw(View.java:6883) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.widget.FrameLayout.draw(FrameLayout.java:357) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1646) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.drawChild(ViewGroup.java:1644) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.View.draw(View.java:6883) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.widget.FrameLayout.draw(FrameLayout.java:357) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1862) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.draw(ViewRoot.java:1522) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.performTraversals(ViewRoot.java:1258) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.view.ViewRoot.handleMessage(ViewRoot.java:1859) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.os.Handler.dispatchMessage(Handler.java:99) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.os.Looper.loop(Looper.java:123) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at android.app.ActivityThread.main(ActivityThread.java:3683) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at java.lang.reflect.Method.invokeNative(Native Method) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at java.lang.reflect.Method.invoke(Method.java:507) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:839) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 06-17 11:55:19.280: ERROR/AndroidRuntime(359): at dalvik.system.NativeStart.main(Native Method) My custom relativelayout is: package com.es; import android.content.Context; public class TransparentPanel extends RelativeLayout { private Paint innerPaint, borderPaint; public TransparentPanel(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub } public TransparentPanel (Context context) { super(context); init(); } private void init() { innerPaint = new Paint(); innerPaint.setARGB(225, 75, 75, 75); //gray innerPaint.setAntiAlias(true); borderPaint = new Paint(); borderPaint.setARGB(255, 255, 255, 255); borderPaint.setAntiAlias(true); borderPaint.setStyle(Style.STROKE); borderPaint.setStrokeWidth(2); } public void setInnerPaint(Paint innerPaint) { this.innerPaint = innerPaint; } public
[android-developers] Re: Passing Data From Javascript To Android WebView
What did you intend for this line to do? _webview.addJavascriptInterface(this, Question); Doug On Jun 15, 4:38 am, Vivek Tamrakar vivek.gameshas...@gmail.com wrote: I have a value inside javascript variable and would like to value of that variable in Sting variable in Android code. I have one webview inside that I created one combo box using HTML Code. That combo box has Five elements say white',ivory,..etc and now upon selecting those I need to get the selected value from the combo box and pass to java function. public class UserInterface extends Activity { WebView _webview; LinearLayout _linearLayout; private Handler mHandler = new Handler(); @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); Main(); } public void Main() { _linearLayout = new LinearLayout(this); _webview = new WebView(this); _linearLayout.addView(_webview, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT); setContentView(_linearLayout); _webview.getSettings().setJavaScriptEnabled(true); _webview.getSettings().setPluginsEnabled(true); _webview.getSettings().setAllowFileAccess(true); _webview.setWebChromeClient(new WebChromeClient()); _webview.addJavascriptInterface(this, Question); _webview.loadData(GetHTML(), text/html, utf-8); } public String GetHTML() { String HTML = + HTML + HEAD + TITLERadio Button onClick Handler/TITLE + SCRIPT LANGUAGE=\JavaScript\ +function function1(colors) { +var col = (colors.options[colors.selectedIndex].value); + if (col) { + document.bgColor = col; + } +/script + /HEAD + BODY +form +b Hello /b //+select name=\colors\ onChange=\window.Question.function1(this);\ +select name=\colors\ onChange=\window.Question.OnJsClick_SelectedItem(' string value');\ +option value=\white\ selectedWhite/option + option value=\cyan\Cyan/option + option value=\ivory\Ivory/option + option id=\myO\ value=\blue\Blue/option +/select +/form + /BODY + /HTML; return HTML; } public void OnJsClick_SelectedItem(final String str) { mHandler.post(new Runnable() { //@Override public void run() { getValue(str); } }); } public String getValue(String str) { _webview.loadUrl(javascript:function1(colors)); Toast.makeText(this, Under getValue + str, Toast.LENGTH_SHORT).show(); return str; } } -- - Thanks Regards, Vivek Tamrakar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AudioTrack help - pause after mute
Are you using stream or static mode? With stream, you need to feed the AudioTrack a stream of zeroes to get it to silence without clicking. I don't think that you can pause in stream mode, but I might be wrong. Doug On Jun 15, 5:27 pm, Stefan Alder twigbra...@gmail.com wrote: I need to pause the AudioTrack after its volume is set to zero. If I pause immediately after muting, there's a glitch, so I've added a sleep -- but this creates other problems and doesn't seem reliable. I still get glitches. Is there a reliable way to do this? For example, some sort of callback after the volume reaches 0? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Google Maps Directions in a WebView
I got a WebView to correctly get a person's current location from a website, but when I go to get directions from the user's current location to another specific place, the B field is correctly filled in, but in the full browser, the A field has My Location, whereas in the WebView, it remains blank. I checked, and the WebView does not appear to be throwing any type of error. Does anyone know how the A field can be correctly filled in? Is there some other setting on the WebView I forgot to turn on? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AudioTrack help - pause after mute
Doug, I'm using MODE_STATIC as the latency is too high with MODE_STREAM. On Fri, Jun 17, 2011 at 10:38 AM, Doug beafd...@gmail.com wrote: Are you using stream or static mode? With stream, you need to feed the AudioTrack a stream of zeroes to get it to silence without clicking. I don't think that you can pause in stream mode, but I might be wrong. Doug On Jun 15, 5:27 pm, Stefan Alder twigbra...@gmail.com wrote: I need to pause the AudioTrack after its volume is set to zero. If I pause immediately after muting, there's a glitch, so I've added a sleep -- but this creates other problems and doesn't seem reliable. I still get glitches. Is there a reliable way to do this? For example, some sort of callback after the volume reaches 0? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Re: Why does home screen widget confuse land/port images?
https://lh6.googleusercontent.com/-sn5rSQZIjm4/TfuWWyZb2kI/ABE/LbHWjdT_OWM/widget_main_4x1_play_normal.png https://lh3.googleusercontent.com/-Om6UM0oMmP0/TfuWaR32U9I/ABM/Gae3RaayvQ4/widget_main_4x1_play_normal.png https://lh4.googleusercontent.com/-eKfgw6psc-w/TfuV9qta1GI/AA4/NZkwGZ5EFy8/device-2011-06-17-135746.png After a lot of testing this is what I found out. The widget did not get confused about picking up the correct image, the problem was actually the image got shifted to the side so it seemed like it was using the wrong image but it wasn't. Since the two images land and port are a bit different in dimensions that is causing the ImageButton to go crazzy. See the attached image and also the two sample images I use. I'm not sure why there are now two images. It seems like setImageViewResource doesn't update the background image but the source image. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why does home screen widget confuse land/port images?
Yes, setImageViewResource sets the android:src image, not the background image. The docs are quite clear about this. For the background image, you want to call setBackgroundResource via RemoteViews.setInt, but I'm not sure since which API level it's possible. It's definitely in 2.2, and not in 1.6. You can always use two ImageViews (or more) layered one over another, instead of changing the background. -- Kostya 2011/6/17 Jona medicalsou...@gmail.com https://lh4.googleusercontent.com/-eKfgw6psc-w/TfuV9qta1GI/AA4/NZkwGZ5EFy8/device-2011-06-17-135746.png After a lot of testing this is what I found out. The widget did not get confused about picking up the correct image, the problem was actually the image got shifted to the side so it seemed like it was using the wrong image but it wasn't. Since the two images land and port are a bit different in dimensions that is causing the ImageButton to go crazzy. See the attached image and also the two sample images I use. I'm not sure why there are now two images. It seems like setImageViewResource doesn't update the background image but the source image. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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