**** BEGIN LOGGING AT Wed Jan 08 02:59:59 2014 Jan 08 03:10:58 desmin88: This you want? 01-07 22:09:48.350 1158-1158/com.kjetilp.flytider3 W/UnimplementedWebViewApi﹕ Unimplemented WebView method onKeyDown called from: android.webkit.WebView.onKeyDown(WebView.java:2169) ........... Jan 08 03:11:27 if thats the stacktrace that occurs when your app crashes, ye Jan 08 03:12:48 Full output, from where it's crash http://pastebin.com/Z2cRjXBY Jan 08 03:15:52 paste the relevant code please Jan 08 03:16:14 is there a way to get a unique ID for a record? I google and all articles are about the Mobile ID... I dont want that Jan 08 03:18:10 no it is impossible to do that sorry Jan 08 03:24:22 sorry... let me rephrase that question... I want to create a unique ID... is there an API that will do this? what is the term I should be googling? Jan 08 03:25:03 uhh Jan 08 03:25:10 "java create a unique id" Jan 08 03:26:09 yep... that worked... Jan 08 03:26:26 think before you press enter Jan 08 03:26:27 heh :) Jan 08 03:52:23 Any that have some time? I have a app, and when i push the "hardware" menu button on my S4 the app is force closes.. The app should not have any menu, so do not quite understand why it just force closes - Full output, from where it's crash http://pastebin.com/Z2cRjXBY Jan 08 03:56:45 If I have a broadcast reciever declared in activity code that I want to continue to get broadcasts when the activity onPause has been called, where should I unregister the reciever/ Jan 08 03:57:25 well definitely not in unpause Jan 08 03:57:43 apekatt: null pointer @ at android.support.v7.app.ActionBarImplICS.getThemedContext(ActionBarImplICS.java:287) Jan 08 03:57:50 oops Jan 08 03:58:53 desmin88 yeah, but onpause is the only shutdown callback garunteed to be called Jan 08 03:59:55 onstop or ondestroy? Jan 08 04:00:15 not garunteed to be called Jan 08 04:00:27 eventually they will be Jan 08 04:00:47 i think you're misguided here Jan 08 04:01:11 protected void onStop () Note that this method may never be called, in low memory situations where the system does not have enough memory to keep your activity's process running after its onPause() method is called. Jan 08 04:01:43 that's true, but they are usually called Jan 08 04:01:56 you can use ondestroy Jan 08 04:02:01 same deal Jan 08 04:02:09 you are misguised Jan 08 04:02:09 here are situations where the system will simply kill the activity's hosting process without calling this method (or any others) in it, so it should not be used to do things that are intended to remain around after the process goes away.' Jan 08 04:02:11 so how critical is it Jan 08 04:02:14 misguided Jan 08 04:02:16 straight from the docs Jan 08 04:02:22 http://developer.android.com/reference/android/app/Activity.html#onDestroy() Jan 08 04:02:36 well the app will crash if the reciever is not unregistered when it is destroyed Jan 08 04:02:39 You want your activity to get broadcasts even when its onPause has been called right? Jan 08 04:02:44 yeah Jan 08 04:02:50 So don't unregister in onpause Jan 08 04:02:54 unregister in ondestroy Jan 08 04:03:06 yes Jan 08 04:03:26 doesn't that leave it open to crashing ~.1% of the time? Jan 08 04:03:29 no Jan 08 04:03:39 but onDestroy not garunteed to be called? Jan 08 04:03:43 yes it is Jan 08 04:04:02 desmin: how do you know? I am just reading straight from the docs: http://developer.android.com/reference/android/app/Activity.html#onDestroy() Jan 08 04:04:09 gaurenteed in the way that it won't ever not be called when it needs to be Jan 08 04:04:12 it is NOT guaranteed to be called Jan 08 04:04:42 but it USUALLY is Jan 08 04:04:45 If ondestroy is not called, that means the activity is still 'alive' and therefore it is okay to still be receiving your broadcasts Jan 08 04:05:43 if your app just gets killed without anything being called to clean it up, your broadcast receivers are essentially u'nregistered' Jan 08 04:05:52 so you're fine Jan 08 04:06:05 when the system normally terminates your app for being in the background and it needs resources, it will be called. only in rare circumstances will it not be called Jan 08 04:06:46 and in those circumstances you're still fine because the process is killed, it cant receive broadcasts Jan 08 04:06:56 right Jan 08 04:06:58 thanks Jan 08 04:14:51 lasserix: Fairly new on the development to Android. Can you explain a little more? Jan 08 04:19:51 Hi. I am dynamically adding buttons to a linear layout, but only the first button is being added. The code I am using is http://pastebin.ca/2531556 - can anyone see if I am missing something obvious that would be causing this to happen? Jan 08 04:22:39 check the size of your list perhaps? Jan 08 04:22:44 see if you have more than 1, heh Jan 08 04:25:37 ir7466: try to wrap the width Jan 08 04:26:02 I figured it out. the linear layout was set to horizontal instead of vertical Jan 08 04:26:08 it was appearing on top of each other Jan 08 04:31:09 lasserix: Fairly new on the development to Android. Can you explain a little more? Jan 08 04:32:40 I have one follow up question. Setting a button dynamically as in the pastebin above, how to I set the bottom margin to 20dp? Jan 08 04:44:08 Is all here dead? Jan 08 04:44:22 yes i am de ad Jan 08 04:46:54 If I make the parameters for the button a LinearLayout.LayoutParams.......then set .bottomMargin to 20... no luck Jan 08 04:57:28 is www.testflightapp.com off line? Jan 08 04:57:39 I'm not dead Jan 08 04:57:42 I'm undead Jan 08 04:58:25 IrishGringo: no... Jan 08 04:58:30 never mind... its back up Jan 08 04:59:04 actually... its running really slow Jan 08 05:02:36 apekatt you are doing some fairly complicated stuff Jan 08 05:02:48 webview and opengl etc etc Jan 08 05:08:05 lasserix: This fixed it: http://pastebin.com/rWVXg8ra :) Jan 08 05:08:39 ahh yeah that's the idea of using log cat great! Jan 08 05:10:29 Never considered that it was the solution, but adding it did the trick so :) Jan 08 05:11:00 * apekatt is now publishing on Play.. Jan 08 05:11:09 that's what logcat was telling you 01-07 22:09:48.350 1158-1158/com.kjetilp.flytider3 W/UnimplementedWebViewApi﹕ Unimplemented WebView method onKeyDown called from: android.webkit.WebView.onKeyDown(WebView.java:2169) Jan 08 05:12:24 apekatt what's the app? Jan 08 05:27:36 <_genuser_> guys, I have a framelayout with fragments loaded in there. How do I keep those save thru screen rotation? Jan 08 05:27:56 <_genuser_> the types of fragment that are loaded depends on what was selected from the nav drawer. Jan 08 05:28:22 <_genuser_> so the framelayout could have OneFragment, TwoFragment, ThreeFragment, etc. all extending Fragment. Jan 08 05:28:42 tbh thats a super easy googleable question Jan 08 05:29:00 but if you must know, setRetainInstance(true) but don't use that without understanding its implications Jan 08 05:29:18 <_genuser_> I am googling. I have set setRetainInstance(true); to true already in each fragment's onCreate(). Jan 08 05:29:43 so you're recreating your views in oncreateview Jan 08 05:29:48 <_genuser_> so the effects of setTitle() are retained. However the actual fragment isn't. Jan 08 05:29:48 which is probably resetting all of your stuff Jan 08 05:30:18 what isnt being retained Jan 08 05:30:22 <_genuser_> right, so I think then I should in my class have a reference to the currently loaded fragment, and save i Jan 08 05:30:27 <_genuser_> *it Jan 08 05:30:46 <_genuser_> so I can then do if(savedInstanceState !=null) check in onCreateView. Jan 08 05:31:06 <_genuser_> does that sound like I have a half decent understanding of how this needs to be approached? Jan 08 05:31:11 no Jan 08 05:31:50 <_genuser_> :). ok, how do I restore a view in onCreateView if onCreateView is being called due to a screen rotate? Jan 08 05:32:15 what parts of the view arent being restored Jan 08 05:32:26 <_genuser_> fragment that is in the FrameLayout. Jan 08 05:32:44 what Jan 08 05:33:02 what parts of the view inside your fragment are not being restored Jan 08 05:33:03 if i have a linearlayout and i want one view to take up all available vertical space, what to i set the layout_height to? Jan 08 05:33:18 ir7466: google Jan 08 05:33:55 <_genuser_> desmin88: the fragment itself is completely recreated. nothing is retained. However, the type of fragment that is loaded is also not retained. Jan 08 05:34:11 just show me the code Jan 08 05:35:11 <_genuser_> layout: http://pastebin.com/fJK7ePPH Jan 08 05:38:19 Ahhhhhh...... You need to use a different version code for your APK because you already have one with version code 1... But i have " android:versionCode="3" Jan 08 06:05:30 desmin88, how nice to see you here :) Jan 08 06:06:43 a question. if I'm adding an unknown number of buttons dynamically, how should i assign an onclick event to them? Jan 08 06:07:03 obviously I would just need one method that gets called, preferably the button that was clicked passed in as a parameter Jan 08 06:08:32 LewsTherin: hehe Jan 08 06:08:44 ir7466: at button creation, set a listener Jan 08 06:12:20 Ahhhhhh...... You need to use a different version code for your APK because you already have one with version code 1... But i have " android:versionCode="3" - Any ide? Jan 08 06:23:54 Where can I find the source code for the zoom/pan enabled ImageView in the Android gallery app? Jan 08 06:24:47 ir7466: at button creation, set a listener ....... yes, but how do you set the id to a text name dynamically? Jan 08 06:25:04 Rather than just an int, which seems to be the case on the stackoverflow articles I've read and seems a bit sloppy Jan 08 06:29:56 just listening for connectivitybroadcastreciever is a drain on the battery? Jan 08 06:30:40 question, is the value returned from Sensor.getPower() accurate, is it actually being measured or is it just a stored value in a table somewhere? Jan 08 06:41:26 hello! Jan 08 06:43:04 i have a RuntimeException: The specified child already has a parent. You must call removeView() on the child's parent first. Jan 08 06:44:35 this is interesting, because i remove the view from his parent before add to another group: http://pastebin.com/duJ3BFzb Jan 08 06:45:45 anybody can help to me? Jan 08 06:49:36 have you tried it without the invalidate calls? Jan 08 06:49:46 not sure that it matters though Jan 08 06:51:17 dab command not found even though I CD'ed into the platform-tools folder on a mac? Jan 08 06:51:21 *adb Jan 08 06:51:39 ./adb Jan 08 06:52:27 ahh Jan 08 06:52:34 I also tried /.adb Jan 08 06:52:34 thanks Jan 08 06:52:35 rdnt, yes, i tried few fix, the invalidate is my last try Jan 08 06:52:49 Thanks Jan 08 06:53:35 rdnt, and the code is working good in my all test device Jan 08 06:53:58 this is a production app, so i dont know what can i do Jan 08 06:54:29 you could make a deep copy of breaking Jan 08 06:54:44 but there must be a better way Jan 08 06:55:21 SimonVT: I pulled the battery files under battery and they work! Jan 08 06:55:32 They have a lot of information I'm going to go through them to see if they have what I need Jan 08 06:59:58 rdnt, this is in onCreate method in my activity, this is the first block after setContent() Jan 08 07:10:24 Where can I find the source code for the zoom/pan enabled ImageView in the Android gallery app? Jan 08 07:14:33 aosp i believe Jan 08 07:15:59 napster: grepcode Jan 08 07:16:52 napster: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.1_r1/com/android/gallery3d/app/Gallery.java Jan 08 07:16:57 that is a good starting point Jan 08 07:17:20 thanks guys thepoosh desmin88 Jan 08 07:17:59 yw Jan 08 07:43:50 Hmm, looks like the android gallery3d app's imageview uses OpenGL extensively. Jan 08 07:47:06 napster: in order to implement zoom you have to either use SurfaceView or OpenGL Jan 08 07:48:04 thepoosh: I see Jan 08 07:48:32 thepoosh: I came across this http://developer.android.com/training/animation/zoom.html Jan 08 07:48:40 But this is not exactly what I'm looking for Jan 08 07:48:41 napster: look at this Jan 08 07:48:42 https://github.com/sephiroth74/ImageViewZoom Jan 08 07:49:12 thepoosh: ok, let me check Jan 08 07:49:18 kk Jan 08 07:49:35 in general you should search google for "pinch to zoom" Jan 08 07:50:26 thepoosh: Yeah! I came across a number of Stackoverflow questions. Jan 08 07:50:34 coolz Jan 08 07:50:36 have fun Jan 08 07:51:07 thepoosh: Thanks for the pointers. Jan 08 07:51:43 pleasure Jan 08 08:04:33 you can't just use a matrix object in canvas to do that? Jan 08 08:11:57 bze Jan 08 08:12:06 *bye Jan 08 08:23:11 hi, is it possible to set a static field to the value of an enum, and then reference the value of that static field in a switch? Jan 08 08:24:45 say you have an inner class public enum Test { TEST1, TEST 2 }, and you have a public final static Test MY_VAL = Test.TEST1; for example. Could I then use MY_VAL in a switch? Jan 08 08:26:04 reason I ask is if I try it I get "The static field should be accessed in a static way" ? Jan 08 08:26:33 which I sort of understand, but I need to use the MY_VAL value because it's essentially a config value Jan 08 08:26:34 it may change Jan 08 08:26:48 so I can't reference the enum type directly, I need to reference it through that MY_VAL value Jan 08 08:31:52 case your_root_class.Test.TEST1 ? Jan 08 08:33:21 ah Jan 08 08:33:23 sorry Jan 08 08:43:32 does anyone have exprience with developing on udoo? Jan 08 08:46:01 youdoo ! Jan 08 08:46:04 :) Jan 08 08:46:09 haha, do you? Jan 08 08:46:16 never heard of it Jan 08 08:46:25 http://www.udoo.org/getting-started/ Jan 08 08:46:34 it's a very small microchip containing everything needed for developing Jan 08 08:46:59 wow, looks cool Jan 08 08:47:03 interesting project Jan 08 08:47:23 Yeah. There are several modules and can run Android or ubuntu Jan 08 08:49:51 hello guys Jan 08 08:50:39 Ill purchase one (+external display) and let you guys know about the status Jan 08 08:51:51 I have an app that works fine on almost all devices, except galaxy note 2 Jan 08 08:52:00 arca! :D Jan 08 08:52:24 misterli, talking to me ? Jan 08 08:52:28 acra, yes Jan 08 08:52:44 what acra ? Jan 08 08:53:47 It let you debug/get all information why an app crashes/throws exceptions Jan 08 08:55:10 I dont have a note 2 device :/ Jan 08 08:55:37 I tested it with my friends, and he is 4000 kms away. Jan 08 08:55:47 misterli: That thing looks great, proabbly going to order one Jan 08 08:56:09 misterli, I'm used with other android powered boards like Cubieboard and Wandboard but udoo is very interesting Jan 08 08:56:09 yes. But i couldnt figure out if it contains a sim-card slot Jan 08 08:56:43 tonySoprano9099, not sure but i guess genymotion has an emulator for note 2 Jan 08 08:57:12 misterli, it doesnt. it has note1, and note3. Jan 08 08:57:22 both of which show a black screen :/ s4 works though. Jan 08 08:57:46 Yeah,but what does exactly not work? Display an activity/layout? Using the Camera? Jan 08 08:58:00 an activity causes ANR. Jan 08 08:58:11 Code? ANR? Jan 08 08:58:14 actually, the phone blacksout for 4,5 seconds Jan 08 08:58:28 Probably just missing "extra" manifest permissions and/or configurations Jan 08 08:58:36 tonySoprano9099, try to get ADB access using remote connection Jan 08 08:58:40 then recontinues for some time,,, then reblacks out and causes anr Jan 08 08:59:01 shineworld, never done that. Jan 08 08:59:02 if your friend can share device for a while Jan 08 08:59:08 but seems a nice idea. Jan 08 08:59:51 usually collecting anr should be rather enough Jan 08 09:00:09 just enable adb debug over TCP and ask friend to *link port 5555 of device routed by router Jan 08 09:00:16 misterli, you are right Jan 08 09:00:17 2 nice ideas. huge companies use the acra thing apparently. Jan 08 09:00:25 shineworld, he is not a geek. so that'll be hard i guess. Jan 08 09:01:03 try to paste ANR Jan 08 09:02:17 I will. Jan 08 09:02:24 but this is a huge dissapointment. Jan 08 09:02:37 iOS devs do not have these type of hassle. Jan 08 09:02:45 have other.... Jan 08 09:02:52 well, do you want to compare object c with java? :D Jan 08 09:03:00 there are literally tens of variations of android :/ Jan 08 09:03:07 yes Jan 08 09:03:09 misterli, hehehe, ofcourse no :D Jan 08 09:03:34 coding iOS is a pain. Learning it, is horrible. Java is easy and takes fun :D Jan 08 09:03:35 life is a bit--h :) but that make it wonderful Jan 08 09:03:43 misterli, im updating the genymotion, apparently there is an update, might fix the note2 emulator thing. Jan 08 09:03:52 shineworld, true that. Jan 08 09:04:35 anyway, it may happen that genymotion does not throw the bug. Think about the arm/cpu which is not "native" Jan 08 09:04:54 misterli, lets just keep optimistic until the test time :P Jan 08 09:06:06 time to take a coffe here ... tonySoprano9099 if you can put the ANR in a debianpaste ... Jan 08 09:06:34 haha, yea. Time to take some Ritalin to get awake Jan 08 09:06:54 I already had 3 since morning. Jan 08 09:07:42 shineworld, ill see what i can do. Jan 08 09:12:16 btw guys, is there any native way of adding an X button on the far right of edittext, or I need to do it manually ? Jan 08 09:23:05 uhm.... you have to create a new widget which do that or find one in net Jan 08 09:23:24 ah Jan 08 09:23:58 your question can have multiple replies Jan 08 09:23:58 shineworld, yeps appears so. Jan 08 09:24:15 i'll probably extend a view Jan 08 09:24:58 for example I have a lot of TextView + EditText combo so I've created a my new component to better accomplishe the thing... Jan 08 09:25:30 but I'm a bad programmer because 99% I live in Delphi world Jan 08 09:25:36 shineworld, appears I need to do the same. no escape. Jan 08 09:25:39 shineworld, dont say that. Jan 08 09:27:20 shineworld, there are quite ready made stuff for this on the net. Jan 08 09:28:44 yeah... android framework extra libs is growing a lot Jan 08 09:28:56 thats the thing with open source. Jan 08 09:29:39 everybody takes everything and does things. Jan 08 09:29:57 open source = good functionality, bad design (interface wise) Jan 08 09:34:09 I'm using Android to do HMI for industial using opensource products like olimex A20 or cubieboard cb2 and to have a full opensource system get me a lot of advantages Jan 08 09:35:20 very good, how is it going ? Jan 08 09:36:28 very well.... prototypes working fine and without stop by months (after some modifies to kernel and android OS) Jan 08 09:37:00 the only bad beast was Android Open Accessory Mode Jan 08 09:37:18 which have a very low maturity level (at IMO) Jan 08 09:40:14 shineworld i see. all the best :))) Jan 08 09:40:43 on a totally different not, im banging my head to my the latest version of genymotion to work with my current version of virtualbox Jan 08 09:41:06 I think i need to restart. brb. Jan 08 09:42:50 unfortunately all my machines are running vmware fusion so I never tried genymotion which require virtualbox. Jan 08 09:43:05 to run vmware fusion and virtualbox in same host isn't a good idea Jan 08 09:43:55 some friend of mine is using it and is very happy of performances Jan 08 09:49:23 shineworld, em, you can run both VMWare and Vbox on same host Jan 08 09:49:33 you just can't have VMs active at the same time. Jan 08 09:51:48 SURE ? sound very good .... but what about net adapters ? Jan 08 09:52:19 PS: I'm running on MAC OS X Jan 08 09:53:06 shineworld install your vbox in your vmware :P Jan 08 09:53:17 so you can have your android in your vbox in your vmware Jan 08 09:53:41 a sec to better understand: Jan 08 09:54:21 I've a Mac OS X how host which run vmWare Fusion. I use a VM with xubuntu to develop android (I prefere to live in linux for android matter). Jan 08 09:54:28 Do I need a layout folder if I provide layout-land and layout-port ? Jan 08 09:55:07 so you suggest to install a vbox in xubuntu VM guest ? Jan 08 09:56:35 whats wrong with developing android apps on mac :| Jan 08 09:57:08 i actually find the IDEs to be much smoother on a mac Jan 08 09:58:10 shineworld, he's trolling. Jan 08 09:58:12 Develop pure Android apps works very fine with Mac OS X but I have often to rebuild android kernel and touch android OS sources (for my embedded android boards) so linux isn't a choice Jan 08 09:58:36 and I think it was pretty clear you're on OS X by mentioning VMWare Fusion ;) Jan 08 09:58:38 Mavrik, I thinkg so Jan 08 09:58:42 as I said, you can have both installed without problems Jan 08 09:58:48 you just can't have them running at the same time Jan 08 09:59:04 this evening I will try to do that :) Jan 08 09:59:22 thanks for suggestion Jan 08 10:07:25 should app settings be accessible from every activity? i couldnt find an answer for this in the design guide Jan 08 10:12:25 rhcake: i'd say no Jan 08 10:12:35 well it doesn't have to Jan 08 10:12:45 you can if you want to, but its not a requirement Jan 08 10:15:13 till api 17 should be possible with getSharedPreferences using WORLD_MODE_READABLE Jan 08 10:16:12 but is "deprecated" Jan 08 10:16:26 is it common at all to put settings only in the first activity? my settings would change the appearance of every activity so im hesitant to let the user access them from anywhere :/ Jan 08 10:29:31 omfg lol got my ndk stuff working. wtf Jan 08 10:29:49 you sound displeased by that :S Jan 08 10:30:25 supprised "{ Jan 08 10:30:27 :P even Jan 08 10:48:16 Hello! I'm using Android 4.4 and I have the swedish letters ÅÄÖ in some places in a database. The problem is that I can't manage to match ÅÄÖ with åäö. It works if I compare ÅÄÖ(db) with ÅÄÖ(query string). How can I make the comparison work? Jan 08 10:49:28 I've tried lower(column_name) LIKE 'åäö' Jan 08 10:55:52 kruxoman: what about String.equalsIgnoreCase()? Jan 08 10:57:12 kruxoman x10 Jan 08 11:00:28 Fisiu: Let me clarify. I'm searcging the database using a query. The equalsIgnoreCase wouldn't be helpfull unless I already have all the string from the database. Jan 08 11:00:38 thepoosh: What? :o Jan 08 11:00:55 lower is the way to go Jan 08 11:01:02 do you add wildcards? Jan 08 11:01:12 '%aaa%' Jan 08 11:01:35 Using this to format the query string Jan 08 11:01:37 String.format(Locale.getDefault(), "school_id = %d and (name LIKE '%s%%' or name LIKE '%% %s%%' or sign LIKE '%s%%')", Jan 08 11:01:37 schoolId, searchFor, searchFor, searchFor); Jan 08 11:02:26 the LIKE operator should be case insensitive what I've read Jan 08 11:04:54 Oh yes, a importanmt thing to mention is that I have only found this problem with android 4.4+ Jan 08 11:06:00 Might it have something to do with Locale? Might it behave different in Android 4.4? Jan 08 11:06:20 anyone ever had issues with gradle "Cause: from class com.android.build.gradle.BasePlugin" ? Jan 08 11:10:58 Do I still need a layout folder if I provide layout-land and layout-port? Jan 08 11:15:46 compac: it's good practice Jan 08 11:16:37 thepoosh, I don't understand under what circumstance would that be used Jan 08 11:17:10 doesn't matter, it's good practice to have defaults, like having the default in a switch case Jan 08 11:17:21 and anyway it would just be a copy of either land or port Jan 08 11:20:26 ffs this is so frustrating Jan 08 11:36:24 Hi Jan 08 11:36:37 Is there a way to make sure that my application only has 1 instance running? Jan 08 11:37:02 after i start it, if I press the home button, go to the menu and select it again, 2 instances start running Jan 08 11:59:29 i just created a new AVD (eclipse, mac) and when i run my app, it's just a black screen Jan 08 11:59:40 is there anything i need to do besides just make the AVD from the manager? Jan 08 12:03:38 www.genymotion.com Jan 08 12:28:06 Is there a way I can make sure only one instance of my application is running? Jan 08 12:30:54 only one instance of your app will only ever one Jan 08 12:30:56 run* Jan 08 12:33:57 CallumTaylor: but sometimes if I close one instance, another instance is running behind it Jan 08 12:34:22 even using singleInstance Jan 08 12:34:27 you mean an activity? Jan 08 12:34:32 not an application Jan 08 12:34:37 yes, sorry Jan 08 12:36:05 I have android:launchMode="singleTask" on the top of my Manifest, but this problem still happens Jan 08 12:37:24 try looking at http://www.intridea.com/blog/2011/6/16/android-understanding-activity-launchmode Jan 08 12:38:24 i will CallumTaylor Jan 08 12:45:43 CallumTaylor sup matey Jan 08 12:45:49 long time Jan 08 12:54:37 sup Jan 08 13:00:19 nm, chilling at work. Jan 08 13:23:12 Ahhh... You need to use a different version code for your APK because you already have one with version code 1... But i have " android:versionCode="3" - Any ide? Jan 08 13:29:58 Description Resource Path Location Type Jan 08 13:29:59 Unable to resolve target 'android-18' until the SDK is loaded. amazoniagideros Jan 08 13:30:03 what that means? Jan 08 13:30:26 I imported the project on eclipse and got that error, 3 times even (on the same project) Jan 08 13:32:46 what do you guys find more helpful: to have one instalation of eclipse with all sorts of plugins: java se, java ee, android... or separate eclipses? Jan 08 13:40:23 dhulke, 1 eclipse with all the plugins ofcourse. Jan 08 13:40:41 apekatt, production or debugging ? Jan 08 13:40:46 because I find it hard to manage everything later... Jan 08 13:40:58 I installed the python plugin but couldnt delete it later Jan 08 13:42:54 dhulke, well it depends on you,, how big the plugins are, etc.. Jan 08 13:44:01 ee plugin Jan 08 13:44:04 se plugin Jan 08 13:44:07 C plugin Jan 08 13:44:10 C++ plugin Jan 08 13:44:11 CallumTaylor, ever implemented an edittext (used for search) with an X or cancel, like ios ? Jan 08 13:44:20 ohhhh, those sort of plugins.. Jan 08 13:44:24 nope Jan 08 13:44:31 CallumTaylor k Jan 08 13:44:44 tonySoprano9099: Beta buld - Debugging off Jan 08 13:45:05 apekatt, what is ur exact question. Jan 08 13:53:02 tonySoprano9099: what about those kinds of plugins? Jan 08 13:53:13 tonySoprano9099: should I still have just one eclipse? Jan 08 13:58:30 well, i still prefer to have them all in 1 place. Jan 08 13:58:35 are they causing too much headache ? Jan 08 14:02:18 <_genuser_> is there any way to force onCreateView for a fragment to be executed. Before a second function is called? Jan 08 14:02:56 _genuser_: what do you mean by, "before a second function is called?" Jan 08 14:04:06 <_genuser_> alexfu: a extends Fragment. Then in main: getFragmentManager().beginTransaction().replace(R.id.content_fame, new a()).commit(); Jan 08 14:04:09 <_genuser_> then a.updateView(); Jan 08 14:04:42 <_genuser_> problem is updateView is run when onCreateView hasn't actually been called. Because some of the vars being set in onCreateView are still null in the subsequent call. Jan 08 14:04:52 <_genuser_> rather in the next call which is to updateView. Jan 08 14:06:36 _genuser_: why not save the data that you use in updateViews and then use them when you get to onCreateView? Jan 08 14:07:22 _genuser_: that would be the way to go since you can update views before it's created.... Jan 08 14:07:26 <_genuser_> alexfu: basically I was trying to avoid updating view in onCreateView. because screen rotate destroys the views. Jan 08 14:07:29 *cant Jan 08 14:08:13 <_genuser_> I guess, I should use onsaveinstance and save all the UI data and in onCreateView either create new or restore from the passed Bundle. Jan 08 14:08:49 <_genuser_> would that be a better approach? Jan 08 14:09:29 _genuser_: when a screen rotates, view hierarchy is destroyed and is recreated anyway so... yes. use onSaveInstanceState, and restore what you need in onCreateView Jan 08 14:09:51 <_genuser_> alexfu: ok, all dynamically created UI values must be store in the Bundle, correct? Jan 08 14:10:32 _genuser_: onSaveInstanceState uses a bundle to store data if that's what you're asking Jan 08 14:11:49 <_genuser_> I was asking if I am responsible for saving every UI value that is generated dynamically at runtime by my code. Jan 08 14:11:59 <_genuser_> for example: Jan 08 14:12:02 <_genuser_> I noticed that in an Activity, the values of EditView are maintained across rotates, even tho they aren't saved anywhere in my code. Jan 08 14:14:14 _genuser_: yes, i've noticed that some stuff like that is saved for you. I can't say that all UI values get saved for you though Jan 08 14:14:50 _genuser_: I think checkboxes will save it's checked state but when you actuall call getChecked() or w/e, it will return false Jan 08 14:15:15 <_genuser_> alexfu: nice. So if my activity has 20+ values, I guess I should save them in a serializable obj and just put the obj in Bundle. Jan 08 14:15:18 <_genuser_> lol @checkboxes Jan 08 14:16:40 _genuser_: you can either do it all yourself or do nothing at all and figure out which ones don't save their state automatically and save those Jan 08 14:17:05 <_genuser_> these will be all textviews showing lot of stats. I know textviews do not store their values. :) Jan 08 14:17:23 <_genuser_> and that's just the stuff inside the fragment. Jan 08 14:17:47 <_genuser_> I still have to saveinstance in the mainactivity to store info about which fragment was loaded and where it was. lot of work. Jan 08 14:18:39 _genuser_: why not use FragmentManager#findFragmentByTag() in mainactivity? Jan 08 14:19:19 <_genuser_> because I'm a n00b android dev and I don't know half the things that are avialable. Jan 08 14:19:30 <_genuser_> everytime someone like you mentions somethig new, it helps me learn new stuff. :) Jan 08 14:20:25 _genuser_: yeah, you don't need to save the fragment yourself if you need to use it later. You can just call getFragmentManager.findFragmentByTag(). Jan 08 14:20:56 *getFragmentManager().findFragmentByTag() Jan 08 14:21:12 <_genuser_> alexfu: so as long as I set retainInstance to true, instead of creating a new one in onCreate(), I can check the value of this first, Jan 08 14:21:31 <_genuser_> and in onCreate of mainactivity, if it returns null, then I can create a new one, eh? Jan 08 14:25:29 _genuser_: setRetainInstance(true) will retain the fragments data. you don't necessarily need it to use findFragmentbyTag Jan 08 14:28:22 <_genuser_> cool. coding it up now. running it. Jan 08 14:31:26 <_genuser_> so I load them using: fragmentManager.beginTransaction().replace(R.id.content_frame, fragment, "activefragment").commit(); Jan 08 14:31:39 <_genuser_> in onCreate of MainActivity, I'm using: Jan 08 14:31:58 <_genuser_> Fragment mFragment=getFragmentManager().findFragmentByTag("activefragment"); Jan 08 14:32:05 <_genuser_> to find the fragment. and then loading it again using: Jan 08 14:32:13 <_genuser_> getFragmentManager().beginTransaction().replace(R.id.content_frame, mFragment, "activefragment").commit(); Jan 08 14:32:32 <_genuser_> however, I don't see it in the view. Even tho my Log.d() messages show that that part has been run without errors. Jan 08 14:33:04 _genuser_: post your whole code into pastebin or gist Jan 08 14:33:12 <_genuser_> alexfu: :) will do. Jan 08 14:34:13 <_genuser_> give me a few minutes to try to fix it. :) I hate feeling like I just got someone else to write my code. Jan 08 14:34:32 <_genuser_> if not, I'll be right back. Jan 08 14:51:15 <_genuser_> alexfu: that worked. :) Jan 08 14:52:06 <_genuser_> alexfu: in MainActivity's onCreate, I just check to see if findFragmentByTag("tagname") returns a null. If so, I create a new view. Otherwise, I don't do anything and android restores the correct fragment on it's own. Jan 08 14:52:19 <_genuser_> that's for suggesting that route and for all the other ideas. Jan 08 14:52:26 <_genuser_> *thanks for suggesting... Jan 08 14:52:40 np Jan 08 14:53:28 <_genuser_> now, I just have to implement data restoration in individual fragments. Jan 08 14:53:37 <_genuser_> which should be easy enough to do,. Jan 08 14:57:48 _genuser_: here's another tip. in you main activity, you only need to attach a fragment once... Jan 08 14:57:58 in oncreate Jan 08 14:58:27 re-attachment is handled for you on screen rotation Jan 08 14:58:58 i should rather say, on configuration change Jan 08 14:59:16 <_genuser_> yeah, I have attached it in onCreate if it's null. Later, I attach different ones when different items are selected based on nav drawer selection. Jan 08 15:00:18 Greetings in here. Jan 08 15:00:52 <_genuser_> beautiful, the emulator has lost the interwebs. Jan 08 15:00:59 <_genuser_> icbytes: greetings back! Jan 08 15:01:12 I am implementing an own type of table. Basically it is an class which extends absolute Layout and has one scroll view. Jan 08 15:01:48 Inside this scrollview i have a custom class, which represents columns ( column orientated table should be created ). Jan 08 15:02:12 icbytes: extends FrameLayout instead. AbsoluteLayout has been deprecated. Jan 08 15:02:32 This column class also inherits from AbsoluteLayout and should carry the rows.$ Jan 08 15:03:25 these rows all consist of several ui elements ( all derivates ) from the usually known ui controls ( TextViews, TextBoxes, Checkboxes, Buttons, Labels ..... ). Jan 08 15:04:50 the problem is this : I have a TextView derivate, which seems to be always shown. But I only inserted a Text at runtime via reflection. I never issued it to have any LayoutParams. So there ust be some kind of Autosizing, could this be ? Jan 08 15:06:50 icbytes: is your textview showing text? Jan 08 15:07:38 right. But it just shall be there with no size ( adoption of port of another language to keep the codes more or less identical ). Jan 08 15:08:14 to what extent KVM will improve emulator's performance? i'm using Core 2 Due intel 2.1 GHz Jan 08 15:08:35 besides : FrameLayout does not allow me to set LayoutParams with width, height, X and Y ( but i NEED THOSE ). Jan 08 15:08:56 icbytes: just hide it using android:visibility in your layout or View#setVisibility() and when you want it to show, call View#setVisibility(View.GONE) Jan 08 15:09:08 hi, I am having a strange problem, when I start a service I set a WakeLock PARTIAL_WAKE_LOCK, when the screen turns off and after 1 min approx. the service is killed, anyone know why ? Jan 08 15:09:28 icbytes: sure it does... https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html Jan 08 15:09:49 tried that, but did not really succeeded, due to the existent logic Jan 08 15:10:03 icbytes: ??? Jan 08 15:11:23 i realized another nice thing; If i set AbsoluteLayout(0,0,0,0) in my ctor, then I succeed ( just tried ) .... during runtime each controls special method will be called which places and resizes the controls ( but if Params = null ) somewhat else takes care and places my TextView.... Jan 08 15:14:12 no, somehow my text-views are missing Jan 08 15:32:13 hello Jan 08 15:33:29 does anyone know how can I get outh token from cookie in google login? Jan 08 15:38:35 hi! Jan 08 15:38:47 anyone experienced with in-app billing ? Jan 08 15:39:29 basically it is so that each column is a view, containing its own amount of rows, all columns next to each other define the datatable Jan 08 15:42:54 hello there, can anyone answer why most examples on the internet that teach making custom list adapters extend ArrayAdapter? Jan 08 15:43:39 because taking data from an array is something a lot of people are going to want to do, and it's simple? Jan 08 15:43:41 What would you use as a webservice to get data from the internet? Jan 08 15:45:58 dragorn, that's convincing, thanks Jan 08 15:49:50 because they're not hardcore enough to extend base adapter Jan 08 15:55:05 arrayadapter is useful if you're always showing a static array of items Jan 08 15:55:07 yeah, CallumTaylor, I did try base adapter once and expected it to work like an array adapter Jan 08 15:55:19 it's just like 10 less lines of code Jan 08 15:56:32 you'll have a bad time Jan 08 16:01:31 hello. I am searching for an API for live-accessing the camera. The stuff I find when searching is all about how to record video to some file. Is it possible to programmatically access the camera input directly? A link as a start would be sufficient, I just cannot find any starting point. Jan 08 16:02:19 does anyone know how can I get outh token from cookie in google login? Jan 08 16:07:39 How would you save a local image stored in the apk in a database? Jan 08 16:07:45 The path Jan 08 16:07:51 As R.drawable.. or how? Jan 08 16:08:44 http://developer.android.com/guide/topics/media/camera.html#custom-camera I found this. but I am not sure whether this is what I am searching for. Jan 08 16:10:04 Does Google have any intentions to add Volley to their online API? Jan 08 16:10:18 autrilla: load resource and then pull it to a byte array, and save it as a blob in the db. search something like "bitmap to array" or something. Jan 08 16:10:42 dragorn, I don't want the actual image data saved on the db Jan 08 16:10:48 Just a string to identify the image Jan 08 16:11:27 if it's in your apk it's a constant resource identifier Jan 08 16:11:46 but you'd probably end up having ot use a path or something Jan 08 16:11:49 dragorn, yes, but I want it stored in a kind of database Jan 08 16:12:07 it does not seem like, because I can only let videos be written to some file Jan 08 16:12:15 Image, I have categories. I want an organized way to have them, and as each of them has an image and they don't change often... Jan 08 16:12:16 and not directly access the video stream without saving it Jan 08 16:12:18 Imagine* Jan 08 16:14:06 autrilla: if nothing else make a map of string names to integers in your code and map a db field name to a resource value. Jan 08 16:33:00 Should android launcher icons have padding? My icon looks very large on the actionbar on tablets. Jan 08 16:35:42 They should look good Jan 08 16:35:51 If padding makes it look good then yes Jan 08 16:36:40 Can anyone help with this? Involves listView and ViewHolders http://stackoverflow.com/questions/20981634/should-i-use-viewholders-if-i-use-different-viewitemtypes Jan 08 16:41:51 hi all guys! Jan 08 16:42:03 I have a question about a EditText Jan 08 16:43:15 I am using a OnEditorActionListener to handle the input Jan 08 16:43:38 I wanna input a number that correspondes with an item number in a db Jan 08 16:43:56 in case this number doesn't exists, then the EditText will take back the previous value Jan 08 16:45:09 however, it ignores the value Jan 08 16:45:25 I even tried to use a TextWatcher Jan 08 16:45:36 but no success Jan 08 16:50:40 How do I set the color of the field under the status bar (the app name field/view)? like there is statusbar+name of app view then there is the rest of the app view. if that makes any sense... Jan 08 16:53:17 Howdy Jan 08 16:56:00 hye jonc Jan 08 16:56:33 hye? Jan 08 16:56:40 I think I want to go home Jan 08 16:57:58 Don't give up! Jan 08 16:58:49 Houte: ? Jan 08 16:59:09 Houte: ActionBar title text? Jan 08 16:59:15 NEVER GIVE UP Jan 08 16:59:19 NEVER SURRENDER Jan 08 16:59:25 TRUST YOUR INSTINCTS Jan 08 17:00:03 I'll have a beer ! Jan 08 17:00:31 I don't drink alcohol, but a pepsi sounds pretty tastey right now Jan 08 17:09:17 Hey guys, I'm having trouble understanding the registerListener which takes a Handler and a SensorEventListener. Where exactly will the SensorManager be calling the onSensorChanged? In the Handler or in the SensorEventListener? Jan 08 17:11:57 wilornel: from the docs, it seems like the listener is where events will be received and forwarded to the handler Jan 08 17:12:41 The docs say it will deliver SensorEvents to the Handler. In the SensorEventsListener, we see that onSensorChanged requires a SensorEvent. Both of them will receive a SensorEvent Jan 08 17:13:32 alexfu: I don't understand the structure the registerListener will be working with. I'd have a SensorEventListener object which has its onSensorChanged called, right? Jan 08 17:13:54 And, I'd have a Handler which will be having SensorEvents delivered to it Jan 08 17:14:43 wilornel: if I had to guess, the Handler is used to pass events to the given SensorEventListener Jan 08 17:14:58 wilornel, what are you confused about, it runs on the thread which the handler runs on Jan 08 17:15:00 that is, if you pass in new Handler(Looper.getMainLooper()) then you'll get the callbacks on the main thread Jan 08 17:15:04 if you give it a ui thread handler, it runs on ui thread Jan 08 17:15:13 if you give it another Handler, you will get them on a different thread Jan 08 17:15:13 if you give it a handler for a background thread, it runs on a background thread Jan 08 17:15:42 alright so it calls the onSensorChanged in the SensorEventListener in the given Handler! Jan 08 17:15:53 right? Jan 08 17:16:24 yes Jan 08 17:16:33 the handler itself doesn't matter Jan 08 17:16:37 it's just a representation of a thread Jan 08 17:16:38 I see Jan 08 17:16:46 you've been asking this for a few days now, why hasn't it clicked yet... Jan 08 17:16:49 oh so I don't need any code in my Handler? Jan 08 17:16:53 no Jan 08 17:16:55 no Jan 08 17:17:06 pfn: well, I've asked that yesterday, I was just too busy to work it out Jan 08 17:17:33 seems like you've been asking before yesterday Jan 08 17:17:42 maybe I was just up too long Jan 08 17:17:48 hahah Jan 08 17:17:56 the docs could be a little more clear about that. Jan 08 17:20:22 alexfu: They are not, at all Jan 08 17:22:18 Is there any lib that simplifies thing for App Engine? Jan 08 17:22:23 For Android obviously Jan 08 17:28:43 autrilla: no, but I've considered writing one Jan 08 17:28:45 my app uses sharedpreferences and after a system update all saved data is gone Jan 08 17:29:39 according to my one beta tester anyway Jan 08 17:35:58 Hmm, if I run my sensor in a HandlerThread and register a listener to it(just my own listenerinterface) then it will call the onEvent method on a class that executes in another thread right? eh, bad...? how would you communicate an event to another class in another thread? Jan 08 17:38:15 I believe a simple listener would just run on the thread that calls it Jan 08 17:39:08 to get it handled on a seperate thread is rather difficult. Have to have a messaging system that is thread safe. Could use a linked blocking queue (may not be available on android) Jan 08 17:40:36 lots of ways Jan 08 17:40:42 you can use a handler to pass it to another thread Jan 08 17:40:42 ^ Jan 08 17:42:13 everything in javase is in android, minus ui and javax stuff Jan 08 17:42:36 and only some javax stuff is omitted Jan 08 17:47:42 If I want to size my buttons like 1/5 of screen size for height, then I have to do this programmatically right? cannot do math in xml...? Jan 08 17:48:25 Houte: yes. Jan 08 17:48:55 I don't know why DDMS profiling almost always (when started from Eclipse view) record only a very little piece of time. For example I start to profile and I count 20s but when I stop I get only 1-2s... It is usual ? Jan 08 17:48:56 there is a hack to do it in xml if you use the weights Jan 08 17:49:19 but it is not suggested (especially with nested weights) Jan 08 17:52:13 shineworld: are you starting/stopping in code? Jan 08 17:52:42 Weights aren't _that_ computationally expensive. As long as you don't go nuts with nested weighting, you're fine. "Not suggested" is exaggurated. Jan 08 17:52:50 not ... using Eclipse ADT view DDMS Jan 08 17:53:21 shineworld: I would do it from code Jan 08 17:53:30 is there no resource folder/file for setting global constants? Jan 08 17:54:00 I will add a button to start/stop profiling in code Jan 08 17:54:30 shineworld: you dont need a button really Jan 08 17:54:35 hello, I have a question which I couldn't find an answer to in the docs: what happens when my BroadcastReceiver crashes while processing one of the PendingIntents passed to android.telephony.SmsManager.sendTextMessage? will they be sent again? or could I lose the information that an SMS was sent? Jan 08 17:55:13 how do you get around that java does not have higher order functions or function pointers? Jan 08 17:55:47 hmm I guess I could recover it from the SMS content provider Jan 08 17:55:59 Houte: what type of global const. are you talking about? Jan 08 17:57:00 Houte: I think one way to get around it is to use anonymous classes but I'm not really an expert. Also, Java 8 gets some syntactic sugar for that AFAIK. Jan 08 17:57:09 alexfu, so why is the better way to profile a piece of code (in my case some threads which implement a stack below Android Open Accessory streams) ? Jan 08 17:57:30 I don't have a wakelock set and my app keeps running when the device is locked. I'm receiving Log.v()'s logs in logCat... Jan 08 17:58:30 shineworld: you have more control over when and where to start/stop profiling. Jan 08 17:58:54 ok, googling for more info :) Jan 08 17:59:44 what happens to exception that are thrown in an asyntask? Jan 08 18:00:19 Trojaner: app crash? Jan 08 18:00:52 can i catch them from the outside of the task? Jan 08 18:02:18 http://pastebin.com/rem0xRnc Jan 08 18:02:20 Trojaner: you can return an Exception in doInBackground.. is that what you mean? Jan 08 18:02:26 yes Jan 08 18:02:28 hey guys! If I want to run some method in onStop() - should I run it before super.onStop() or after super.onStop()? Jan 08 18:02:37 @code above: would that work? Jan 08 18:02:52 if the UnknownHostException is thrown at doInBackground Jan 08 18:02:56 Trojaner: you could do return e in the catch block. Jan 08 18:03:17 okay Jan 08 18:03:33 but, the problem is Jan 08 18:03:49 Can anyone help with integrating App Engine on Android Studio? I get this error: http://gyazo.com/3d76d417610d5414b4b8b9d2b42a3d96 Jan 08 18:03:58 idea says that the exception is never thrown at the block Jan 08 18:04:07 its shown as an error Jan 08 18:05:02 I want to run some method in onStop() - should I run it before super.onStop() or after super.onStop()? Jan 08 18:06:11 Trojaner: are you sure the query.get throws an UnknownHostException? Jan 08 18:06:24 Trojaner: what is query ? Jan 08 18:06:28 its a task Jan 08 18:06:36 custom class? built in class? Jan 08 18:06:42 a class extending asynctask Jan 08 18:06:53 but its not overriding get() Jan 08 18:07:00 get Jan 08 18:07:05 No, you can not catch exceptions thrown in an asynctask outside of asynctask Jan 08 18:07:19 osmij_: https://developer.android.com/training/basics/activity-lifecycle/stopping.html Jan 08 18:07:22 You probably don't want to use AsyncTask#get either (because I assume you're calling it form the main thread) Jan 08 18:07:26 in the example super.onStop is called at the beginning Jan 08 18:07:43 hmm, SimonVT: how should I get the result? Jan 08 18:07:46 osmij_: but keep in mind onStop may be skipped if there is no memory left so don't rely on that for launching the missiles Jan 08 18:07:53 its not a long task Jan 08 18:08:06 its just sending some bytes and receiving a response Jan 08 18:08:36 Trojaner: i think what you want is to run execute and handle post processing in onPostExecute Jan 08 18:08:44 A callback in onPostExecute Jan 08 18:08:46 What would be a reason my app is still running when the device is locked even though there is no wakelock? Jan 08 18:09:00 And networking can be a long task Jan 08 18:09:05 You're on mobile Jan 08 18:09:08 hm Jan 08 18:09:12 durka42: is onPause() more reliable? I need to save list filter state in SharedPreferences Jan 08 18:09:14 its also a widget Jan 08 18:09:23 so, are asynctasks a good idea? Jan 08 18:09:24 osmij_: As durka42 said, be mindful of how the lifecycles work, but to answer yout question, call the superclass first. Jan 08 18:09:37 I think onPause is more reliable Jan 08 18:10:03 in onStop docs it says "may not be called if your app is OOMed after onPause" Jan 08 18:10:13 which implies that onPause is reliable Jan 08 18:10:22 but, you know, beware of cosmic rays Jan 08 18:11:10 I've never built a widget before, but i'd imagine upi Jan 08 18:11:23 you'd want to use a service for background tasks Jan 08 18:11:27 onPause() is extremely reliable, onStop() and onDestroy() equally less so. Jan 08 18:11:27 durka42, ironmarx: =) thanks!! Jan 08 18:12:06 hmm, i dont know how to use services...so i will ask google how to use them :D Jan 08 18:12:09 thanks anyway Jan 08 18:12:26 Google's pretty good at knowing that sort of thing. Smart guy. Jan 08 18:12:39 It's actually a service that keeps running.. Jan 08 18:13:11 that's what services are for :) Jan 08 18:14:00 durka42: It keeps running even though the device is locked Jan 08 18:14:27 That's not mentioned anywhere in the Service docs Jan 08 18:17:18 Service doesn't really have anything that runs.. You can start a thread that runs if you want Jan 08 18:18:18 if you want a service that runs only while your activity is up, you want a bound service Jan 08 18:18:38 a wakelock is just about whether the screen is on, to my understanding Jan 08 18:19:00 And whether the cpu can sleep Jan 08 18:19:29 You can have a wakelock without the screen turning on Jan 08 18:21:03 is there a way to force line breaks in string-ressources without hardcoding \n ? Jan 08 18:22:56 Can anyone help with integrating App Engine on Android Studio? I get this error: http://gyazo.com/3d76d417610d5414b4b8b9d2b42a3d96 Jan 08 18:23:01 SimonVT: Actually, my service is creating a new Thread. And the Log.v() is being called in that new thread. Is that why I'm still receiving updates from Log.v() in logcat even though the device is locked? Jan 08 18:23:23 Locking the device doesn't pause threads Jan 08 18:23:30 Any threads, service or not Jan 08 18:24:06 I thought a service was not a thread? Jan 08 18:24:18 Alright so a lock pauses the main thread, but not any other thread, right? Jan 08 18:24:19 Any thread, in a service or not Jan 08 18:24:30 No, it doesn't pause the main thread either Jan 08 18:24:45 SimonVT: Well, it does stop the main thread, right? Jan 08 18:24:50 what? Jan 08 18:24:50 No Jan 08 18:25:03 Well, how come my app stops running when the device is locked? Jan 08 18:25:12 Define "stops running" Jan 08 18:25:13 I think the app will get onPause() if it is what you mean by "stop the main thread" Jan 08 18:25:16 Your activities are paused, sure Jan 08 18:25:23 activities are always paused when device is locked Jan 08 18:26:23 Alright so onPause() is called for activities, but not services or threads? Jan 08 18:26:35 services and threads don't have onPause, so no Jan 08 18:26:44 onPause is just a callback letting you know that you should pause what you're doing Jan 08 18:27:16 onPause() does mean the app is "paused" or "stopped" Jan 08 18:27:17 Your activity is no longer at the front Jan 08 18:27:17 Alright, thanks tons guys! Jan 08 18:27:28 services and threads don't have onPause Jan 08 18:27:34 Joker-eph: Activity != app Jan 08 18:27:54 SimonVT: right Jan 08 18:28:04 My app is not paused when my activity is Jan 08 18:29:12 In Settings > Application Manager on the device, I can see "1 process and 1 service" under my app. The service I understand, the process would be the app itself or would it be a thread or is it an activity? Jan 08 18:30:01 all apps are single process Jan 08 18:30:08 unless explicitly created otherwise Jan 08 18:33:28 I have a code using c++11 std::thread, works fine in an app using NDK. Now I have to turn it into a native system library/daemon, however I need to statically link to gnustl and I don't find how to do that in the Android tree (no Application.mk there...), any hint ? Jan 08 18:42:57 hey, would it be okay to solicit a small (paid) java/android related task in here that i could use some help with? Jan 08 18:43:14 i can read, i promise. Jan 08 18:43:26 oops, meant to put that in #android. i'm on a roll today. Jan 08 18:43:58 oh and i jumped the gun again on the no advertising in the topic, please ignore me. sorry again. Jan 08 18:44:40 Hi, I'm trying to install the electrum bitcoin client, following their tutorial via qr codes I have gone as far as installing the SL4A and python4android. But When I choose the option to scan a qr code from within the SL4A the app shuts down, is there a compatible qr scanner for the SL4A ? Jan 08 18:48:04 is there a way to use a relativelayout with radio buttons while still keeping them in a radio group? Jan 08 18:51:03 In Eclipse I use Comand Shift F to reorganize A LOT. But it shortens some lines and puts them onto two lines. Anyone know how to change this behavior so that I can extend the line? Jan 08 18:51:51 valheru7: wrap relativelayout around radiogroup? although that seems strange Jan 08 18:55:33 alexfu, yeah that didnt work. I can wrap the radio buttons in one and then align them apprioriately bu tthen they are no longer in the radio group Jan 08 18:55:48 if I wrap the whole radio group, then the alignment of the buttons is ignored Jan 08 18:56:01 valheru7: what are you trying to do? Jan 08 18:56:27 well right now I have a radio group of 4 radio buttons Jan 08 18:56:33 and they get cut off in phone view Jan 08 18:56:37 valheru7: radiogroup is a subclass of linearlayout so you can change orientation Jan 08 18:56:40 so I wanted to align them, 2 on top, and 2 on bottom instead Jan 08 18:56:52 valheru7: oh Jan 08 18:57:02 I dont want them to be a full 4 vertically though. I still want it primarily horizontal Jan 08 18:58:23 valheru7: you can always make a custom radiogroup that extends from relativelayout instead. shouldnt be hard to manage radiobuttons yourself Jan 08 18:58:33 interesting thought Jan 08 18:59:43 I mean yeah I could manage the buttons myself instead. just didnt want to have to deal with that. but extending relativelayout may be more complex Jan 08 19:01:16 valheru7: there are also alternative ui options, such as using a spinner instead or an alertdialog with a single choice list... just depends on your design. Jan 08 19:01:38 ok thanks Jan 08 19:03:07 anyone around that can help me? Jan 08 19:03:29 vite: just ask Jan 08 19:03:54 he asked before so I guess the answer is unfortunately not Jan 08 19:04:44 is there a known bug when trying to get google SL4A to scan a qrcode to download a package? Jan 08 19:05:35 hy all [19:56] is there a way to get an NFC reading capability into a phone what hasn't such capability? Jan 08 19:06:08 pretty sure NFC requires dedicated hardware Jan 08 19:07:52 gregtom6: no Jan 08 19:08:19 and what is the cheapest NFC capable phone? Jan 08 19:08:51 what is always supported officially or unofficially with always the newest version of android Jan 08 19:09:17 or at least it has v4 android Jan 08 19:09:54 Try #android Jan 08 19:15:26 how can I set the background color of the actionbar? Jan 08 19:15:53 Greg I know my girlfriends razrm has nfc Jan 08 19:16:36 jonc: I can confirm RAZR M has NFC. Jan 08 19:17:01 my Galaxy Nexus S has NFC, i bet you can get one for almost nothing by now Jan 08 19:18:15 $400 for a moto x is a good deal Jan 08 19:18:19 dunno about cheapest, but it's a good deal Jan 08 19:18:35 no contract? Jan 08 19:18:47 I was trying to use it to read the (I assume) nfc data from the meal deal cups at universal studios Jan 08 19:18:56 I imagine they get a date written to them for when they are good Jan 08 19:19:20 and depending on who coded it, wouldn't be surprised if there was no encryption involved Jan 08 19:25:19 sabton: good call. and you can put a 2.3 image on a Nexus S, as well as 4.0 and 4.1 Jan 08 19:41:11 Can anyone help with integrating App Engine on Android Studio? I get this error: http://gyazo.com/3d76d417610d5414b4b8b9d2b42a3d96 Jan 08 19:41:28 How do I alight something below another view in xml with relative layout? I thought layout_alignBottom would work, but it doesn't go below the view. Jan 08 19:42:11 Aha! below not alignBelow Jan 08 19:42:46 eghdk, "alignBottom" means "align bottom edges" so that means the views are side-by-side Jan 08 19:42:52 "below" is indeed what you seek :) Jan 08 19:46:07 Anyone know how to check if you should use Imperial units instead of Metric inside of an Android app other than checking if the country code is "US" (or "LR" or "MM")? Jan 08 19:50:50 louielouie: whats wrong with with using Locale.getDefault() ? Jan 08 19:51:45 louielouie: only a handful of places use imperial so checking for those won't take much. Jan 08 19:51:48 alexfu: that works fine. but there's no "isMetricSystemUsed" or equivalent call Jan 08 19:52:35 so you can use something like Locale.getDefault().getCountry() and check against "US", "LR", and "MM". just seems like something generic that should be in the OS. Jan 08 19:53:01 louielouie: i wouldnt expect it to be in the OS Jan 08 19:53:10 louielouie: or rather, API Jan 08 19:56:48 louielouie: https://gist.github.com/alexfu/8323468 done. Jan 08 19:57:18 Anyone good with ArrayAdapters? getView and Viewholders? Could use some help here: http://stackoverflow.com/questions/20981634/should-i-use-viewholders-if-i-use-different-viewitemtypes Jan 08 19:57:20 alexfu: thanks - i already had written that. just looking for something better if available. thanks though. Jan 08 19:58:22 why does it not result in the same color when using setBackgroundColor for Button and View? Jan 08 19:58:24 alexfu, that's not really helpful now is it? Jan 08 19:58:46 Mavrik: ? Jan 08 19:59:07 alexfu, dealing with locale in this way will almost always lead to crap Jan 08 19:59:13 please use libraries for that -_- Jan 08 19:59:31 Houte: I think button automatically puts transparency Jan 08 19:59:34 since you'll manage to forget half of smaller locales in that check Jan 08 20:00:24 Houte: I think if you set a specific size for width and height it'll lose the transparency Jan 08 20:00:43 Mavrik: do you have a library to suggest that will detect imperial/metric usage? Jan 08 20:00:54 louielouie, checking for it, I think there was one awhile ago Jan 08 20:01:03 Mavrik: i'm not an expert with locales nor have I ever used them. just providing a basic example using tools that the SDK provides... Jan 08 20:01:03 louielouie, also remember to always give the user option to change it Jan 08 20:01:16 since there's ton of people using en_US locale that don't want to see units in imperial :) Jan 08 20:01:58 hey whats up my homies Jan 08 20:02:03 Button doesn't set transparency.. THere's no difference between calling setBackgroundColor on a Button and on a View Jan 08 20:02:38 louielouie, hmmm, there was something in JScience, but I'm not seeing anything standalone :/ Jan 08 20:02:46 are you my mummy? Jan 08 20:06:29 I really wish there was things like en_FI locale, I'd use it Jan 08 20:06:43 the latter part is supposed to be the region Jan 08 20:07:05 but apparently you can only have official locales and not mix and match them in some insane way though I'm not sure why Jan 08 20:07:41 Mavrik: thanks - i'm looking into it now. Jan 08 20:08:26 no prob ,bob =) Jan 08 20:09:24 alankila, there was a tool that let you do that Jan 08 20:09:37 I was running my phone with en_SI for a long while and it worked well Jan 08 20:09:47 HTC & Co. even build ROMs with that option Jan 08 20:10:11 hmm, yeah android is a bit different from the JDK Jan 08 20:10:22 but in the JDK, it seems to be impossible Jan 08 20:10:35 I dimly remember doing something like this in android 2.x timeframe Jan 08 20:11:48 Hi guys. I have an A activity that instantiate a class B that extends AsyncTask. I want to cancel the AsyncTask when I hit the back button to go from A activity to my MainActivity. Jan 08 20:12:05 uniqdom: what's stopping you? Jan 08 20:14:07 in A activity, i have written B_Instance.taskAsyncTask.cancel(true) in the onPause() Jan 08 20:14:15 butt don't know if that is the correct way Jan 08 20:14:19 but* Jan 08 20:14:40 apart from weird naming, and violating of object state, it seems like the sort of thing you should be doing Jan 08 20:14:42 http://bon-app-etit.blogspot.com/2013/04/the-dark-side-of-asynctask.html Jan 08 20:15:49 uniqdom, your async task won't stop unless you check for isCanceled in the task code tho. Jan 08 20:15:59 So how do I remove transparency for background for button and view? Jan 08 20:16:20 trueish. It may be necessary to test the canceling state if you don't do some interrutible operation Jan 08 20:16:21 Is there a way to generate the debug.keystore without using eclipse? Jan 08 20:16:38 also I/O reads from streams are not interruptible, the only means to interrupt them is to close those streams from another thread Jan 08 20:17:00 hello helo Jan 08 20:17:28 let me check out ur link guy Jan 08 20:18:05 tl;dr is "don't use asynctask", i think Jan 08 20:18:36 uh Jan 08 20:18:36 no. Jan 08 20:18:42 The dark side of AsyncTask, nice Jan 08 20:18:43 (you don't really have a choice anyway) Jan 08 20:18:56 nice find dog Jan 08 20:19:48 i think you do have a choice... Jan 08 20:20:05 there are a lot of alternatives to asynctask... Jan 08 20:20:08 hmh. does the asynctask really hold the activity instance? What if it held a mere handler... Jan 08 20:20:26 too lazy to check out the source of the shit to see if that's true Jan 08 20:20:33 alankila, Mavrik, thanks... it's working now :) Jan 08 20:20:46 If it's an anonymous inner class it holds a reference to the outer class.. Like any other anonymous inner class Jan 08 20:20:48 np Jan 08 20:20:52 alankila, depends on how you define it Jan 08 20:20:54 SimonVT: it doesn't have to be, of course. Jan 08 20:20:57 In itself, asynctask doesn't hold a reference to your activity Jan 08 20:20:58 alankila, if it's an inner class Jan 08 20:21:10 Mavrik: okay, so the article was full of shit or I didn't read it carefully enough Jan 08 20:21:11 it will reference it's parent so it can call stuff in parent Jan 08 20:21:13 was merely surrised Jan 08 20:21:22 same if it's anonymous :) Jan 08 20:21:42 if it's a static inner class / not an inner class it doesn't hold a reference unless you do manually :) Jan 08 20:21:54 the article specifically claims that to call the onostExecute it needs the activity instance Jan 08 20:21:56 TRomeo, with same behaviour. Jan 08 20:22:01 since this is clearly not true, I was wondering Jan 08 20:22:23 hmm... Jan 08 20:22:25 but if you make it static, then you can't make UI changes in onPostExecute, so you might as well not use it :/ Jan 08 20:22:25 onpostexecute too. My p char is actually broken on laptop, I have it in cut-paste buffer. Jan 08 20:22:29 it does switch to main thread Jan 08 20:22:37 Yeah, that's not true Jan 08 20:22:38 cleaned keyboard, some water seeped through... maybe it broke for good. Jan 08 20:22:57 alankila: oh man. I had a laptop with a busted 6 key for years. Jan 08 20:23:15 so all you doubting thomas's - i FINALLY got my NDK tile map library working Jan 08 20:23:24 alankila: b/c it was sony and I couldn't get a replacement kb. Some guy sent me one from japan but it had the wrong mounting points Jan 08 20:23:26 yeah the p is kind of inconvenient because it's used in those visibility descriptors and capitalizing it is annoying Jan 08 20:23:33 alankila: what brand laptop? Jan 08 20:23:40 it's an old macbook air Jan 08 20:23:47 ahh. Well that sucks. Jan 08 20:23:48 had to load the entire tile map into ram tho, cant do random reads on assets the way the NDK API leads you to believe Jan 08 20:23:52 I already poured a cup of tea over it about 2 years ago Jan 08 20:24:00 that broke the power key Jan 08 20:24:14 alankila: I'm spoiled with thinkpads; they're more or less bulletproof AND you can buy all the bits Jan 08 20:24:18 I have a hole drilled in the bottom where I can access the on-board jumper that powers it on from the motherboard Jan 08 20:24:23 wow Jan 08 20:24:30 that's kind of awesome Jan 08 20:24:39 it's crazy but I'm stubborn Jan 08 20:24:44 alankila, take the battery out. unplug. leave to dry - open up and WASH in water all the parts that might be icky. do not power on till thoroughly dry Jan 08 20:24:58 what about toshiba satelitte Jan 08 20:25:11 I440r: it may be too late. I already took the keyboard to pieces once, trying to work out if something would fix the power key Jan 08 20:25:17 it's been like this a week now Jan 08 20:25:56 buy new one. peel off sitckers. accidentally drop the old laptop with the new stickers and get a replacement :))) Jan 08 20:26:05 shhhh dont tell them i said that! lol Jan 08 20:26:57 i had an LG phone that had banana in the mini USB port once. cleaned it out with rubbing alcohol and a toothbrush. Jan 08 20:27:06 this isn't my main machine, it's just what I use mostly for testing web apps and as a reading machine Jan 08 20:27:17 alankila: looks like about $250, the keyboard and the top of the case are one unit Jan 08 20:27:20 it has core 2 duo and 2 GB of memory. It can barely run eclipse or android studio Jan 08 20:27:26 it compiles very, very slow Jan 08 20:27:27 alankila: http://www.powerbookmedic.com/MacBook-Air-13-Mid-2011-p-1-c-746.html Jan 08 20:27:51 tho i'm seeing some from other sites for under $100 Jan 08 20:28:00 in fact I had decided it's useless until 10.9 came out Jan 08 20:28:06 but that breathed new life to this old machine Jan 08 20:28:15 my cousins are dillholes Jan 08 20:28:33 wtf is a dillhole Jan 08 20:28:46 louielouie: that's a pretty hilarious sentence to read. "it had banana in it" Jan 08 20:29:14 the definition of hilarious has been severely degraded Jan 08 20:29:26 Norrin: it's a dickhole Jan 08 20:29:28 for scale, I assume. Jan 08 20:30:04 dragorn: haha yea. pro tip: don't mix fruit and devices. :p Jan 08 20:30:20 yeah, you end up with an iMac Jan 08 20:30:22 nobody wants that Jan 08 20:30:46 louielouie: I hope that also includes "don't mix children and devices" :P Jan 08 20:30:49 nick9998, I see. makes sense. still a very sparsely used description. so many more common terms would suffice. maybe its regional Jan 08 20:31:30 alexfu, thanks for the suggestions. I was able to follow this http://stackoverflow.com/questions/6320125/radiogroup-extending-relativelayout to create my own RadioGroup ReleativeLayout extension and it works =) Jan 08 20:31:39 dragorn: no comment :) Jan 08 20:32:17 Norrin: thanks for the suggestion Jan 08 20:32:27 my cousins are dickholes, everyone Jan 08 20:34:32 nick9998: oh, NOW i understand you. :P Jan 08 20:37:20 valheru7: nice Jan 08 20:41:23 So if setting the same color to a Button in different places and receiving different colors when it is displayed, what is then the problem? I set both to opaque(=1). Jan 08 20:43:50 is there an easy way in Android Studio to show portions of a scroll view that are off screen (in UI design view) Jan 08 20:48:35 how is the new AS 0.4.1 working out ? Jan 08 20:50:02 I sent a bug about android studio 4.0, complaining that minSdk didn't affect renderscript target ai Jan 08 20:50:25 api even. They told me there's renderscriptTargetApi declaration to control that Jan 08 20:50:53 I tried AS a few months ago, suddenly all my eclipse paths were borked. uninstalled, fixed eclipse, haven't been brave enough to try AS again Jan 08 20:51:12 It's not bad Jan 08 20:51:27 I still feel that it's clunky, but overally it's pretty decent Jan 08 20:52:08 also made renderscript api default to minsdk from now on Jan 08 20:52:14 which is what eclipse did Jan 08 20:52:55 my only personal complaint about AS is that as a hamfisted person I often manage to drive it into some weird state where I need to work out how to restore normalcy Jan 08 20:53:13 "Updated to the latest Intellij 13.0.2 release build" Jan 08 20:53:35 cool. the only problem i've had with it so far, is that builds take too damn long Jan 08 20:54:08 I have some eclipse-driven keystrokes that don't work right in AS and sometimes I absentmindedly use the wrong combination Jan 08 20:54:14 like enable block selection mode Jan 08 20:55:21 Sometimes happen as I try to generate a {, manage to hit alt+cmd+8 and then it's in block selection mode Jan 08 20:55:41 oh yeah, i always used ctrl-d in eclipse which was delete line; in AS is DUPLICATE line haha Jan 08 20:56:06 I worry that I'm retarded Jan 08 20:56:14 me too :| Jan 08 20:56:35 but in general I hate software with features I don't use. Giving me means to eliminate entire modules that I don't need is often what I would want Jan 08 20:57:45 yeah, thats the way i felt about eclipse ADT - al those 'gui' editors for things like the AndroidManifest, which just turned out be some huge form. it was all useless crap. Jan 08 20:57:52 I kind appreciate the minimal eclipse for this reason, though I often hate the effort it takes to set it up so that it can actually do what I need it to do Jan 08 20:58:13 yeah I never really touch the androidmanifest editor, I just want the xml Jan 08 20:58:25 give me good completions for xml attributes any day over that gui cra Jan 08 20:58:27 +p Jan 08 20:58:31 yeah, definitely Jan 08 20:58:53 though I like the ui editor for showing me the views in real time, it's a great design help Jan 08 20:59:01 they are kinda doing that to AS too if i'm reading right; i'd rather all changes to the project model just be the developer editing build.gradle Jan 08 20:59:03 not so thrilled about the drag and dro shit Jan 08 20:59:11 i dont think there should be a second way to do it, like through dialogs etc Jan 08 20:59:25 I'm still fighting against gradle, but perhaps I embrace it one day Jan 08 20:59:40 I took the step into maven after many years of resistance and it hasn't been too awful so far Jan 08 20:59:51 in fact in some respects a marked improvement Jan 08 21:00:20 I was happy to see that AS and IDEA can build android apps themselves for most part. What they can't do is renderscript apparently Jan 08 21:00:37 but RS is totally oversold tech in that I've never seen a device that can run any of it on gpu I guess Jan 08 21:00:50 it's just a retarded version of C/C++ Jan 08 21:01:24 glm.hpp seems like better bet than RS if you don't get assurance that it will actually execute on the graphics processor. Jan 08 21:09:48 If I provide a layout-land and layout-port then I technically don't need the default layout folder? Jan 08 21:12:04 whats layout-port ? Jan 08 21:12:08 oh Jan 08 21:12:11 duh Jan 08 21:12:17 it's where you stick the layout Jan 08 21:12:20 i just have layout and layout-land Jan 08 21:12:36 so i should rename "layout" to "layout-port" ? Jan 08 21:12:57 "Likewise, if you provide different layout resources based on the screen orientation, you should pick one orientation as your default. For example, instead of providing layout resources in layout-land/ for landscape and layout-port/ for portrait, leave one as the default, such as layout/ for landscape and layout-port/ for portrait." Jan 08 21:13:07 https://developer.android.com/guide/topics/resources/providing-resources.html#Compatibility Jan 08 21:13:26 JesusFreke, can you take a look at my apk and tell me if the interface is ok? Jan 08 21:13:39 I cannot Jan 08 21:13:49 not even in an AVD? Jan 08 21:14:00 @compac Jan 08 21:14:38 If I drop support for 2.3 devices moving forwards, will my last apk that does support 2.3 be served to someone through play? Jan 08 21:14:49 (if they're on 2.3 that is) Jan 08 21:14:51 You can offer multiple apks Jan 08 21:15:21 I440r: I have no interest in looking at your apk, sorry :) Jan 08 21:15:43 drismm: https://developer.android.com/google/play/publishing/multiple-apks.html Jan 08 21:16:32 k lol - i just wanted some more experienced person to tell me if the interface was badly implemented or not :) Jan 08 21:16:33 beautiful, thank you kakazza Jan 08 21:16:35 kakazza, Thanks, I missed that Jan 08 21:16:38 ah, what a pleasure it is to see that once-unassailable gingerbread is only 1/4 of devices now Jan 08 21:17:04 we're dropping support for it - feels good Jan 08 21:17:26 I guess in another year it will be 10 % or so Jan 08 21:18:23 I have sort of worried that it would never go away because the 4.x series raised memory and cpu requirements Jan 08 21:18:33 was worrying that there would be a never-ending niche for those devices Jan 08 21:18:43 would any experienced dev care to take a look at my apk and tell me if the interface is bad? Jan 08 21:21:16 hmh. I'm struggling with a notification on task bar I can't seem to kill Jan 08 21:21:41 the app is dead, I killed the process, but the notification lingers on ... and the notification is only for the foreground status of the process Jan 08 21:22:21 ah, I see why Jan 08 21:22:28 I forgot a stopForeground(true) call Jan 08 21:22:30 well damn Jan 08 21:22:36 definitely retarded Jan 08 21:22:36 alankila: you need to cancel a notification Jan 08 21:25:01 suppose that I'm behind the curve technically like any old fart but I want a phone that can run the latest and greatest in android and has all hardware goodies phones these days tend to come with, be it gyroscopes or NFC or what-have-you. What should I get? Jan 08 21:25:16 I'd also like to impose price ceiling of 200 euros and have a free pony, please. Jan 08 21:25:26 So if setting the same color to a Button in different places and receiving different colors when it is displayed, what is then the problem? I set both to opaque(=1). I cant figure this out, what could I be doing wrong? Jan 08 21:25:49 a whole bunch of people have mentioned moto g. Is that thing worth a damn? Jan 08 21:26:01 alankila: probably a better question for #android Jan 08 21:26:24 what would you call an app that is a smartphone friendly interface for a website? Jan 08 21:26:28 like, is there a word specifically for that type of app? Jan 08 21:26:44 A browser? Jan 08 21:26:53 no, like.. Jan 08 21:26:57 monarch: you mean like what is Facebook app to Facebook website? Jan 08 21:27:06 to an extent tapatalk stuff, and yeah alexfu. Jan 08 21:27:13 like fb, twitter, etc. Jan 08 21:27:43 like this? https://xkcd.com/1174/ Jan 08 21:27:48 monarch: you would call that an app....... Jan 08 21:28:03 Hmh. I suppose. Moto g looks a bit too basic anyway. I hate this new hardware search thing. Jan 08 21:28:04 I would call it a "wrapper" Jan 08 21:28:39 alexfu, but it's different from other apps, it's not a tool in and of itself, it's a re-representation of a website in app form. Jan 08 21:28:50 unless it has significant extra features Jan 08 21:28:53 that's why I'd call it a wrapper Jan 08 21:28:54 i guess like all of the reddit ones Jan 08 21:29:03 durka42, word. Jan 08 21:29:11 well some of those have "value added" though Jan 08 21:29:22 like notifications etc Jan 08 21:29:41 in which case, what would you call that? Jan 08 21:29:55 I dunno Jan 08 21:30:06 it's a continuum I guess Jan 08 21:30:08 i'm asking all of this because i want to make one for my job's ticketing system and i wanted to see examples of how other ones were made. Jan 08 21:30:11 lol whats wrong w/ app ? Jan 08 21:30:22 alexfu, there are different kinds of apps Jan 08 21:30:31 there are apps that are tools in and of themselves Jan 08 21:30:52 i'm looking for information about a specific kind of app, and i wanted to know if there was jargon for it, is all. Jan 08 21:35:49 hm, you would consider facebook to be a wrapper? Jan 08 21:36:18 the official one, I'd say is more than a wrapper Jan 08 21:36:22 Tinfoil for Facebook, that's a wrapper Jan 08 21:36:28 i can understand the other ones i mentioned, but FB has a specific mobile user experience. Jan 08 21:36:29 they used to be called "pretty viewers" Jan 08 21:36:46 our topic said at one time, "no more pretty viewers please" or something like that Jan 08 21:36:53 ahah Jan 08 21:36:58 yeah i pretty much hate them too. Jan 08 21:37:26 but you're writing one :) Jan 08 21:38:21 well, most of the ones i've seen are pretty shitty and don't change much if anything about the UX on mobile. Jan 08 21:38:47 like most of the ones i've seen have been sorta just shortcuts to the mobile site. Jan 08 21:39:00 which more often than not is lacking some core functionality that i've needed haha. Jan 08 21:39:49 that's why i'm trying this out, because i can't do what i want to do on our site's mobile version. Jan 08 21:41:42 alankila: how about the nexus 5? its 250 euro roughly but its got the latest and greatest and you have all the nexus images and such Jan 08 21:45:53 yeah I would be interested in that I think Jan 08 21:48:05 I'm afraid the cheapest prices I can find for nexus 5 start from 400 E though Jan 08 21:49:21 still, it looks quite good. I have to consider it. Jan 08 21:50:46 i just upgraded from an N4->N5, they are pretty nice Jan 08 21:52:32 Forgive my ignorance but I am trying to set a Matrix on a View but am getting kickback in the form of an exception "Matrix can not be modified". How do i set a matrix on a view? Jan 08 21:53:10 Trying to do this all without an animation as I am working with a tweening lib. Jan 08 21:59:21 what is the font cache and why is it being constantly perged of 200k of data? Jan 08 22:01:08 where are you seeing that ? Jan 08 22:03:52 i am playing the kabam hobbit game for droid, and I have raided like 10 cities today already. this game is fun. Jan 08 22:06:34 tcb^ll3r great advertising Jan 08 22:09:19 g00s: the funny thing is that you responded. when i talk about dev, no one responds. Jan 08 22:21:44 anyone familiar with the google play services api? Im just curious if there's a reason the debug sha1 doesn't work for an additonally linked app to speed up test builds? Jan 08 22:21:52 or, if i somehow mucked it up Jan 08 22:22:53 pulled the sha1 from the .android/debug.keystore debug key and added it to a new linked app with teh same id Jan 08 22:23:14 not really sure why that fails miserably, but my prod sha1 version and build work fine Jan 08 22:23:59 shinkamui: what is a "linked" app? Jan 08 22:24:16 I feel lost... how do I populate my header view that I've set via .addHeaderView(View, Object, Boolean)? Jan 08 22:24:20 it should work for whatever app you signed as long as it is signed with the right keystone and has the right package name Jan 08 22:27:13 bankai_, im seeing it in my logcat :) Jan 08 22:27:26 359-359/com.reality.retrorpg D/skia? purging 195K from font cache [26 entries] Jan 08 22:27:37 was wondering what the font cache is Jan 08 22:29:31 it's a cache that's built up from your font directories to speed up usage of fonts Jan 08 22:29:44 how do I retrieve things i put in a bundle in a fragment using setArguments()? Jan 08 22:29:54 in the unix world there's fc-* commnads to manage this cache Jan 08 22:31:06 my "if (savedInstanceState.getBoolean("mTwoPane"))" isn't working. I'm getting a nullpointerexception Jan 08 22:31:46 louielouie: on the dev console, under game services, when you select any of your apps that use game services, item #2 is linked apps. I assumed it was for specifying different builds that have the same app_id and be tied tot he same services. Jan 08 22:32:45 louielouie: all i can think of is that somehow im published a key eclipse isn't using, or debug keys can't be used for some reason or another Jan 08 22:32:51 I not im Jan 08 22:32:54 anyone using NewRelic to monitor there Android app? Jan 08 22:33:54 SimonVT: Hello world! Jan 08 22:34:09 nice Jan 08 22:34:21 shinkamui: ah i see. i've only used it with google maps. check https://developers.google.com/games/services/console/enabling#a_create_a_linked_application for reference. looks like some additional oauth steps may be needed. Jan 08 22:34:28 ChairmanLMAO: getArguments() Jan 08 22:35:33 shinkamul: Eclipse should just use debug.keystore. if you really want to make sure, you can do Export > Android Application and then in third step you can select the keystone explicitly Jan 08 22:35:34 bankai_: doh! why dind't i think of that Jan 08 22:35:37 bankai_: thanks Jan 08 22:35:51 ChairmanLMAO: that is an epic name. =) Jan 08 22:36:23 thanks louielouie ! i was going to be Chairman_LMAO but it was already taken Jan 08 22:36:29 i guess i'm not as original as i thought Jan 08 22:36:43 still - its awesome Jan 08 22:37:25 Has anyone experienced issues with a WebView's setInitialScale() randomly not working on a Jelly Bean device? Jan 08 22:38:58 Any takers on .addHeaderView(View, Object, Boolean)? How do I actually use the Object parameter to populate the View paramter? Jan 08 22:39:41 My inflated header view is appearing and everything, but I can't figure out how to populate it. I don't have to pre-populate it do I? Jan 08 22:39:53 Prior to adding it that is. Jan 08 22:48:37 does anyone have experience in android custom rom development? Jan 08 22:49:04 mainly, how to allow enable system updates and package them? Jan 08 22:49:17 wrong channel for that Jan 08 22:49:27 which channel should i be looking at? Jan 08 22:49:56 CM? #android-root? #android? someone in one of those will know Jan 08 22:49:59 GusBricker: #android-root Jan 08 22:50:04 Anyone have an idea of a format to use to specify a maze so that I couod edit it graphically and then interpret it in the game? Jan 08 22:50:09 ah, cheers! Jan 08 22:50:14 like read in a resource to a matrix. Jan 08 22:54:09 n20: i think i would pre-populate it. headers are weird in ListViews. Jan 08 22:54:21 louielouie: I've noticed :( Jan 08 22:54:22 its hard to manipulate them after adding them Jan 08 22:55:02 louielouie: So, basically, inflate => populate => addHeaderView() Jan 08 22:55:34 n20: yes, then setAdapter Jan 08 22:59:03 Thanks louielouie, I'll try that out. I'd expect my adapter to have some fancy way of determining it in getView(), but no luck on that end :( Jan 08 22:59:14 Due to some adapter wrapping that goes on somewhere, somehow Jan 08 23:01:21 n20: yea that would be nice but not the way it works. you may also need to adjust the position of items in your list view after adding a header view. Jan 08 23:01:38 check out http://stackoverflow.com/questions/11106397/listview-addheaderview-causes-position-to-increase-by-one for the gist of it. #thingsIWishIKnewWhenIFirstStartedAndroidProgramming Jan 08 23:04:02 JakeWharton: I was working on hugo. I've been able to build hugo-runtime. However example fails because goes to mavenCentral to download runtime and doesn't find it (I have mavenLocal in hugo-example build.gradle). Do you have any idea how to force the build to grab the local runtime? Jan 08 23:04:02 louielouie: Actually, I'm not getting that problem lol Jan 08 23:04:35 n20: ok good to hear. good luck and have fun! Jan 08 23:04:45 louielouie: Thanks! Jan 08 23:06:26 Is there any way of passing Object INSTANCES around between activities? I have a C API that has callbacks which have references to the original object Jan 08 23:06:45 So, is there anything short of some static map I could use, to pass the instances around? Jan 08 23:06:53 what's wrong with a reference Jan 08 23:07:16 durka42, nothing, I need a reference to the SAME object Jan 08 23:07:28 not a de-parcelled version of the old parcelled-object Jan 08 23:07:33 I think you may have the definition of "reference" backwards... Jan 08 23:07:58 Not really Jan 08 23:08:21 then I don't understand the question. you say you have a reference to the original object, but what you want is a reference to the original object. ? Jan 08 23:08:45 I have a reference in the old activity Jan 08 23:08:57 And when I start a new activity, I still need the reference to that object Jan 08 23:09:05 oh and you're passing it in a Bundle or whatever Jan 08 23:09:22 Well, not really passing it yet, but designing the API Jan 08 23:09:55 Last resort would be a static map that just holds the references, and I pass the ID of that reference around and retrieve it from that map Jan 08 23:10:01 But that seems pretty terrible Jan 08 23:10:32 and why can't it be serialized for the bundle? Jan 08 23:10:38 I guess you could have a service that holds onto the object Jan 08 23:10:42 and hands it out to activities Jan 08 23:11:21 durka42, if I serialize it, it won't be the same object. It will serialize it into the bundle, and deserialize a new version of it in the new activity Jan 08 23:11:41 And since the C Code is holding references to the OLD object, this will cause segmentation faults Jan 08 23:11:52 oh I see Jan 08 23:12:12 yeah I think you need to store it somewhere outside the activity then Jan 08 23:12:23 because activity instances can be destroyed whenever android feels like it Jan 08 23:12:50 I'm trying to make the API android-friendly Jan 08 23:13:13 It's generally a java API to that C library, but Android is probably going to be the biggest use case for it Jan 08 23:13:23 bankai_ I only have one font included in my apk, i guess im consantly unloading it or something Jan 08 23:13:40 hmm Jan 08 23:13:53 * durka42 has not actually used NDK Jan 08 23:13:57 ohh.. is it only caching the font data for the characters ive used so its invalidating stale character data? Jan 08 23:14:00 thats probably it Jan 08 23:14:06 nothing to worry about Jan 08 23:15:07 So I'm wondering if I should care about this at all, or leave it completely up to whoever develops the application Jan 08 23:15:51 I guess my feeling is you should document it as a gotcha but it'll have to be up to the app developer in the end Jan 08 23:16:08 if the C API can't completely own the object Jan 08 23:16:13 then it will require cooperation Jan 08 23:17:04 Thanks for the input Jan 08 23:17:26 but I don't know anything about your library, so yeah :) Jan 08 23:17:53 Hey guys. It's me again. So, it was said that services and threads are not paused when the device is locked.Therefore, all the stackoverflow questions about keeping a service running when the device locks are irrelevant, right? Jan 08 23:18:11 https://github.com/irungentoo/ProjectTox-Core/ for reference Jan 08 23:18:46 And the java binding: https://github.com/Tox/jToxcore (the current implementation uses the static map solution I described, but I want to rewrite things now) Jan 08 23:18:46 wilornel: example of such a question? Jan 08 23:19:06 oh, that looks cool Jan 08 23:19:43 Hello, is there anyway I can grab the maximum value from contacts contract (or any native content provider) set of entries? Ie, I'd like to get the maximum value of times contacted Jan 08 23:20:18 durka42: http://stackoverflow.com/questions/992508/using-a-wakelock-in-a-service-android-1-5, http://stackoverflow.com/questions/13826481/android-wakelock-not-working-when-screen-is-off Jan 08 23:20:44 durka42: Also, this [http://stackoverflow.com/questions/14128126/service-wakelock] is saying that when the device goes to sleep, the service is turned off Jan 08 23:21:22 that first question is from android 1.5, and is pretty much a syntax error Jan 08 23:22:10 durka42: But it's still asking how to keep a service running when the device is locked Jan 08 23:22:23 durka42: This also... http://stackoverflow.com/questions/13359111/wakelock-implementation-in-a-service Jan 08 23:23:43 So, implementing a wakeLock in a service is just... redundant. Jan 08 23:23:54 well, I guess I'm not sure Jan 08 23:24:00 in my app a service is registered as an event listener Jan 08 23:24:04 and I've never had the service shut off Jan 08 23:24:10 but normally it's not trying to do anything Jan 08 23:24:18 me neither, it's never been shut down when the device got locked Jan 08 23:24:22 because it only takes action as an event listener Jan 08 23:24:55 btw, the new way to hold a wakelock is not to actually use a wakelock, but show a KEEP_SCREEN_ON activity Jan 08 23:25:06 alright so if my SensorManager does not send anything to my service, the service is not doing anything, therefore it is not taking any power, eh? Jan 08 23:25:22 I'm not using an activity, I'm using a service Jan 08 23:25:25 that's my understanding Jan 08 23:25:29 (Well, both.) Jan 08 23:32:27 wilornel: locking the screen doesn't necessarily put the device to sleep, as I understand it Jan 08 23:32:45 especially if it's still plugged in (like it probably is while you're developing the app) Jan 08 23:33:21 evanc: Ach! So if I lock the device, it can be put to sleep and the service then gets destroyed? Jan 08 23:38:42 wilornel: yes Jan 08 23:39:12 evanc: And will a WakeLock prevent that destroy? Jan 08 23:39:21 yes Jan 08 23:39:36 yes, but it will eat the battery Jan 08 23:39:39 yes Jan 08 23:39:43 durka42: Aware of that Jan 08 23:39:45 it prevents the device from sleeping Jan 08 23:39:49 gotcha Jan 08 23:39:56 hey guys so I have been using spannable text for the past week and I realised that there has just got to be a better way Jan 08 23:40:02 i mean companies like facebook Jan 08 23:40:08 My goal is not to drain the battery, of course Jan 08 23:40:35 probably dont create spannable text if they want to add some text color or make the text bigger Jan 08 23:40:52 does anyone know a better way to getting styled text in a textview Jan 08 23:40:57 basically my setup is Jan 08 23:41:11 a bunch of blog posts that I retrieve from a sqlite database Jan 08 23:41:22 and I prepend them there by showing the latest post first Jan 08 23:41:27 rallat: ask again in 20m. On my way back to work Jan 08 23:41:38 JakeWharton: ok thanks no worries Jan 08 23:41:55 anybody have any ideas ping me? Jan 08 23:42:03 cause I get hte feeling im doing stuff incorrectly Jan 08 23:44:39 "Note: as of API 19, all repeating alarms are inexact." How inexact are they? Jan 08 23:45:47 Oh, not _so_ inexact Jan 08 23:46:36 wilornel: can you spare a few minutes for a styling question Jan 08 23:52:58 can anyone spare a moment Jan 08 23:55:26 hahahah Jan 08 23:55:34 You want my help on something android related? Jan 08 23:55:43 I'm sorry I can't help much, wa5ted :P Jan 08 23:55:59 hahah okay Jan 09 00:01:08 rallat: any ideas? Jan 09 00:01:20 ? Jan 09 00:01:33 Did I miss something? Jan 09 00:01:52 no i was just wondering if you could help me with a styling problem Jan 09 00:02:00 about styling text in a textview Jan 09 00:02:16 i think i might being doing it wrong by using spannables Jan 09 00:03:35 basically i need to create styled text Jan 09 00:03:44 of various styles within 1 text view Jan 09 00:04:02 except im fnding using spannables to be really inefficient Jan 09 00:04:10 rallat: any ideas? Jan 09 00:07:13 wa5ted: what about this https://stackoverflow.com/questions/2116162/how-to-display-html-in-textview Jan 09 00:07:59 or just go all the way and use a WebView Jan 09 00:13:15 durka42: give me a sec will get back to you on that, but to tell you in short i did that before. Jan 09 00:27:20 Hi! What's a robolectric shadow for? can it override behavior of the original class? Jan 09 00:28:13 Basically, I have an activity... the activity calls a method makeWebRequest on the onCreate method... I want to do something, so that makeWebRequest is a non-op in the test... how can I do that Jan 09 00:42:52 durka42: back, i have seen that before, tbh i started with that Jan 09 00:42:57 but it really comes back to spannables Jan 09 00:43:06 and i feel like i might be doing it wrong Jan 09 00:46:04 damn i cant bet adView to work, I get error in logcat that Google Play Services isnt there Jan 09 00:46:21 followed several stackoverflow posts on the problem but to no avail :( Jan 09 00:46:27 anyone else get this error? Jan 09 00:46:43 "The Google Play services resources were not found. Check your project configuration to ensure that the resources are included." Jan 09 00:52:33 well ? did you ? Jan 09 00:55:13 JakeWharton: are you back? Jan 09 00:55:35 bankai_: do you know anything about styling text in a textview Jan 09 01:00:19 rallat: yes Jan 09 01:00:55 JakeWharton: so I add class support for hugo Jan 09 01:02:00 I was finally able to build hugo-runtime, but hugo-example is failing because is trying to get the runtime from mavenCentral. However, I have mavenLocal on the build.gradle and the path is correct Jan 09 01:02:29 if I comment mavenCentral obviously it grab correctly runtime but not the android dependencies Jan 09 01:02:50 I suppose I have to modify something in the build.gradle but I don't know what is it Jan 09 01:21:15 Has anyone here worked with Koush ion for JSON? I'm putting in a link to get JSON, but now I'm unsure of what to do with it to get the exact json data I want Jan 09 01:32:04 rallat: did you install the plugin into your local repo like the README says? Jan 09 01:32:48 ugh when i assign text to my EditText programmatically via setText(), the keyboard pops up. Is there an easy way of not letting it do that? Jan 09 01:40:12 hi everyone quick question is Jan 09 01:40:24 it possible to set multiple properties of a span in 1 go Jan 09 01:40:28 rather 1 line Jan 09 01:40:32 JakeWharton: yes I did gradle install and the aar is installed Jan 09 01:44:13 uh Jan 09 01:44:17 not sure what to tell you Jan 09 01:44:22 i'll have to try it myself tonight Jan 09 01:48:37 JakeWharton: I did gradle install Jan 09 01:48:45 then cd hugo-example Jan 09 01:48:52 and gradle assembleDebug Jan 09 01:49:26 and I can copy in a gist the gradle error but it's basically that is going to grab the dependency to maven central but should be using maven local Jan 09 01:49:30 thanks anyway Jan 09 01:51:50 JakeWharton are you doing any android dev on mavericks? is it well behaved ? Jan 09 01:52:02 i think i may update from 10.7 Jan 09 01:52:26 don't know. i'm on what i'm on and it works Jan 09 01:52:51 mavericks has been out for many months therefore hundreds of thousands of developers are on it and aren't complaining loud enough to be heard Jan 09 01:52:55 so i'd say it works just fine Jan 09 01:54:00 i guess it comes down to genymotion / vbox mostly Jan 09 02:12:42 soo … i think today i noticed rev 4 of the android support repository; but the support lib didn't get a rev bump. anyone know what changed ? i don't see any news in the support lib rev list Jan 09 02:22:19 lets chat Jan 09 02:23:11 I have an activity with calls a method makeWebRequest()... I want to create that activity in a test with robolectrict, but I want makeWebRequest method to be a no-op. Is that possible? Jan 09 02:23:57 i dont see why not Jan 09 02:24:02 what's a no-op btw Jan 09 02:24:22 nick9998: doesn't do anything... Jan 09 02:24:36 nick9998: I don't want the method to make the request, nor the parser for the answer to execute, etc... etc... Jan 09 02:25:27 can you use intent for this Jan 09 02:27:03 nick9998: what? Jan 09 02:28:10 i dont know what roboelectric is, but you can pass info to your activity using "Intent"s Jan 09 02:28:30 intent.putExtra("TEST_MODE", true); //or somesuch Jan 09 02:29:19 g00s: extract the jars, decompile, and diff Jan 09 02:29:44 riight Jan 09 02:30:08 it's three commands Jan 09 02:30:14 well, 5 since you have to do the first two twice Jan 09 02:30:14 welcome to costco, i love u Jan 09 02:33:49 thats weird, as 0.4.1 project import doesn't give you a choice about using gradlew; and when you import your project it throws all that shit in there Jan 09 02:34:43 good. it should be required Jan 09 02:34:56 hermetic builds is something android has never emphasized Jan 09 02:35:46 xbox sign out Jan 09 02:36:34 what ? Jan 09 02:36:41 i never use a maven wrapper Jan 09 02:38:14 how do i request an audio device from the audio HAL ? Jan 09 02:38:20 any help would be appreciated Jan 09 02:42:20 g00s: because they weren't smart enough to make one Jan 09 02:42:41 try updating to 3.1.1 and building an older project Jan 09 02:43:58 well i can i see it useful for public projects; looks nice for CI; makes sense if a new project includes it, but i think an imported gradle project should be left alone Jan 09 02:44:16 something like that Jan 09 02:45:24 what happens when you try to build that project in two years and gradle is on version 6 and the model API completely changed? Jan 09 02:45:36 you'll be in here complaining that Google should do something about it Jan 09 02:45:54 hey Elim, how do i talk to the Audio HAL? Jan 09 02:45:58 thx in advance Jan 09 02:47:30 does the gradle wrapper update itself if the scripting changes ? Jan 09 02:47:58 it only updates when you explicitly tell it to Jan 09 02:50:47 ugh; wtf. i deleted them and it out them back Jan 09 02:50:52 *put Jan 09 02:51:00 gaah i can't win this one i guess Jan 09 02:57:36 WHen I override something like onResume()… should I do super.onResume and then write my code, or write my code and then do super.OnResume? Jan 09 02:57:37 any audioflinger guys care to chat? Jan 09 02:59:29 eghdk: "Why not have both?" **** ENDING LOGGING AT Thu Jan 09 02:59:58 2014