**** BEGIN LOGGING AT Sat Oct 22 02:59:58 2016 Oct 22 04:51:04 j/ #debian-offtopic Oct 22 04:51:47 whoops Oct 22 06:40:01 Hi, according to Android documentation, there are two types of intents, implicit and explicit intents, does that mean broadcast intents are considered implicit intents? Oct 22 08:35:26 <_genuser_> hello people Oct 22 08:35:35 <_genuser_> so api 19 is a big mess to work with . Oct 22 08:36:24 It's fine, git gud. Oct 22 10:45:28 Hi, I've just got my GoogleMaps to display using inflater.inflate(R.layout.activity_maps, container, false) - but once this is done, how does my onMapReady() function get executed (it doesn't currently)? Oct 22 10:46:00 oscarandjo: are you using a Map Fragment or a Map View? Oct 22 10:46:52 I'm using a view Oct 22 10:47:13 oscarandjo: do you need to do a lot more than just get onMapReady Oct 22 10:47:43 I'm using FragmentTransaction to display the map in a frame in my main class Oct 22 10:47:50 I'm unsure if that is actually using a view of a fragment? Oct 22 10:48:06 oscarandjo: what did you put in your layout? pastebin it Oct 22 10:48:08 I want to be able to manipulate the map object afterwards, yes Oct 22 10:49:33 yea, well i want to tell you put it depends on the how you using google maps Oct 22 10:52:37 Here Napalm, http://pastebin.com/skK9SrHn Oct 22 10:53:07 activity maps right? Oct 22 10:53:15 looks like your using a fragment Oct 22 10:53:16 SupportMapFragment Oct 22 10:54:00 Yeah sorry I got confused by my MyFragment class having a public View method. Oct 22 10:54:03 It is a fragment Oct 22 10:54:11 you should rename your layout from activity_maps to fragment_maps Oct 22 10:54:21 Okay, will do Oct 22 10:54:38 It was just the default name when you make a Google Map through file>new :P Oct 22 10:54:41 ok Oct 22 10:54:56 so in your onViewCreated of your MyFragment Oct 22 10:55:45 SupportMapFragment mapFragment = (SupportMapFragment)getFragmentManager().findFragmentById(R.id.map); Oct 22 10:56:37 mapFragment.getMapAsync(this); Oct 22 10:56:57 then add: implements OnMapReadyCallback Oct 22 10:57:02 to your MyFragment class Oct 22 10:57:18 and your onMapReady will be called when its the right time Oct 22 10:57:57 Thanks for the help Napalm! Oct 22 10:58:15 So if I make my GoogleMap mMap object public in this class, I can use map methods on it from any class right? Oct 22 10:59:23 Oh @Napalm it crashed, "java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vanleusen.brighthelp/com.vanleusen.brighthelp.HamburgerDrawer}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.SupportMapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)' on a null object reference" Oct 22 10:59:41 well you didnt do what i said Oct 22 11:00:46 Oh sorry I created an OnMapReady not an OnMapReadyCallback Oct 22 11:02:25 try Oct 22 11:02:31 (SupportMapFragment)getChildFragmentManager().findFragmentById(R.id.map); Oct 22 11:02:37 instad of the getFragmentManager Oct 22 11:02:40 instead Oct 22 11:02:56 they might have changed the way they are inflated in the latest support library.. i forget Oct 22 11:03:23 Okay Oct 22 11:04:11 Nope, same error unfortunately :( Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.SupportMapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)' on a null object reference Oct 22 11:07:15 have you used the google maps api before? Oct 22 11:07:27 did you generate yourself a api key and set it up in your manifest? Oct 22 11:07:41 Yeah, the map has been displaying fine before Oct 22 11:07:47 ok Oct 22 11:07:53 I just couldn't get the OnMapReady to call Oct 22 11:08:05 it might be easier to use a mapview Oct 22 11:08:32 https://developers.google.com/android/reference/com/google/android/gms/maps/MapView Oct 22 11:08:44 you add it to your layout instead of your tag Oct 22 11:09:03 then you have to call all those callbacks when your fragment goes through those steps Oct 22 11:10:08 I don't understand what you mean by call all those callbacks Oct 22 11:10:13 Do you mean manually call all the methods? Oct 22 11:10:18 yes Oct 22 11:10:41 so when your fragment gets its onResume you call MapView.onResume Oct 22 11:11:12 oscarandjo: let me get this right.. you are putting a map in your own fragment right? for a reason.. ? Oct 22 11:11:29 oscarandjo: what i mean is, any reason why you cant just put a mapfragment directly in your activity Oct 22 11:12:13 The only reason I was using a fragment over any other type was because it was the default generated by New>Google Maps Oct 22 11:12:24 erm Oct 22 11:12:32 it generated your MyFragment? Oct 22 11:12:49 No, but I gave up on that class because it didn't work properly. Oct 22 11:13:02 gave up one what class? Oct 22 11:13:58 This one, it was generated with the creation however when I used it, it drew the map ontop of my hamburger menu so I stopped using it Oct 22 11:13:58 http://pastebin.com/UQW09qHQ Oct 22 11:14:17 And that's when I tried to use a FrameLayout to contain it instead Oct 22 11:15:00 ok is that what your doing now? Oct 22 11:15:23 yeah Oct 22 11:15:56 your layout didnt need to be renamed then.. because this is an activity Oct 22 11:16:40 anyway, there is nothing wrong with that code Oct 22 11:17:04 The problem was that when I ran the code for that activity it drew ontop of my hamburger menu, obscuring the buttons Oct 22 11:17:07 how do I stop that? Oct 22 11:17:58 ok you are confusing the hell out of me Oct 22 11:18:06 so you dont want an activity? Oct 22 11:18:21 sorry I've been confusing the hell out of myself for hours too Oct 22 11:18:54 I'm not sure what I need to implement my intended use, which is why I've just been trying a mess of everything Oct 22 11:19:03 Basically when I open my map I want my map to always be there Oct 22 11:19:07 with a hamburger menu ontop of it Oct 22 11:19:20 Then different buttons on the hamburger menu run map functions Oct 22 11:20:51 right Oct 22 11:22:26 I'm just insure whether I need to use Activities, or fragments, or frames, or views or whatever other types there are Oct 22 11:23:17 it all depends on what you want to do Oct 22 11:25:06 pastebin your activity_hamburger_drawer layout Oct 22 11:27:03 Here, http://pastebin.com/0uNY6QLQ Oct 22 11:30:09 oscarandjo: and layout app_bar_hamburger_drawer Oct 22 11:30:22 this is really overly complex Oct 22 11:30:24 lol Oct 22 11:30:36 It's mostly auto generated stuff aha Oct 22 11:31:25 Napalm: http://pastebin.com/dcX9kQqE Oct 22 11:31:35 have you ever done any Java programming before? Oct 22 11:31:54 Yeah, lots Oct 22 11:32:08 I just find the way Android works confusing Oct 22 11:33:09 ok all your code is fine Oct 22 11:33:18 you just need to modify MyFragment Oct 22 11:34:11 oscarandjo: will send you some code in a moment Oct 22 11:34:30 Wow you're being really helpful Napalm Oct 22 11:34:44 I really appreciate it, I spent so long trying to work this out haha Oct 22 11:42:04 do you know why you are creating MyFragment? why not just create a SupportMapFragment in your activity? Oct 22 11:42:08 oscarandjo Oct 22 11:43:01 I didn't realise I could do that Oct 22 11:43:38 Does that allow me to FragmentTransaction.add my MapsActivity class? Oct 22 11:43:45 Because that didn't work before Oct 22 11:43:48 yes its just a fragment Oct 22 11:44:55 Like this? transaction.add(R.id.map, new MapsActivity()); Oct 22 11:45:25 Or would I still use frame_container and then set that like I did in MyFragment Oct 22 11:46:54 oscarandjo: http://pastebin.com/h7tmku09 Oct 22 11:47:53 I'll give your class a try, thanks napalm Oct 22 11:53:44 Napalm: Stupid question but how do I implement that class to run when I start my app? Oct 22 12:03:33 oscarandjo: not sure what you mean.. you already have it in your Activity's onCreate Oct 22 12:06:17 Napalm: Sorry just me being stupid, I ran it with an intent Oct 22 12:06:43 edit your manifest Oct 22 12:06:58 any activity with the action main and category of launcher will appear in your app list Oct 22 12:07:15 The problem is that it opens the map in a new window but I want to set the area that is currently "HelloWorld" (in content_hamburger_drawer.xml) to be this map Oct 22 12:07:15 so move that intent-filter over to your activity you want to launch Oct 22 12:07:24 I got the inte to work Oct 22 12:07:27 intent* Oct 22 12:09:00 oscarandjo: erm, edit your layout? Oct 22 12:10:21 What I mean is, I thought this MainActivity's onCreate would create a fragment inside the "frame_container" in "content_hamburger_menu.xml" but instead it creates a new window ontop of the app Oct 22 12:11:29 then your doing it wrong Oct 22 12:11:45 the way i suggested and shows just exactly what you want Oct 22 12:12:07 perhaps you can explain your intent thingy.. perhaps thats your issue Oct 22 12:12:18 sounds to me like your simply using and intent to launch google maps Oct 22 12:13:12 Well I just have " Intent intent = new Intent(this, MainActivity.class); startActivity(intent);" in my HamburgerDrawer's onCreate() Oct 22 12:13:37 whyyyyy Oct 22 12:13:50 otherwise it never runs MainActivity.class? Oct 22 12:13:50 why are you launching main activity from your hanmburgerdrawer activity? Oct 22 12:13:55 why do you have a mainactivity Oct 22 12:14:06 You sent it to me to create I thought Oct 22 12:14:18 the mainactivity i sent you was the same as your hambergerdrawer.. its just your activity Oct 22 12:14:29 all you needed to do was replace your fragment transaction with mine Oct 22 12:14:37 and implement the callback in your hamburger activity Oct 22 12:14:44 I feel stupid now, I'll set it up properly. Oct 22 12:14:52 That makes far more sense Oct 22 12:19:12 Right now I've got it sorted out Oct 22 12:19:25 I've got all that code correctly in MyFragment Oct 22 12:19:43 so your using MyFragment now? Oct 22 12:19:46 And then in my HamburgerDrawer's onCreate() I add FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.add(R.id.frame_container, new MyFragment()); transaction.commit(); Oct 22 12:20:00 That's correct Oct 22 12:20:04 erm... Oct 22 12:20:18 what i was showing you is you dont need MyFragment Oct 22 12:20:33 what your doing now is exactly what you were doing before Oct 22 12:21:21 Oh I see, because MyFragment is unnecessary as it can be simplified Oct 22 12:25:52 But even after removing the MyFragment class the original issue of it creating the map in a different window is still there Oct 22 12:26:27 because your still launching MainActivity with an intent Oct 22 12:26:36 look at MainActivity i sent you Oct 22 12:26:47 copy the transcation lines over the top of your transaction lines Oct 22 12:27:07 now add the onMapReady function to your drawer activity Oct 22 12:27:18 and the implements bit aswell Oct 22 12:27:19 all done Oct 22 12:40:42 hi, I am a new android developer, I want to use a real device instead of emulator. I decided to buy a 16G nexus 5. Is nexus 5 a good choice? won't it make problem for me? is 16G enough for me? thanks Oct 22 12:42:38 it's ok altumelix Oct 22 12:43:04 you could buy a genymotion license for testing, probably cheaper and cover more grounds than few devices Oct 22 12:43:33 but it's not the same arch nor the same hardware, but usually you don't test that Oct 22 12:43:45 * Napalm agrees with adq Oct 22 12:44:11 i don't work for them, but i renew my license every year since few years, because it has proven to be to useful Oct 22 12:44:45 altumelix: dev with GenyMotion and later get a better device like the Nexus 5X or Pixel so you can test on the most recent Android releases Oct 22 12:45:33 :| Oct 22 12:45:54 eh Oct 22 12:46:17 hi i need to check app foreground, ok i use a code and it works but i need know when user "close" app and open another app. is there some listener, broadcastreceiver or i have implement a timer ? Oct 22 12:46:26 lol Oct 22 13:59:52 Why SQLiteOpenHelper.onCreate() in being called even if the database file exists? Oct 22 14:00:25 In fact I had to comment-out the code from the onCreate() method and the database works perfectly. Oct 22 14:00:32 So why is it being called? Oct 22 14:01:05 I created the database file on my desktop computer and my application downloads it from the server if the file is missing Oct 22 14:01:25 your not placing in the right location perhaps? Oct 22 14:01:47 or you have a permission issue Oct 22 14:01:57 well, it would not work Oct 22 14:02:04 I can query the database and all is fine Oct 22 14:02:38 I just have to remove the code from onCreate(), otherwise I get an exception because the table already exists. Oct 22 14:03:25 the version in your database is not set Oct 22 14:03:44 Melatonina: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/database/sqlite/SQLiteOpenHelper.java#L248 Oct 22 14:03:45 I didn't set it. I'll google how to set it Oct 22 14:04:28 its set for you after onCreate with the parameters passed in the constructor Oct 22 14:04:56 but I'm creating it on my desktop using C# Oct 22 14:05:04 so what? Oct 22 14:05:07 I guess I have to execute PRAGMA user_version = 1 Oct 22 14:05:10 no Oct 22 14:05:19 no? Oct 22 14:05:24 i mean yes, if you dont want it to call onCreate at all Oct 22 14:05:25 well, then why is it not set? Oct 22 14:05:28 > Royal Caribbean International will no longer allow Samsung Galaxy Note 7 cell phones onboard our ships. Oct 22 14:05:39 hah, old. news rccl Oct 22 14:05:57 but if you only want onCreate to be called once, then you just make sure your constructor version is set to non-zero Oct 22 14:08:35 Melatonina: just remember the version used in the constructor should be the same as the one used in your c# created database if you dont want onCreate to be called at all.. but it can never be zero in either case Oct 22 14:11:23 Napalm: yes, I guess I understood it. Now I'm testing it. I'll let you know Oct 22 14:24:58 Napalm: yes, it worked. I made the program that creates the database set the version number to 1 and now onCreate() is not being called anymore. Oct 22 14:25:02 Napalm: Thanks Oct 22 14:26:04 throw note7 at troll Oct 22 14:26:17 ? Oct 22 14:27:29 Melatonina: np Oct 22 14:42:46 Hello. Oct 22 14:42:54 How in the world do you get an instance of https://developer.android.com/reference/android/print/PrinterId.html Oct 22 14:42:57 good afternoon Oct 22 14:44:42 huh Oct 22 14:44:48 The only way I see is to create it from a parcel. But you need to write it to a parcel first Oct 22 14:45:11 Tanjoodo: are you implementing your own printer? Oct 22 14:45:14 I'm just trying to make a mock print service Oct 22 14:45:18 Napalm, pretty much Oct 22 14:45:59 i see at leats one way - from printerInfo.getId() Oct 22 14:46:03 now to create PrinterInfo.. Oct 22 14:46:09 you need a PrinterId Oct 22 14:46:17 the builder won't take a null Oct 22 14:46:32 i dont think you make your own Oct 22 14:46:38 where do you register your printer service? Oct 22 14:46:54 Napalm, it's done through the AndroidManifest.xml Oct 22 14:47:27 Tanjoodo Oct 22 14:47:31 oopsy. one sec Oct 22 14:47:38 it's ok Oct 22 14:48:12 Tanjoodo: you need to extend this right? https://developer.android.com/reference/android/printservice/PrintService.html Oct 22 14:48:17 and it has a genreatePrinterId Oct 22 14:48:28 oh yes Oct 22 14:48:43 let me see. Oct 22 14:51:40 thanks, Napalm Oct 22 14:53:35 yep that works. Thanks a ton mate Oct 22 14:53:57 np Oct 22 14:54:02 geezer Oct 22 14:54:04 :) Oct 22 15:06:58 Is there anyone that knows where cordova is caching its output files? Oct 22 16:03:17 hello I am having trouble using the volley library, I imported it as a module and made sure it is built in my gradle files but it still does not recognize RequestQueue Oct 22 16:13:33 halp Oct 22 16:13:34 D: Oct 22 16:13:43 I need to get a token that is used in http requests? Oct 22 16:13:57 I got told that it's visible in the dev version of the app I'm using Oct 22 16:14:03 I have the dev version Oct 22 16:14:09 but logcat shows no such token Oct 22 16:16:31 dont you get the token from the API website? Oct 22 16:16:39 Im a noob so idk lol Oct 22 16:19:25 android-dev620, no the token is in the app Oct 22 16:19:28 it's logged Oct 22 16:19:32 I can't get it from the logs Oct 22 16:21:00 does savedInstanceState return 0 or 1 if it has been used? Just finding alternative to using if statement in my code. Oct 22 16:43:09 What is the correct way to update gradle in Android Studio? I tried running gradlew in the terminal and it downloaded the new gradle 3.1 but then gave me this error: org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.ap Oct 22 16:43:09 i.internal.file.collections.DefaultConfigurableFileCollection Oct 22 16:43:29 Pretty sure this is the same way I updated it in the past... Oct 22 16:50:09 Is it not possible to delete with Google QUery language? You have to query to get them loop over them and delete? Oct 22 16:58:23 Can somebody share their gradle config? What do you have the classpath listed as? Oct 22 17:01:06 SilentByte, classpath 'com.android.tools.build:gradle:2.2.2' Oct 22 17:02:45 SilentByte, http://paste.lisp.org/display/329252 Oct 22 17:06:22 Why doesn't the first version of the query work, while the second does? https://gist.github.com/anonymous/3074548d85a5497ebdb28ae8cbc3e935 Oct 22 17:07:16 raoul11: hi! Oct 22 17:07:38 ohi Melatonina Oct 22 17:07:58 SilentByte, gradle != android gradle plugin Oct 22 17:08:04 i'm also using distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip Oct 22 17:11:37 adq, I tried setting mine to 2.2.2 and it said it couldn't find it. It searched the following locations: C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.2.2 and https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2, and I confirmed that neither of those exist Oct 22 17:11:43 raoul11: can I show you a query? Oct 22 17:11:51 sure Oct 22 17:12:20 SilentByte, have you enable offline mode by any chance? because it should download it if not available Oct 22 17:12:23 the first version of the query doesn't work, the second does. https://gist.github.com/anonymous/3074548d85a5497ebdb28ae8cbc3e935 Oct 22 17:12:36 hello all Oct 22 17:12:42 to my eyes, they should be equivalent Oct 22 17:12:46 winegoddess: hi!!! ! !! Oct 22 17:12:49 :) Oct 22 17:13:54 SilentByte, https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.2/ it's definitely available on jcenter anyway (and since few days if nto weeks) Oct 22 17:14:15 winegoddess: what if your child prefers iPhones? Oct 22 17:14:36 :) i have an iPad and will play with that next :) Oct 22 17:14:49 hes ten months, so i really need to get moving! Oct 22 17:21:09 adq, no offline mode that I'm aware of. Do I need to configure Android Studio to look in the jcenter repository? Oct 22 17:21:28 Or do I just manually download all of the jars/poms from there and put into the appropriate folders? Oct 22 17:22:00 i never configured as to look in jcenter, i think it's default (as you can see in the conf i pasted) Oct 22 17:22:05 im getting an error messge trying to use an image i added to the drawable folder. java.lang.NumberFormatException: Color value '@drawable/pittsburgh-1075751_1280' must start with # Oct 22 17:22:14 and i never manually downloaded jars/poms to put there where the should too, so idk Oct 22 17:22:23 something must be wrong on your side, but i would blame AS Oct 22 17:22:34 countless issues Oct 22 17:22:54 SilentByte for some reason, google did not put gradle-plugin 2.2.+ into mavenCentral() Oct 22 17:23:09 for that you need jcenter() Oct 22 17:23:28 yeah but i gave him an almost default conf with jcenter & 2.2.2 Oct 22 17:23:35 not sure what happens after Oct 22 17:23:41 winegoddess: why was the drawable interpreted as a color drawable? Oct 22 17:23:45 ok, i renamed the file and it works now Oct 22 17:24:05 Melatonina doesnt work how? Oct 22 17:24:07 thats a terrible message if teh issue is with the naming f teh file. Oct 22 17:24:16 how do i report an issue? Oct 22 17:24:27 b.android.com Oct 22 17:24:28 SilentByte also '$ gradle buildEnvironment' can help you diagnose things Oct 22 17:24:40 but the issue is probably on your side winegoddess Oct 22 17:24:48 because a drawable resource id is an int Oct 22 17:25:04 raoul11: no errors, it just returns no words (no rows) Oct 22 17:25:05 and you passed something expecting a color string starting with # Oct 22 17:25:09 adq - well, it a clean project, and i got an error saying it needed to start with a #. but as soon as i removed teh - and _ it works. Oct 22 17:25:21 ah indeed, - is forbidden Oct 22 17:25:31 i only have an image view, and was putting the property to the image file Oct 22 17:25:39 underscore should be ok Oct 22 17:25:48 i did not know the - was forbidden, the message was very misleading Oct 22 17:26:16 i'm nto sure - is forbidden anymore tbh Oct 22 17:26:18 soz Melatonina, i suck at sqls Oct 22 17:26:35 caps are forbidden for drawable iirc too Oct 22 17:26:37 it's crazy Oct 22 17:26:46 raoul11: no problem. Thanks for looking at it Oct 22 17:28:08 https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=java.lang.NumberFormatException%3A%20Color%20value&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=215987 Oct 22 17:28:45 thanks adq ill watch for caps too Oct 22 17:28:52 I get the following when I add - to a resource: Error:Error: '-' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore Oct 22 17:29:06 i can understand it ow, since - is in xml, but i didnt think that as teh issue based on teh message Oct 22 17:29:16 Should I replace maven with jcenter? I tried it and re-synced and it's still looking in maven Oct 22 17:29:27 i have both Oct 22 17:32:03 2 weeks til vacay, can't wait Oct 22 17:32:17 hk, th, kr, jp Oct 22 17:33:32 hk? Oct 22 17:33:32 quite the tour! Oct 22 17:33:42 im tryign constraint layout, al i did was ass an image, and i say match_parent but it has spacin left and right. i just updated to 2.2.2 and a tutorial using 2.2 is showing no padding. What approach shodl i use to get rid of the spacing? Oct 22 17:33:48 oops..add. Oct 22 17:33:52 hk == hong kong Oct 22 17:34:11 pfn that sounds awesome. Oct 22 17:34:32 yes, it will be Oct 22 17:35:03 i would stay away from constraintlayout if i were you winegoddess, except if you just want to test it, provide feedback and have many issue Oct 22 17:35:04 Zika in th is a little worrisome Oct 22 17:35:23 oh damn...its that bad? Oct 22 17:35:31 not touching it with a 10 foot pole Oct 22 17:35:47 they broke thing to provide something half-assed Oct 22 17:35:49 not the first time Oct 22 17:36:07 so i will have to wait 6 monthes to use it, and i'm not even sure it solves something Oct 22 17:36:46 still, it can be fun to play with it, that's an entire another story Oct 22 17:37:33 yuck. okay thanks for the advice. i might finish my little test. i was able to get rid of the spacing by using left and right constraints and setting to 0. i guess there will be a lot of changes with each release of Android Studio... Oct 22 17:38:00 i don't want to discourage you from using it Oct 22 17:38:07 you just have been warned Oct 22 17:38:20 last status from constraint: http://tools.android.com/recent/constraintlayoutbeta1isnowavailable Oct 22 17:39:03 maybe they talk more about it in a random tweet, or somewhere burried in the comment of a post of an unknow community in G+, or .. etc Oct 22 17:40:50 adq you may have just saved me a lot of time, i appreciate you sharing that Oct 22 17:41:04 i did not know it was a beta release. Oct 22 17:41:17 it was alpha until v 8 iirc, then they shipped beta 1 Oct 22 17:43:10 Fixed my issue. Had to switch to jcenter in both build.gradle and the Project Structure dialog. Thanks for the help! Oct 22 17:47:35 Could somebody check there two queries? They are supposed to be equivalent by aren't. https://gist.github.com/anonymous/3074548d85a5497ebdb28ae8cbc3e935 Oct 22 18:15:28 I guess it's a "no" Oct 22 18:17:55 no idea Oct 22 18:18:46 One's 'length', the other is length Oct 22 18:19:25 SilentByte sounds wrong, maybe you forgot to sync Oct 22 18:21:29 g00s, there is a separate setting for "Android Plugin Repository" under the Project Structure dialog. That one was still set to maven. Once I set it to jcenter it downloaded the new gradle. Oct 22 18:22:32 what you have in your gradle files is the gold standard. the ide should sync Oct 22 18:22:48 i always though that project structure dialog was a pice of crsp Oct 22 18:23:00 even to this day, it screw up the dependency list for my project Oct 22 18:23:07 they should have just left it as 'edit the text file' Oct 22 18:48:53 has anyone tried any kind of code obfuscator before submitting everything to the play store? Oct 22 18:51:20 elderuyld its almost pointless Oct 22 18:51:45 g00s: why so? Oct 22 18:55:37 elderuyld they can be de-obfuscated with sophisticated machine learning techniques Oct 22 18:56:16 there was one on hacker news last week, can't find it Oct 22 18:56:27 you just submit the apk to a website :P Oct 22 18:56:59 elderuyld here it is http://www.apk-deguard.com/ Oct 22 18:57:04 uhm I see. In the end I just want to protect against the average script kiddie Oct 22 18:57:13 will check it out, thanks g00s Oct 22 18:59:34 elderuyld dexguard might be a little better. not sure how that will work out with jack/jill though Oct 22 19:01:59 i'll check that out as well, thank you Oct 22 19:06:17 g00s, they say it's compatible Oct 22 19:06:58 SimonVT: if you are saying that passing the length=13 value as parameter will wrap it in quotes or is equivalent to wrapping it in quotes, I don't understand 1) why passing the limit argument as parameter works (it should not, since it should be an integer) 2) how do you pass integer parameters in general. I'm googling for examples and all seems to build the query in the same way Oct 22 19:06:59 (since 7.2) Oct 22 19:07:53 SimonVT: I assume you are saying that in one case it's LENGTH(word)='13' and in the other is LENGTH(word)=13 (which is correct) Oct 22 19:14:36 Yes Oct 22 19:19:05 If you need obfuscation, just enable ProGuard under Android Studio. Oct 22 19:19:11 It's a standard part of the install Oct 22 19:19:29 Last I looked it was the default for production (non-debug/beta) builds Oct 22 19:20:25 didn't knew there was an obfuscation on android studio. thanks for the input Dagmar Oct 22 19:21:24 Just set minifyEnabled to true under buildTypes in the build.gradle file and you're basically done Oct 22 19:22:06 I usually don't bother enabling it for beta builds, since the stack traces become a pain in the butt Oct 22 19:22:10 What would be a simple way to load a json object from /raw and convert it to an object?? Oct 22 19:23:02 should I just use gson or is there something even simpler? Oct 22 19:23:05 Turning it into an actual bit of java first Oct 22 19:23:35 yeah Oct 22 19:25:28 This (http://pojo.sodhanalibrary.com/) seems to do a reasonable job at first examination Oct 22 19:27:17 If you're not doing any other parsing of JSON in your application, then it doesn't make sense to make the application do the work of converting the data structure every time it's launched Oct 22 19:27:38 Thanks, I'll check it Oct 22 19:29:46 elderuyld i haven't futzed with it in a while, the only downside to obfuscating is you need to have the mapping.text file so when you get exception reports, you know what happened :P Oct 22 19:29:48 SimonVT: so why "LIMIT ?" works? Shouldn't "LIMIT ?" with a parameter 15 be converted to "LIMIT '15'"? How can that work without causing an error? How would you pass non-textual arguments? I find only examples that do as I did Oct 22 19:30:59 SimonVT: what you said is the first thing I thought of. And I discarded it because if that were true, query parameters would be useless Oct 22 19:31:10 g00s: Yeah thank god proguard generates those heh Oct 22 19:32:28 Seeing a report with com.rofl.u.r.f.kd is never a happy thing Oct 22 19:32:48 will keep that in mind, thanks! Oct 22 19:36:10 One is doing math in the query, the other is just limiting results.. Not surprised they work differently Oct 22 19:37:05 So they are different Oct 22 19:37:12 I knew that already Oct 22 19:37:13 Thanks Oct 22 19:43:44 I have a book about Android Database without mention of query parameters. Oct 22 19:44:13 That is even less useful than "One is doing math in the query, the other is just limiting results.. Not surprised they work differently" Oct 22 19:53:19 Query parameters only matter if you care about not having your database taken over by some kid in Romania Oct 22 19:56:01 My absolute favorite tho' is finding a mixture of stored procedures, paramterized queries, and raw SQL statements being generated and splattered against the database Oct 22 19:56:20 Dagmar: I know that I can do without in this case but I used SQLite only rarely and I want to use them to learn how to use them. Apparently there is some details that need to be taken care of. Oct 22 19:56:28 You know at least three different coders were involved and none of them knew their ass from /dev/null Oct 22 19:58:30 Melatona: Well, let's see... If you generate your query like WHERE FOO = $somevar and somevar is 15, all is fine and well. You can even do WHERE FOO = '$somevar' and as long as somevar is sane, everything's cool. Oct 22 19:58:50 The moment somevar contains "'; DROP TABLES;" tho... Oct 22 19:59:28 Dagmar: I know about SQL injection Oct 22 20:00:23 Dagmar: I just want to understand WHY those queries are not the same. Why I'm using the parameters in the wrong way Oct 22 20:01:45 Without seeing more than the last screenfull, my guess is the paramter is managing to be treated as a string Oct 22 20:02:43 Yeah, I know that's a probable cause. I just don't know why. This is the code (version 1 doesn't work) https://gist.github.com/anonymous/3074548d85a5497ebdb28ae8cbc3e935 Oct 22 20:03:24 I mean, if that's the cause, I don't know what's causing the parameter to be quoted. One parameter is quoted and the other isn't. Oct 22 20:03:33 I have limited experience with SQL in general. Oct 22 20:03:50 Obviously I have no problems typing that query at the console Oct 22 20:03:58 new String[] Oct 22 20:06:12 SQL is managing to work out what you really mean when you type it is my guess Oct 22 20:06:29 You handing it a string instead of an int gives it a strong hint that the paramter should actually be a string Oct 22 20:06:32 i am trying to open a project on another computer. i get a message that it cant find teh olde rversion of Build Tools. I made my way to the build.gradle, and also see a message i shoudl use 25.0.0 or greater. 25.0.0 is on this install. i change dthe value, but it is still trying to build using 24.0.1. any ideas how i can get past this? Oct 22 20:06:38 in messages, it is offering to install build tools 24.0.1 and sync- but when i ttied that it failed saying that it was no longer available Oct 22 20:07:14 winegoddess: Did you resynch the gradle files? Oct 22 20:07:28 winegoddess: If you're using Android Studio it'll carp at you about this Oct 22 20:08:06 Dagmar: I didn't invent the String[] thing. It's in the method definition: public Cursor rawQuery(String sql, String[] selectionArgs) Oct 22 20:08:43 it is anroid studio, 2.2.2 - i have hit the synchronize button. but it still is complaining about 24.0.1 even though i made the change. teh project isnt looking right, it is not organizinged correctly in teh Android view Oct 22 20:08:48 Dagmar: apparently the placeholder ? and selection argument mechanism is not designed for generic use Oct 22 20:09:21 Dagmar: it's main use it for preventing SQL injection and unfortunately it's implemented to handle only that problem Oct 22 20:09:36 ah, i found the synch with gradle files under tools, tryig that now Oct 22 20:09:46 Dagmar: so all parameters are passed as string expressions. Oct 22 20:09:59 Dagmar: there is nothing wrong in the query that doesn't work Oct 22 20:10:13 Dagmar: there is nothing wrong in the usage of the mechanism Oct 22 20:10:37 Dagmar: it's just that the mechanism must no be used at all but for string expressions Oct 22 20:11:06 This concept is apparently too sophisticated to be expressed in words by SimonVT Oct 22 20:11:18 wut Oct 22 20:11:49 Dagmar: when I went to the source code to copy and paste the method signature, I read the comment Oct 22 20:12:14 Dagmar: "The values will be bound as Strings." says Oct 22 20:12:29 winegoddess: Usually it's a yellow strip that'll appear atop the editor window the moment you mess with build.gradle for the module Oct 22 20:13:02 ive seen that before when making changes o a project. on this import of an existing project it wasnt offered as an option. Oct 22 20:13:08 Dagmar: so there is no way to pass a value that is not a SQL string as query parameter. You just format and concatenate it to the main body of the query Oct 22 20:13:22 Dagmar: as I did in the second version of the code Oct 22 20:13:36 winegoddess: I can see that happening. I'd just trick it by adding and deleting a comment or something Oct 22 20:13:42 g00s: what "wut"? Oct 22 20:15:19 Melatonina: I am not convinced that what they're doing is wholly correct. I'm used to seeing people go the whole route and prepare the query, at which point it becomes pretty obvious that the type of the param matters Oct 22 20:15:41 Dagmar: what I don't understand is why the SQL interpreter can eat "LIMIT '15'" ('15' is a string) and interpret it as 'LIMIT 15' Oct 22 20:15:47 "LIMIT 15" Oct 22 20:15:48 Sure, all SQL queries can be represented as string, however, things which are ints typically don't need escaping Oct 22 20:16:06 yeah, you just have to not pass them as arguments Oct 22 20:16:17 query arguments are for strings period Oct 22 20:16:27 Query arguments are for all data types Oct 22 20:16:37 Using paramterized queries is meant to AVOID having the sql interpreter misinterpret something Oct 22 20:17:02 SimonVT: the show how to write that query using arguments Oct 22 20:17:02 sqlite doesn't really have data types Oct 22 20:17:19 You're doing math in the query Oct 22 20:17:27 1 = '1' and 1 = 1 are different Oct 22 20:18:04 When querying data it doesn't matter Oct 22 20:18:25 LIMIT '1' should be different than LIMIT 1 Oct 22 20:18:27 https://gist.github.com/anonymous/cd788d834f46d227b8e5904953efe274 Oct 22 20:18:36 That's the definition of rawQuery Oct 22 20:18:38 Blame sqlite Oct 22 20:18:44 It's not when you type it in and the interpreter code reads it all at once Oct 22 20:18:49 In fact I blame it Oct 22 20:19:31 SQLite still looks at that and decides since LIMIT takes a numeric argument that the parameter has to be numerica and gets converted to an int blob Oct 22 20:20:16 the it could do in the comparison too. Anyway I don't care. I understood how to make it work. I hope I won't have similar problems in future Oct 22 20:20:34 Go the whole route and use prepared statements Oct 22 20:20:39 What's the correct way to handle setting uri permission for a shareintent? should I just make sure the file is saved to external storage? Oct 22 20:20:50 Next time I'll try prepared statements Oct 22 20:21:01 They're ridiculously easy, actually Oct 22 20:21:28 The main extra step is the preparestatement invocation that makes it compile the query, sort of reserving the paramter slots as things to be filled in later Oct 22 20:21:46 That way your parameters NEVER get confused with part of the query at execution time Oct 22 20:22:04 You then supply the parameters, explicitly specifying their type Oct 22 20:22:20 The oracle page on it asplains everything pretty well Oct 22 20:22:23 (for a change) Oct 22 20:23:23 It's possible that I'll do moar SQLite in the next days. I'll try them. Thanks. Oct 22 20:23:55 I've had to look into it because I've been working on an app where I just know the users are going to enter jacktarded unicode glyphs Oct 22 20:24:08 Melatonina: sometimes this is referred to as bound parameters elsewhere. Oct 22 20:24:40 Turns out it was a little easier than expressing to java "I WANT THIS IN @#$#@# ASCII @#$@# YOU" Oct 22 20:25:13 Things were so much easier before we started allowing non-romanic language people to use computers. Oct 22 20:25:15 heh Oct 22 20:25:56 Dagmar: next time I have to complain about unicode I'll be remembering that little comment :D Oct 22 20:26:06 Well, it was Oct 22 20:26:31 It didn't surprise me a bit to find that you could completely screw up every apple phone around you with a few bits of crap unicode in an SSID Oct 22 20:28:27 I'm trying to use a fileprovider to pass a content:\\ Uri to a shareintent for a share button on my app's menu. How do I set the Uri permissions when I don't know the name of the calling package? Oct 22 20:29:05 i was previously using the file:\\ uri but that seems to have been deprecated Oct 22 20:29:27 i am modifying the colorPrimary, colorPrimaryDark and accent to be pink, a darker pink, and an accent of purple. the default font on the actionbar is light, so it doesnt stand out as well on pink. should i be choosing a different parent theme than Theme.AppCompat.Light.DarkActionBar or shoudl I change the font of the ActionBar? Oct 22 20:32:18 winegoddess: it's not the font, it's the text color Oct 22 20:33:22 sorry, yes, i mean the text color used in the ActionBar. should I somehow change that directly form the default color, or because my action bar is no longer really "dark" should I be using a different theme as teh parent? Oct 22 20:33:29 winegoddess: I hope this can help: http://stackoverflow.com/questions/9593133/how-to-change-default-text-color-using-custom-theme Oct 22 20:33:48 winegoddess: maybe you already saw it. I don't know Oct 22 20:35:44 thanks Melatonina . i dont want to change all text color, just the action bar. since i am going from dark to light ithought maybe i should be using a different parent theme? Oct 22 20:36:14 i found a post from 2011 about making teh ActionBar font different, but the way things change so often, wanted to see if there was a better approach Oct 22 20:38:01 i am getting past this by using darker pinks, but i do wonder how i shoudl approach this problem in teh future Oct 22 20:39:00 winegoddess: maybe this? http://stackoverflow.com/a/33919703 Oct 22 20:41:05 Set a theme on your Toolbar, e.g. android:theme="@style/ThemeOverlay.AppCompat.Light" Oct 22 20:46:35 I think that Melatonina led me to something that makes sense. http://stackoverflow.com/a/26916123/1460944 Oct 22 20:46:50 it seem sto be what you are saying SimonVT Oct 22 21:04:18 winegoddess: how is your game designed? Will it be effective in instilling online gambling addiction in kids under 1 year old? Oct 22 21:04:31 haha Oct 22 21:04:54 my friend has done very well with an MMO that combines gambling addiction and gaming addiction Oct 22 21:05:13 but thats not really my way. i want to make educational games. Oct 22 21:59:48 do people use any code generation libraries to persist objects into sharedpreferences? Oct 22 22:01:37 im looking for a resource that gets into detail about things such as the Properties pane in Adroid studio 2.2.2. i havent found anything yet under developer.android.com Oct 22 22:10:27 i do not understand what is meant by the wrench with text, under text in properties, an dthen contentDescription. is there a user guide for this version? Oct 22 22:15:51 winegoddess: Hover your mouse over them Oct 22 22:16:25 The IDE will tell you about anything important anyway Oct 22 22:16:40 Hi, about the targetSdk value, it's written " the system may enable compatibility behaviors to ensure that your app continues to work the way you expect", can you provide some examples of such compatibility behaviors? Oct 22 22:17:24 soulisson: Mostly margins and padding things. Just target the latest version (24 or 25 depending on your mood) and you can basically leave it there forever Oct 22 22:17:48 they introduced runtime permissions in api 23 Oct 22 22:17:57 What it amounts to is that if later they decide that the window title becomes SUPER important and everyone needs to specify things a different way, your app's behaviour won't change Oct 22 22:17:58 apps that dont support them will likely crash Oct 22 22:18:16 if they target api 22, the permissions are set at installing, not runtime Oct 22 22:18:47 Basically, if you set it and then leave it you'll suffer the least Oct 22 22:18:58 of course targeting 22 is crude workaround instead of just handling the permissions Oct 22 22:19:22 There's some windowmanager stuff that'll just silently fail without a high enough version Oct 22 22:19:43 Hi Dagmar, the wrench says text: Text to display. abve that is android:text Tet to display. how are these different? Oct 22 22:20:10 winegoddess: They're the same as far as I know. Try setting them both to something and hten look at the XML Oct 22 22:20:43 winegoddess: Keep in mind this particular version of the layout editor is _new_ and slightly sucky compared to 2.0's Oct 22 22:21:48 Hmmm, I think I see, if some graphical elements are displayed differently in the latest version, the compatibility features will display it as intended for instance? Oct 22 22:21:55 winegoddess: If you set the "wrench" version, you'll see that it generates a tools:text= definition. This is so you can put ipsum lorems in place if you want to see some text there in the layout editor, but don't want users of the app to ever see any ipsum lorems Oct 22 22:22:08 soulisson: That's the general idea Oct 22 22:22:20 thanks Dagmar - i realize it is new, but seriously, no documentation? ugh. i treid putting values for both, teh first is the android:text and is displayed, teh other whch said it was :text is actually tools:text in the XML Oct 22 22:22:34 Dagmar, Ashiren, thank you Oct 22 22:22:48 winegoddess: Largely it doesn't need a lot of documentation beyond the mouseovers Oct 22 22:23:02 winegoddess: Either you know what attribute you're looking for or you're far asea Oct 22 22:23:34 At least they're slowly getting all the sets of _what_ is displayed in the abbreviated list of properties fixed Oct 22 22:23:50 The first revision of this new properties editor was almost useless. Oct 22 22:23:53 soulisson: you asked a question that nobody answered earlier today. What was that? Oct 22 22:24:23 Way more often than was useful you had to tell it to show you _all_ the properties just to see the rather common one you needed to set Oct 22 22:25:30 I'm still waiting for them to put back the right-click option to reset a property to the default (by removing it entirely) Oct 22 22:25:33 Melatonina: hmm, I think it was about broadcast intents, I asked if BroadCast Intent were implicit intents, I think it's the case Oct 22 22:25:54 soulisson: right. Yes, they are Oct 22 22:26:10 Melatonina: than you Oct 22 22:26:13 But hey, we got copy+paste back so that's good Oct 22 22:26:25 Melatonina: how is your application dev going? Oct 22 22:26:58 soulisson: if there is a class, it's explicit. Otherwise it's implicit, because you don't say explicitly who will handle the intent Oct 22 22:27:08 hence "broadcast" Oct 22 22:29:44 Melatonina: right, I was reading a book that was talking about broadcast intents, I thought they were some kind of special intents but they're just intents send in broadcast Oct 22 22:30:25 They' Oct 22 22:30:32 Dagmar i do like the shortened list of most used properties, but i think they coudl do a bit better explaining what things are Oct 22 22:30:42 They're special in that Android devs whine like babies about how resource consumptive this form of IPC is Oct 22 22:31:10 :) Oct 22 22:31:54 soulisson: I made few things. I'm learning Android so I measure my progress in the amount of feature that I will use in my real application that I manage to make work. Between yesterday and today I managed to make work a few of them, so I should be glad Oct 22 22:32:12 Melatonina: cool Oct 22 22:47:14 I have a button that, when pressed, generates a phrase of length N. If you long-press the button you get a dialog when you can change N. Currently, if you press the "OK" button in the dialog, the value selected becomes current while, if you dismiss the dialog tapping elsewhere, the current value remains unchanged even if you selected a different one in the dialog. Should I change the current value to the selected one even if the dialog is Oct 22 22:47:14 dismissed? Oct 22 22:47:27 That is a little UX question Oct 22 22:47:47 I don't know what are the conventions on Android in similar cases Oct 22 22:50:50 Melatonina The dialog says what exactly? Oct 22 22:51:26 "How many words?" I can change that. Oct 22 22:52:55 If you are overriding the default if they ht ok, it makes sense to use the default length if they exit out. the "canel" choice could say to use default. to make it clear Oct 22 22:53:20 There is no "default". Only a current value Oct 22 22:53:47 I wouldn't apply the update without explicit ok button press Oct 22 22:53:48 The main button says "Generate a Lorem Ipsum of 15 words" Oct 22 22:53:54 is the dialog is to change the value of N (default)? Oct 22 22:54:21 i dont think a long press of a button to chaneg teh behavior is intuitive Oct 22 22:55:06 i do Oct 22 22:55:07 Melatonina, https://material.google.com/components/dialogs.html not very specific, but you should read it in case Oct 22 22:55:26 context menu Oct 22 22:55:28 sometimes it makes more (or no) sense to display cancel or not, etc Oct 22 22:56:57 Ok. Thanks to all, winegoddess capellaGoesBOO and adq Oct 22 22:57:22 👊 Oct 22 23:00:51 You're completely allowed to use a long-press to bring up a context menu of your own if you like. Oct 22 23:03:37 In that particular case if selecting a new item actually changes something then you don't need an OK button to confirm it because you're basically requiring two actions in a row with no in-between, and the OK button should really read "Confirm" Oct 22 23:04:33 i.e., don't Oct 22 23:05:12 Don't make the user press more things than they absolutely need to. Oct 22 23:06:27 The SDK/API version is bound to the OS version, right? Oct 22 23:06:50 Mostly, yes Oct 22 23:06:59 ok Oct 22 23:07:22 minSdkVersion sets the oldest version of the API your app will run on Oct 22 23:08:51 As far as I care, 19 or GTFO Oct 22 23:08:56 :) Oct 22 23:09:23 Below that I keep having to do _way_ too many run-time version checks Oct 22 23:10:12 Can one for instance install the latest API version on Android KitKat or is that something impossible? Oct 22 23:10:16 Also I'm about to be a complete *dick* to a certain someone out there using 19 with one of my apps Oct 22 23:10:46 soulisson: Let me rephrase that question for you... "Can someone install the latest version of Windows 10 in Windows 7?" Oct 22 23:11:01 You can't install "just" the API on a device Oct 22 23:11:07 Dagmar: ok, I see Oct 22 23:11:58 There's a psycho jackass out there who has a personal beef with me who was making a nuisance of himself by using his bogus accounts to supply libelous and false reviews of my stuff Oct 22 23:12:12 I made him go away before by informing Google Play about it. Oct 22 23:12:18 soulisson: I noted the same. In the Android lingo API number = Android version. So, to specify a given version of Android you can use the API number, the Android version, the Android letter or the Android name Oct 22 23:12:33 Recently SOMETHING has gotten him stirred up again and he put another bullshit review in claiming impossible bugs Oct 22 23:12:43 Melatonina: ah ok, thanks very much Oct 22 23:12:50 dang Dagmar - how can you fight that? Oct 22 23:12:51 soulisson: it also defines the version of the Java runtime you are going to use Oct 22 23:13:02 He is the *only* person (according to metrics) using this old version of Android on a particular phone model. Both of these things I can look for in the app Oct 22 23:13:03 Dagmar: there are assholes every where, this is a shame Oct 22 23:13:33 winegoddess: Well, for one thing they were obviously fake accounts, and personal disparagements unrelated to the app Oct 22 23:14:01 The next release is going to have some special code in there so that one guy will find that my app just refuses to run properly for him./ Oct 22 23:14:30 I'm also going to start doing some install source checks because of these goddamn chinese app stores and their spamming promoters trying to get me to buy reviews Oct 22 23:15:04 Dagmar: Are you going to use the device Id? Oct 22 23:15:33 soulisson: Nope. Don't need to. He's literally the only user ever showing a 4.1 android version on some screwball kfjlte phone Oct 22 23:15:39 All of his accounts used the same version Oct 22 23:15:47 He's using some default setup for Xposed Oct 22 23:15:59 Dagmar: oki Oct 22 23:17:02 Btw, is the android id linked to the phone hardware, I know the device id is, but I'm not sure about the Android Id? Oct 22 23:17:08 If I didn't see there was one other 4.1 user out there i'd just quietly raise the minimum version requirement Oct 22 23:17:24 afaik that's tied to the user's Google Play login Oct 22 23:17:47 Dagmar: oh ok, thanks Oct 22 23:18:11 By now I'm used to SOMEONE always missing the point on April Fool's day Oct 22 23:18:25 Not going to tolerate genuine skullduggery Oct 22 23:20:10 Considering the app has an overlay component, I was tempted to make it randomly expand to cover the entire screen invisibly and soak up keypresses, but that would be more naughty than necessary Oct 22 23:22:06 I am using AppCompat and am setting TextAppearance with AppCompat.Large - what are these other choices about with AppCompat.title, Body1, body2 etc? where shoudl i be looking in the docs to know what i should be using? Oct 22 23:24:35 winegoddess material typography Oct 22 23:24:58 winegoddess: That stuff is so deeply nested it's not even funny. If you go into the XML and right click on that value, you can select "Go to declaration" and start trying to chase the thing upstream Oct 22 23:26:03 winegoddess: ...but even that is sort of the wrong approach. Stick with the basics and read what g00s is talking about. You don't want your interface to start looking like a ransom note Oct 22 23:26:49 no ransom note...check... Oct 22 23:27:46 im just confused about using Material if i do wantto support older devices. i thoght i needed to use AppCompat, and i recall trying to test on an AVD matching my tablet and it not supporting something I had chosen such as Material.Large.... Oct 22 23:29:33 winegoddess its good to get the sources for appcompat. they just stopped distributing it as jar in sdk manager - that at least had all the resources. now i think you will have to pull it from aosp Oct 22 23:31:02 from there, you will want to open its res/ folders and start looking at the theme attributes, what is declared, etc Oct 22 23:31:32 thanks g00s . i guess i was hoping to find documentation online. Oct 22 23:31:38 i havent seen anything yet Oct 22 23:31:43 lol haha Oct 22 23:31:53 I don't recall having downloaded those and I can chase the text attributes all the way up to their settings in the IDE Oct 22 23:32:36 Dagmar hm nice , so how do you do that ? Oct 22 23:33:16 so, the reality is, new features, no docs, and even appcompat no guides on using it online? :( Oct 22 23:33:39 Literally just like I said. I go into the XML itself and right click on the attribute's value (@style/TextAppearance.AppCompat.Button for example) and click Go To Declaration Oct 22 23:33:49 ..a.nd I just repeat that until I get past all the damn symlinks Oct 22 23:33:51 winegoddess well, there is a bunch of stuff spread around in twitter, google+ posts, medium, and SO from googlers Oct 22 23:34:01 Thsoe things are abstracted seven ways from sunday Oct 22 23:34:09 fuuuuuuuuuuudge Oct 22 23:34:11 okay Oct 22 23:34:18 Dagmar right, but how do you know all the attributes that are declared ? Oct 22 23:34:32 well, i appreciate getting the word on that. Oct 22 23:34:57 g00s: Because each one explodes into the entire file full of definitions Oct 22 23:35:06 ...which I can just browse through Oct 22 23:35:23 It's kind of an unholy mess Oct 22 23:35:36 Although from past experience I can see why it's that way Oct 22 23:35:40 hm Oct 22 23:35:47 It just gives me more of a reason to not try to get too fancy Oct 22 23:35:54 i like just getting the sources, then you can also see the hidden stuff, the layouts, all that Oct 22 23:36:20 yeah there are so many levels of indirection, you can go mad Oct 22 23:36:35 Someone out there, somewhere, is going to be using one of those blighted "theme changers" and things will go straight to hell if I used the inherited styles for some things and my own declarations for others Oct 22 23:44:24 okay i found a reference about the wrench text in TextVIew properties. it says the wrench text i not shown at runtime, but appears in teh alyout editor an dis usefl for testing the way a visual component and teh layout will behave with different settings without having to run the app repetedly. Oct 22 23:44:50 but that is all it says and i dint get that. it does make an entry in the xml of tools:text - but how is that helpful? Oct 22 23:46:45 preview the layout with content in the layout editor Oct 22 23:46:56 without it affecting your deployed layouts Oct 22 23:48:45 hi darken - thanks for replying. I dont get it still, sorry. i have please enter your name for the text. the wrench text, is...? Oct 22 23:49:22 what? my answer was to the question how "tools:text" is helpful Oct 22 23:49:30 What wrench text Oct 22 23:49:56 the wrench text is below text in the properties window of AS 2.2 Oct 22 23:50:36 i did a test before, and had different text in both, and did not see what i hadin the wrench text. and now, i am seeing teh wrench text in my preview instead of my original text. Oct 22 23:50:37 winegoddess: We just went over this a few minutes ago. The tools text is only for display in the layout editor Oct 22 23:50:47 I have an app that makes use of some data stored in an xml file. What should be the ideal location of such file? In plain java I would have yoused a resource folder, but on android that's already used Oct 22 23:51:13 so the "wrench text" is likely the visual representation of the "tools:text" xml attribute Oct 22 23:51:23 elderuyld: Shove it into it's own subfolder if you like Oct 22 23:52:18 elderuyld: If you don't want android studio looking at it funny or trying to inventory it into R just put it under assets/ Oct 22 23:52:48 i *think* I may be gettingit now. what do you think aboout this interpretation of what is happening. you put text in android:text. you extract it as a resource to strings.xml or whatever. you can use wrench to temporarily see a different value, just to get an idea of what that value will look like? Oct 22 23:52:49 ok perfect, thanks Dagmar Oct 22 23:53:22 before when i added a wrench text, it didnt show up, so i was even more confused Oct 22 23:53:26 winegoddess: This is particularly important if say, a TextView will have it's text set only at runtim Oct 22 23:53:55 winegoddess: You can just leave the text value undefined, and set the tools:text value to some placeholder so you can still see how it plays in the layout editor Oct 22 23:54:24 okay, that makes sense. thanks again darken and Dagmar Oct 22 23:54:33 winegoddess: Stuff that's in text= should almost always be punted over into strings, if you want there to be any hope of translating your app into other languages Oct 22 23:54:46 If you don't care if it's ever translated it you can not bother Oct 22 23:55:00 Me, I sort of care. At least I care enough to not shoot myself in the foot later. Oct 22 23:55:29 I have a _suspicion_ that Google Play might be scrutinizing things like that for some hidden "quality" metric Oct 22 23:56:38 The thing I'm working on right now is probably not going to be translated until I can get a better handle on java i18n and is mostly "ASCII or GTFO" and I'm still abstracting the strings Oct 22 23:59:00 My guess is that at some future date they'll actually probably just start making translations automatic and free Oct 23 00:01:17 automatic translations suck though Oct 23 00:02:50 has anyone used teh translation services you can request form android studio? i was wondering how much they charge. not that im even ready fo rthat, but i was curious about how good it was Oct 23 00:04:33 would it be very difficult (for a n00b) to surround multi-line text with a style? like a color/border? Oct 23 00:10:34 winegoddess: surround each character or the whole text? Oct 23 00:10:55 hi Melatonina i may have found something: http://www.codeproject.com/Tips/845894/How-to-make-EditText-With-Border-and-Gradient-Back Oct 23 00:11:16 not sure if there is a better way....the entire text to make it more of a bubble... Oct 23 00:11:22 hi winegoddess. We talked no much time ago. It's always me. :D Oct 23 00:11:36 Hey guys anyone know how to sort using firebase? Oct 23 00:11:58 winegoddess: ah, ok. Surround the whole block of text. That's easy Oct 23 00:12:03 http://stackoverflow.com/questions/40198291/how-to-sort-by-children-key-value-in-firebase Oct 23 00:12:13 This is the question I am trying to solve if anyone got some ideas Oct 23 00:14:18 winegoddess: you could even draw a cartoon bubble in Illustrator or InkScape and import as VectorDrawable in Android Oct 23 00:14:31 winegoddess: and use that as background. With some padding, I guess Oct 23 00:15:04 that sounds nice. Oct 23 00:16:29 What sounds nice my question? Oct 23 00:16:43 9-patch files are a bit easier Oct 23 00:17:31 sorry Lonesoldier728 Oct 23 00:17:50 i meant the approach to the border Oct 23 00:18:18 i just read i shoudl be able to simply use style, bbiab thanks all for your help so far Oct 23 00:19:11 What they're doing there isn't technically a "style" Oct 23 00:19:35 Styles generally have more attributes attached and you'd apply them to the entire EditText instead of hte background Oct 23 00:19:48 That's just using a drawable for the background Oct 23 00:20:40 You *could* go and shim that somewhere in the mess that is the style tree so that it would apply to all instances of EditText automatically Oct 23 00:21:41 hello, I have messed up my android installation, can anyone tell me how to get back to square one? Oct 23 00:22:01 Any of you use firebase Oct 23 00:22:03 Reflash the stock firmware Oct 23 00:22:27 how does one go about doing that' Oct 23 00:22:50 napalmgrenade: By asking Google to tell you where to get it and how to reflash it. Oct 23 00:23:03 napalmgrenade: The instructions will be specific to your phone model and carrier Oct 23 00:23:26 oh my bad, I meant android studio Oct 23 00:23:44 Oh, just uninstall it and reinstall it Oct 23 00:24:06 when I do that, when I reinstall it still opens up my old project somehow Oct 23 00:24:22 So close the project. Oct 23 00:24:37 Until you configure it to do otherwise it'll always try and reopen the last project you were editing Oct 23 00:24:53 so I've been deleting the directory where I installed it to uninstall Oct 23 00:25:16 is that the right way considering thats how I installed it? by unzipping the file from their website and moving it to /opt? Oct 23 00:25:20 and then just running studio.sh Oct 23 00:29:14 napalmgrenade: why don't you give up Android development altogether? Is it worth? Oct 23 00:29:38 taking a class on it so. Oct 23 00:29:40 lool Oct 23 00:29:43 not much choice Oct 23 00:29:44 :D Oct 23 00:31:32 there is a guy with nick "napalm" here Oct 23 00:31:45 and a "lilygrenade" too Oct 23 00:32:46 Are you their child? Oct 23 00:37:50 nope Oct 23 00:38:05 or maybe my parents are lilygrenade and napalm Oct 23 00:38:14 that would be surprising but... Oct 23 00:38:16 o.o Oct 23 00:40:21 alright I think I have re-installed successfully, how do I not mess up importing this one library I've been trying to use? its called volley and im using git to clone it to a folder, then importing it as a module via new module --> import existing, I also made sure to make sure compile project(":volley") is written in the gradle file for the app. When I write a line of code initializing an object from volley, it doesnt r Oct 23 00:41:25 napalmgrenade: you don't need to import the sources of volley unless you need to modify them Oct 23 00:41:52 but I want to use it to make http requests to an API Oct 23 00:42:05 is it alreayd included in the base installation? Oct 23 00:42:26 no, you just do as described here: https://developer.android.com/training/volley/index.html Oct 23 00:43:07 add this to the dependencies of your module: compile 'com.android.volley:volley:1.0.0' Oct 23 00:43:42 what kind of class are you taking? Oct 23 00:44:26 oh hey it worked.. Oct 23 00:44:32 thanks Oct 23 00:44:38 it's an android development class Oct 23 00:44:57 currently using the twitter API with our app Oct 23 00:45:02 or trying to Oct 23 00:45:34 its my first time using api's so its all new to me Oct 23 00:45:51 Hello, i want to make a Android app in Java what need to list the wifi SSIDs, but i don't know from where I should start, can someone guide me? Oct 23 00:45:55 I know the feeling Oct 23 00:46:32 is it pretty easy after the learning curve? Oct 23 00:47:10 napalmgrenade: sure. Unfortunately the learning curve is steep and never-ending Oct 23 00:47:29 Vapez: http://stackoverflow.com/questions/5452940/how-can-i-get-android-wifi-scan-results-into-a-list Oct 23 00:48:24 napalmgrenade: I'm joking. Yes, everything gets easier after masterning the basics Oct 23 00:49:12 the concept of "after the learning curve" is not familiar to me because I think you can always learn. Thus learning curves are infinite Oct 23 00:49:15 Melatonina: i saw that, but i don't know what i should do with it, the android studio it's not like Visual Studio, in VS if you double-click on button for example, it's open in new tab the code for that button... Oct 23 00:49:53 In Android Studio you can double-click anywhere you want Oct 23 00:50:04 if you make a mess, just undo Oct 23 00:50:19 then you open the java file manually Oct 23 00:50:34 but nobody prevents you from double-clicking if that makes you happy Oct 23 00:50:43 http://stackoverflow.com/questions/17167084/android-scanning-wifi-network-selectable-list Oct 23 00:51:47 i also found this, the Alex Chengalan answer, i paste it in my Main Activity file and i get alot of errors, i click on classes that wasn't imported, i imported them and a run the app, it crash after run Oct 23 00:52:23 read the log, find the exception, fix the problem Oct 23 00:52:29 just like in Visual Studio Oct 23 00:53:29 Android Studio is not as good as Visual Studio but has lots of features Oct 23 00:53:55 there is a long history and lots of money behind Visual Studio Oct 23 00:54:16 You can make Android application in Visual Studio too Oct 23 00:56:16 Good night Oct 23 01:02:09 Melatonina: good night, thank you Oct 23 01:08:56 Neither user 10221 nor current process has android.permission.ACCESS_WIFI_STATE. Oct 23 01:09:01 I need to be root? Oct 23 01:09:13 Hi guys! Has anybody worked with AndroidAnnotations here? I wonder how do I preocess the response in REST client if it wasn't 200 ok? Oct 23 02:13:46 hi Oct 23 02:16:19 you don't need to be root to use WifiManager Oct 23 02:25:51 Anyone else not able to run the debugger (without 'Run > Attach debugger')? I've not been able to since AS 2.2. Oct 23 02:25:56 Nothing I try fixes it. Oct 23 02:26:09 Restarting everything, invalidating caches, etc. Oct 23 02:26:32 Just says "Waiting For Debugger" on device indefinitely. Oct 23 02:27:31 hey TacticalJoke , saw something i think you will like Oct 23 02:27:39 hello, i am trying to autofill a form with webview but i dont know how to pass [] in Happens on one device and the emulator. Oct 23 02:27:46 Hey, g00s. Oct 23 02:27:53 i won't be out until 2017 Oct 23 02:28:03 https://www.amazon.com/gp/product/0134494164 Oct 23 02:28:08 this doesnt work: view.loadUrl("javascript:document.getElementById('login[username]').value = '"+username+"';"); Oct 23 02:29:09 g00s: Interesting. Oct 23 02:29:39 michael33: Maybe try escaping those brackets with a backslash? Just a guess. Oct 23 02:34:03 TacticalJoke: like this? view.loadUrl("javascript:document.getElementById('login/[username/]').value = '"+username+"';"); Oct 23 02:34:23 michael33: Is / a backslash? Oct 23 02:35:49 sorry, still says illegal character Oct 23 02:37:43 TacticalJoke i don't understand that post on /r/androiddev - the one about interview Qs Oct 23 02:38:12 https://www.reddit.com/r/androiddev/comments/58qhjr/android_interview_study_guide/ Oct 23 02:38:47 if you want the full monty then its best to get that 700 page book on all those CS questions Oct 23 02:39:35 i hate when people try to distill a few years of CS into a few bullet points. then some dumbass recruiter asks Qs from the list, as soon as you're like 'it depends' they are like, NO ... this is the answer ! Oct 23 02:39:53 anyway got this part working but instead of autofilling the form it just turns into a blank page with the given string. Im using onPageFinished. any help? Oct 23 02:40:04 memorizing all this stuff is just ... barely skimming the top. its not real understanding Oct 23 02:40:11 g00s: Yeah, it's so lame. Oct 23 02:40:42 This field is full of clueless pretenders already. Oct 23 02:43:46 got this working too Oct 23 02:43:48 nvm Oct 23 02:46:27 I hate how so many support libraries assume you're using AppCompat now. Oct 23 02:46:45 The day I switched from AppCompat was the day I breathed a huge sigh of relief. Oct 23 02:47:35 the whole thing is like some kind of malignant tumor Oct 23 02:47:44 haha Oct 23 02:48:02 Yeah, it's a mess. Oct 23 02:48:24 I wish they'd stuck to their guns and said "Sorry, no material design without `minSdkVersion 21`". Oct 23 02:48:44 although, i do want to see sqlite in the support library Oct 23 02:48:56 Nowadays it's "You can have the latest look and feel even if you're supporting a five-year-old version of Android!" Oct 23 02:48:56 can't use lots of new features Oct 23 02:49:21 But then you see a screenshot of an old device that's half-Holo and half-material. Oct 23 02:51:11 i'd be much more willing to put up with android if google wasn't becoming such a sleezy company ... Oct 23 02:52:20 TacticalJoke did you see this ? https://tech.slashdot.org/story/16/10/22/008216/google-has-quietly-dropped-ban-on-personally-identifiable-web-tracking Oct 23 02:52:51 Doesn't sound promising. :[ Oct 23 02:52:53 there were better discussions on HN, too lazy to dig it up though Oct 23 02:53:50 * g00s desperately wants mobile 3rd option Oct 23 02:55:23 I must be missing something obvious here. How is this `scroll` method being called? https://android.googlesource.com/platform/frameworks/support/+/master/design/src/android/support/design/widget/AppBarLayout.java#812I Oct 23 02:55:39 That method is an instance method in HeaderBehavior (in the same package). Oct 23 02:55:49 I just can't see how this class is able to call it. Oct 23 02:56:15 Is it the `@CoordinatorLayout.DefaultBehavior(AppBarLayout.Behavior.class)` annotation? Oct 23 02:57:13 https://android.googlesource.com/platform/frameworks/support/+/master/design/src/android/support/design/widget/AppBarLayout.java#812 (fixed link) Oct 23 02:58:49 It doesn't inherit or define the method. The method is not statically imported (and it's an instance method anyway). **** ENDING LOGGING AT Sun Oct 23 02:59:58 2016