[android-developers] change the language of sim
HI, I am new in Android, I need to know how to change the language of sim Thanks C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to change network service permission without modifying init.rc file
IMHO as you see to extend the platform for a certain hardware I would suggest you move to android-platform, as such questions are out of scope ( sdk) for this group. On 11 Nov., 05:55, chandra shekar chandu@gmail.com wrote: My application speaks to JNI interface which has some socket connection written in C to talk to the underlined Hardware. I am starting some network service in order to make my application work since its dependent on it. so in order to do that my application doesnt support talking to such services unless untill you explictly change the permission. Its working if i do it from init.rc. But I dont want to do that I want some way I can change the permission without modifying init.rc. Please let me know if der is any alternatives. Regards, chandrashekar On Wed, Nov 10, 2010 at 4:18 AM, FrankG frankgru...@googlemail.com wrote: This will not help, because it requires the platform key. And he said that he will not run his app as root. On 9 Nov., 04:13, gujian outspacem...@gmail.com wrote: You can try to add android:sharedUserId='android.uid.system' to AndroidManifest.xml. 2010/11/8 chandu chandu@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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Zitierten Text ausblenden - - Zitierten Text anzeigen - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] detect the language of a particular piece of text (no internet connection)
Is there any function/library/API which can detect the language of a particular piece of text (no internet connection)? i.e. for an input text This is a sentence, it should detect the language as English. Or for Esto es una sentencia it should detect the language as Spanish. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Is there a way to keep an Android microSD card interface awake while the rest of the device is asleep?
IMHO not in a portable way .. and go to android-platform or android- porting On 10 Nov., 17:15, JackN jnadel...@gmail.com wrote: I am working with custom microSD cards. I'd like to be able to maintain power to the microSD card while the handset sleeps. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AlarmManager starting service, API Level?
Dianne, Are there guarantees that the wake lock is held long enough for the PendingIntent tied to the alarm to actually be delivered? Such as starting a service, triggering a broadcast receiver? -- Kostya 11.11.2010 5:05, Dianne Hackborn ?: Note that currently the alarm manager WILL NOT hold a wake lock for sufficient time when starting a service, so if you are using a wake up alarm you must go through a receive and do a fun dance with wake locks. On Wed, Nov 10, 2010 at 4:39 PM, Henrik Lindqvist henrik.lindqv...@gmail.com mailto:henrik.lindqv...@gmail.com wrote: Thank. I'll sleep well tonight knowing raptors are extinct. On Nov 11, 1:30 am, Mark Murphy mmur...@commonsware.com mailto:mmur...@commonsware.com wrote: On Wed, Nov 10, 2010 at 7:27 PM, Henrik Lindqvist henrik.lindqv...@gmail.com mailto:henrik.lindqv...@gmail.com wrote: Thanks. I'am using the AlarmManager to send PendingIntent.getService with a Explicit Intent to an IntentService. Read this post from July 2008: The Alarm Service sample code in ApiDemos at http://code.google.com/android/samples/ApiDemos/src/com/google/androi... is intended to provide the best practices for this. The current example is a little overly complex because of the need of the intermediate receiver. In a future SDK where you can have the alarm manager directly start a service, this is a lot cleaner. July of 2008 is the Jurassic era of Android development. Personally, I was nearly eaten by a raptor. :-) Seriously, that would have been the Android M5 pre-release. Anything older than, say, October 2008 should be viewed with a bit of skepticism. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy http://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.0.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com mailto:hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get a string from a website, and show the string on my android app. ?
I have made a service which extends Service in android, and running in the background of my android app. What I want from this background service is to get the euro to dollar exchange rate from a finance website, I have my service ready, it can periodically run a function, I am now need to implement the function to get the euro-dollar rate from a website, there are many this kind of website, my question is, how can I get the currency rate as a string from the website, and pass the string to my 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] Re: Local Service vs Remote Service
The default Android force close dialog is displayed by the default uncaught exception handler. If you replace the uncaught exception handler, make sure to call the previous uncaught exception handler from yours, presumably after writing / sending the exception information. So you can have the best of both everything: your own logging for uncaught exceptions, and still leave the user experience unchanged. Regarding corrupted process - in some languages that are executed directly by the CPU, it's pretty easy for application logic errors to produce heap corruption, such that allocating memory in the exception handler (for formatting the error message, for example) would crash again. Java is different, much safer, in this regard: you get exceptions (IndexOutOfBoundsException, NullPointerException) instead of a possibly corrupted heap. Therefore, there is a much better chance that the exception handler code can run from start to finish without crashing itself. -- Kostya 11.11.2010 3:17, William Ferguson пишет: Sorry, I may have muddled several concepts here .. I'll blame lack of sleep. I was thinking that a RuntimeException force closes an app and that there is limited opportunity to capture the failure (pre Froyo) before the app is destroyed. But if using Thread.setDefaultUncaughtExceptionHandler() actually stops the force close then there is opportunity to dispatch the crash report since the app won't be destroyed. Whether the crash dispatch happens in the app process or another process is irrelevant. And yes, I was only imagining having the 2nd process exist briefly. Something like an IntentService solely tasked with dispatching the crash and handling disconnection and other dispatch failures. But that doesn't seem as relevant now. Am I back on track? On Nov 11, 9:56 am, Mark Murphymmur...@commonsware.com wrote: Your strategy only makes sense if you feel that your failed process will be able to successfully do IPC to start a service to report the exception and *not* successfully be able to report the exception itself. I am dubious that this is the case. If your process truly is failed, neither will work. I think both will work, in which case why add the overhead and complexity? In the end, though, this isn't a huge deal...*if* your proposed crash-reporting service isn't running all of the time. Saying there's a 2nd process briefly is one thing -- having a long-lived service chewing up a 2nd process is another matter entirely. We still have too many devices with too little RAM to be using that sort of technique today. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.2 Available! -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] nest custom views
11.11.2010 8:54, kavitha b пишет: But the views which i draw are drawing down the scrollview.It is not drawing on top layer of scrollview. I tried with framelayout.But it is not drawing down of scrollview only. FrameLayout draws all children on top of one another, in the same position. If you want views to be distinctly positioned, use some other type of layout: RelativeLayout (my personal favorite), or LinearLayout. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Starting a service in another applicaion
Not entirely necessary. It works to use a fully-qualified class name when starting a service in another application: Intent i = new Intent(); i.setClassName(com.backgroundService, *com.backgroundService.*MyService); startService(i); Oddly enough, .MyService does not work. Make sure that the service is exported in the manifest, either by default, or by explicitly setting exported to true: http://developer.android.com/reference/android/R.attr.html#exported -- Kostya 11.11.2010 2:00, Mark Murphy ?: On Wed, Nov 10, 2010 at 5:24 PM, kl4232klavin4...@yahoo.com wrote: What information do I need to put in the intent to start a remote service? Step #1: Add anintent-filter to the service, with your own custom action string Step #2: Use new Intent(whatever the action string is) in your call to startService() -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Image view from drawable folder path
Hi, I want to show image from drawable folder using path (res/drawable/icon.png). I do not want to use R.drawable.icon. Please anybody know how to view the image using res/drawable/icon.png. Thanks, Sripati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Image view from drawable folder path
You cannot do that way. On Thu, Nov 11, 2010 at 3:36 PM, Sripati Misra sripati.mi...@gmail.comwrote: Hi, I want to show image from drawable folder using path (res/drawable/icon.png). I do not want to use R.drawable.icon. Please anybody know how to view the image using res/drawable/icon.png. Thanks, Sripati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.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] Image view from drawable folder path
Any particular reason you don't want to use R.drawable.icon? 11.11.2010 13:06, Sripati Misra пишет: Hi, I want to show image from drawable folder using path (res/drawable/icon.png). I do not want to use R.drawable.icon. Please anybody know how to view the image using res/drawable/icon.png. Thanks, Sripati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: The best way to download webpage and parse it into simple UI
Not necessarily - fully parsing and hooking up DOM and CSS in-memory structures is indeed likely to be slow. But that's not needed here. Simple page scrubbing to extract pieces of text should be much, much faster. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 11.11.2010 9:19 пользователь fernando fernandoler...@gmail.com написал: That would be slw, unless the parser and renderer are native as the webkit is for the webview On Nov 10, 8:48 pm, TreKing treking...@gmail.com wrote: On Wed, Nov 10, 2010 at 3:02 AM, SHADOW-XIII shadow.x...@gmail.com wrote: Question is: is th... TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are su... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: color banding. can't get over it :(
Thank you all for your input. Here's the solution: http://stuffthathappens.com/blog/2010/06/04/android-color-banding/ in short: Window.setFormat(PixelFormat.RGBA_); ! Cheers, Hatch On Nov 5, 6:10 am, Adam Hammer adamhamm...@gmail.com wrote: Since you use it in a ImageView I do not know how to set the bitmap preferences. You will probably have to load the Bitmap in code, and then assign it to the ImageView once loaded. E.g. BitmapFactory.Options myOptions = new BitmapFactory.Options(); myOptions.inDither = true; myOptions.inScaled = false; myOptions.inPreferredConfig = Bitmap.Config.ARGB_; myOptions.inDither = false; myOptions.inPurgeable = true; preparedBitmap = BitmapFactory.decodeResource(CTX.getResources(), R.drawable.myImage, myOptions); new line --- MyImageView.setImageBitmap(preparedBitmap); I don't know if you can specify image loading configs in the xml for a ImageView. On Nov 4, 1:33 am,Hatchtomislav.hecimo...@gmail.com wrote: Great Your reply gives me hope :) But can you provide me with more information on how to do it ? I have a gradient alpha png. I just use it in imageView inside an XML resource. I don't set the dither option (although have tried both true and false options with same result) And I get the bands. Do I need to draw the image by hand, and which API must I use in that case ? Regards, Hatch On Nov 4, 1:19 am, Adam Hammer adamhamm...@gmail.com wrote: It get's banded because Android automatically decodes images based on your screen, and not based on the actual image. Why decode a 2048x2048 image when it's showing on a 800x480 screen. This I assume is to save cpu cycles and speed up image decoding where it normally will not have a issue. When you are doing compositing though it does make a difference, and you need to be specific as to how you want the image decoded. Like I said before, you need to manually define your options to ensure it uses ARGB_ when decoding the image, disable dithering and scaling. Do this and you will no longer have banding. Adam On Nov 2, 1:01 am,Hatchtomislav.hecimo...@gmail.com wrote: Yes, Thank you for your replies. I have read the article but it doesn't explain why alpha enabled resource get's banded :( Is there a way to know exactly which RGB is used in the png ? BTW the dither option didn't work in the XML nor in the code. On Oct 30, 2:04 am, Lance Nanek lna...@gmail.com wrote: I saw an interesting article on avoiding this the other day:http://android.nakatome.net/2010/04/bitmap-basics.html On Oct 29, 7:01 pm,Hatchtomislav.hecimo...@gmail.com wrote: Seems my original post (ugly pngs...) somehow disappeared :( nvm. I have a problem with a png resource that has gradient fade-out alpha. The png looks great in the emulator, but displays an artefact known as color banding (http://en.wikipedia.org/wiki/Colour_banding) Has anyone surpassed this issue ? My designer wants to trop a shadow behind his icons, and that's where the bands appear. What are my options ? Thanks Hatch BTW is there any way to see all my posts here on google groups ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to override native dialog's theme ?
Thank you. If anyone else has a better idea, pls be so kind ... Cheers, Hatch On Nov 11, 7:35 am, Kumar Bibek coomar@gmail.com wrote: I am not sure about this. But I guess, you will have to override the default long click action and drop in your Custom context menu there and handle the events. On Tue, Nov 9, 2010 at 8:27 PM, Hatch tomislav.hecimo...@gmail.com wrote: ah :( Yes. that's the native copy/paste dialog. So there is no way to resolve those parts that are gray/black on the posted image ? Then the themes aren't that flexible, are they ? Ok, can you give me a clue on how can to disable native copy/paste and replace it with custom ones ? Thank you for your input. Regards, Hatch On Nov 9, 2:44 pm, Kumar Bibek coomar@gmail.com wrote: Are you referring to the Copy Paste dialog that comes up when EditText is long clicked? If that is the case, you will have to first disable the default dialog and use your own custom dialog and implement the Copy Paste functionality. On Tue, Nov 9, 2010 at 6:57 PM, Hatch tomislav.hecimo...@gmail.com wrote: Here's how the native popup looks like: http://postimage.org/image/t59v7udg/ Anyone has an idea on what I failed to override in the themes.xml (besides item name=android:background@color/background/item) I am creating all my dialogs by hand to avoid this, and now I found out that simple coply/paste dialog will look ... well bad :) Any hints ? Cheers Hatch -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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: select query problem.
Logcat gives me following output 11-11 16:13:13.031: ERROR/Database(709): Failure 1 (no such column: BathRoom) on 0x145618 when preparing 'SELECT RoomID FROM roomtable where RoomName=BathRoom'. 11-11 16:13:13.159: WARN/System.err(709): android.database.sqlite.SQLiteException: no such column: BathRoom: SELECT RoomID FROM roomtable where RoomName=BathRoom 11-11 16:13:13.159: WARN/System.err(709): at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method) 11-11 16:13:13.159: WARN/System.err(709): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java: 1610) 11-11 16:13:13.159: WARN/System.err(709): at com.monarch.home.AddRoom.onActivityResult(AddRoom.java:349) 11-11 16:13:13.159: WARN/System.err(709): at android.app.Activity.dispatchActivityResult(Activity.java:3828) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.deliverResults(ActivityThread.java:3325) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3371) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.access$2700(ActivityThread.java:119) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1893) 11-11 16:13:13.159: WARN/System.err(709): at android.os.Handler.dispatchMessage(Handler.java:99) 11-11 16:13:13.159: WARN/System.err(709): at android.os.Looper.loop(Looper.java:123) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.main(ActivityThread.java:4363) 11-11 16:13:13.159: WARN/System.err(709): at java.lang.reflect.Method.invokeNative(Native Method) 11-11 16:13:13.159: WARN/System.err(709): at java.lang.reflect.Method.invoke(Method.java:521) 11-11 16:13:13.159: WARN/System.err(709): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 11-11 16:13:13.159: WARN/System.err(709): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 11-11 16:13:13.286: WARN/System.err(709): at dalvik.system.NativeStart.main(Native Method) On Nov 11, 11:50 am, pramod.deore deore.pramo...@gmail.com wrote: Hi , I have a table in that there is 2 columns. Now I want to retrieve the value of one column using value of second column (Means suppose my table name is roomtable. and it contains 2 columns as RoomID and RoomName) Now I know value of RoomName and I want to find out value of RoomID. How to this? I had tried using following but not succeed. final String ROOM_TABLE_NAME = roomtable; sampleDB = this.openOrCreateDatabase(SAMPLE_DBNAME, MODE_PRIVATE, null); sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+where RoomName=+selectedRoom); how to execute this query so I can get RoomID? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] select query problem.
Try this: sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+where RoomName='+selectedRoom + '); In case you cannot see the difference, wrap your room name in single quotes, so that your query passed to SQLite is: SELECT ... WHERE RoomName='Bathroom' Daniel On Thu, Nov 11, 2010 at 6:50 AM, pramod.deore deore.pramo...@gmail.com wrote: Hi , I have a table in that there is 2 columns. Now I want to retrieve the value of one column using value of second column (Means suppose my table name is roomtable. and it contains 2 columns as RoomID and RoomName) Now I know value of RoomName and I want to find out value of RoomID. How to this? I had tried using following but not succeed. final String ROOM_TABLE_NAME = roomtable; sampleDB = this.openOrCreateDatabase(SAMPLE_DBNAME, MODE_PRIVATE, null); sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+where RoomName=+selectedRoom); how to execute this query so I can get RoomID? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: select query problem.
Hi Pramod, since you are trying to select something based on a string where clause, you have to encapsulate the string into '', so you have to write either selectedRoom='BathRoom' or sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+where RoomName='+selectedRoom+'); (= put the quotes inside the select, which is imho better). Best regards, Filip Havlicek 2010/11/11 pramod.deore deore.pramo...@gmail.com Logcat gives me following output 11-11 16:13:13.031: ERROR/Database(709): Failure 1 (no such column: BathRoom) on 0x145618 when preparing 'SELECT RoomID FROM roomtable where RoomName=BathRoom'. 11-11 16:13:13.159: WARN/System.err(709): android.database.sqlite.SQLiteException: no such column: BathRoom: SELECT RoomID FROM roomtable where RoomName=BathRoom 11-11 16:13:13.159: WARN/System.err(709): at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method) 11-11 16:13:13.159: WARN/System.err(709): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java: 1610) 11-11 16:13:13.159: WARN/System.err(709): at com.monarch.home.AddRoom.onActivityResult(AddRoom.java:349) 11-11 16:13:13.159: WARN/System.err(709): at android.app.Activity.dispatchActivityResult(Activity.java:3828) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.deliverResults(ActivityThread.java:3325) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3371) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.access$2700(ActivityThread.java:119) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1893) 11-11 16:13:13.159: WARN/System.err(709): at android.os.Handler.dispatchMessage(Handler.java:99) 11-11 16:13:13.159: WARN/System.err(709): at android.os.Looper.loop(Looper.java:123) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.main(ActivityThread.java:4363) 11-11 16:13:13.159: WARN/System.err(709): at java.lang.reflect.Method.invokeNative(Native Method) 11-11 16:13:13.159: WARN/System.err(709): at java.lang.reflect.Method.invoke(Method.java:521) 11-11 16:13:13.159: WARN/System.err(709): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 11-11 16:13:13.159: WARN/System.err(709): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 11-11 16:13:13.286: WARN/System.err(709): at dalvik.system.NativeStart.main(Native Method) On Nov 11, 11:50 am, pramod.deore deore.pramo...@gmail.com wrote: Hi , I have a table in that there is 2 columns. Now I want to retrieve the value of one column using value of second column (Means suppose my table name is roomtable. and it contains 2 columns as RoomID and RoomName) Now I know value of RoomName and I want to find out value of RoomID. How to this? I had tried using following but not succeed. final String ROOM_TABLE_NAME = roomtable; sampleDB = this.openOrCreateDatabase(SAMPLE_DBNAME, MODE_PRIVATE, null); sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+where RoomName=+selectedRoom); how to execute this query so I can get RoomID? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Layoutinflater for listview
Hi guys, May I know how to use the layoutinflater in listview? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: select query problem.
Hi, Daniel and Filip Thanks for reply. after changing query as sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+ where RoomName='+selectedRoom + '); Now logcat gives following warning 11-11 16:44:42.298: WARN/System.err(772): android.database.sqlite.SQLiteException: unknown error: Queries cannot be performed using execSQL(), use query() instead. 11-11 16:44:42.298: WARN/System.err(772): at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method) 11-11 16:44:42.427: WARN/System.err(772): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java: 1610) 11-11 16:44:42.427: WARN/System.err(772): at com.monarch.home.AddRoom.onActivityResult(AddRoom.java:352) 11-11 16:44:42.427: WARN/System.err(772): at android.app.Activity.dispatchActivityResult(Activity.java:3828) 11-11 16:44:42.427: WARN/System.err(772): at android.app.ActivityThread.deliverResults(ActivityThread.java:3325) 11-11 16:44:42.427: WARN/System.err(772): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3371) 11-11 16:44:42.427: WARN/System.err(772): at android.app.ActivityThread.access$2700(ActivityThread.java:119) 11-11 16:44:42.427: WARN/System.err(772): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1893) 11-11 16:44:42.427: WARN/System.err(772): at android.os.Handler.dispatchMessage(Handler.java:99) 11-11 16:44:42.427: WARN/System.err(772): at android.os.Looper.loop(Looper.java:123) 11-11 16:44:42.427: WARN/System.err(772): at android.app.ActivityThread.main(ActivityThread.java:4363) 11-11 16:44:42.427: WARN/System.err(772): at java.lang.reflect.Method.invokeNative(Native Method) 11-11 16:44:42.427: WARN/System.err(772): at java.lang.reflect.Method.invoke(Method.java:521) 11-11 16:44:42.427: WARN/System.err(772): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 11-11 16:44:42.427: WARN/System.err(772): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 11-11 16:44:42.555: WARN/System.err(772): at dalvik.system.NativeStart.main(Native Method) 11-11 16:44:48.237: DEBUG/dalvikvm(217): GC freed 43 objects / 1968 bytes in 217ms On Nov 11, 4:01 pm, Filip Havlicek havlicek.fi...@gmail.com wrote: Hi Pramod, since you are trying to select something based on a string where clause, you have to encapsulate the string into '', so you have to write either selectedRoom='BathRoom' or sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+where RoomName='+selectedRoom+'); (= put the quotes inside the select, which is imho better). Best regards, Filip Havlicek 2010/11/11 pramod.deore deore.pramo...@gmail.com Logcat gives me following output 11-11 16:13:13.031: ERROR/Database(709): Failure 1 (no such column: BathRoom) on 0x145618 when preparing 'SELECT RoomID FROM roomtable where RoomName=BathRoom'. 11-11 16:13:13.159: WARN/System.err(709): android.database.sqlite.SQLiteException: no such column: BathRoom: SELECT RoomID FROM roomtable where RoomName=BathRoom 11-11 16:13:13.159: WARN/System.err(709): at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method) 11-11 16:13:13.159: WARN/System.err(709): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java: 1610) 11-11 16:13:13.159: WARN/System.err(709): at com.monarch.home.AddRoom.onActivityResult(AddRoom.java:349) 11-11 16:13:13.159: WARN/System.err(709): at android.app.Activity.dispatchActivityResult(Activity.java:3828) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.deliverResults(ActivityThread.java:3325) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3371) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.access$2700(ActivityThread.java:119) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1893) 11-11 16:13:13.159: WARN/System.err(709): at android.os.Handler.dispatchMessage(Handler.java:99) 11-11 16:13:13.159: WARN/System.err(709): at android.os.Looper.loop(Looper.java:123) 11-11 16:13:13.159: WARN/System.err(709): at android.app.ActivityThread.main(ActivityThread.java:4363) 11-11 16:13:13.159: WARN/System.err(709): at java.lang.reflect.Method.invokeNative(Native Method) 11-11 16:13:13.159: WARN/System.err(709): at java.lang.reflect.Method.invoke(Method.java:521) 11-11 16:13:13.159: WARN/System.err(709): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 11-11 16:13:13.159: WARN/System.err(709): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 11-11 16:13:13.286: WARN/System.err(709): at dalvik.system.NativeStart.main(Native Method) On Nov 11, 11:50 am, pramod.deore deore.pramo...@gmail.com wrote: Hi , I have a table in that
Re: [android-developers] nest custom views
Thanks Kostya, Somehow I am managing with FrameLayout. It is working now. Without your help I wouldn't be able to solve thhis problem. On Thu, Nov 11, 2010 at 2:48 PM, Kostya Vasilyev kmans...@gmail.com wrote: 11.11.2010 8:54, kavitha b пишет: But the views which i draw are drawing down the scrollview.It is not drawing on top layer of scrollview. I tried with framelayout.But it is not drawing down of scrollview only. FrameLayout draws all children on top of one another, in the same position. If you want views to be distinctly positioned, use some other type of layout: RelativeLayout (my personal favorite), or LinearLayout. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: select query problem.
On Thu, Nov 11, 2010 at 11:17 AM, pramod.deore deore.pramo...@gmail.com wrote: Hi, Daniel and Filip Thanks for reply. after changing query as sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+ where RoomName='+selectedRoom + '); Now logcat gives following warning 11-11 16:44:42.298: WARN/System.err(772): android.database.sqlite.SQLiteException: unknown error: Queries cannot be performed using execSQL(), use query() instead. ^ above is your answer ^ -- Daniel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Downloading Problem
I went through this a couple of months back with our server where we had the same script sometimes provide a content-length, other times the length was -1 AFAIK, -1 is a valid response when the server can't determine the length. In researching the issue, we found our solution was in the server output headers - much like Bob suggested We changed the output headers on those problematic scripts from Header('Content-Type: text/html'); to Header('Content-Type: text/html charset=UTF-8'); adding the charset encoding made all the difference - who'd've thunk it YMMV of course since you are doing ZIP files, but it's something to check. On Nov 10, 11:16 pm, Android Humanoid droid.hu...@gmail.com wrote: The length of the content that am getting is -1, The server is ours only, so I asked the server persons to look into the logs what exactly logged, They informed that there is nothing logged, Is there any chance for android to change url, because, the same url is working on desktop. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Adding separators to a ListView
Hi all. I have created a ListView from a collection of objects, using an ArrayAdaptor to set the items. The objects used to populate the list have a NAME field, and are sorted into alphabetical order, so ultimately the ListView is long list of names. I now want to make the list more user friendly. I'd like to add a separator for each letter of the alphabet, saying A, B etc. The separator could be one of the list items (non-clickable) or just a normal View. I'm just not sure how I can manipulate the ListView to achieve this, and would appreciate any help. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AlarmManager starting service, API Level?
On Thu, Nov 11, 2010 at 3:56 AM, Kostya Vasilyev kmans...@gmail.com wrote: Are there guarantees that the wake lock is held long enough for the PendingIntent tied to the alarm to actually be delivered? Such as starting a service, triggering a broadcast receiver? The WakeLock held by AlarmManager is guaranteed to be acquired for the duration of onReceive() of a BroadcastReceiver when used with a getBroadcast() PendingIntent. For example, the aforementioned WakefulIntentService uses this to then acquire its own WakeLock, which gets released only when the service is out of work. By having the two WakeLocks overlap, the device cannot fall asleep until the work is finished. However, to paraphrase Ms. Hackborn, the AlarmManager WakeLock is not guaranteed to be acquired long enough for a service to be created and have an Intent passed to onStartCommand(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Local Service vs Remote Service
On Thu, Nov 11, 2010 at 4:14 AM, Kostya Vasilyev kmans...@gmail.com wrote: The default Android force close dialog is displayed by the default uncaught exception handler. If you replace the uncaught exception handler, make sure to call the previous uncaught exception handler from yours, presumably after writing / sending the exception information. That's a good point -- I forgot about that trick. Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Adding separators to a ListView
On Thu, Nov 11, 2010 at 7:20 AM, Neilz neilhorn...@gmail.com wrote: Hi all. I have created a ListView from a collection of objects, using an ArrayAdaptor to set the items. The objects used to populate the list have a NAME field, and are sorted into alphabetical order, so ultimately the ListView is long list of names. I now want to make the list more user friendly. I'd like to add a separator for each letter of the alphabet, saying A, B etc. The separator could be one of the list items (non-clickable) or just a normal View. I'm just not sure how I can manipulate the ListView to achieve this, and would appreciate any help. It's not a question of the ListView, but of the ListAdapter. Your ListAdapter needs to: -- Override getViewTypeCount() to return 2 -- Override getItemViewType() to return 0 for regular rows and 1 for headings -- Override getView() (or newView() and bindView() for CursorAdapter) and have it properly create the right rows and bind them This is somewhat of a pain. I have a MergeAdapter that can simplify it, but only where each section is its own adapter, with plain Views being interspersed: https://github.com/commonsguy/cwac-merge Creating a HeaderCursorAdapter that injects headings based on some rule (e.g., when the first letter of such-and-so column in the Cursor changes) is on my list of 18,000 things to do. Though anyone is welcome to go and beat me to writing it. :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How can service return a string back to Activity?
I am new in Android . I encounter the following situation, I have a background running service, which will get a keep-updating string from a webpage, I need to show this keep-updating string in my UI through Activity, since this string is get from service, I am wondering, How can the service pass the string to Activity so that activity can render the string on UI. Anyone can help? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Link error : when linking with 3rd party static library
Observed No rule to make target `NOTICE-TARGET-STATIC_LIBRARIES-lib*', needed by `out/target/product/generic/system/plugins/*.so I observed this err even after using the macro LOCAL_WHOLE_STATIC_LIBRARIES Can some one help me reg this error -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: select query problem.
Indeed, you can use execSQL for statements like CREATE, UPDATE, DELETE, INSERT. For SELECT you have to use query. Best regards, Filip Havlicek 2010/11/11 Daniel Drozdzewski daniel.drozdzew...@gmail.com On Thu, Nov 11, 2010 at 11:17 AM, pramod.deore deore.pramo...@gmail.com wrote: Hi, Daniel and Filip Thanks for reply. after changing query as sampleDB.execSQL(SELECT RoomID FROM +ROOM_TABLE_NAME+ where RoomName='+selectedRoom + '); Now logcat gives following warning 11-11 16:44:42.298: WARN/System.err(772): android.database.sqlite.SQLiteException: unknown error: Queries cannot be performed using execSQL(), use query() instead. ^ above is your answer ^ -- Daniel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How can service return a string back to Activity?
On Thu, Nov 11, 2010 at 7:30 AM, xi developer xidevelope...@gmail.com wrote: I am new in Android . I encounter the following situation, I have a background running service, which will get a keep-updating string from a webpage, I need to show this keep-updating string in my UI through Activity, since this string is get from service, I am wondering, How can the service pass the string to Activity so that activity can render the string on UI. Anyone can help? Use a callback/listener object that the activity supplies to the service via an API exposed by the service and accessed via bindService(). Or, use android.os.Messenger. Or, use a broadcast Intent. Or, use a ResultReceiver. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Using AspectJ with Android - Pune GTUG blog
Hi All, I have created a project (guess first of its kind) which uses AspectJ with Android for method tracing. Read more here - http://blog.punegtug.org/2010/11/adding-aspect-to-android.html I have uploaded the project source at http://code.google.com/p/android-aspectj/ Please feel free to go through this blog and code.google.com project and feel free to comment on it Details: This project is an example of how to enable method tracing (which cuts across all classes) in Android. Adding Aspect to Android Programming AspectJ with Android AspectJ is the defacto choice for AOP program. So far I did not see any one trying AOP concept in Android. However, I did read one blog mentioning, it should be possible, hence I tried it. AspectJ puts in pointcut across code and can execute advices around those pointcuts. The beautify of this is once you compile your java source, you add these pointcuts and advices to your program by injecting them in the byte code (of already generated class files). Knowing this I knew aspectJ can be used in Android, as dex relies on .class files. Stage 1- Let Java compile java to .class files Stage 2- Let AspectJ compiler inject point cuts and advices to the .class files Stage 3- Let Dex take these new class files and create .dex file. Read more here - http://blog.punegtug.org/2010/11/adding-aspect-to-android.html Cheers, Rohit -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 can service return a string back to Activity?
Hi, there are more ways to do this, one of them might be sending a broadcast from service to activity with string in broadcast's intent as an extra. Best regards, Filip Havlicek 2010/11/11 xi developer xidevelope...@gmail.com I am new in Android . I encounter the following situation, I have a background running service, which will get a keep-updating string from a webpage, I need to show this keep-updating string in my UI through Activity, since this string is get from service, I am wondering, How can the service pass the string to Activity so that activity can render the string on UI. Anyone can help? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Image view from drawable folder path
Yes I got the solution. Please go through this link : http://steven.bitsetters.com/2007/11/27/accessing-android-resources-by-name-at-runtime/ Here after getting id, we can use anywhere. Thanks, Sripati On Thu, Nov 11, 2010 at 3:41 PM, Kumar Bibek coomar@gmail.com wrote: You cannot do that way. On Thu, Nov 11, 2010 at 3:36 PM, Sripati Misra sripati.mi...@gmail.comwrote: Hi, I want to show image from drawable folder using path (res/drawable/icon.png). I do not want to use R.drawable.icon. Please anybody know how to view the image using res/drawable/icon.png. Thanks, Sripati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Adding separators to a ListView
This came up before and I recommended a simple trick to implement this. I heard that it worked pretty well. You will need your own list adapter, and two types of views, as Mark says. Implementing per-group separators as self-contained list view items is tricky, as data item numbering will slide (the separators are not indexed by the same sequence of numbers as data items in the backing array). The trick is to use a list item layout that includes both the regular list item view (for data), as well as a header that indicates the start of a new group. This list item layout would then be used by the list adapter in the case where the data item is the start of its respective group. This only requires a simple lookup of the previous item in the data array, and then a test whether both the current and the previous item belong to the same group. If both items belong to the same group, the adapter should return a layout that's just for displaying item data. If the previous item belongs to a different group, it means that the current item is the start of a distinct new group. In this case, the adapter should return a layout that has both views for displaying data (as in the first case), as well as some kind of header / group indicator. The advantage of this trick is that item numbering in the list view (including the number of items) stays the same as in the backing data array. So, you don't have to make a separate pass over data to determine where group boundaries are, how many of them exist, or perform any kind of mapping between item positions in the list view and in the data array. -- Kostya 11.11.2010 15:26, Mark Murphy пишет: On Thu, Nov 11, 2010 at 7:20 AM, Neilzneilhorn...@gmail.com wrote: Hi all. I have created a ListView from a collection of objects, using an ArrayAdaptor to set the items. The objects used to populate the list have a NAME field, and are sorted into alphabetical order, so ultimately the ListView is long list of names. I now want to make the list more user friendly. I'd like to add a separator for each letter of the alphabet, saying A, B etc. The separator could be one of the list items (non-clickable) or just a normal View. I'm just not sure how I can manipulate the ListView to achieve this, and would appreciate any help. It's not a question of the ListView, but of the ListAdapter. Your ListAdapter needs to: -- Override getViewTypeCount() to return 2 -- Override getItemViewType() to return 0 for regular rows and 1 for headings -- Override getView() (or newView() and bindView() for CursorAdapter) and have it properly create the right rows and bind them This is somewhat of a pain. I have a MergeAdapter that can simplify it, but only where each section is its own adapter, with plain Views being interspersed: https://github.com/commonsguy/cwac-merge Creating a HeaderCursorAdapter that injects headings based on some rule (e.g., when the first letter of such-and-so column in the Cursor changes) is on my list of 18,000 things to do. Though anyone is welcome to go and beat me to writing it. :-) -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can service return a string back to Activity?
How to implement the broadcast from service to activity? It is too abstract concept for me, is there any tutorial or sample code? On Nov 11, 2:36 pm, Filip Havlicek havlicek.fi...@gmail.com wrote: Hi, there are more ways to do this, one of them might be sending a broadcast from service to activity with string in broadcast's intent as an extra. Best regards, Filip Havlicek 2010/11/11 xi developer xidevelope...@gmail.com I am new in Android . I encounter the following situation, I have a background running service, which will get a keep-updating string from a webpage, I need to show this keep-updating string in my UI through Activity, since this string is get from service, I am wondering, How can the service pass the string to Activity so that activity can render the string on UI. Anyone can help? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@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] Adding separators to a ListView
How are you controlling the presentation of selection? I would think your approach -- which is great in all other respects -- would show the combined header+row being selected when navigated using the D-pad/trackball/whatever. On Thu, Nov 11, 2010 at 8:00 AM, Kostya Vasilyev kmans...@gmail.com wrote: This came up before and I recommended a simple trick to implement this. I heard that it worked pretty well. You will need your own list adapter, and two types of views, as Mark says. Implementing per-group separators as self-contained list view items is tricky, as data item numbering will slide (the separators are not indexed by the same sequence of numbers as data items in the backing array). The trick is to use a list item layout that includes both the regular list item view (for data), as well as a header that indicates the start of a new group. This list item layout would then be used by the list adapter in the case where the data item is the start of its respective group. This only requires a simple lookup of the previous item in the data array, and then a test whether both the current and the previous item belong to the same group. If both items belong to the same group, the adapter should return a layout that's just for displaying item data. If the previous item belongs to a different group, it means that the current item is the start of a distinct new group. In this case, the adapter should return a layout that has both views for displaying data (as in the first case), as well as some kind of header / group indicator. The advantage of this trick is that item numbering in the list view (including the number of items) stays the same as in the backing data array. So, you don't have to make a separate pass over data to determine where group boundaries are, how many of them exist, or perform any kind of mapping between item positions in the list view and in the data array. -- Kostya 11.11.2010 15:26, Mark Murphy пишет: On Thu, Nov 11, 2010 at 7:20 AM, Neilzneilhorn...@gmail.com wrote: Hi all. I have created a ListView from a collection of objects, using an ArrayAdaptor to set the items. The objects used to populate the list have a NAME field, and are sorted into alphabetical order, so ultimately the ListView is long list of names. I now want to make the list more user friendly. I'd like to add a separator for each letter of the alphabet, saying A, B etc. The separator could be one of the list items (non-clickable) or just a normal View. I'm just not sure how I can manipulate the ListView to achieve this, and would appreciate any help. It's not a question of the ListView, but of the ListAdapter. Your ListAdapter needs to: -- Override getViewTypeCount() to return 2 -- Override getItemViewType() to return 0 for regular rows and 1 for headings -- Override getView() (or newView() and bindView() for CursorAdapter) and have it properly create the right rows and bind them This is somewhat of a pain. I have a MergeAdapter that can simplify it, but only where each section is its own adapter, with plain Views being interspersed: https://github.com/commonsguy/cwac-merge Creating a HeaderCursorAdapter that injects headings based on some rule (e.g., when the first letter of such-and-so column in the Cursor changes) is on my list of 18,000 things to do. Though anyone is welcome to go and beat me to writing it. :-) -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How can service return a string back to Activity?
On Thu, Nov 11, 2010 at 8:07 AM, xi developer xidevelope...@gmail.com wrote: How to implement the broadcast from service to activity? It is too abstract concept for me, is there any tutorial or sample code? https://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/ This approach has its downsides. Notably, it is a true broadcast, meaning any application on the device can listen for it. Android 2.2 introduces a setPackage() option on the Intent you can use to deal with this, but that is only for Android 2.2 and newer versions. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Image view from drawable folder path
Ah, so you just needed to access a resource by string, not numeric, id. Yes, that's the trick. -- Kostya 11.11.2010 15:59, Sripati Misra ?: Yes I got the solution. Please go through this link : http://steven.bitsetters.com/2007/11/27/accessing-android-resources-by-name-at-runtime/ Here after getting id, we can use anywhere. Thanks, Sripati On Thu, Nov 11, 2010 at 3:41 PM, Kumar Bibek coomar@gmail.com mailto:coomar@gmail.com wrote: You cannot do that way. On Thu, Nov 11, 2010 at 3:36 PM, Sripati Misra sripati.mi...@gmail.com mailto:sripati.mi...@gmail.com wrote: Hi, I want to show image from drawable folder using path (res/drawable/icon.png). I do not want to use R.drawable.icon. Please anybody know how to view the image using res/drawable/icon.png. Thanks, Sripati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] View.bringToFront() not working
for what u r using it..show some code here On Thu, Nov 11, 2010 at 1:28 PM, kavitha b kkavith...@gmail.com wrote: How to bring a View to front? i tried with View.bringToFront() method. But it is not working. Please help me. It is very urgent. Thanks Kavitha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- A N K ! T.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layoutinflater for listview
That's pretty much the fundamentals of using ListView. As such, there are lots and lots of samples. For example, this one: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html 11.11.2010 14:15, kahken пишет: Hi guys, May I know how to use the layoutinflater in listview? Thanks in advance. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Image view from drawable folder path
Yes, Anyhow i got the solution according to my requirement. Thanks for quick response. Thnanks, Sripati On Thu, Nov 11, 2010 at 6:45 PM, Kostya Vasilyev kmans...@gmail.com wrote: Ah, so you just needed to access a resource by string, not numeric, id. Yes, that's the trick. -- Kostya 11.11.2010 15:59, Sripati Misra пишет: Yes I got the solution. Please go through this link : http://steven.bitsetters.com/2007/11/27/accessing-android-resources-by-name-at-runtime/ Here after getting id, we can use anywhere. Thanks, Sripati On Thu, Nov 11, 2010 at 3:41 PM, Kumar Bibek coomar@gmail.com wrote: You cannot do that way. On Thu, Nov 11, 2010 at 3:36 PM, Sripati Misra sripati.mi...@gmail.comwrote: Hi, I want to show image from drawable folder using path (res/drawable/icon.png). I do not want to use R.drawable.icon. Please anybody know how to view the image using res/drawable/icon.png. Thanks, Sripati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SQLite and XML
So I have a rather simple XML output from a database I made in mySQL. Now what I want to do is retrieve this data and place it into the SQLite database of my app. I'm at the stage where I've defined the onCreate methods for each of the tables. The XML data may need to be added to or changed over time so I need a way of dynamically loading the data into the SQLite database. Should this be possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AppsLib (Archos store) is not legit?
They look very much like scammers. Apparently they screwed Al out of his work to get their store started. On Nov 10, 8:31 am, Michael MacDonald googlec...@antlersoft.com wrote: On 11/09/10 16:51, SoftwareForMe.com SoftwareForMe.com wrote: Hello, What do you all know about AppsLib? I know they were a small startup store who partnered with Archos to provide them with an app store on their devices. Recently we found that they are distributing pirated software, including an old copy of our product, PhoneMyPC, for free. We have contacted AppsLib several times, and Archos directly twice, only to be ignored by all parties. We had AppsLib in our list of markets to release products into once our licensing mechanism is finalized, but we have now removed them and will not do business with them. I sincerely hope Archos device owners can download SAM from SlideMe, or some other reputable app market. What's your experience? Is this unusual for that store, or is this just how they do business? Warm regards, Scott SoftwareForMe Inc. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en I believe Al Sutton has a particularly strong opinion on the AppsLib store-- When AppsLib was first set up, they were giving away a free Archos 5 to every developer who submitted an app. I bet what happened in your case is that some unscrupulous individual submitted your app as their own to get the free device. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 new contact with All Information by using intent
Hi All I need little bit help. i want to add new contact by using Intent. i have tried following code, but i am able to add only name and phone. i also want to add Organization and title but dot know what is the problem i am not able to add these two things if somebody have any solution please tel me Thanks My Current code is. Contacts.Intents.Insert.ACTION, Contacts.People.CONTENT_URI); SetLog.log(Contact Address , Contacts.People.CONTENT_URI.toString()); addContactIntent.putExtra(Contacts.Intents.Insert.NAME, companyProfileDAO.getsFullName()); // an example, there // is other data // available addContactIntent.putExtra(Contacts.Intents.Insert.PHONE, companyInfo.getsPrimaryPhone()); addContactIntent.putExtra(Contacts.Intents.Insert.COMPANY, companyInfo.getsCompanyName()); addContactIntent.putExtra(Contacts.Intents.Insert.POSTAL, getAddress(companyInfo)); addContactIntent.putExtra( Contacts.Intents.Insert.POSTAL_ISPRIMARY, getAddress(companyInfo)); addContactIntent.putExtra(Contacts.Intents.Insert.POSTAL_TYPE, getAddress(companyInfo)); addContactIntent.putExtra(Contacts.Organizations.COMPANY, Endeavour Software Technology); addContactIntent.putExtra(Contacts.Organizations.TITLE, Manager); startActivityForResult(addContactIntent, GET_NEW_CONTACT); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 application not visible when I build my emulator
Hi, I have written a customized application using google maps. So I had to generate the API key and add it into my xml file. The application works perfectly fine when I run it on my emulator using eclipse. But since I was making my customized emulator, I downloaded the android source code and built an image using this apk file. But I am not able to see this application when I run the image file that was built. Is this got to do something with google and the API keys ? Please help. I have tested other apk files by building an image with them, which works perfectly fine. Thanks, Priyank -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] SQLite and XML
Look at the NotePad example in the SDK. The main class is SQLiteDatabase. There are functions to insert, update, replace and select. The helper is good for creating and updating. On Nov 11, 2010 8:28 AM, zizzfusion calumer...@gmail.com wrote: So I have a rather simple XML output from a database I made in mySQL. Now what I want to do is retrieve this data and place it into the SQLite database of my app. I'm at the stage where I've defined the onCreate methods for each of the tables. The XML data may need to be added to or changed over time so I need a way of dynamically loading the data into the SQLite database. Should this be possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Adding separators to a ListView
Many thanks Mark, this looks great, will take a look. On Nov 11, 12:26 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Nov 11, 2010 at 7:20 AM, Neilz neilhorn...@gmail.com wrote: Hi all. I have created a ListView from a collection of objects, using an ArrayAdaptor to set the items. The objects used to populate the list have a NAME field, and are sorted into alphabetical order, so ultimately the ListView is long list of names. I now want to make the list more user friendly. I'd like to add a separator for each letter of the alphabet, saying A, B etc. The separator could be one of the list items (non-clickable) or just a normal View. I'm just not sure how I can manipulate the ListView to achieve this, and would appreciate any help. It's not a question of the ListView, but of the ListAdapter. Your ListAdapter needs to: -- Override getViewTypeCount() to return 2 -- Override getItemViewType() to return 0 for regular rows and 1 for headings -- Override getView() (or newView() and bindView() for CursorAdapter) and have it properly create the right rows and bind them This is somewhat of a pain. I have a MergeAdapter that can simplify it, but only where each section is its own adapter, with plain Views being interspersed: https://github.com/commonsguy/cwac-merge Creating a HeaderCursorAdapter that injects headings based on some rule (e.g., when the first letter of such-and-so column in the Cursor changes) is on my list of 18,000 things to do. Though anyone is welcome to go and beat me to writing it. :-) -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Fetch Spinner value outside setOnItemSelectedListener
What do you mean by when the activity is re-loaded ? simply put, when I revisit the current page by touching the menu linking to the same view On Nov 10, 8:16 pm, TreKing treking...@gmail.com wrote: On Wed, Nov 10, 2010 at 1:52 PM, sisko adeod...@gmail.com wrote: But, the very next line I am using the same function call but my spinner does not set to the previously selected value when the activity is re-loaded. However, if I simply give spinner.selection a static argument, e:g 2, it works fine upon re-loading the activity. What do you mean by when the activity is re-loaded ? - 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] Can't launch setup for android SDK
You probably might want to make a try by changing from https to http. -- On Tue, Nov 9, 2010 at 9:24 PM, .Net Sports ballz2w...@cox.net wrote: New to android, trying to work with the SDK, but when launching the setup.exe, get this error: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings. NS -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL glScissor not working on HTC phones
I also tested this on an HTC Droid Incredible with the same bad result there. Also, I tested by only drawing over part of the background instead of using glScissor(). Same result again. It would appear that the OpenGl library on HTC phones fills the color buffer with garbage on each swap. Why would this happen? Does anyone know if HTC changed the OpenGl library on its phones? Is there a place to file a bug report just for HTC versions of Android? Warren On Nov 10, 4:25 pm, Warren warrenba...@gmail.com wrote: I am optimizing a game for performance. A large part of the screen remains the same from frame to frame and it takes a while to render, so I intend to use glScissor() to limit new drawing to only certain parts of the screen. I do not do a gl.glClear(GL10.GL_COLOR_BUFFER_BIT); so the bits that were drawn previously should remain. This provides a large speed increase and works very well on the Droid and on the emulator. However, it is not working on the G1 or Droid Eris, both made by HTC. The areas outside the scissor region are still being drawn over in a strange way. It's as if what's being drawn inside the scissor region is being wrapped outside the region. There is a large rectangle in the middle of the screen that has the correct contents. This is the defined scissor region. Immediately below the scissor region is a row, maybe 150-200 pixels high that looks like an exact copy of the bottom of the scissor region. Again, this only is happening on the HTC phones. I believe that unless I specifically clear the color bits, they should remain from frame to frame. Is this correct? Any ideas? Is this an HTC OpenGL library bug? Thank you, Warren -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Default Media Button Application
Hi, I wonder whether there is a concept in Android that allows a user to define which application should be launched if a headset media button is pressed..? This would be something similar as the concept of a default browser or default e-mail application that is launched when a website should be opened or a mail needs to be sent. As far as I know such a concept at least exists for a browser on Android. Is there something like a default media player that is started when the user hits the headset's play button? If so, how could my application inform the system that it is a potential candidate for the default media player application? Thanks, Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: issue with Edit Text
On Thu, Nov 11, 2010 at 12:06 AM, Kartik Bansal kartikban...@gmail.comwrote: issue is in eclipse preview.. not tried it on actual device.. I'd bet money this is the problem. There is also an issue with italics in TextViews disappearing in the preview, but it shows up fine when you run it. Always try that first. - 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: passing data between views
Since you're only interested in maintaining state/data between configuration changes, look at these two methods instead: onRetainNonConfigurationInstance() getLastNonConfigurationInstance() On Nov 9, 7:27 pm, mannyk mannykh...@gmail.com wrote: Hi, I am trying to create an app with two view classes - portrait and landscape. I use the portrait view in my layout.xml and use the landscape in layout.xml under the layout-land folder. My both view classes (portrait and landscape) are essentially the some bitmap placement differences. My end goal is - to fetch some pictures in these classes and manipulate them before displaying. I obviously don't want to refetch the pictures on orientation change, so would like to pass bitmaps between these views. Is that possible? Here is my first iteration of one of these view classes and for now I am just trying to pass an integer between classes. My Main Activity is like this: public class flipperActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); } protected void onSaveInstanceState(Bundle outState) { outState.putBoolean(bs, true); super.onSaveInstanceState(outState); } And my View class is like this: public class FlipperVerticalView extends View { String time; Paint paint = new Paint(); private Bitmap[] pictureArray = new Bitmap[5]; int i = 0; boolean forward = true; public FlipperVerticalView(Context context, AttributeSet attrs) { super(context, attrs); paint.setColor(Color.BLUE); paint.setStyle(Paint.Style.FILL); paint.setAntiAlias(true); GetPhotoClass getPhotos = new GetPhotoClass(); pictureArray = getPhotos.GetPhotoArray(); this.setOnClickListener(new OnClickListener() { //change picture index here }); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawBitmap(pictureArray[i], 20, 20, paint); } /***SaveState/ @Override public Parcelable onSaveInstanceState() { Parcelable superState = super.onSaveInstanceState(); SavedState ss = new SavedState(superState); ss.stateToSave = this.i; return ss; } @Override public void onRestoreInstanceState(Parcelable state) { SavedState ss = new SavedState(state); super.onRestoreInstanceState(ss.getSuperState()); this.i = ss.stateToSave; } static class SavedState extends BaseSavedState { int stateToSave; SavedState(Parcelable superState) { super(superState); } private SavedState(Parcel in) { super(in); this.stateToSave = in.readInt(); } @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeInt(this.stateToSave); } public static final Parcelable.CreatorSavedState CREATOR = new Parcelable.CreatorSavedState() { public SavedState createFromParcel(Parcel in) { return new SavedState(in); } public SavedState[] newArray(int size) { return new SavedState[size]; } }; } / ***EndSaveStateCode***/ } }- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Default Media Button Application
The media button is a broadcast Intent, not an activity Intent. Hence, it doesn't go through the normal chooser-style stuff like you see with activity Intents (e.g., default browser). You can listen for the ACTION_MEDIA_BUTTON broadcast. The documentation does not say it is an ordered broadcast, so I assume all applications that have registered for it will receive it. On Thu, Nov 11, 2010 at 10:06 AM, michael kuh...@gmail.com wrote: Hi, I wonder whether there is a concept in Android that allows a user to define which application should be launched if a headset media button is pressed..? This would be something similar as the concept of a default browser or default e-mail application that is launched when a website should be opened or a mail needs to be sent. As far as I know such a concept at least exists for a browser on Android. Is there something like a default media player that is started when the user hits the headset's play button? If so, how could my application inform the system that it is a potential candidate for the default media player application? Thanks, Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to debug APK in emulator with maven dependency
Hello Hugo, i need to debug my application (i use maven-android-plugin) at startup. Do you have some suggests, please? Thanks, bye. On 12 Ott, 12:40, Hugo Josefson (Jayway) h...@josefson.org wrote: Hi Mohammad, I have now documented this on the maven-android-plugin wiki: http://code.google.com/p/maven-android-plugin/wiki/Debug Thanks, Hugo On Oct 8, 11:49 am, Mohammad Haque shumi...@gmail.com wrote: Hi I'm using maven-android-plugin in my android application. I'm a dependency which maven download from remote repository before APK build. But if I want to debug the APK in emulator it does not include the those maven dependency and as a result APK does not run with normal Run (using Eclipse) and can not be debug as well. Could someone know how to debug in this situation? Any suggestion is highly appreciated. Regards Mohammad Haque -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: The best way to download webpage and parse it into simple UI
On Thu, Nov 11, 2010 at 12:18 AM, fernando fernandoler...@gmail.com wrote: That would be slw, unless the parser and renderer are native as the webkit is for the webview Well yeah, that's why I said better / easier but probably not faster :) And like Kostya pointed out, you only need to parse the parts of the HTML you actually care about, discarding the rest, which drastically improves performance. - 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: how to debug APK in emulator with maven dependency
Moreover, i want to debug by test. I've setted a test in instruments app. After launch mvn clean install, tests are executed with succesfull. How i can launch single test in eclipse and debug? Thanks, bye On Oct 12, 12:40 pm, Hugo Josefson (Jayway) h...@josefson.org wrote: Hi Mohammad, I have now documented this on the maven-android-plugin wiki: http://code.google.com/p/maven-android-plugin/wiki/Debug Thanks, Hugo On Oct 8, 11:49 am, Mohammad Haque shumi...@gmail.com wrote: Hi I'm using maven-android-plugin in my android application. I'm a dependency which maven download from remote repository before APK build. But if I want to debug the APK in emulator it does not include the those maven dependency and as a result APK does not run with normal Run (using Eclipse) and can not be debug as well. Could someone know how to debug in this situation? Any suggestion is highly appreciated. Regards Mohammad Haque -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] retrieving theme information like font and color
Hi, Is it possible to retrieve the current theme settings that the user set on his phone? I want to retrieve information like current font size, name and type, background and foreground colors for text and subtext, and so on. thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Fetch Spinner value outside setOnItemSelectedListener
On Thu, Nov 11, 2010 at 8:33 AM, sisko adeod...@gmail.com wrote: simply put, when I revisit the current page by touching the menu linking to the same view I'm not following. Could you describe the sequence of steps you take in your app and where the activities start and end? - 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] Adding separators to a ListView
11.11.2010 16:08, Mark Murphy пишет: How are you controlling the presentation of selection? I would think your approach -- which is great in all other respects -- would show the combined header+row being selected when navigated using the D-pad/trackball/whatever. I don't - never actually done this in my code. But it doesn't seem like a significant UI defect. Besides, there probably is a way to fix it, with some knowledge about how selection highlighting works. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Adding separators to a ListView
On Thu, Nov 11, 2010 at 10:41 AM, Kostya Vasilyev kmans...@gmail.com wrote: 11.11.2010 16:08, Mark Murphy пишет: How are you controlling the presentation of selection? I would think your approach -- which is great in all other respects -- would show the combined header+row being selected when navigated using the D-pad/trackball/whatever. I don't - never actually done this in my code. Ah, phooey. But it doesn't seem like a significant UI defect. Beauty lies in the eye of the beholder. I can see some UI designers freaking out over it. Besides, there probably is a way to fix it, with some knowledge about how selection highlighting works. Yeah, well, that's kinda why I was asking, to see if you had worked out the recipe... :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: From emulator to real device
Searh engines are your friend ;) http://www.java.net/forum/topic/jxta/jxta-community-forum/peergroupexception-could-not-locate-world-peergroup-module-im-1 Are you using any specific class from JXTA? -f4 On Nov 10, 11:23 pm, kypriakos demet...@ece.neu.edu wrote: HI all, I can run the app on the emulator without issues - when I run it on a real device I get the exception that certain classes are not found (see below for exception). I am sure this is a loaded question and I know an emulator is not a real device and many things can alter their behavior during this transition but loading classes seems a bit fundamental - any ideas? Perms and everything else in the corresponding directories are identical. I am just wondering if anyone else has seen similar issue before and if they have any hints as to what to look for - thanks again I/System.out( 297): P2PA - ## - fatal error : group creation failure W/System.err( 297): exception.PeerGroupException: Could not locate World PeerGroup Module Implementation. com.p2pSOAAndroidP2PA_16.P2PA.PeerToPeerAdapter.main(PeerToPeerAdapter.java : 808) W/System.err( 297): at com.p2pSOAAndroidP2PA_16.p2pSOAAndroidP2PA_16.onCreate(p2pSOAAndroidP2PA_16 .java: 124) W/System.err( 297): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1123) W/System.err( 297): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2364) W/System.err( 297): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2417) W/System.err( 297): at android.app.ActivityThread.access $2100(ActivityThread.java:116) W/System.err( 297): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1794) W/System.err( 297): at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err( 297): at android.os.Looper.loop(Looper.java:123) W/System.err( 297): at android.app.ActivityThread.main(ActivityThread.java:4203) W/System.err( 297): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 297): at java.lang.reflect.Method.invoke(Method.java: 521) W/System.err( 297): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) W/System.err( 297): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) W/System.err( 297): at dalvik.system.NativeStart.main(Native Method) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Finish multiple tasks (stacks)
I agree with Ganapathy.C. I've done it before, linking activities using startActivityForResult, and the last (the activity on top) on the event that I want to finish it, it will trigger onActivityResult in rest of activities. -f4 On Nov 11, 12:39 am, Ganapathy.C cganapa...@gmail.com wrote: Use onActivityResult() method in stack of activity then pass unique result code to finish that activity.. On Nov 11, 7:08 am, Dianne Hackborn hack...@android.com wrote: You can't do this without programmatically getting all of your activities to call finish() (possible using CLEAR_TOP to reduce some of that), implying that they may need to be re-instantiated to be able to do so. What you are trying to do here isn't really how tasks are supposed to work. The whole point of them is that they are entirely separate, unrelated things (basically applications). On Wed, Nov 10, 2010 at 3:22 PM, raukodraug gabriel.martine...@gmail.comwrote: Hi everyone, I have an app that contains multiple tasks (stacks of activities). I can jump from one to another with no problem, but when i finish a task it goes to the previous stack. I would like to finish all stacks whenever i finish one of them, because I want my application to finish. Does anyone have an idea on how to achieve this? Cheers, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: map can't load at specific places
I'm facing a similar issue. Map works fine. I have an input in the app, on which when I write a text and press a button I geolocate the text and zoom the map to the geocoded location. Everything works fine until i go to bochum. It takes me to bochum, but doesn't load any tiles, and after that, no map tiles are loaded on ANY place on the map until I restart the app. On Sep 22, 2:29 am, Frank Weiss fewe...@gmail.com wrote: Strange. Maybe try a few more locations besides home and office and see if there's any pattern. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Galaxy Tab in debug mode on Win 7 x64
Hi all, I have a brand new Galaxy Tab that I am trying to use for some development. However, the usual method of installing the ADB driver isn't working on my Win 7 x64 version. (I have even tried the USBDeview method of deleting everything that looks like an Android device.) Has anyone out there gotten this to work? If so, what did you have to do? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Creating a trial version
I'm getting requests for a trial version of my app. Assume for the moment that I'm not concerned with piracy (I have other mechanisms in place to defeat that). One approach that occurs to me is upon first launch of the app I write the date into the shared preferences database. Let's call it the incept date like in the movie Blade Runner. Then each subsequent launch checks the stored date against the current date. If trial period has expired, it pops up a Market purchase screen for the non- trial version of the app. The problem with this, I believe, is that clearing the application data from the application management screen will also clear the saved date in the shared preferences. A slightly more heavy-weight (and intrusive) option is to write the user account name to web storage, along with the incept date on first launch. Then the app can check there to see if the trial has expired for that account name. The web storage could be set up to be write- only from the app so even a clever snooper wouldn't be able to undo it. This starts to sound a lot like the existing Android Market server- based licensing infrastructure and it occurs to me that Google could make this a lot easier for all of us by providing some simple hooks to offer trial versions. Anyway, I'm interested to hear how others are offering trial versions. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Creating a trial version
Note that if Google changed the refund period to be settable by the developer then this problem would be solved. I would make the refund period 7 days, which is long enough for any reasonable evaluation. This would delay me getting paid by 7 days but I could live with that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SQLite and XML
Thank you I've been looking through the NotePad example and I'm still a little unsure about the actual referencing of the XML file. At the moment I have it placed in the assets directory. If I'm to retrieve data from the XML should I be referencing it by name directly or is there a separate provider I need to use for it? On Nov 11, 2:15 pm, Prakash Iyer thei...@gmail.com wrote: Look at the NotePad example in the SDK. The main class is SQLiteDatabase. There are functions to insert, update, replace and select. The helper is good for creating and updating. On Nov 11, 2010 8:28 AM, zizzfusion calumer...@gmail.com wrote: So I have a rather simple XML output from a database I made in mySQL. Now what I want to do is retrieve this data and place it into the SQLite database of my app. I'm at the stage where I've defined the onCreate methods for each of the tables. The XML data may need to be added to or changed over time so I need a way of dynamically loading the data into the SQLite database. Should this be possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@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: SQLite and XML
Actually, to simplify things, you could: - Place your xml file into res/xml - Use Resources.getXml to obtain the xml pull parser for your xml file http://developer.android.com/reference/android/content/res/Resources.html#getXml(int) - Handle parsing events as described here: http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html -- Kostya 11.11.2010 19:35, zizzfusion пишет: Thank you I've been looking through the NotePad example and I'm still a little unsure about the actual referencing of the XML file. At the moment I have it placed in the assets directory. If I'm to retrieve data from the XML should I be referencing it by name directly or is there a separate provider I need to use for it? On Nov 11, 2:15 pm, Prakash Iyerthei...@gmail.com wrote: Look at the NotePad example in the SDK. The main class is SQLiteDatabase. There are functions to insert, update, replace and select. The helper is good for creating and updating. On Nov 11, 2010 8:28 AM, zizzfusioncalumer...@gmail.com wrote: So I have a rather simple XML output from a database I made in mySQL. Now what I want to do is retrieve this data and place it into the SQLite database of my app. I'm at the stage where I've defined the onCreate methods for each of the tables. The XML data may need to be added to or changed over time so I need a way of dynamically loading the data into the SQLite database. Should this be possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating a trial version
On Nov 11, 4:20 pm, Bret Foreman bret.fore...@gmail.com wrote: A slightly more heavy-weight (and intrusive) option is to write the user account name to web storage, along with the incept date on first launch. Then the app can check there to see if the trial has expired for that account name. It's not clear to me what you mean by web storage - is that a web server that you run, or some web-related storage area on the device? Assuming that it's the former, that's essentially the approach that I took when I had a time-limited trial in one of my apps, and it worked pretty seamlessly. There were other issues with the trial-version approach, but that wasn't one of them. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] UI -using the setText() method ?
Hi Mark, Yes, I was refering to a TextView that I have in a table cell. In fact, I have found out that the problem seems to have nothing to do with the TableLayout. I have created a Tab Layout based on the sample code given in the Tutorials section on the Android website. I have two Tabs with two Activities for each one of them. All I wanted to do was to update the a TextView using the setText() method for one of the Activities (whichever activity being displayed at the moment obviously). I must have been missing something but what ? I was able to achieve this display update when I was using a single layout by just setting the text of the the TextView variable. It should have something to do with the Tab Layout. Any ideas ? Cheers, Emre From: mmur...@commonsware.com Date: Tue, 9 Nov 2010 18:30:12 -0500 Subject: Re: [android-developers] UI -using the setText() method ? To: android-developers@googlegroups.com On Tue, Nov 9, 2010 at 6:20 PM, Emre A. Yavuz eayl...@hotmail.com wrote: I have a TableLayout and I populate its columns (and rows) dynamically by calling the setText() method whenever the corresponding values are updated. There is no setText() on TableLayout AFAIK. I am assuming you are referring to a TextView you have a in a table cell. How can I be sure that the new value of a certain table location will fit into its allocated space to avoid any runtime errors ? The table automatically resizes based on its contents and rules, and so there should not be any runtime errors, AFAIK. If you have evidence to the contrary, post a sample app somewhere. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] UI -using the setText() method ?
I avoid putting activities in tabs like the plague, except for one book example, so I have no particular suggestions here -- sorry. On Thu, Nov 11, 2010 at 12:26 PM, Emre A. Yavuz eayl...@hotmail.com wrote: Hi Mark, Yes, I was refering to a TextView that I have in a table cell. In fact, I have found out that the problem seems to have nothing to do with the TableLayout. I have created a Tab Layout based on the sample code given in the Tutorials section on the Android website. I have two Tabs with two Activities for each one of them. All I wanted to do was to update the a TextView using the setText() method for one of the Activities (whichever activity being displayed at the moment obviously). I must have been missing something but what ? I was able to achieve this display update when I was using a single layout by just setting the text of the the TextView variable. It should have something to do with the Tab Layout. Any ideas ? Cheers, Emre From: mmur...@commonsware.com Date: Tue, 9 Nov 2010 18:30:12 -0500 Subject: Re: [android-developers] UI -using the setText() method ? To: android-developers@googlegroups.com On Tue, Nov 9, 2010 at 6:20 PM, Emre A. Yavuz eayl...@hotmail.com wrote: I have a TableLayout and I populate its columns (and rows) dynamically by calling the setText() method whenever the corresponding values are updated. There is no setText() on TableLayout AFAIK. I am assuming you are referring to a TextView you have a in a table cell. How can I be sure that the new value of a certain table location will fit into its allocated space to avoid any runtime errors ? The table automatically resizes based on its contents and rules, and so there should not be any runtime errors, AFAIK. If you have evidence to the contrary, post a sample app somewhere. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: From emulator to real device
Sure - this is a peer-to-peer codebase that I imported into Android. It was a fairly straightforward import and everything works fine. I launch the component (the activity class starts all the corresponding threads) and the app finds and connects to peers across the network. I have a number of emulators running on laptops scattered around different network and they connect exchange data and are happy. But once I deploy this on a real device (either Droid or HTC) I get this exception which seems to say that some classes from the imported codebase are not found. I am not sure why this would be the case - I should get the same exception on the emulators if it was classloading problem right? Are there particular precautions or permissions that need to be taken care of for apps to migrate from the emulator to the real device? On Nov 11, 12:26 am, Kumar Bibek coomar@gmail.com wrote: Can you provide some more details? As to what are you trying to do? On Thu, Nov 11, 2010 at 10:53 AM, kypriakos demet...@ece.neu.edu wrote: HI all, I can run the app on the emulator without issues - when I run it on a real device I get the exception that certain classes are not found (see below for exception). I am sure this is a loaded question and I know an emulator is not a real device and many things can alter their behavior during this transition but loading classes seems a bit fundamental - any ideas? Perms and everything else in the corresponding directories are identical. I am just wondering if anyone else has seen similar issue before and if they have any hints as to what to look for - thanks again I/System.out( 297): P2PA - ## - fatal error : group creation failure W/System.err( 297): exception.PeerGroupException: Could not locate World PeerGroup Module Implementation. com.p2pSOAAndroidP2PA_16.P2PA.PeerToPeerAdapter.main(PeerToPeerAdapter.java: 808) W/System.err( 297): at com.p2pSOAAndroidP2PA_16.p2pSOAAndroidP2PA_16.onCreate(p2pSOAAndroidP2PA_16.java: 124) W/System.err( 297): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1123) W/System.err( 297): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2364) W/System.err( 297): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2417) W/System.err( 297): at android.app.ActivityThread.access $2100(ActivityThread.java:116) W/System.err( 297): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1794) W/System.err( 297): at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err( 297): at android.os.Looper.loop(Looper.java:123) W/System.err( 297): at android.app.ActivityThread.main(ActivityThread.java:4203) W/System.err( 297): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 297): at java.lang.reflect.Method.invoke(Method.java: 521) W/System.err( 297): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) W/System.err( 297): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) W/System.err( 297): at dalvik.system.NativeStart.main(Native Method) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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] Calling wipeData from a service
I have an app which just has a service in it. So it doesnt have an activity. I want to call the wipeData() api from it. I have followed an example which sets up the DevicePolicyManager from inside the onCreate of an Activity class. That works fine. Q1: My example only works if the mDeviceAdminSample is created as below. If I try to create the mDeviceAdminSample using new ComponentName((String pkg, String cls) then I dont get a popup window asking the user to confirm the new policies. Do I have to create the ComponentName using a context and a class? mDeviceAdminSample = new ComponentName(this, DeviceAdminSample.class); ... intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, mDeviceAdminSample); Q2: If I setup the device policy from one app, can I use those policies from another app? The problem seems to me to be the... mDeviceAdminSample = new ComponentName(this, DeviceAdminSample.class); If it has to be created using a context then how can you use it from another app? Q3: Basically I have an app with just a service and I dont know how I can call wipeData from it. I dont know how to create the mDeviceAdminSample to hook into policies that have already been created. Many thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: problem with AVD manager (last version) on XML verification failed.
No one has any idea? the S.O. is windows, I tried to install the same files in an other PC, all works fine. So it comes in mind that there is a problem with configuration of the PC.. the error is strange: why check if the HTML element exists? The url of xml is correct I think.. On 10 Nov, 16:16, Dani eraofw...@gmail.com wrote: Hi, I'm trying to install the Android SDK using AVD Manager. When it try to verificate the XML of the repository appears the following error: XML verification failed forhttp://dl-ssl.google.com/android/repository/repository.xml. Error: cvc-elt.1: Cannot find the declaration of element 'HTML'. I have the last ADV version (r7) and the last ADT plugin for Eclipse (0.99), downloaded today. Thank you, Daniele -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 AVD manager (last version) on XML verification failed.
Go into Settings in the AVD Manager and check Force https://... sources to be fetched with http://...;, then try again. On Thu, Nov 11, 2010 at 12:39 PM, Dani eraofw...@gmail.com wrote: No one has any idea? the S.O. is windows, I tried to install the same files in an other PC, all works fine. So it comes in mind that there is a problem with configuration of the PC.. the error is strange: why check if the HTML element exists? The url of xml is correct I think.. On 10 Nov, 16:16, Dani eraofw...@gmail.com wrote: Hi, I'm trying to install the Android SDK using AVD Manager. When it try to verificate the XML of the repository appears the following error: XML verification failed forhttp://dl-ssl.google.com/android/repository/repository.xml. Error: cvc-elt.1: Cannot find the declaration of element 'HTML'. I have the last ADV version (r7) and the last ADT plugin for Eclipse (0.99), downloaded today. Thank you, Daniele -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: From emulator to real device
Hmm, Interesting. Do your emulators and the device have the same API level? You might search for similar issues that others would have faced while using that particular library if it is public. exception.PeerGroupException: Could not locate World PeerGroup Module Implementation As from the logcat, it clearly complains about the missing implementation. On Thu, Nov 11, 2010 at 11:07 PM, kypriakos demet...@ece.neu.edu wrote: Sure - this is a peer-to-peer codebase that I imported into Android. It was a fairly straightforward import and everything works fine. I launch the component (the activity class starts all the corresponding threads) and the app finds and connects to peers across the network. I have a number of emulators running on laptops scattered around different network and they connect exchange data and are happy. But once I deploy this on a real device (either Droid or HTC) I get this exception which seems to say that some classes from the imported codebase are not found. I am not sure why this would be the case - I should get the same exception on the emulators if it was classloading problem right? Are there particular precautions or permissions that need to be taken care of for apps to migrate from the emulator to the real device? On Nov 11, 12:26 am, Kumar Bibek coomar@gmail.com wrote: Can you provide some more details? As to what are you trying to do? On Thu, Nov 11, 2010 at 10:53 AM, kypriakos demet...@ece.neu.edu wrote: HI all, I can run the app on the emulator without issues - when I run it on a real device I get the exception that certain classes are not found (see below for exception). I am sure this is a loaded question and I know an emulator is not a real device and many things can alter their behavior during this transition but loading classes seems a bit fundamental - any ideas? Perms and everything else in the corresponding directories are identical. I am just wondering if anyone else has seen similar issue before and if they have any hints as to what to look for - thanks again I/System.out( 297): P2PA - ## - fatal error : group creation failure W/System.err( 297): exception.PeerGroupException: Could not locate World PeerGroup Module Implementation. com.p2pSOAAndroidP2PA_16.P2PA.PeerToPeerAdapter.main(PeerToPeerAdapter.java: 808) W/System.err( 297):at com.p2pSOAAndroidP2PA_16.p2pSOAAndroidP2PA_16.onCreate(p2pSOAAndroidP2PA_16.java: 124) W/System.err( 297):at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1123) W/System.err( 297):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2364) W/System.err( 297):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2417) W/System.err( 297):at android.app.ActivityThread.access $2100(ActivityThread.java:116) W/System.err( 297):at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1794) W/System.err( 297):at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err( 297):at android.os.Looper.loop(Looper.java:123) W/System.err( 297):at android.app.ActivityThread.main(ActivityThread.java:4203) W/System.err( 297):at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 297):at java.lang.reflect.Method.invoke(Method.java: 521) W/System.err( 297):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) W/System.err( 297):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) W/System.err( 297):at dalvik.system.NativeStart.main(Native Method) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To
[android-developers] Re: Default Media Button Application
Thanks for the reply. So I guess Android is missing a clean concept here...? The problem is that if a user has installed several media (e.g. music) players, it is not clear which player will be started. Most likely, all of them are registered for the ACTION_MEDIA_BUTTON intent, and hence all of them might start playing music... If the players abort the broadcast once received, I guess the other players won't receive it anymore... But still, there is no possibility for the user to choose which player should take control. I've noticed that some players just set an extremely high priority value for the intent (and thus basically try to make themselves the default player). This is definitely not the intended way of handling the issue, because in the end, only the user can decide which of two installed players should be launched (i.e. which one s/he wants to be his/her default player, and which one might be used for special cases only). Any thoughts on that? On Nov 11, 4:14 pm, Mark Murphy mmur...@commonsware.com wrote: The media button is a broadcast Intent, not an activity Intent. Hence, it doesn't go through the normal chooser-style stuff like you see with activity Intents (e.g., default browser). You can listen for the ACTION_MEDIA_BUTTON broadcast. The documentation does not say it is an ordered broadcast, so I assume all applications that have registered for it will receive it. On Thu, Nov 11, 2010 at 10:06 AM, michael kuh...@gmail.com wrote: Hi, I wonder whether there is a concept in Android that allows a user to define which application should be launched if a headset media button is pressed..? This would be something similar as the concept of a default browser or default e-mail application that is launched when a website should be opened or a mail needs to be sent. As far as I know such a concept at least exists for a browser on Android. Is there something like a default media player that is started when the user hits the headset's play button? If so, how could my application inform the system that it is a potential candidate for the default media player application? Thanks, Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Default Media Button Application
Well, I guess, the behaviour of the ACTION_MEDIA_BUTTON is not to only start or stop playing music. Different apps might want to handle and do different stuff when the media button is pressed, and thus, every app registered for the broadcast should receive it silently, without prompting the user, since, different apps might do different things. I think, registering for this broadcast should be done within one of your activities or services where you want to listen to this broadcast and also unregister it when you are done, instead of putting this in your manifest. On Thu, Nov 11, 2010 at 11:14 PM, michael kuh...@gmail.com wrote: Thanks for the reply. So I guess Android is missing a clean concept here...? The problem is that if a user has installed several media (e.g. music) players, it is not clear which player will be started. Most likely, all of them are registered for the ACTION_MEDIA_BUTTON intent, and hence all of them might start playing music... If the players abort the broadcast once received, I guess the other players won't receive it anymore... But still, there is no possibility for the user to choose which player should take control. I've noticed that some players just set an extremely high priority value for the intent (and thus basically try to make themselves the default player). This is definitely not the intended way of handling the issue, because in the end, only the user can decide which of two installed players should be launched (i.e. which one s/he wants to be his/her default player, and which one might be used for special cases only). Any thoughts on that? On Nov 11, 4:14 pm, Mark Murphy mmur...@commonsware.com wrote: The media button is a broadcast Intent, not an activity Intent. Hence, it doesn't go through the normal chooser-style stuff like you see with activity Intents (e.g., default browser). You can listen for the ACTION_MEDIA_BUTTON broadcast. The documentation does not say it is an ordered broadcast, so I assume all applications that have registered for it will receive it. On Thu, Nov 11, 2010 at 10:06 AM, michael kuh...@gmail.com wrote: Hi, I wonder whether there is a concept in Android that allows a user to define which application should be launched if a headset media button is pressed..? This would be something similar as the concept of a default browser or default e-mail application that is launched when a website should be opened or a mail needs to be sent. As far as I know such a concept at least exists for a browser on Android. Is there something like a default media player that is started when the user hits the headset's play button? If so, how could my application inform the system that it is a potential candidate for the default media player application? Thanks, Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.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: Creating a trial version
Yeah, both Amazon and Google host web databases. It would be just a simple table with user IDs and dates. But it's a lot of infrastructure to lay in when Google could just make the return period settable. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: issue with Edit Text
thnx a lot.. On Nov 11, 8:09 pm, TreKing treking...@gmail.com wrote: On Thu, Nov 11, 2010 at 12:06 AM, Kartik Bansal kartikban...@gmail.comwrote: issue is in eclipse preview.. not tried it on actual device.. I'd bet money this is the problem. There is also an issue with italics in TextViews disappearing in the preview, but it shows up fine when you run it. Always try that first. --- -- 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: Default Media Button Application
On Thu, Nov 11, 2010 at 12:44 PM, michael kuh...@gmail.com wrote: Thanks for the reply. So I guess Android is missing a clean concept here...? It's more that they aren't expecting the media button to launch apps, I presume. It is to control a running app. If the players abort the broadcast once received, I guess the other players won't receive it anymore... That only works for ordered broadcasts. The documentation does not say this is an ordered broadcast, though I haven't looked at the implementation, and so the docs could be wrong. Any thoughts on that? If you have ~50 hours lying around that you don't know what to do with, yes -- let me know and I can make some suggestions. If you're looking for some simple answer, sorry, but no. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Full Screen Caller Pictures and Full Screen Caller ID
On Wed, Nov 10, 2010 at 1:02 PM, Kavinder Dhaliwal kavind...@gmail.comwrote: I don't know exactly what either of these developers have done, but hope someone on the forums does. Just guessing, but if there's nothing in the SDK for this, these apps are probably using private APIs which is generally a bad idea. - 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: How to get a string from a website, and show the string on my android app. ?
Ideally, you should be connecting to a webservice to get this value. Just any website won't do. You should mention which webservice you are trying to access. On Nov 11, 2:13 pm, xi developer xidevelope...@gmail.com wrote: I have made a service which extends Service in android, and running in the background of my android app. What I want from this background service is to get the euro to dollar exchange rate from a finance website, I have my service ready, it can periodically run a function, I am now need to implement the function to get the euro-dollar rate from a website, there are many this kind of website, my question is, how can I get the currency rate as a string from the website, and pass the string to my 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: detect the language of a particular piece of text (no internet connection)
There are no such APIs that I am aware of in the Android SDK. There might be some 3 party libraries, but again, I haven't searched for them. Try googling. On Nov 11, 1:48 pm, alan lam certain...@gmail.com wrote: Is there any function/library/API which can detect the language of a particular piece of text (no internet connection)? i.e. for an input text This is a sentence, it should detect the language as English. Or for Esto es una sentencia it should detect the language as Spanish. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Drawing a marker when user touch the map
On Thu, Nov 11, 2010 at 12:06 PM, ZQ zhiqiang@gmail.com wrote: Hi TreKing, Thank you for replying. I tried drawing a marker on the map with the code below, but i can't get it to draw anything when i click on the map. Could u advice me? Thank you @Override public boolean onTouchEvent(MotionEvent event, MapView mapView) { mapOverlays = mapView.getOverlays(); drawable = getResources().getDrawable(R.drawable.androidmarker); HelloItemizedOverlay itemizedoverlay = new HelloItemizedOverlay(drawable); //---when user lifts his finger--- if (event.getAction() == 1) { GeoPoint p = mapView.getProjection().fromPixels( (int) event.getX(), (int) event.getY()); GeoPoint point3 = new GeoPoint(p.getLatitudeE6(), p.getLongitudeE6()); OverlayItem overlayitem3 = new OverlayItem(point3, , ); itemizedoverlay.addOverlay(overlayitem3); } return false; } A) Please respond to the whole group. B) Try invalidating the mapview. - 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: Problem related to multiple Screen Support
Can you post some screen shots of the layouts? That would help. As far as I can tell, it's the expected behaviour. Say, you have this layout. Button(100dip) TextView(100dip) EditText(100dip) On different devices, these dips will be converted to different pixel values at runtime, and thus, their actual length(say in inches) will definitely vary. Having different layouts is a different point altogether. On Nov 11, 12:15 pm, swaps12 swap...@gmail.com wrote: Hi, I am trying to develop an app for which I want multiple screen support. I have read the Android article on Best practices for Multiple Screen Support. As per the article we have to follow 3 important things 1. Mention support for different screen sizes(large, medium and small) and any density in AndroidManifest.xml. 2. Place images of 3 dpi's (120, 160, 240) in 3 folders res/ldpi, res/ mdpi and res/hdpi. 3. In layout's the dimension should be mentioned in dip units. Then Android will take care of the scaling on its own. I have implemented all these points in my project. The images are picked up correctly from the appropriate folders. But the arrangements of the controls in not same. e.g. I ran the app on three emulators 1. Resolution 240*320 dpi 120. 2. Resolution 240*320 dpi 160. 3. Resolution 240*320 dpi 240. (All the emulator have same resolution but different density. ) The problem is the position of the controls is not same on all the three emulator. As per my understanding if the android:layout_marginLeft and android:layout_marginTop are mentioned in dip then this problem should not occur. As the density of the emulator increases the controls get placed more towards the right. Is it necessary that i provide layouts for all combinations of dimensions and density i.e. in layout-small, layout-large, layout- medium, layout-long,layout-notlong? Am I missing some important point? Any help will be great. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to prohibit the user install the app to the SDcard of the phone
Hi, all Android 2.2 allow users install the app on SDcard. Developer could set the android:installLocation =internalOnly to install the app to internal memory. But I found that the user could also use the adb install -s command to install the app on the Sdcard. Are there anyone know how to force the app installed on internal memory? Another question is: are there any API support to find the locatin where the app is installed? Thanks a lot. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] AVD cursor
Hi guys, When i use the AVD to test my apps the cursor in the avd window changes from the windows default cursor to a custom black cursor. I would like to use the widows default. Does anyone know how to accomplish this? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] developing sliding tab for android application
Hello everyone, I am new to android development and really need your help please reply if you know the answer..its really important for me. MY QUESTION IS: I need to develop a sliding tab at the centre of menu for android application which should work in such a way that if i slide it on left side it should go to some page and if i slide it on the right side it should go to another page (just like the gesture of iphone menu screen if we slide towards left side screen goes to left page if we slide to the right side screen go to right page i want to implement same thing wid a sliding tab) IF ANYONE KNOWS THE ANSWER PLEASE REPLY ITS VERY IMPORTANT TO ME THANKYOU -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] adb connect works only with localhost?
Hi all, I was playing trying to run an emulator remotely, and I thing I stumbled upon a bug (?or maybe something I dont get?) abd seems to parse wrong the params passed to it... Here are some examples: ...:~/android/android-sdk-linux_x86/tools$ ./emulator -avd testdev - port 5554 -report-console tcp:42001,server [4] 7610 ...:~/android/android-sdk-linux_x86/tools$ ifconfig |grep addr eth0 Link encap:Ethernet HWaddr 00:50:8d:bc:b0:e3 inet addr:192.168.1.5 Bcast:192.168.1.255 Mask: 255.255.255.0 ... ...:~/android/android-sdk-linux_x86/tools$ ./adb connect 192.168.1.5:42001 unable to connect to 192.168.1.5:42001:42001 (why is it 192.168.1.5:42001:42001 ?) ...:~/android/android-sdk-linux_x86/tools$ ./adb connect 127.0.0.1:42001 connected to 127.0.0.1:42001 ( localhost worked just fine) Furthermore ...:~/android/android-sdk-linux_x86/tools$ ./emulator -avd PegDevice16MB -port 5558 -report-console tcp:,server [4] 7819 ...:~/android/android-sdk-linux_x86/tools$ ./adb connect 192.168.1.5 unable to connect to 192.168.1.5: (ok, now it is 192.168.1.5: but still didnt work...) ...:~/android/android-sdk-linux_x86/tools$ ./adb connect localhost connected to localhost: Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Buttons on Android Devices
Kind of new to Android, and definitely don't know too much about the devices. I was wondering whether every android device out there has a menu and back button? I just wanna make sure we could assume this as a fact... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: not getting next image on clicking next button
This should work fine. Any errors? There might be something wrong in the loadImage method. On Nov 11, 12:16 pm, Alok Upadhyay maddy.luck...@gmail.com wrote: Hi, i have a nest button on clicking which a new image should be displayed.But not happening so i have taken an integer array as: private int imageCounter = 0; private int index_count = 0; private ImageView imageView; private int[] imageArray = {R.drawable.image_w_lbl_0, R.drawable.image_w_lbl_1,}; //in oncreate i have done something like this: public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.frame0);//this one is the common parent layout for all imageviews super.onCreate(savedInstanceState); imageView = new ImageView(this); ImageButton next = (ImageButton) findViewById(R.id.next); ImageButton back = (ImageButton) findViewById(R.id.back); next.setOnClickListener(this); back.setOnClickListener(this); //show the default image this.loadImage(imageArray[0]); } in onclick something like this: int imagePath = 0; // TODO Auto-generated method stub switch (v.getId()) { case R.id.next: if(imageCounter 25) { imagePath = imageArray[index_count]; } index_count++; imageCounter++; break; case R.id.back: if(imageCounter 0) { //imagePath = } break; } this.loadImage(imagePath); //now i have loadImage method to load image into imageview -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 I cannot see the Free App in Market place
Hi, Have created and published Tasbee Counter App in Market place ... but i cannot see this in Market Place. I am trying it from India Kindly let me know the solution .. or am I missing some thing Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] background phone call
I have to made call in background mean standard android GUI does not come appear when i made call instead of it go into the background. Timo prill give me an idea from 1 forum which is try to listen for phone call broadcasts, check if its a call done by your application and then start the intent you want to show during the call from the background. but now i have no idea how to listen phone call broadcast. If any one has idea please reply me as early as possible -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] not getting next image on clicking next button
try this imageview.setImageResource(R.drawable.imgename); On Thu, Nov 11, 2010 at 12:46 PM, Alok Upadhyay maddy.luck...@gmail.comwrote: Hi, i have a nest button on clicking which a new image should be displayed.But not happening so i have taken an integer array as: private int imageCounter = 0; private int index_count = 0; private ImageView imageView; private int[] imageArray = {R.drawable.image_w_lbl_0, R.drawable.image_w_lbl_1,}; //in oncreate i have done something like this: public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.frame0);//this one is the common parent layout for all imageviews super.onCreate(savedInstanceState); imageView = new ImageView(this); ImageButton next = (ImageButton) findViewById(R.id.next); ImageButton back = (ImageButton) findViewById(R.id.back); next.setOnClickListener(this); back.setOnClickListener(this); //show the default image this.loadImage(imageArray[0]); } in onclick something like this: int imagePath = 0; // TODO Auto-generated method stub switch (v.getId()) { case R.id.next: if(imageCounter 25) { imagePath = imageArray[index_count]; } index_count++; imageCounter++; break; case R.id.back: if(imageCounter 0) { //imagePath = } break; } this.loadImage(imagePath); //now i have loadImage method to load image into imageview -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Launch twitter Homepage
use callback url also. On Thu, Nov 11, 2010 at 12:53 PM, Babita kumari babita.permeat...@gmail.com wrote: Ya Bibek , I am getting following error : 11-10 10:48:46.348: ERROR/OAUTH(409): Communication with the service provider failed: Received authentication challenge is null I have added Twitter4J and signpost as library and I have registered as client type on Twitter . And my code is following: public class TwApp extends Activity { private static final String APP =OAUTH; private Twitter twitter; TextView tweettx; Button login; private OAuthProvider provider; private CommonsHttpOAuthConsumer consumer; private static final String CONSUMER_KEY = consumer key... ; private static final String CONSUMER_SECRET = consumerSecret key..; String verifier ; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tweettx = (TextView)findViewById(R.id.tweet); login = (Button) findViewById(R.id.main_loin_button); login.setOnClickListener(new OnClickListener() { public void onClick(View v) { askOAuth(); } }); } private void askOAuth() { try { consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET ); provider = new DefaultOAuthProvider( https://api.twitter.com/oauth/request_token;, https://api.twitter.com/oauth/access_token;, https://api.twitter.com/oauth/authorize;); String authUrl = provider.retrieveRequestToken(consumer, OAuth.OUT_OF_BAND); System.out.println( + authUrl); Toast.makeText(this, Please authorize this app!, Toast.LENGTH_LONG).show(); this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl))); } catch (Exception e) { System.out.println(ERROR_ + e); Log.e(APP, e.getMessage()); Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show(); } } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); Uri uri = intent.getData(); if (uri != null uri.toString().startsWith( OAuth.OUT_OF_BAND)) { verifier = uri.getQueryParameter(oauth.signpost.OAuth.OAUTH_VERIFIER); } try { // this will populate token and token_secret in consumer provider.retrieveAccessToken(consumer, verifier); // TODO: you might want to store token and token_secret in you app settings AccessToken a = new AccessToken(consumer.getToken(), consumer.getTokenSecret()); // initialize Twitter4J twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET); twitter.setOAuthAccessToken(a); // create a tweet Date d = new Date(System.currentTimeMillis()); String tweet = #OAuth working! + d.toLocaleString(); // send the tweet twitter.updateStatus(tweet); // feedback for the user... tweettx.setText(tweet); Toast.makeText(this, tweet, Toast.LENGTH_LONG).show(); login.setVisibility(Button.GONE); } catch (Exception e) { Log.e(APP, e.getMessage()); Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show(); } } } Can you reply fast as its very urgent. Thanks Babita -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Froyo media not mounting in time on boot-up? (works in Eclair)
Figured it out by adding a loop on startup that waits for media to be mounted: private File backgroundToJPG() { String status = Environment.getExternalStorageState(); if (status.equals(Environment.MEDIA_MOUNTED)) { File d = new File(Environment.getExternalStorageDirectory()); d.mkdirs(); File f = new File(d,/Custom.jpg); if (!f.exists()){return null;} return f; } else { //keep calling back until media is mounted! try{ Thread.sleep(1000); }catch(InterruptedException e){ } File tmp = backgroundToJPG(); return null; } } On Nov 7, 1:20 am, Koops khris.koo...@googlemail.com wrote: Hello there I was wondering if someone may be able to help me... I have a Live Wallpaper app that is working very well on Eclair but there is a strange issue with Froyo that I can't find any information about. The user is able to select a custom picture as a background from their gallery and it will be saved to internal storage (/ Snowflakes/CustomBG.jpg) and applied as a background to the live wallpaper. That all works fine until the user reboots their phone... The problem is that the internal storage doesn't seem to be mounted in time for when the live wallpaper starts and so it reverts to the default setting when null is returned (see code below). As I say, this problem has only been introduced with Froyo as Eclair works fine (the image is found and used so the internal storage must be mounted before the Live Wallpaper starts). Here's the code that searches for the CustomBG.jpg image on startup... @Override public void onSurfaceCreated(SurfaceHolder holder) { super.onSurfaceCreated(holder); c = holder.lockCanvas(); canvasSize = new Point(c.getWidth(), c.getHeight()); globalCanvasSize = canvasSize; holder.unlockCanvasAndPost(c); generateBackgroundGraphic(); } private void generateBackgroundGraphic() { if (backgroundToJPG() == null) { //default to gradient pattern background = BitmapFactory.decodeResource(res, R.raw.gradient); Log.d(pic, (SF) File doesn't exist to using Gradient as default); } else { background = BitmapFactory.decodeFile(backgroundToJPG().getPath()); Log.d(pic, (SF) File does exist so using '/Snowflakes/ CustomBG.jpg' as background); } } private File backgroundToJPG() { String status = Environment.getExternalStorageState(); if (status.equals(Environment.MEDIA_MOUNTED)) { File d = new File(Environment.getExternalStorageDirectory() +/Snowflakes); d.mkdirs(); File f = new File(d,CustomBG.jpg); if (!f.exists()) {return null;} return f; // -- FILE NOT BEING RETURNED HERE!! } } Apologies for the code formatting - is there any way I can improve this? Anyway, I'd be very grateful for any help you may have... I can't find any information about this on-line so perhaps there's something wrong with my code? Thanks, Chris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] compiling amr from android sources
Just a quick one. Assuming it is technically possible, can I compile the amr enc project and use it from jni? Thanks Eli -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en