**** BEGIN LOGGING AT Thu Apr 09 02:59:57 2009 Apr 09 03:45:24 how do i prevent the phone from sleeping? Apr 09 04:59:34 hi friends, i am new to android. I wanted a little information. can the UI use opengles ? I meant reflections shading etc Apr 09 05:40:51 Hi, I'm and android newb Apr 09 05:40:55 *an android newb Apr 09 05:41:02 Can someone help me with a basic database question? Apr 09 06:39:36 hi.. i have a question and excuse me if that seems too trivial or something like that... i was wondering how can i get a 3D animation in a surfaceview? Are there any ready to use classes in Android or I have to do it using opengl es methods? anything similar to android.view.animation available to be used directly in a surfaceview? Apr 09 07:11:42 pundiramit: android.view.animation is UI animations Apr 09 07:11:51 like making views flip around and what not :) Apr 09 07:12:13 for 3D your best bet is opengl es Apr 09 07:12:30 can i use those animations in my surface view? i guess not Apr 09 07:14:20 opengl es works in surface views Apr 09 07:15:44 thanks rejser for clarification Apr 09 09:58:28 hi - I'm interested in helping on a music composing/midi tracker app for android. Is there a project in that area already? Apr 09 10:39:41 ey amit hw r u? **** BEGIN LOGGING AT Thu Apr 09 13:17:01 2009 Apr 09 15:27:50 I'm using reflection to invoke LocationManager.updateProviders, so that when I call Settings.System.putString for LOCATION_PROVIDERS_ALLOWED the list of providers gets updated. This normally works ok during normal conditions, but when I call in destroy I'm getting a security exception. Apr 09 15:28:15 Aside from putting this in onStop, can anyone suggest a better method of doing this, or getting around the security exception? Apr 09 15:28:37 The reason we're doing this is that we're enabling GPS while the app is active, if it's not already, and then attempting to deactivate it when we're done if it was deactivated when we started Apr 09 15:29:55 vol: is that the best way to enable/disable gps? Apr 09 15:30:12 isn't there a system settings contentprovider you can update Apr 09 15:30:26 is there? We're calling Settings.System.putString Apr 09 15:30:34 the problem is that that doesn't actually take effect until we call updateProviders Apr 09 15:30:49 it worked in 1.0, but in 1.1 this changed to be a bit less useful Apr 09 15:30:59 requiring bits of witchcraft and trickery to invoke (reflection) Apr 09 15:32:48 of course, if you have a better solution, I'm all ears ;) Apr 09 15:37:31 vol: hmm, I haven't had to do that myself...but seems like you shouldn't have to break out reflection on it Apr 09 15:38:52 zhobbs: if I recall, we found this in the settings java classes Apr 09 15:39:00 this is supposed to be seeekret Apr 09 15:39:07 so that malicious apps can't turn on the GPS Apr 09 15:40:29 hmm, there are lots of toggle apps out there Apr 09 15:40:45 http://groups.google.com/group/android-developers/browse_thread/thread/7f50b08efdf01c27/076cb21110bb998b?lnk=raot Apr 09 15:41:26 vol: did you check what they do in the Settings app? Apr 09 15:41:26 I've been digging for an hour, and can't find a way to tell a WebView not to display a left and top margin. Does anyone know ho to achieve that, please? Apr 09 15:41:35 probably private api's though Apr 09 15:41:42 that's exactly what it is Apr 09 15:41:50 the settings app calls LocationManager.updateProviders Apr 09 15:41:57 something we plebs don't have normal access to Apr 09 15:42:16 yeah Apr 09 15:42:37 someone needs to build an SDK that just turns the use of those @hidden api methods into warnings Apr 09 15:43:24 ha Apr 09 15:43:44 anyway, if you skip to the end of that thread, Rudi seems to have the same problem we're having Apr 09 15:43:56 so I'm wondering if the solution is to basically try and handle all app-ending events and call this there Apr 09 15:44:30 actually, right now my current solution is to go get taco bell, because I'm a slob Apr 09 15:44:34 bbl :D Apr 09 15:44:38 :) Apr 09 15:44:53 maybe could do whatever you need to do before you call super.onDestroy() Apr 09 15:45:52 time to override finish :P Apr 09 17:18:13 So i'm using a ListView that starts out empty and I add things to it through an EditText. I defined the ListView as layout_height="wrap_content" but as I add new items it doesn't expand. Is there a way to do this or should I just be inflating views and appending them to the layout? Apr 09 17:43:54 tbr you need to tell the adapter of the list that it has new values Apr 09 17:44:20 notifyDataSetChanged() Apr 09 17:44:44 notifyDataSetInvalidated() Apr 09 17:48:13 it's displaying the new items but it's just not resizing the list height Apr 09 17:54:12 is there anything else you are showing? Apr 09 17:56:14 yeah there's a few EditText's and such and the last one allows you to add items and i want the overall layout to grow since it's scrolling already Apr 09 17:56:54 Maybe you need to tell the parent layout to relayout Apr 09 18:34:37 04-09 14:32:23.761: WARN/ActivityManager(62): Permission Denial: starting Intent { flags=0x10000000 comp={com.blau.android.calendartest/com.blau.android.calendartest.inbox.InboxEditActivity} } from ProcessRecord{43160290 99:android.process.acore/10016} (pid=99, uid=10016) requires null Apr 09 18:34:37 any ideas Apr 09 18:34:47 ive had it before but forget what it was Apr 09 18:35:14 it's an intent :D Apr 09 18:35:37 the permission denial part Apr 09 18:36:00 which flag is that? Apr 09 18:36:22 flag? Apr 09 18:36:28 starting Intent { flags=0x10000000 Apr 09 18:36:45 whatever the defaults are Apr 09 18:37:05 i played with shortcuts so much my mind is mushy Apr 09 18:37:10 i rpobably forgot something simple Apr 09 18:37:26 :\ Apr 09 18:38:00 i made a shortcut on the desktop by passing a stuff back to the shortcut thing on the desktop Apr 09 18:38:09 you know when you long click, and get the list of things Apr 09 18:40:40 yeah, don't know offhand, sorry Apr 09 18:40:47 I mean I know the long click Apr 09 18:40:53 just dont' know what the bug is you're having Apr 09 18:41:07 that's Intent.FLAG_ACTIVITY_NEW_TASK, which is usual when launching something from Home Apr 09 18:42:22 got a workaround Apr 09 18:42:25 now i just have to udnerstand why Apr 09 18:42:37 what's the workaround? Apr 09 18:42:53 adding category=default, and action=main fixed it, but i dont know if thats the correct way Apr 09 18:43:06 since this isnt a main entry point to the app should i be doing that? Apr 09 18:43:26 well, you're setting up a shortcut to launch it directly Apr 09 18:43:49 yeah, so is that the right way? Apr 09 18:44:11 still, hm. Apr 09 18:44:11 hmr Apr 09 18:45:00 * ctate glances at the code to see if he can work out what's prompting the permissions check Apr 09 18:45:19 oh i think i know maybe Apr 09 18:45:32 you dont want other apps to be running any activity willy nilly Apr 09 18:47:30 oh! is the activity class public? ;) Apr 09 18:47:59 it looks like it's failing the permissions check because the activity is not exported Apr 09 18:48:22 [null permissions are nominally always granted, so it must be failing for some other reason -- lack of export is the reason that looks like it applies] Apr 09 18:49:41 ah Apr 09 18:50:34 thanks Apr 09 18:50:36 android:exported="true" in the manifest Apr 09 18:50:53 and then try without the action=main and category=default to see if that was indeed it Apr 09 18:52:23 worked! Apr 09 18:52:25 ctate ctate! Apr 09 18:52:32 :D Apr 09 18:52:33 brilliant Apr 09 18:52:59 http://developer.android.com/guide/topics/manifest/activity-element.html#enabledhttp://developer.android.com/guide/topics/manifest/activity-element.html#exported Apr 09 18:53:02 err. Apr 09 18:53:03 http://developer.android.com/guide/topics/manifest/activity-element.html#exported Apr 09 18:53:05 stupid keyboard Apr 09 18:53:47 declaring an intent filter -- e.g. action=main -- implicitly makes exported=true by default Apr 09 18:53:50 which is why that worked Apr 09 18:54:04 ah cool thanks Apr 09 19:48:47 i just downloaded camera source from http://tinyurl.com/cfjhn3 but it has over 450 errors when i open it in eclipse, why is there so many errors? Apr 09 19:52:54 what are some of the errors? Apr 09 19:53:21 some of them might be because the built in apps use private API calls, but I dount there's 450 of those Apr 09 19:53:37 s/dount/doubt Apr 09 19:56:14 Description Resource Path Location Type Apr 09 19:56:14 mScrollY cannot be resolved ImageGallery2.java Camera/src/com/android/camera line 1238 Java Problem Apr 09 19:56:33 Description Resource Path Location Type Apr 09 19:56:33 MediaStore.INTENT_ACTION_VIDEO_CAMERA cannot be resolved MenuHelper.java Camera/src/com/android/camera line 560 Java Problem Apr 09 19:56:59 Description Resource Path Location Type Apr 09 19:56:59 ERROR No resource identifier found for attribute 'configure' in package 'android' appwidget_info.xml Camera/res/xml line 17 aapt Problem Apr 09 19:57:16 do you need more sample ? Apr 09 20:02:01 Description Resource Path Location Type Apr 09 20:02:02 com.android.camera.PhotoAppWidgetProvider does not extend android.content.BroadcastReceiver AndroidManifest.xml Camera line 206 Android Problem Apr 09 20:08:13 hi all, I'm looking to create a graphical application in C++ on the Android. From what I understand this will involve compiling to native ARM code for the architecture. but my question is, does FLTK work well under this enviroment ? thanks Apr 09 20:08:41 Er, if it's in C++, is it really "on Android"? Apr 09 20:10:53 halley: I guess it's supported by Android officially,unlike the non-standard java implementation. but the ARM code is still run by the OS right ? Apr 09 20:12:16 yikes Apr 09 20:12:22 htet: pastebin next time, PLEASE. Apr 09 20:12:44 hmm is this channel run by Google ? I see a single # in the name Apr 09 20:12:58 I mean is it official Apr 09 20:14:22 uh, official enough Apr 09 20:14:27 googlers run it in their spare time Apr 09 20:14:30 (no I am not one of them) Apr 09 20:14:42 this and #android Apr 09 20:14:50 stay well clear of #android-chat, though. Apr 09 20:16:03 vol: I knew of #android but what's wrong with #android-chat ? Apr 09 20:17:05 Whats't he difference between the java.microedition.khronos.egl package and the java.microedition.khronos.opengles? Apr 09 20:17:37 #android-chat is where firc dumps everyone. Think of all of the comments on marketplace. Who writes them? the people that go there. Apr 09 20:17:52 hahah I see :) Apr 09 20:18:26 http://www.khronos.org/egl/ Apr 09 20:18:54 http://www.khronos.org/opengles/ Apr 09 20:18:56 vol: ok, i was not planning to paste all 400 errors here :) Apr 09 20:19:28 vol: I'm very new to this field, do you think it's possible to use the Fast Light Tookkit (FLTK) with C++ to create an application that runs on Apr 09 20:19:32 on Android Apr 09 20:19:50 I mean, is there anything that would stop me from doing that ? Apr 09 20:19:59 I don't know anything about FLTK. It is entirely possible to create a shared lib you can load from a dalvik program. Apr 09 20:20:01 ignoring the lack of support that is Apr 09 20:20:16 Starting arbitrary bins requires access to a console, or another app to launch them. Apr 09 20:21:18 vol: I'll be developing on the Dev Phone, but the final app has to run on an HTC Magic... will I not be able to get to the console on the HTC by default ? Apr 09 20:21:26 no, you will not. Apr 09 20:21:35 your user is going to have to start your app by starting an android app somehow Apr 09 20:21:45 Hi there can anyone tell me where I find the equivalent to /etc/groups on android? Apr 09 20:22:13 now, what you can do is implement everything as a shared library, handle flipping to screen by using a SurfaceView, push key events down to the native layer, etc. Apr 09 20:22:19 that's what we're doing for our app Apr 09 20:22:38 this does come with a bit of a learning curve, however. Apr 09 20:27:46 hmm this sounds very difficult, I'm new to the whole cell phone programming scene. I would've thought I could use some kind of pre-made application loader that I run the binary through. Are you basically saying the whole application itself needs to be programmed in such a way that it will run, or is the main difficulty is that it's C++ and thus I don't have an API to control the phone's hardware wifi gps etc... Apr 09 20:27:50 vol: ^ Apr 09 20:28:03 the "android" way is to make your app in java. Apr 09 20:28:10 if you want to use native code, it's a bit more hairy. Apr 09 20:28:53 blip-: yeah, no API is the main problem Apr 09 20:29:00 basically, you're on your own with a lot of things, you're REALLY STRONGLY DISCOURAGED from linking against anything (even libc is iffy) Apr 09 20:29:32 native code is really flat out unsupported for android at the moment, but that will change in the future Apr 09 20:30:32 so, if your situation is such that it wouldn't be the end of the world to just redevelop it for java/android, that's the absolute preferred way to do things. Apr 09 20:30:43 problem is I've got some existing algorithms in C++..... so I need a way to run those algos in additiona to creating an application around them for them Apr 09 20:31:06 Hence my Er, if it's in C++, is it really "on Android"? Apr 09 20:31:07 well, you can always create a shared lib that just runs those algorithms via JNI Apr 09 20:31:09 ye and the c++ code cannot be rewritten Apr 09 20:31:29 "Can't be rewritten" sounds very suspicious. Who wrote it? Apr 09 20:31:38 halley: not me Apr 09 20:31:56 Under what licensing agreement? Apr 09 20:32:12 "Can't be rewritten" usually means "if we have to rewrite it lets just not bother with this project at all" Apr 09 20:32:22 yes that's it :) Apr 09 20:32:55 our app would just flat out not fly as dalvik only; it would take forever to rewrite and we've been burned pretty hard on j2me so management is not happy about rewriting code and keeping seperate codepaths Apr 09 20:33:25 as in "here's the java version and here's the c++ version of THE EXACT SAME ALGORITHM" Apr 09 20:34:13 vol: sorry to repeat but I want to make sure I'm following. I can compile the C++ algos to ARM, and somehow use JNI to interface to them from a Java interface I create ? Apr 09 20:34:20 yes Apr 09 20:34:21 http://groups.google.com/group/android-ndk Apr 09 20:34:40 You can created a shared lib, use System.load to load the shared lib, and then use JNI to call into methods. Apr 09 20:34:54 that is pretty much how we are doing our app Apr 09 20:35:04 events get sent into the native layer via JNI Apr 09 20:35:22 vol: ah I see. so that way I don't have to worry about "loading" any native code ina difficult way since the Java front-end will load the algos for me Apr 09 20:35:26 we are using a somewhat ugly (and possibly fatal) method of flipping directly to a surfaceview Apr 09 20:35:28 Is it something that takes a lot of CPU, or manages hardware directly, or what? Apr 09 20:35:47 blip-: basically this is calling dlopen, and doing java specific JNI stuff Apr 09 20:36:09 halley: lots of CPU, lots of very, very complicated code. Apr 09 20:36:26 And yours, blip-? Apr 09 20:36:42 likewise :) Apr 09 20:36:57 * halley shrugs. Apr 09 20:37:26 Not going to say that Java's as fast by any means, but most people overestimate how "complicated" their algorithms are. Apr 09 20:39:03 it's not an issue of "we need to sqeeze every cycle" Apr 09 20:39:26 it's an issue of "we spent hundreds of man years developing these specific C routines with hundreds of thousands of lines of code; porting it to another language is just not feasable" Apr 09 20:39:26 ok so the way I see it now, I've got 2 choices: 1) The currently achievable option of creating a Java frontend and use JNI to load the C++ algos as shared libs. 2) or I go through the difficult job of making a C++ application load and then it can communicate easily with the algos. 3) or I wait for C++ support in Android... how soon will that be do you think roughly.. months ? Apr 09 20:39:49 there won't be support for you to just run a C++ bin from the main screen, pretty much ever. Apr 09 20:39:53 blip-, likely not. Apr 09 20:40:10 you're pretty much stuck using JNI for something you want the average user to be able to start Apr 09 20:40:28 The *point* of Arduino is portability and an app model that is focused on a stack of different short-term tasks. Apr 09 20:40:42 you mean android :> Apr 09 20:40:50 Gah. Android. Apr 09 20:40:53 vol: If will be able to configure the device the user will use Apr 09 20:40:59 arduino is focused on short term tasks too, though ;) Apr 09 20:41:00 Being involved in both makes it hard on the fingers. Apr 09 20:41:12 blip-: what exactly does your app do, if you don't mind saying Apr 09 20:43:16 you can always use the java layer to control hardware specific things (as much as is possible) Apr 09 20:43:22 er Apr 09 20:43:23 vol: it's an interface to some communication related algorithms (those are the c++ stuff). where can I read about doing option 2, ie to see how I can make the C++ app run on an HTC magic ? Given that I can customize the phone it will run on Apr 09 20:43:24 to configure Apr 09 20:43:48 blip-: you get a device with a console and you type /mydir/myapp Apr 09 20:43:55 there are console apps available at marketplace Apr 09 20:44:03 the issue is getting a surface to draw onto Apr 09 20:44:06 vol: reason I'm leaning towards c++ is because the algos are c++.. but also because I want deeper access to hardware. gps, wifi, etc... Apr 09 20:44:31 blip-: things are pretty much either exposed at the java layer, or require root access. Apr 09 20:44:41 you can run cat /dev/smd27/ to get raw NMEA sentences Apr 09 20:44:45 but you have to be root to do it Apr 09 20:44:50 otherwise, you're stuck with registering for location updates Apr 09 20:45:13 Plus it might not work that way on T2 or T3 or Samsung1 or ... Apr 09 20:45:29 vol: were the last 3 posts a reply about gaining access to hardware through java... or getting a c++ application to run native Apr 09 20:46:15 but seriously where can I learn about this area. are there books or such for doing this sort of thing on the Android or it's mostly the opensource community Apr 09 20:46:38 mostly it's just the community, since native code is "unsupported" Apr 09 20:46:50 oh. right Apr 09 20:46:52 the google guy that wrote the JNI layer for android pretty much helped me through etting started Apr 09 20:47:18 but yeah, the part about cat /dev/smd27/ was at the command line Apr 09 20:47:25 the part about registering for location updates was via the android framework Apr 09 20:47:32 vol: I think I'm even before "Getting started" then :) Apr 09 20:47:46 I mean I don't understand 50% of the words you're using Apr 09 20:47:48 blip-: http://developer.android.com/sdk/1.1_r1/index.html Apr 09 20:47:56 Android handles access to GPS in a funny way Apr 09 20:48:02 basically, the framework does all of the GPS stuff itself Apr 09 20:48:07 you just register for location update callbacks Apr 09 20:48:16 unfortunately, you don't really get anything until the framework has a fix Apr 09 20:50:03 what's the trick to find the native implementation of a method declared "native" in the android source? Apr 09 20:50:24 zhobbs, grep? Apr 09 20:50:52 is it just me or is the emulator screen 321x480? Apr 09 20:51:22 vol: one last thing, you said earlier that if I go down the path of creating a C++ application frontend for the C++ algos... my problem will be "getting a surface to draw"... is that the main problem ? Will I get a black screen because I don't have access to the touchscreen for some reason ? Apr 09 20:52:54 halley: yeah...just didn't know if there was a map somewhere Apr 09 20:54:01 hard to grep for a method like open(String file) Apr 09 20:54:04 lots of results Apr 09 20:54:25 But open( isn't a JNI, right? Apr 09 20:54:49 Rather, it's not a method you're likely to want to follow into the JNI, right? Apr 09 20:54:58 http://benno.id.au/blog/2007/11/13/android-native-apps Apr 09 20:56:06 tbr: 320x480 Apr 09 20:56:14 if it's 321, uh... you're doing something interesting :D Apr 09 20:56:30 halley: it could be Apr 09 20:56:35 blip-: the issue is getting a pointer to draw into Apr 09 20:56:46 i'm doing a video screen cap and when i make a 320 pixel wide region there's still a one pixel line outside the region Apr 09 20:56:55 strange. Apr 09 20:57:23 Maybe the screen-capper app is drawing the rectangle wrong. Apr 09 20:57:36 Screen-cap the whole thing and go into GIMP or something. Apr 09 20:57:48 vol: ok so I'll focus on reading about how to tie a native C++ application to android graphical system in my googling. thanks a lot for the help :) Apr 09 20:57:53 you try saving the screenshot via DDMS? Apr 09 20:58:13 blip-: good luck. You're going to be looking for the "surface flinger" Apr 09 20:58:24 you're probably going to need an android app somewhere for this. Apr 09 20:58:29 really, using jni isn't that terrible. Apr 09 20:58:40 all you're doing is handling drawing and ui events Apr 09 20:58:52 there isn't too much horrible overhead involved Apr 09 20:59:33 I'll check that out too. thanks Apr 09 21:07:04 ah, there is no R.java file in my camera project. that's why i have over 400 errors. eclipse is not creating the R.java even though i have started the project as android project. i deleted the project and create it again but no luck Apr 09 21:09:04 it is probably not being recognized as an android project correctly, or there are errors occuring before R.java is even trying to be generated. Check your console. Apr 09 21:10:10 ok Apr 09 21:11:10 R won't generate if there are any errors in res Apr 09 21:15:00 is it possible to make a remote view smaller? Apr 09 21:15:32 specifically the bar for notifications? Apr 09 21:15:49 i feel like ive seen different sizes but not sure how Apr 09 21:16:20 might just been an illusion Apr 09 21:18:20 anyone have any ideas on how to get a list of all Drawable resources without R? Apr 09 21:19:01 I can get a Resources object, but don't have R Apr 09 21:19:18 well...unless someone knows how I might be able to access R for another apk Apr 09 21:22:20 stop trying to steal opp Apr 09 21:23:37 haha, not stealing anything Apr 09 21:24:08 just loop from Integer.MIN_VALUE to Integer.MAX_VALUE Apr 09 21:24:19 hehe Apr 09 21:24:26 and do getDrawable Apr 09 21:24:44 actually, I'm noticing that all my drawable res id's start at "0x7f020000" Apr 09 21:24:55 hate to assume that's always true though Apr 09 21:25:02 yeah whatcha doing? Apr 09 21:25:19 assume for now until you found out a better solution Apr 09 21:25:44 working on allowing people to publish themes... Apr 09 21:25:50 zhobbs: i'm pretty sure Resources or Assets will list everything in it Apr 09 21:26:04 zinx: yeah, I would think so too...just can't find it Apr 09 21:27:01 hi Apr 09 21:27:26 cooking now and didnt wanna miss anything lol Apr 09 21:27:30 haha Apr 09 21:28:33 i think android is my fav os Apr 09 21:28:37 simple yet functional Apr 09 21:28:49 wish i could have it on my eeepc Apr 09 21:29:00 hmm, it'll give you a list of assets but not ids Apr 09 21:29:02 sounds like you can Apr 09 21:29:19 zinx: yeah, I saw a list(String) in AssetsManager Apr 09 21:29:48 String names for the drawables would be fine though Apr 09 21:30:07 with google apps Apr 09 21:30:18 ahh, true Apr 09 21:42:40 here are the errors in the res http://pastebin.com/m780d3d50 so, i need to find what cause them Apr 09 23:16:56 04-09 16:03:25.162: ERROR/GLLogger(210): couldn't load library (Cannot find library) Apr 09 23:18:04 * svm_invictvs nudges vol, ctate Apr 10 00:28:55 i get some of my Camera build failure answer on this thread http://tinyurl.com/dx993n Apr 10 00:32:24 so basically, i cannot build the camera against sdk Apr 10 00:37:27 yes, you can't Apr 10 00:42:10 if u know this, u should have told me earlier ;) **** ENDING LOGGING AT Fri Apr 10 02:59:57 2009