**** BEGIN LOGGING AT Thu Sep 15 02:59:58 2016 Sep 15 03:09:41 hi Sep 15 03:17:27 when i override onBackPressed() back button stops working - what should be the reason behind this ? Sep 15 03:19:55 are you calling the super.onBackPressed()? Sep 15 03:21:30 whatitis: yes Sep 15 03:22:39 no you aren't Sep 15 03:22:46 if. you did, it. would. work Sep 15 03:23:33 pfn NPE, if was null Sep 15 03:23:55 super can never be null Sep 15 03:24:05 pfn: you mean i have to omit super.onBackPressed() just before the overridden method ? Sep 15 03:24:41 sorry "just after" Sep 15 03:26:13 you probably have this in a try block or conditional, and thus, it does not get. called Sep 15 03:26:34 another question - when in Android - you have to get the method name, within the method body for debugging purposes - rather than hard-coding it , what is the best workaround for that ? Sep 15 03:26:43 pfn: thanks - i'll try it and see Sep 15 03:35:58 there is no good workaround without performance destroying stack inspection for determining calling method name Sep 15 03:36:45 I have a custom list adapter with an onclick adapter which opens up an activity to edit the content. Upon pressing update the activity finishs, does its business and returns to the list but its not updated. How can i force it to update? Sep 15 03:37:14 I would use startIntentForResult and update in there, but it wont work because the intent is called from the customAdapter onclick listiner Sep 15 03:38:38 Is there a way to suppress the “This build could be faster, please consider using the Gradle Daemon” message? Sep 15 03:40:23 Never mind, a onResume() function exists. Sep 15 05:10:57 Hi there, I've been running some cURL commands like this "curl -u username:token https://api.github.com/user/repos -H "Accept: application/vnd.github.inertia-preview+json" Sep 15 05:11:08 How can I run that same command in Android/Java? Sep 15 05:11:25 If i run it on the command line I get a JSON response; i want to do the exact same thing except within an android app Sep 15 05:11:27 <_genuser_> any ideas on removing password from pdf files? Sep 15 05:11:36 <_genuser_> I know it's unrelated, just seeing if someone has a clue. Sep 15 05:14:39 or if not Curl, how can I run http requests in a similar way? Sep 15 05:21:24 ir7466: check out retrofit and okhttp Sep 15 05:22:04 thanks Leeds - is OkHttp (I have heard of that I think) easy to add to android by just adding it to the build.gradle file? Sep 15 05:22:12 yup Sep 15 05:22:22 awesome Sep 15 05:23:49 in that example above, what would the "-u username:token" part be called? Sep 15 05:24:07 I figure it would be some sort of authentication, but from an http perspective is there a proper name for it? Sep 15 05:24:58 ir7466: it's called "authentication" Sep 15 05:25:13 does it get passed with the request? Sep 15 05:25:18 or is it two separate actions? Sep 15 05:25:34 ir7466: it depends on the kind of authentication Sep 15 05:25:46 well just that one above Sep 15 05:25:53 whatever -u username:token does Sep 15 05:26:01 i'm trying to replicate that Sep 15 05:26:11 ir7466: "that one above" doesn't define a type of authentication Sep 15 05:26:31 how do you mean? Sep 15 05:26:35 ir7466: it could be as simple as adding username and password to the HTTP header Sep 15 05:26:47 ir7466: using cookies Sep 15 05:26:55 is there some way I can find out? Sep 15 05:27:18 ir7466: connecting to other authentication server before performing that request, etc. Sep 15 05:28:43 ir7466: not sure. read the cURL documentation to see what does it do and github documentation to see what kind of authentication it requires Sep 15 05:29:04 i believe according to the github docs its "Basic authentication" Sep 15 05:29:24 with a personal access token Sep 15 05:31:45 then you probably need to read how to perform basic authentication in the HTTP header. you have to add username and password to the header and perform the request via a secure connection to prevent everybody to read your secrets Sep 15 05:33:08 ir7466: http://stackoverflow.com/questions/22490057/android-okhttp-with-basic-authentication Sep 15 05:33:16 ir7466: what does your nick mean? Sep 15 05:33:18 but what about with the token? Sep 15 05:33:50 the other 7465 ir's were taken Sep 15 05:34:09 what about being more original? Sep 15 05:35:11 like how? Sep 15 05:35:37 i think it's ok Sep 15 05:35:54 if you think it's ok then it's ok Sep 15 05:37:00 In order to not get an exception when I do setSupportActionBar(toolbar); I have to set false and true in the AppTheme. Why the cheesesquare demo doesn't need to do that? Sep 15 05:37:31 ir7466: did you read the stackoverflow? Sep 15 05:38:27 hello Sep 15 05:38:51 yes but it only talks about how to do it with a username and password Sep 15 05:38:53 not a username:token Sep 15 05:39:15 what's token? Sep 15 05:39:34 Can I configure android as is (any version, latest?) to enable usb tethering whenever usb cable connected? I see when trying with the app "automate" on andoid 6 the action to listen to connectivity is OK, check usb tethering status allowed, but setting usb tethering to enabled/disabled requires rooted device? Sep 15 05:39:42 a private access token Sep 15 05:39:49 i think it's similar to an oAuth token Sep 15 05:39:54 like a password? Sep 15 05:40:04 i guess. you can generate them on github Sep 15 05:40:56 I don't know. Try using it as password. Or read the cURL manual to understand what does it do when you use username:token Sep 15 05:41:01 ok Sep 15 05:41:25 to make your snippets more realistic you should write your actual username and your actual password, though Sep 15 05:41:42 ok Sep 15 05:42:01 you can trust this channel, we won't abuse your account on github to make evil things Sep 15 05:42:49 yes i think the token is basically a password Sep 15 05:42:52 you're right Sep 15 05:43:25 I was just guessing Sep 15 05:51:31 ir7466: did I help you? Sep 15 05:52:58 i am currently testing Sep 15 05:53:03 still building... :) Sep 15 05:53:14 i'll know when it hits the first breakpoint Sep 15 05:55:18 i think the OkHTTP is not working. the apk is taking forever to install Sep 15 05:55:47 why would okhttp have anything to do with installing an apk? Sep 15 05:56:19 because that is the only change i've made in the last 10 mins Sep 15 05:56:50 ah ok Sep 15 05:56:53 "java.lang.SecurityException: Permission denied (missing INTERNET permission?)" Sep 15 05:57:04 obviously it'll get bigger if you're pulling in a library, but not that much that you should really notice Sep 15 05:57:27 it ended up crashing with that error, i guess i needed to update the manifest Sep 15 05:57:50 their documentation is pretty light, i didnt see it mentioned anywhere although i guess it does make sense Sep 15 05:58:18 I think that's a pretty basic well-known Android thing :P Sep 15 05:59:37 ok now it builds Sep 15 05:59:50 but when i run in debug mode it just freezes - hasn't hit a breakpoint yet Sep 15 06:00:34 re-run in normal mode and look for an exception Sep 15 06:02:34 ok i just tried it again. seems ok... and seems to be getting the json result too, so token does act as password Sep 15 06:03:02 thanks for your help. one final thing - is it hard in android to convert a string of json into an actual JSONObject/JSONArray? Sep 15 06:04:42 HoloPed: set `APP_PLATFORM := android-23` in your Application.mk Sep 15 06:05:08 basically the result i've got back is huge, i want to be able to iterate through it more nicely than parsing the raw json text Sep 15 06:06:41 i guess i'm sort of thinking of something like json_decode in php, where it just dumps it all into an array... something like that would be good Sep 15 06:07:04 look into gson Sep 15 06:08:28 ok Sep 15 06:08:34 will i need to create the classes myself? Sep 15 06:08:41 or will the library handle it at runtime? Sep 15 06:09:41 depends on your json Sep 15 06:10:04 how complexed it is Sep 15 06:10:15 it's all strings Sep 15 06:10:19 if that helps Sep 15 06:10:44 a few ints and bools too, my mistake Sep 15 06:11:11 there's no blobs or anything like that though Sep 15 06:11:54 just an example how to parse: HashMap> scores = gson.fromJson(scoreReader, HashMap.class); Sep 15 06:12:40 if you need custom fields, you might better creating a pojo Sep 15 06:12:50 +be Sep 15 06:14:57 ok Sep 15 06:15:30 i actually just tried new JSONArray(json) and that worked. put everything into namevalue pairs Sep 15 06:28:49 ir7466: how is it going? Sep 15 06:29:33 it's going well now Sep 15 06:29:42 i have used OkHttp and it seems to be working Sep 15 06:29:56 i do have a question about asynchronous calls though Sep 15 06:30:17 if i have a function like "getFooBar()" that returns ArrayList - how do i do that given it's asynchronous Sep 15 06:32:24 it is asynchronous or you would like it to be asynchronous? Sep 15 06:35:18 i guess i want it to be async Sep 15 06:35:36 i want the data to end up going in a listview Sep 15 06:35:59 so i guess in my mind i see the listview having like a spinner icon to show it's loading, and then when it's done the listview loads the data Sep 15 06:38:01 do that then Sep 15 06:38:35 what you call "spinner icon" is called "progress bar" Sep 15 06:38:55 http://pastebin.ca/3718370 Sep 15 06:39:00 thats sort of what i have in mind Sep 15 06:39:03 https://developer.android.com/reference/android/os/AsyncTask.html Sep 15 06:39:12 but in ClassB how do I "wait" Sep 15 06:39:17 oh... using AsyncTask? Sep 15 06:44:25 Is there a special recycler view adapter for SQLite queries? Sep 15 06:44:32 Do I just use a normal adapter? Sep 15 06:53:30 hey guys, any tips on app promotion that has worked for you? Sep 15 06:54:05 obiously spam, fake 5 stars and fake accounts, why not Sep 15 06:54:40 murosai let us know if you find any good ones Sep 15 06:54:57 are you independent dev. is this your first app Sep 15 06:56:40 when i first started, i promoted it on local android forum and its "your app" section Sep 15 06:56:54 hmm, I wonder how I can use RemoteInput with a RemoteViews Sep 15 06:58:33 murosai: firstly, be a good app Sep 15 06:59:16 murosai: secondly, be a very good app that is worth money Sep 15 06:59:21 thats a pretty subjective thing to say Leeds Sep 15 06:59:55 not to mention, that even really shit apps who does good promotion gets big regardless of thier quality Sep 15 07:00:08 raoul11: if it wasn't subjective there would be only 1 application for each genre Sep 15 07:00:10 raoul11: not really Sep 15 07:00:28 or maybe better to say "don't be a crap app" Sep 15 07:00:45 raoul11: if it wasn't subjective, advertisement and marketing would be an algorithm Sep 15 07:00:53 arancio: what i meant is that the statement "very good app" has no real merit Sep 15 07:01:24 sorry to interrupt again, going back to my function at http://pastebin.ca/3718370 - how do I make it so return myStuff; isn't returned until client.newCall() has finished executing asynchronously Sep 15 07:01:37 I did look at ASyncTask but i'm not sure if it's suitable for me... Sep 15 07:01:46 at least i'm not sure how my example would work with it Sep 15 07:02:49 ir7466: perform the query in doInBackground() and update your view in onPostExecute() Sep 15 07:03:00 ir7466: you don't return anything Sep 15 07:03:23 if i do it that way, do I need to be doing all this login in the activity? Sep 15 07:03:42 like have a subclass MyActivity extends AsyncTask Sep 15 07:03:58 because ideally i think some of this logic should be more separated from the activity Sep 15 07:04:51 murosai: so, what's the app? Sep 15 07:06:18 hello Sep 15 07:06:26 ir7466: no, you don't need to subclass AsyncTask Sep 15 07:06:43 ir7466: did you read that page? Sep 15 07:06:49 wwwi: hello! Sep 15 07:06:51 interesting, setTextColor(int color) doesnt work from colors.xml, but instead need to use setTextColor(ContentCompat.setColor(int color)) Sep 15 07:06:51 yep i think i see what you mean Sep 15 07:07:12 there's one thing I'm not understanding though, you say run onPostExecute from the view Sep 15 07:07:23 when your server is under maintenance, you pop up a message, but what do you do at that point, you stop selling the product, until you finish maintenance? Sep 15 07:07:23 no, I didn't say that Sep 15 07:07:25 but doesn't that logic need to be inside the Task class? Sep 15 07:07:30 + this||context inside the ContextCompat.setColor Sep 15 07:07:43 arancio: hello Sep 15 07:07:44 "and update your view in onPostExecute()" Sep 15 07:08:07 how does the Task know which view to update? Sep 15 07:08:22 shouldn't that be done in like an anonymous method from the view somehow? Sep 15 07:08:26 no Sep 15 07:08:59 aren't you supposed to sell a product that does what it promises? when you are under maintenance, your product is sort of paused Sep 15 07:09:18 can't i override that method from the Activity class? Sep 15 07:09:23 that seems like it would make sense Sep 15 07:09:34 pass a reference to your view(s) explicitly or implicitly Sep 15 07:10:02 is it impossible to override from the Activity class? Sep 15 07:10:20 let me rephrase Sep 15 07:10:49 say I want my task - which is downloading some data in json and converting it to objects (and i thought just return an ArrayList of those objects) Sep 15 07:10:59 say i want to use that in many places - not just one activity Sep 15 07:11:09 the key feature of this is the construction of that ArrayList Sep 15 07:11:22 i may choose to use it in many different ways in many different activities Sep 15 07:11:36 pass a continuation instead Sep 15 07:12:44 In order to not get an exception when I do setSupportActionBar(toolbar); I have to set false and true in the AppTheme. Why the cheesesquare demo doesn't need to do that? Sep 15 07:12:53 what is a continuation? Sep 15 07:14:32 i've been looking on stackoverflow, see this image: http://i.stack.imgur.com/I23KW.png Sep 15 07:15:07 where he's got MyTask().execute.... i basically want to do what he's doing, but somewhere around MyTask.execute I want to be able to access the ArrayList i've created Sep 15 07:15:07 well that's one way to describe how asynctask works... Sep 15 07:17:28 it must be possible to override the onpostexecute from the activity Sep 15 07:17:41 then I can do whatever i please with the result Sep 15 07:18:52 ir7466: either you hardwire what you want to do in onPostExecute() (it will be executed in the UI thread, conveniently) or you subclass AsyncTask, add a reference to a continuation and execute that continuation for maximum genericity (="whatever I please"). A continuation is a piece of code to be executed after the end of an asynchronous task. Google "continuation" "java continuation" Sep 15 07:19:25 sorry, I can't help you more now Sep 15 07:19:29 ok Sep 15 07:21:16 look into where each method is executed and you'll find where you need to place your code Sep 15 07:21:21 no need for kung fu Sep 15 07:22:19 I have an ImageView set to 0dp width, 0.5 layout width and it scales down to half width on the left side as intended. However, the height has alot of blank space above and below, any suggestions on removing this? Sep 15 07:22:35 scaleType Sep 15 07:23:04 ugh, for serious??? RemoteViews.setRemoteInput is an @hide API, fml Sep 15 07:26:53 Odaym: Thanks, fitStart worked. However, the design view shows the space below is still being taken up Sep 15 07:27:20 probably by something that hasn't rendered yet? Sep 15 07:27:36 dunno, I test on device, if it works there then I assume I did my job :P Sep 15 07:28:10 Thanks, i will continue re-doing this view and see how it goes Sep 15 07:31:19 today is the first time I ever hear of TwoLineListItem UI element Sep 15 07:33:36 ok a more general java question. say i create a base class for AsyncTasks because most tasks will be the same, except the return value from doInBackground will be an unknown type of ArrayList Sep 15 07:33:51 so it might be ArrayList, ArrayList etc - i don't know until run time Sep 15 07:33:59 like ArrayList? Sep 15 07:34:01 protected abstract ArrayList doInBackground(); <-- if i put that in the base class Sep 15 07:34:13 yes you beat me to the punch Odaym Sep 15 07:34:19 yea im super genuis Sep 15 07:34:26 why do you want to do that? Sep 15 07:34:39 I tried T first of all, because I remember a tiny bit about generics Sep 15 07:34:51 but it says cannot resolve symbol Sep 15 07:34:58 but when I try it doesn't complain Sep 15 07:34:59 if you're going to the web and stuff with an API and all that, use retrofit Sep 15 07:36:04 Odaym: The height is definetly and issue. Although the image is scaling, the height is not shrinking and is offsetting the content below half a screen almost Sep 15 07:36:17 i'm happy to look into retrofit, although OkHttp seems to be doing it's job Sep 15 07:36:34 i'm curious right now about the generics though, why doesn't it like but it's fine with ? Sep 15 07:36:36 nah retrofit is a whole other ballgame man Sep 15 07:36:42 not sure i suck at java Sep 15 07:36:50 see #java, but they are not nice people Sep 15 07:37:02 maybe it's an issue of where the image is sitting in, Ben2560 Sep 15 07:37:42 Odaym: Quick google, android:adjustViewBounds="true" allows the image view to resize its dimensions Sep 15 07:38:04 cool Sep 15 07:38:05 Fixed the issue. So i guess anything that dynamically changes size would need that for the view to adjust Sep 15 07:38:08 life solved Sep 15 07:38:20 Just in case you ever see someone with the same problem Sep 15 07:38:30 * Odaym tucks answer under belt Sep 15 07:39:58 when your server is under maintenance, you pop up a message, but what do you do at that point, you stop selling the product, until you finish maintenance? Sep 15 07:40:06 Now that the rest of my program looks neat, just have to figure out the implementation of a gallery for the app with the ability to copy photos from the device gallery Sep 15 07:41:18 sounds easy Sep 15 07:41:22 is easy Sep 15 07:44:11 I think implementing google maps based off the address in a database is easier Sep 15 07:44:41 I actually have no idea where to start / how to implement the gallery part. So google time Sep 15 07:46:11 what does it do Sep 15 07:46:42 it's a UI issue you're going to have, not code Sep 15 07:46:46 how to show it in a decent way Sep 15 07:50:09 Its an assignment, I have to have a gallery built in with some images that are included, and there has to be the ability to add images to the gallery from the device gallery, and also to remove them Sep 15 07:53:24 Looks doesnt have to be to good, so a gridview with images would do Sep 15 07:58:56 of course gridview, that's granted Sep 15 07:59:24 open picker, select image, you get the path back, load that path into the array of paths that's fed to the gridview adapter, notifyDataSetChanged on the adapter Sep 15 08:00:29 so use Intents eh Sep 15 08:00:39 also, why gridView not recyclerView? Sep 15 08:00:57 + Sep 15 08:05:51 Hi, i followed this android tutorial https://developer.android.com/training/basics/firstapp/starting-activity.html and have a problem with the android:onClick="sendMessage" Event. My sendMessage function is not firing. Any idea what could be wrong? Sep 15 08:05:51 quick question about Retrofit Sep 15 08:06:06 do you guys create response models of the actual API JSON response also? Sep 15 08:06:27 like you go to jsonschema2pojo.org and give it the JSON model and paste back what it replies as Java classes? Sep 15 08:06:53 yes Sep 15 08:07:26 ok Sep 15 08:07:50 so you also try to combine together as much models as possible by having the API design be not so varied in structure of the response? Sep 15 08:08:18 Thanks Odaym, that is a good idea Sep 15 08:08:30 in my recent project we are trying to use repository design pattern, which separates api models and db models Sep 15 08:08:31 cause I haven't found a way to have the parent elements be the same and only the contents of "data" nested way inside be different Sep 15 08:08:32 Ashiren: We have not been taught recyclerView Sep 15 08:09:17 i always have the same outer element be the same, i.e. data > message, body > data, code Sep 15 08:09:55 only inner data changes Sep 15 08:13:22 i had just few situations like this. in this case the inner data just holded all possible variables Sep 15 08:13:31 sounds ugly since most of the variables would be null Sep 15 08:13:34 you can do that? Sep 15 08:13:51 oh.. Sep 15 08:14:00 so it just wouldn't set them! easy! Sep 15 08:14:04 yea they'd be null Sep 15 08:14:09 yes Sep 15 08:15:49 Anyone building aosp? Sep 15 08:16:48 How can i add mapview into listview after last row ? I want to make it scrollable as well Sep 15 08:17:29 I'm trying to figure out how to build just single .so library without using 10 minutes each round and re-compiling a lot of extra stuff. Sep 15 08:23:16 IJNX: what are the first three words of the channel topic? Sep 15 08:24:06 java only? Sep 15 08:24:18 android application development Sep 15 08:24:19 lol Sep 15 08:24:32 Well my application is dependent on libraries :) Sep 15 08:24:36 Hello, i want redirect logcat to a file with command 'logcat -v time > somefile.txt'. But it write file always, is there any better way with buffered? Sep 15 08:24:46 he has a good point, where else is the poor guy going to turn? Sep 15 08:24:53 I don't think there's an #android-aosp Sep 15 08:25:02 whay about #android-root Sep 15 08:25:37 ok, thanks. Sep 15 08:25:44 I'd keep asking here Sep 15 08:25:53 but not repeating the same question of course Sep 15 08:25:58 Any one can help me? Sep 15 08:26:25 Could anybody help me to debug a RecyclerView that is not showing anything? Sep 15 08:27:08 cnbleu: your question is not clear. I would rephrase it Sep 15 08:29:06 arancio: Redirct logcat to a file cause file wrote with high frequency, i want slow down it. Sep 15 08:30:27 arancio: sorry about my bad English, can you get me? Sep 15 08:30:31 cnbleu: I can't help you but now your question is understandable, at least. I hope someone else can help you. Sep 15 08:31:09 this is more a question for bash linux redirect buffering Sep 15 08:31:47 one way would be logcat -v time | gzip > file.gz .... it will cache a bit before writing to file Sep 15 08:31:54 plus it provides compression Sep 15 08:32:28 yes, i want it cache first and then write it. Sep 15 08:32:48 Ashiren: i have a try now, thanks. Sep 15 08:34:02 cnbleu: or if you want fixed delay try this: adb logcat | while read a; do echo $a; sleep 0.1; done Sep 15 08:34:03 then to read the contents you could zcat file Sep 15 08:36:57 cnbleu if you use pipe with any command it will always buffer data. Sep 15 08:37:51 Ashiren: it seems works. I run the command in adb shell and a file named 'logcatfile.txt' created. Sep 15 08:39:23 IJNX: I work for this for half a day. After process.exec('logcat -v tim') the process.getInputStream return 0 byte. Sep 15 08:41:51 cnbleu: maybe this helps http://bit.ly/2cwACOH ? Sep 15 08:44:04 IJNX: i will have a try, thanks Sep 15 08:57:13 Ashiren: I use 'logcat -v time | gzip > logcatfile.gz' and i get the logcatfile.gz file. But there is an error 'gzip: logcat.gz: unexpected end of file' when command 'gzip -d logcat.gz' executed. Sep 15 08:57:39 Ashiren: I'm short of linux shell Sep 15 08:58:42 Ashiren: Is there any help? Sep 15 09:04:29 cnbleu: zcat logcat.gz Sep 15 09:05:23 Ashiren: 'zcat: can't stat: logcat.gz (logcat.gz.Z): No such file or directory', but the file is there.... Sep 15 09:05:38 oO Sep 15 09:05:43 or gunzip Sep 15 09:06:04 Ashiren: Or '/system/bin/sh: zcat: not found' in adb shell Sep 15 09:06:15 gunzip not works well Sep 15 09:06:24 ah you mean in android Sep 15 09:06:31 well, android bash is limited Sep 15 09:06:39 uh,, ys Sep 15 09:06:52 normally i would move the file to the computer and read it in computer Sep 15 09:07:01 Yes, i want exec that command in my application Sep 15 09:08:15 Ashiren: There is another problem: i can't stop the process whitch run 'logcat -v tim | gzip > logcat.gz' in my adb shell Sep 15 09:08:46 i guess, this is the 'can't read' reason Sep 15 09:09:31 And i try read the logcat.gz file on my Mac with command 'gzip -d' 'zcat' 'gunzip' Sep 15 09:09:43 not works! Sep 15 09:10:15 ps | grep logcat and then kill PID Sep 15 09:10:28 ok Sep 15 09:13:31 Ashiren: i can't kill the logcat id. Sep 15 09:14:56 i will try another resolvent Sep 15 09:15:10 my activity extends a base activity class which has protected MyApi getTheApi() { return getApp().getApi(); } in it.. Im trying to access it from a fragment in the activity but it cant find it :( getActivity().getTheApi doesnt work Sep 15 09:15:33 but i can do getTheApi.. in the activity Sep 15 09:15:59 IJNX: And that links you post above, not works as well. Sep 15 09:16:21 ok Sep 15 09:16:22 cnbleu: you can pipe it through gstdbuf(on osx) Sep 15 09:17:39 logcat: i have no knowledge about gstdbuf, but i will try. Sep 15 09:19:26 thornekey: The Activity you 'getActivty' from your fragment may not your base activty. try '((your base activity) getActivity).getApp().getApi())' Sep 15 09:19:58 cnbleu, oh, but the activity im getting it from extends base activity (does that not link it?) Sep 15 09:20:09 ill try that though Sep 15 09:20:41 getActivity() returns the base base Activity, which doesnt have getApi() Sep 15 09:20:45 you have to cast it yourself Sep 15 09:20:53 oh i see Sep 15 09:21:14 Yes, Ashiren right. Sep 15 09:21:51 how do i cast it though when BaseActivity isnt public Sep 15 09:22:37 These days, i develop a new app whtich run some custom machine. After a long time works, my app crash with ANR, but i can't find the reason, so i want lot the logcat infomation. Sep 15 09:22:56 Ashiren, i just made the base activity public and the method static Sep 15 09:24:05 make getApp method public Sep 15 09:24:17 thornekey: Sep 15 09:24:30 umm making things static isnt good way to solve this.. Sep 15 09:25:46 ok Sep 15 09:25:48 Hmm Sep 15 09:26:51 Ashiren, i removed the static but left it public Sep 15 09:31:28 good for yo Sep 15 09:31:29 u Sep 15 09:31:44 not really cos now it says it needs to be static again :( Sep 15 09:32:30 hi guys, I am writing an app with Firebase and added a ChildEventListener to o node. One of the children is supposed to be a Map... but how can I convert the value I am getting to that list: {0={name=Default cateoory, lastChange=1473762098807, color=#DDDDDD}} } Sep 15 09:33:08 each of the inner brackets is an object of Category (in this case there is only one but might be multiple) Sep 15 09:53:04 Passing an arrayList to a ImageAdapter class. The position value is for some reason going up to one more time then the list size Sep 15 09:53:36 So i have to manually pass the size to add an if statement Sep 15 10:15:24 Hi guys - what is the normal process if you've got a dynamic list view, and you want to click on an item to see more details? Sep 15 10:15:42 like say I have List<> of objects, i want object.getName() to be the name shown on the listview Sep 15 10:15:51 but when you click on it, then you see more details from that object Sep 15 10:16:03 should this all be done in the one activity? Sep 15 10:16:14 or should I pass intents with the object to another activity or something? Sep 15 10:17:03 you mean its expandable? Sep 15 10:17:08 or new window/dialog Sep 15 10:18:46 you have to make the type of object you're making a list of, implement Parcelable Sep 15 10:18:51 so that you can send it between activities Sep 15 10:19:11 once there, you can just get(position).getName() or any other get() you want on the object Sep 15 10:19:40 so you say intent.putParcelableArrayListExtra("my_list_of_objects", thatList): Sep 15 10:20:33 <_genuser_> do you guys do image editing? user selects profile and you let him/her select a square piece or something to crop out the rest? Sep 15 10:21:24 well this is interesting, relativelayout with an in it and elements that want to be layout_below="@id/some_id_in_the_included" works in one layout but not another which is essentially equivalent Sep 15 10:23:52 that is, if I make a copy of the layout with another name and it fails in aapt Sep 15 10:24:21 with one layout that has the included layout it works but if there's more it breaks saying that it can't find the id Sep 15 10:25:12 Ashiren: I mean if you tap and item I want it to like, slide into another listview Sep 15 10:25:31 new activity is one way Sep 15 10:25:42 so maybe if you tap on the first one, then i want to see a listview of object.getSubItems() Sep 15 10:26:48 0daym, yep i have used parcelable before. i was just questioning the UI side of things on this one Sep 15 10:27:01 like whether fragments or activities is advisable Sep 15 10:27:11 that sort of thing Sep 15 10:30:36 in my mind i'm thinking the user taps the list item, and then that listview slides / transitions left until it's out of view and the new ListView appears Sep 15 10:44:40 What would be the best way to store an ArrayList. Not allowed to use anything over the Android java code, so cannt import gson or anything Sep 15 10:45:19 And what's inside the arraylist? Sep 15 10:45:23 And store where_ Sep 15 10:45:25 ? Sep 15 10:45:42 a bunch of Uri's Sep 15 10:45:48 On the device Sep 15 10:46:28 I suppose i could cheat and throw it into a database easily Sep 15 10:46:35 Just store them in a text file, one uri per line? Sep 15 10:46:43 Or put it in db? Or shared prefs? Or pretty much anwthere? Sep 15 10:47:46 or use ObjectOutputStream/ObjectInputStream Sep 15 10:47:56 That's horrible :) Sep 15 10:48:56 Might just cheat and put them in the database, or quickly learn writing to textfiles Sep 15 10:50:20 Does projects located in platform/external have separate subforums or is it discussed here as well? Sep 15 10:51:30 huh Sep 15 10:57:43 Ben2560: you could ask the user to kindly remember them. Isn't that an innovative idea? Tell them it's a exercise for mnemonic development and it will boost their IQ. Sep 15 11:10:46 arancio: Telling my tutor who will marking my assignment that will be entertaining haha Sep 15 11:11:06 I pretty much have everything to a HD level now, just need to add google maps into it tomorrow for the last 5% Sep 15 11:34:41 Ben2560: what's a "HD level"? Sep 15 11:37:32 Could anybody help me to understand why the RecyclerView in this Fragment is not displaying anything? http://pastebin.com/2LBf6zZQ Sep 15 11:40:41 arancio, pastebin list_item.xml Sep 15 11:40:58 and fragment_history.xml Sep 15 11:41:43 Zharf: thanks for solving my problem. Sep 15 11:41:49 o.O Sep 15 11:41:53 :D Sep 15 11:42:35 I switched to the list_item.xml tab and there was a LinearLayout without orientation. I set it to "vertical" and it fixed my problem Sep 15 11:42:41 So really thanks Sep 15 11:42:48 figures :) Sep 15 11:43:48 hi there Sep 15 11:43:49 I need to create an app that monitors, what websites user is visiting, website's referrer and time spent on each website. Sep 15 11:43:49 Could someone please guide me, how this could be achieved and where should I start looking? Tnx Sep 15 11:44:31 you can't really without being the browser itself Sep 15 11:45:08 can't I monitor the network ? Sep 15 11:45:19 not without being root Sep 15 11:45:36 don't apps have a root access? Sep 15 11:45:41 no Sep 15 11:46:44 can I monitor which apps were being used? Sep 15 11:47:43 there was getRecentTasks() until 21 Sep 15 11:48:24 https://developer.android.com/reference/android/app/ActivityManager.html#getRunningAppProcesses() and this may be useful Sep 15 11:49:16 also I could get information about user visited websites by accessing browser's browsing history, am I right ? Sep 15 11:50:18 external browser history? no Sep 15 11:50:37 it'd depend on the browser and if it exposes it's history Sep 15 11:51:33 android itself doesn't really take part in that Sep 15 11:52:51 as I understand chrome does expose it's history Sep 15 11:52:57 and chrome is main browser for android Sep 15 11:54:16 <_genuser_> so the default theme colors are dictated by API level? Sep 15 11:54:41 _genuser_, not if you use appcompat like you should Sep 15 11:54:49 <_genuser_> or does each vendor create their own theme? Sep 15 11:55:15 <_genuser_> Zharf: yep, using appcompat. AS creates the base acvitities off the templates. Sep 15 11:55:33 <_genuser_> but still I see each new API version there's a new favorite color for appbar, etc. etc. Sep 15 11:58:43 skuaskua, https://code.google.com/p/android/issues/detail?id=200685 Sep 15 11:59:34 <_genuser_> brb, rebooting Sep 15 12:21:05 thepoosh http://i.imgur.com/JdoVJvR.jpg Sep 15 12:22:33 lolz Sep 15 12:35:45 <_genuser_> geez, that was a long reboot. Sep 15 12:36:21 <_genuser_> Zharf: you still around? ok, so the appcompat has the Light/Dark theme declarations, and ideally one should use those, is that it? Sep 15 12:37:41 pick one of the appcompat themes and extend upon it Sep 15 12:38:36 you'll get a similar experience on all api levels Sep 15 12:41:38 <_genuser_> Zharf: I see. The Android studio default AppTheme does just that. So I guess I should always work on extended AppTheme and add to it. Sep 15 12:41:54 yes Sep 15 12:42:26 well you can directly modify the apptheme it generated for you of course Sep 15 12:43:56 <_genuser_> Zharf: yep, that's what I did. then I started adding to it. Sep 15 12:44:19 <_genuser_> Zharf: the mistake, however, was that I started applying themes/styles and drawables directly to UI elements in some activities. Sep 15 12:44:53 <_genuser_> Zharf: when I have some downtime, I'll find out what the default style is and then override that in the AppTheme and remove it from UI elements in xml layouts. Sep 15 12:45:35 _genuser_, I think pretty much all view styles also have a corresponding appcompat style you can extend on Sep 15 12:45:51 just make sure to try to use those instead of platform provided ones Sep 15 12:49:46 <_genuser_> Zharf: yeah, I kinda just went nuts in creating elements, extending those style elements, and then applying them directly to UI elements. Sep 15 12:50:03 <_genuser_> Zharf: it's fine, but if I wanted to create a new theme and swap it out, major hassle. Not a single line change. Sep 15 12:51:57 <_genuser_> Zharf: so outside of appcompat, each api level ships with it's own default, etc. etc, is that correct? Sep 15 12:53:35 yes Sep 15 12:53:50 There's @android:style/Theme, @android:style/Theme.Holo, @android:style/Theme.Material and some subthemes of those Sep 15 12:54:28 <_genuser_> ah, as much as I try to pigeonhole this thing into a corner, there's a bigger view to consider. Sep 15 12:54:51 <_genuser_> Theme.Material might be of interest to look at, since I do like material design look very much. Sep 15 12:55:10 AppCompat is pretty much replication of Theme.Material Sep 15 12:55:31 but in a backwards compatible way Sep 15 12:55:52 <_genuser_> ok, that's good. And besides appcompat stuff is going to give the benefit of so many other devs' work in trying to ensure a smooth experience. Sep 15 12:56:23 If you want your app to look the same on all android versions, always use the Appcompat variant of everything. (e.g AppCompatActivity instead of Activity) not just the theme Sep 15 12:57:04 <_genuser_> have you used a profile image cropping type widget before? I load a user select profile image and it lets you do the area selection and you can crop the rest. Sep 15 12:57:24 <_genuser_> ktwo: I think android studio by default starts off on that note, and I leave everything I see to appcompat Sep 15 12:58:05 in AS, how can i move the caret to the next word (with commas and braces etc not counting as words) ? Sep 15 13:01:34 ktwo, appcompatactivity, sure, but it's not necessary to use appcompat widgets for most things as it does some magic to replace them as needed Sep 15 13:03:28 But using them eases some things when methods are not available for older apis, so you prevent a lot of (if api < 17) stuff Sep 15 13:06:29 sure, I just can't think of any widget where that would be the case Sep 15 13:06:45 or specifically a method of a widget Sep 15 13:07:55 <_genuser_> so no experience with cropping profile images? I'm thinking of just coding it up in a custom widget. Sep 15 13:08:12 <_genuser_> lot of what I see on SO or google it just riddled with "but this doesn't work" comments. Sep 15 13:12:21 Zharf, Button vs. AppCompatButton, the latter offers methods like setSupportBackgroundTintMode for example which is available in all api's while the default one is only api21+ (but there are some other cases as well) Sep 15 13:18:13 I guess I've never used that Sep 15 13:25:20 <_genuser_> lol, I have if(insidebounds) toast("inside") else toast("inside"); Sep 15 13:25:36 that'l do it Sep 15 13:25:44 <_genuser_> and I just spent 30minutes debugging why the inside/outside situation isn't getting detected properly, only to realize it's the print message that's wrong. Sep 15 13:37:25 do people debug with toasts often? Sep 15 13:38:01 why toast when you can logcat? Sep 15 13:38:12 yeah Sep 15 13:43:16 sometime I use toast to see what's going on in the UI Sep 15 13:51:18 <_genuser_> yay, I got a scrolling rectangle drawn on an image. I jsut need to resize it and then pos the coordinates back to the caller. Sep 15 13:51:29 <_genuser_> then bam cut the image into a smaller size and done. Sep 15 14:08:09 Should the SQLite type "TIMESTAMP DEFAULT CURRENT_TIMESTAMP" actually define a column of type TIMESTAMP that is initialized to the current timestamp when the row is created? Why I get all timestamp set to January 1st 1970? Sep 15 14:22:01 where am i going wrong on this camera thing ? http://hastebin.com/egeloxagif.java Sep 15 14:22:16 I was following the google docs , and some things I've seen on SOF Sep 15 14:22:51 arancio: It should, can you paste your table creation? Sep 15 14:22:51 some reason it doesnt reach my log's to make the galley image and I cant find the image in droid monitor storage Sep 15 14:25:29 arancio: Did you drop your table before creating the new one? Sep 15 14:26:24 barq: Here is the creation query: http://pastebin.com/L0GSSnrD Sep 15 14:27:05 barq: I never dropped the table but I think I created the table with this query from the origin. I never changed it Sep 15 14:27:14 from the beginning Sep 15 14:29:24 arancio: Check the schema of the db Sep 15 14:29:56 barq: I have pull the file from the emulator, right? Sep 15 14:30:13 You can check on the device if your device is rooted. Sep 15 14:32:08 barq: it's not rooted. I can't find the database file in "storage". I have to google the location. 1 min Sep 15 14:32:44 data/data Sep 15 14:33:04 yes Sep 15 14:36:47 barq: it looks like it's correct: http://pastebin.com/nzum0AWL Sep 15 14:38:58 How are you reading the date from the database? Sep 15 14:39:16 barq: thanks for making me do that. I performed a query on the table and the timestamp are ok. The error must be in the Java part Sep 15 14:39:32 I would hazard a guess you are using getData instead of getString Sep 15 14:39:36 getDate* Sep 15 14:39:55 ok. I'm using get int Sep 15 14:40:03 Try getString Sep 15 14:40:07 And then parse your date Sep 15 14:41:13 hi Sep 15 14:44:25 how i can make my statusbar translucent ? Sep 15 14:44:54 and my drawer under status bar Sep 15 14:47:38 arancio: Any luck? Sep 15 14:48:10 barq: I'm fixing the SimpleDateFormat. 1 minute Sep 15 14:48:47 barq: with getString() I get the date correctly, anyway. I thought the timestamp was a integer storage Sep 15 14:48:50 man, my nexus 9 is hurting on ram so hard Sep 15 14:50:21 arancio: Everything is stored as String in Sqlite Sep 15 14:50:34 O.O Sep 15 14:52:11 barq: everything is working now. Thanks very much Sep 15 14:53:02 no problem Sep 15 14:57:24 Hello, I try to get mimeType for XLSM files, but i just returns null Sep 15 14:58:09 I can cheat and say type = "application/vnd.ms-excel.sheet.macroEnabled.12" if extension is xlsm, but... Sep 15 14:58:32 how can this extension be unknown by Android ? Sep 15 15:05:22 huh? Sep 15 15:07:40 Does anyone used matrix.mapRect if so can you use it to translate rotate a Rect Object? Sep 15 15:17:27 I did not but what's the issue Emmanuel_, the documentation is pretty clear about it Sep 15 15:24:37 adq: Thanks for the reply. I'm trying to rotate a Rect Object using matrix using this : canvas.drawBitmap(bitmap,Rect src,Rect dst,paint) the dst is the one to translate and rotate Sep 15 15:25:33 adq:I tried rotating the canvas but didn't gave me good result Sep 15 15:29:48 hehe, here's an odd one for you all. catch (Exception E){ Log.e("EXCEPTION", E.getMessage()); } with my app is failing on the E.getMessage() call saying "println needs a message" I presume that's likely that the thing that caused the exception doesn't throw back a message? Sep 15 15:30:38 adq: Thanks for the reply. I'm trying to rotate a Rect Object using matrix using this : canvas.drawBitmap(bitmap,Rect src,Rect dst,paint) the dst is the one to translate and rotate << that's not how you should do it Sep 15 15:31:35 if dst and src are not at the same position, this will put the bitmap in the position of dst, and if the dst and src are different size this will (down/up)scale the output Sep 15 15:32:29 either you use canvas.translate and canvas.rotate, either you use matrix rotate & translate (post or pre, up to your need) Sep 15 15:33:09 <_genuser_> I have a Color var that I'm trying to assign argb values. Sep 15 15:33:30 <_genuser_> but Color.argb() returns a color-int. Can I create a Color var with a given argb values? Sep 15 15:33:36 you have lot of Color.{methods} for that Sep 15 15:34:16 like Color.argb(a,r,g,b) Sep 15 15:34:20 which will give you an int Sep 15 15:34:37 <_genuser_> adq: right https://developer.android.com/reference/android/graphics/Color.html Sep 15 15:34:51 <_genuser_> so it shows it will give an int. Can I store that in a var of type Color? Sep 15 15:35:17 <_genuser_> private Color cropperBackground=Color.argb(99, 185, 0, 185); Sep 15 15:35:31 Color is a class, not really a type, more an object if declared Sep 15 15:35:43 look the source of Color.class it's tiny Sep 15 15:35:55 you will see how they do Color.RED for example Sep 15 15:36:05 but you should not need that i believe Sep 15 15:36:45 <_genuser_> private Color cropperBackground=Color.argb(99, 185, 0, 185); < that will not work for sure Sep 15 15:36:54 <_genuser_> so you recommend I store my custom color as int that Color.argb() returns? Sep 15 15:37:04 <_genuser_> yeah, that complains and asks me to turn it to an int. Sep 15 15:37:09 look what they did internally: Sep 15 15:37:13 @ColorInt public static final int RED = 0xFFFF0000; Sep 15 15:37:19 that's how they give you Color.RED Sep 15 15:37:42 yeah i recommend you store your custom color as an int Sep 15 15:37:47 0xAARRGGBB Sep 15 15:38:15 <_genuser_> hmm, the only other question would be: I have custom attributes for my widget. in the attrs.xml the attribute is of type color, I wonder if I it passes me the color in an int. Sep 15 15:38:40 i don't recall exactly for attrs, sorry Sep 15 15:38:58 doesn't it take a @color/yourcolor? Sep 15 15:39:27 cause a third way would be to store your predefined color in xml if you on't plan to retrieve them from code but more from xml side Sep 15 15:40:23 <_genuser_> adq: yep, I will have a color in colors.xml. Assign it in layout.xml as app:cropperColor="@color/mycolor" but then in the constructor in attrs bundle, I'm hoping it passes it as an int. Sep 15 15:40:32 <_genuser_> no need to worry to much, I suppose. just build it and see. heh Sep 15 15:40:44 ^^ Sep 15 15:42:33 <_genuser_> heh, got tired of googling or a profile image resizer type widget or code. figured it would be easier to just write it. Sep 15 15:42:34 if the variable result is boolean, there's no problem with doing if(!result) is there? Just I am testing out Upsource, and it's saying I can't do that, yet IntelliJ doesn't say anything Sep 15 15:42:57 of course there is no pb, sdousley Sep 15 15:43:20 adq: didn't think so, cos it all works, I guess it's just Upsource being a little picky/not got it's settings quite right Sep 15 15:43:47 well, i don't know "upsource" but maybe it's not parsing java to say that? Sep 15 15:44:06 Upsource is a code review tool made by JetBrains Sep 15 15:44:15 Just playing around with it Sep 15 15:45:06 doesn't seem trustful if it cannot handle properly a simple boolean condition Sep 15 15:45:50 yeah, and this was just the first random file I have looked into! Sep 15 15:45:59 has kinda put me off using it Sep 15 15:47:21 result is boolean right, not "Boolean"? Sep 15 15:47:38 i mean the primitive type versus the little Class Boolean Sep 15 15:48:09 hello devs Sep 15 15:48:25 result is setup as: Boolean result = .... Sep 15 15:48:42 ah! Sep 15 15:48:48 now it makes more sense sdousley Sep 15 15:49:01 should that be boolean result = ... ? Sep 15 15:49:03 you said originally "boolean" but i doubted as you can see, and now you might even get why Sep 15 15:49:33 it depends, if it's a result from a method in a lib you did not make, or if it's entirely your code Sep 15 15:49:44 if it's entirely your code, it should probably be the primitive type "boolean" Sep 15 15:50:04 so finally, upsource is not doing stupid thing afterall Sep 15 15:50:13 it's a call to an asynctask that I created Sep 15 15:50:25 public class MyTask extends AsyncTask { Sep 15 15:50:35 <_genuser_> values such as 5dp, etc. these are dimensions, correct? Sep 15 15:50:39 <_genuser_> borderwidth, etc. etc. Sep 15 15:50:53 long time i did not use Asynctask tbh, but i remember there was a habit to use Integer instead of int, etc Sep 15 15:50:59 because result could be null(able) i believe Sep 15 15:51:23 <_genuser_> oh the days of using asynctask. argh Sep 15 15:51:29 <_genuser_> values such as 5dp, etc. these are dimensions, correct? < not dimensions, but size or length Sep 15 15:51:31 I just tried changing that class declaration to and it says you can't use primitive types there Sep 15 15:51:41 yes Sep 15 15:51:58 so do I leave that like that, but when I call it do boolean result = ... Sep 15 15:52:19 you can always convert your Boolean into a boolean Sep 15 15:52:21 true or false ;) Sep 15 15:52:25 there is a getter iirc Sep 15 15:52:44 but you should test is result (as a Boolean) is null first Sep 15 15:53:43 OK, changing that, it's not complaining in Upsource now :) Sep 15 15:57:09 <_genuser_> dang, how much I hate create property getter/setters Sep 15 15:57:26 <_genuser_> if you think I'm complaining... it's becuase I am. Sep 15 16:03:05 <_genuser_> awesome!! widget taking attributes from xml layout! Sep 15 16:05:39 Is there a SEO/ad benefit to having your app be automatically redistributed by random companies? Sep 15 16:06:37 anyone using fastlane around here? Sep 15 16:24:53 _genuser_: you can generate getters/setters you know Sep 15 17:22:15 GCM makes ASP.NET first class citizens :O Sep 15 17:23:48 ah, ok "Coming soon: support for ASP.NET Core" <-- what i was wondering about Sep 15 17:27:02 Hmm, so I have copied an sqlitedatabase from internal storage to external storage which has gone to /storage/emulated/0/ - which this should be the sd card, but i'm unsure if this actually is the case? Sep 15 17:27:14 I want to be able to then copy the database from the sd card once i've put the sd card in my computer Sep 15 17:27:25 *copy the database on the sd to my pc Sep 15 17:27:36 but I can't see it there -.- Sep 15 17:29:49 are you sure this is sdcard Sep 15 17:30:00 sometimes there are more "external" storages Sep 15 17:41:05 aah Sep 15 17:41:11 maybe Ashiren Sep 15 17:48:48 virtual files in SAF in Android N are pretty neat Sep 15 17:48:56 we need a support SAF Sep 15 17:49:17 g00s: !!! Sep 15 17:49:22 thepoosh ! Sep 15 17:49:29 SSAF :) Sep 15 17:49:42 s'all good Sep 15 17:49:45 and you? Sep 15 17:50:10 ok, doge hanging in there for now Sep 15 17:50:28 good enough for me Sep 15 17:50:30 thepoosh read any interesting articles Sep 15 17:50:35 meh Sep 15 17:50:41 lol Sep 15 17:52:20 thepoosh did you read that article the other day, on androiddev, about arrows Sep 15 17:52:46 http://www.glide.me/introducing-google-firebase-app-indexing-on-glide Sep 15 17:52:48 ??? Sep 15 17:53:30 thepoosh https://medium.com/@mttkay/reverse-your-arrows-86173bd4aae0#.3cl5dm21b Sep 15 17:53:54 is that someone talking about Liskov? Sep 15 17:54:52 nah Sep 15 17:55:16 well at the end he mentions CQRS Sep 15 17:55:38 i've been thinking about event sourcing too, but most discussion is not related to mobile Sep 15 17:55:47 thepoosh great news on the glide feature Sep 15 17:56:25 that is what i was doing in the past 3.5 months Sep 15 17:56:28 hope to have my app converted from GA to firebase this week Sep 15 17:56:36 great work thepoosh :D Sep 15 17:56:55 gl Sep 15 17:57:16 raoul11 can tell you all about it after meeting with pr0n name fontain foxworth Sep 15 17:58:12 gotta run thepoosh , bbiab Sep 15 18:07:39 there are days i hate RelativeLayout Sep 15 18:12:45 <3 fontain thepoosh Sep 15 18:12:53 xximjasonxx: dont be a h8r, be a lover. Sep 15 18:13:01 trying really hard :-D Sep 15 18:13:15 why would anyone hate relativelayout?! Sep 15 18:13:18 it's amazing Sep 15 18:13:41 thepoosh: kind of why i implied the hate is only relevant on certain days Sep 15 18:14:01 still one of the best layout ever Sep 15 18:14:27 it is, but some days :) Sep 15 18:15:55 on a happier note Sep 15 18:16:04 eagerly awaiting getting my hands on the Pixel XL Sep 15 18:16:48 my Droid Turbo is on its last leg. Also means I can finally say FU to Verizon :) Sep 15 18:16:52 Getting on the Fi train Sep 15 18:22:27 Hi all what is the best way to handle Bitmaps in Android. I have been getting lots of Out of Memory errors even after compressing images. Sep 15 18:22:34 ha Sep 15 18:22:40 InSampleSize on your options Sep 15 18:22:45 i literally fought this just yesterday Sep 15 18:23:00 droidace: using a byte[]? Sep 15 18:24:15 droidace: the best way is probably to use a good library Sep 15 18:24:27 like glide or UIL Sep 15 18:26:07 ah I use picasso Sep 15 18:28:22 Picasso is good Sep 15 18:28:29 i will try Glide maybe Sep 15 18:28:30 do you add flags for autoscaling images? Sep 15 18:28:44 Glide's good part is the gif support Sep 15 18:28:59 @thepoosh nope I never even thought about adding flags Sep 15 18:29:39 http://square.github.io/picasso/ Sep 15 18:29:46 check the resizing part Sep 15 18:30:25 wish i had known about that yesterday Sep 15 18:30:32 have to be something we add in later :) Sep 15 18:30:35 ha! Sep 15 18:30:56 thanks Sep 15 18:31:10 np Sep 15 18:31:55 question, there should not be a problem with using MipMaps in spannablestrings, yes? Sep 15 18:41:19 if anyone has an answer to that question i would love to hear it Sep 15 18:41:59 what is the connection between mipmap files and spannavles? Sep 15 18:44:14 i am trying to output a string with an image (drawable/mipmap) in it. For an icon Sep 15 18:58:58 Does anyone know if Android’s UUID class 100% guarantees uniqueness? You’d expect it to, but I want to be sure before I rely on it Sep 15 19:00:17 xximjasonxx: use drawableLeft or drawableRight Sep 15 19:00:48 konk3r: documentation said it's not 100% but should be considered as such since collision is virtually not existing Sep 15 19:01:59 thepoosh: i know thats what i ended up doing yesterday Sep 15 19:02:05 its more of a curiousity Sep 15 19:02:18 the answer is no Sep 15 19:02:22 it won't work Sep 15 19:02:25 ok Sep 15 19:02:30 just curious Sep 15 19:02:31 spannable strings are for strings and spans Sep 15 19:02:35 not for images Sep 15 19:02:38 what about ImageSpan ? Sep 15 19:03:50 meh Sep 15 19:03:53 don't trust it Sep 15 19:03:55 lol Sep 15 19:04:06 yeah, it seems that it doesnt work. though i have seen examples online which claim to work Sep 15 19:04:11 emoticon replacement mostly Sep 15 19:10:16 thepoosh: Thanks Sep 15 19:13:32 <_genuser_> hey guys. Sep 15 19:14:04 <_genuser_> I'm just about finishing up a widget that let's you select an image area to crop. Like you can in facebook, linkedin, etc. when yous elect a profile. Sep 15 19:14:28 <_genuser_> is that something that many people use? I might put the end thing on github or make a gradle usable package... Sep 15 19:15:00 heh Sep 15 19:36:50 publish it as an aar or. don't bother :p Sep 15 19:38:04 <_genuser_> pfn: aar? does that go in gradle as compile ''; dep? Sep 15 19:39:27 yes Sep 15 19:39:54 <_genuser_> pfn: yeah, I like that. who has time to copy class files, or download .jars and import into projects. Sep 15 19:40:17 if it's not easy to use, it. won't get used Sep 15 19:41:20 <_genuser_> pfn: as is, just declare it in xml layout ProfileImageSizer, configure it, and I'm adding the .crop() function. hopefully should workout as a very eash to use cropper. Sep 15 19:46:04 Hey Sep 15 19:46:33 Is it possible to overlay camera control options over a surfaceView for a camera app? I can't seem to find too much content about it online Sep 15 19:47:31 <_genuser_> controls? like snap "take picture" button, etc? Sep 15 19:48:09 More like "enable flash" etc Sep 15 19:48:20 but yeah, "record", "stop" as well Sep 15 19:48:25 it's primarily video only, no pictures Sep 15 19:48:32 <_genuser_> Use FrameLayout, you should be able to do it. Sep 15 19:49:02 <_genuser_> http://stackoverflow.com/questions/29072946/how-do-i-create-overlay-button-in-my-android-layout Sep 15 19:49:52 Ah okay awesome thanks Sep 15 19:50:13 they're suggesting RelativeLayout mostly Sep 15 19:50:24 <_genuser_> framelayout everythign just start top left, from what I understand. Sep 15 19:50:29 <_genuser_> so they're all on top of each other. Sep 15 19:50:46 I've never really understood that one, should probably do some reading on it Sep 15 19:50:49 thanks for the link :) Sep 15 19:50:54 <_genuser_> so if you lay them out aligned to different edges, and different controls, you can build a layout and have things on top of each other. Sep 15 19:50:57 <_genuser_> sure. Sep 15 19:51:15 essentially I want to create a frame around the video preview Sep 15 19:51:28 and lay the buttons on that frame Sep 15 19:56:34 Is it common for phones/tablets to not have file explorer apps preinstalled? Sep 15 19:56:51 I've personally never seen one not being preinstalled, but can't find anything on my google tango tablet Sep 15 19:57:44 konk3r there is a web service for unique UUIDs Sep 15 19:57:50 if its that important to you ;) Sep 15 19:58:27 <_genuser_> Faizan: framelayout child 1 preview-surface, child 2 Linearlayout (with all teh buttons inside this). Sep 15 19:59:16 ah okay that makes sense _genuser_ Sep 15 19:59:44 <_genuser_> ok, back to figuring out how to crop the dang bitmap! Sep 15 19:59:48 <_genuser_> almost done with this. Sep 15 20:03:24 Thanks g00s! I think I’m just going to push it to our server on registration, this doesn’t really feel like it should be handled locally Sep 15 20:06:30 ugh - suddenly by bottom navigation bar is being obscured by the soft button bar Sep 15 20:06:33 *my Sep 15 20:06:53 only when i navigate to a particular fragment Sep 15 20:16:04 <_genuser_> somedays I hate the internet. Sep 15 20:16:18 <_genuser_> I almost finish my widget and then find a free one that already does that! Sep 15 20:26:02 hey Sep 15 20:26:21 trying to understand the interaction between ActionBars and Fragments Sep 15 20:26:25 well Toolbar Sep 15 20:26:43 if I create a toolbar in a fragment, how can I inflate menu for it? Sep 15 20:26:45 can i even? Sep 15 20:46:08 xximjasonxx Toolbar#inflateMenu Sep 15 20:53:16 Duplicated: no, thanks. We already have the original Sep 15 20:53:30 hah Sep 15 20:54:55 I guess this is how a new guy is welcomed around here ._. Sep 15 20:55:43 welcome Duplicated Sep 15 20:56:08 missingno hi! Sep 15 20:57:36 I'm still learning from the BNR book, is it a good idea to finish the book cover to cover first before I move on to some other resources (udacity courses/Google's own tutorials)? Sep 15 21:05:24 Duplicated, It would be a good idea to finish the book. Is it important to strictly finish it before looking at any other resource? no, probably not. Sometimes if you are stuck or want to approach a problem from another angle, it is a good idea to use different resources Sep 15 21:06:45 Duplicated i'd finish the (interesting) parts of the book, and build upon that with some experience before another book Sep 15 21:07:00 alternate theory / experience Sep 15 21:10:35 Duplicated: I was joking. Yes, take it as a welcome because you are welcome, indeed. :-) Sep 15 21:12:18 Duplicated: I read BNR from cover to cover. Now I'm jumping between chapters of "The Busy Coder's ..." Sep 15 21:13:06 Duplicated w/o experience or practice, you get no feedback ;) Sep 15 21:20:54 btw, arancio, the websearch I showed a few days ago, Sep 15 21:21:12 *ircsearchwebthingy Sep 15 21:21:26 I rewrote most of it to make it ten times faster: https://dl.kuschku.de/videos/2016-09-15_21-59-28.mp4 Sep 15 21:21:29 source is on github Sep 15 21:21:32 hey guys, seeing something weird. When I load up my first fragment Sep 15 21:21:44 everything looks fine, when i replace into the container Sep 15 21:21:54 xximjasonxx there really is no such thing as 'weird' with fragments :) Sep 15 21:22:13 justJanne: I don't know what you are talking about... Sep 15 21:22:24 g00s: yeah, except it gets cut off by the soft action bar button Sep 15 21:22:31 arancio: did I mix you up with someone then? Sep 15 21:22:32 ugh Sep 15 21:22:37 brb, gonna check the log Sep 15 21:22:44 so basically, first view looks fine, click the cardview we got to fragment #2 Sep 15 21:22:48 Probably. Sorry. :-) Sep 15 21:23:00 ah, it was Afzal! Sep 15 21:23:00 and its pushing underneath the soft action button bar Sep 15 21:23:03 not you Sep 15 21:23:09 it was afzal? Sep 15 21:23:21 the one who asked why my IRC thingy is so material. Sep 15 21:23:25 oh Sep 15 21:23:27 lol Sep 15 21:23:36 see above, I rewrote it, with video, and source on github Sep 15 21:23:54 oh nice, looks nice! Sep 15 21:24:11 I hadn’t used it for weeks until I needed it to show you proof that I was wrong Sep 15 21:24:24 other people's browser looks so much smoother :( Sep 15 21:24:29 haha I see Sep 15 21:25:06 (and I used it this time again to find out who it actually was) Sep 15 21:25:24 hahaha Sep 15 21:25:25 nice Sep 15 21:25:35 It feels kinda like being a god just having magical search in front of you, kinda like when you used altavista the first time as kid Sep 15 21:25:57 lol Sep 15 21:25:59 I did Sep 15 21:26:28 so baffle by this Sep 15 21:26:49 makes me sad that we have no proper on-device search on android, or general global search Sep 15 21:27:01 no one thing to search every service, location, thing you even thought Sep 15 21:28:12 global searches are overrated imo Sep 15 21:28:42 justJanne When I was a kid, I just wanted a search engine to find things misplaced in the house Sep 15 21:28:53 Afzal: same here! Sep 15 21:29:02 still no viable tech for that :/ it's annoying Sep 15 21:29:15 a year ago, we had an issue with finding a kitchen cabinet we had forgotten about Sep 15 21:29:24 so we cleaned up, and I built a search engine for kitchen stuff Sep 15 21:29:26 could use sonar or something but noooooo, it's too expensive Sep 15 21:29:44 oh cool! how does that work? Sep 15 21:30:01 every product has an EAN code, when you buy something the EAN is on the receipt, so the app gets that stuff from bank statements or by scanning the receipt, Sep 15 21:30:15 when you throw things away, there’s a small webcam near the trashcan Sep 15 21:30:30 so it knows when you buy things, and when you throw them away, always keeping track of what you have Sep 15 21:30:43 long-term, RFID will be used, likely Sep 15 21:31:02 my family abandoned the system after a few weeks, though Sep 15 21:31:14 but for those weeks, I had an app on android and a website, and could do Sep 15 21:31:27 g00s arancio I do have prior experience with Java, but I can't decide which parts of the book is "interesting" lol Sep 15 21:31:33 stuff like automatic rules to add products to my wunderlist when they ran out, Sep 15 21:32:38 or "do we still have milk?" – "2l milk are available, best used by 18 SEP" Sep 15 21:32:54 that sounds pretty sweet Sep 15 21:35:01 I used the EAN -> product + photo + price backend from a local grocery store’s app, and a simple ZXing barcode scanner app, with a simple postgres backend and a small service written in grails Sep 15 21:37:58 "Consumer Product Safety Commission issues an official recall for the Galaxy Note 7" Sep 15 21:38:02 ouchies ! Sep 15 21:40:04 Totally missed your response truckcrash, thank you though Sep 15 21:47:28 anyone know if something changed with the webp compression on nougat? Sep 15 21:49:15 so i am still seeing this rather strange issue with fragment Sep 15 21:49:43 the new fragment is pushing the host frame heightwise Sep 15 21:49:55 and its pushing the bottom navigation bar halfway off the page Sep 15 21:50:03 are you using .replace() or .add() ? Sep 15 21:50:16 if i use a coordinatorlayout i can fix it, but my toolbar is then halfed Sep 15 21:50:19 replace Sep 15 21:52:04 a quick fix would normally be to just do a linear layout for the actionbar, but i need the context menu support Sep 15 21:53:04 if anyone has any suggestions, please do not hesitate Sep 15 21:58:07 Any recommendations for video player libraries other than ExoPlayer? Sep 15 21:59:52 No reason to doubt Exo, I'm just wondering what else is out there. Sep 15 22:10:22 "All of the samples the FDA tested in a recent examination contained glyphosate residues, and some of the honey showed residue levels double the limit allowed in the European Union" Sep 15 22:10:33 i keep thinking , it would be good to live in the EU Sep 15 22:34:14 hey guys, i am trying to change teh color of the overflow elipssis in my toolbar Sep 15 22:34:22 cant seem to find the right style attribute. anyone know what it is off hand? Sep 15 22:40:41 imjason: android:actionOverflowButtonStyle Sep 15 23:50:10 Looking for some advice... I have a free/paid app. The free app has in-app purchases and generates hardly any revenue. The paid app does pretty good. I am considering removing the free app from Google Play to see if it affects purchases of the paid app. If I decide to unpublish the free version, when/if I republish, will I lose my ranking or would it have any other disadvantages? Sep 16 00:12:51 surf2b1 there should be a way to answer that question without nuking one product Sep 16 00:16:36 surf2b1, I think you can remove it from the listing w/out deleting it Sep 16 00:16:47 if you delete it, it's properly gone Sep 16 00:18:59 I have a very simple idea for an app and I would like to implement it on my own, but I am brand new to android. I would like to build an app that ships with a linux package and basically just runs the package. Is this easy to do? or do I have to build an app with the source code of the package I want to include (or something more complicated than just zipping up a package) Sep 16 00:20:44 dragorn, you can unpublish and republish apps. They are in your console forever. Sep 16 00:22:30 g00s, I was thinking of removing supported devices to test if removing the free version would bump sales. However, if you google for the app the free version is listed first and a user would get a device not compatible warning. So I was thinking of unpublishing for a week and seeing if it has any affect on revenue. Sep 16 00:25:17 i just watched a talk on demystifying rxjava subscribers, holy crap i can see the light Sep 16 00:25:19 are you assuming the free+iap is taking away from your total sales? Sep 16 00:26:10 parco, which one? Sep 16 00:26:11 hey g00s :) Sep 16 00:26:20 yo bitkiller Sep 16 00:26:38 g00s, finally getting to be a reasonable temperature, eh? Sep 16 00:26:45 bitkiller: https://vimeo.com/144812843 Sep 16 00:33:35 looks good Sep 16 00:55:08 dragorn, yes Sep 16 01:01:03 parco now get ready for rxjava 2 :D Sep 16 01:01:15 i still haven't converted stuff over yet Sep 16 01:10:18 dragorn yeah ! my dog who is struggling now, really likes the lower temp Sep 16 01:10:47 i think we have 1 more warm bump ahead tho Sep 16 01:34:50 wtf, Notification.Style DecoratedCustomViewStyle isn't in support-compat Sep 16 01:34:57 I need that shizit... Sep 16 01:37:13 https://code.google.com/p/android/issues/detail?id=204126 Sep 16 01:37:20 no movement since july... scrubs Sep 16 01:37:52 I guess I'll fallback to hacking on the notification object directly Sep 16 01:45:19 Where have you all seen the greatest cost/downloads ratio for adverts? Sep 16 01:45:42 Done a few reddit campaigns, works pretty well, but looking to try others. Sep 16 02:06:39 Hello, i am trying to use CardView in my app but it says "Cannot resolve symbol CardView" Sep 16 02:06:43 Stackoverflow says "Using Gradle or Android Studio, try adding a dependency on com.android.support:cardview-v7:21.+" Sep 16 02:06:47 But how do I do that? Sep 16 02:08:41 Where did you try Sep 16 02:08:57 i tried adding this to build.gradle - compile 'com.android.support:cardview-v7:23.+' Sep 16 02:09:06 oh, there's Notification.Builder.recoverBuilder(ctx, notification) awesome Sep 16 02:09:19 * pfn ponders what to have for dinner Sep 16 02:10:15 waffles and pork Sep 16 02:10:15 Stackoverflow suggested 21.+, where'd you get 23.+? There is more to this story... Sep 16 02:10:45 maybe I'll go have poutine again Sep 16 02:31:28 hey , I am cureently rading broadcast receivers , while i understood why use them for built in intents(like system boots) but regarding the custom ones , why should one use it , any practical examples ? Sep 16 02:44:11 Newbie question: Are there any particularly good resources for a dev who is converting over from the dark side (iOS)? Sep 16 02:44:19 I've seen a lot of guides going the other wayy Sep 16 02:44:24 same lol Sep 16 02:44:30 i recently went the other way Sep 16 02:44:33 now i do a bit of both Sep 16 02:45:17 inder_gt professionally or what? I've only got professional iOS dev experience but I'm more interested in Android and think it's the way forward generally speaking. Sep 16 02:45:40 I've done a few years of Java development but only in a scholastic setting. Sep 16 02:45:56 oh ya, professionally for me crowbahr, also i have always found big nerd ranch guides/books really helpful. Sep 16 02:46:23 Yeah I actually used a BNR book when I was getting into iOS Sep 16 02:46:30 What made you make the transition? Sep 16 02:46:55 got an iphone 6 months ago and a mac year ago, so fell into it naturally :) Sep 16 02:49:43 Gotcha, that makes sense. Sep 16 02:50:05 I just wish that there was a better guide for those who are going from iOS to Android. Android studio seems really powerful Sep 16 02:50:27 android studio is definitely better than xcode, altho xcode looks prettier Sep 16 02:50:31 It's just hard to take advantage of that when I'm used to the Visual builder system of xcode Sep 16 02:50:46 yup, most android devs go straight to xml Sep 16 02:50:47 Ehhh a bit. I despise xcode for a variety of reasons though. Sep 16 02:51:24 Fair enough. I have some experience with XML in a RESTful server sense but not really as using it for GUI building Sep 16 02:52:14 android studio will help with it , it will make sense after the first couple of times, i personally did the udacity course to learn it crowbahr Sep 16 02:52:25 that was how i built the first app Sep 16 02:54:59 So the udacity course is worth it? Sep 16 02:59:15 it was decent, i dunno if there's a better way to do it. It was sponsored by google and what not so it made sense **** ENDING LOGGING AT Fri Sep 16 02:59:59 2016