**** BEGIN LOGGING AT Tue Jul 12 02:59:58 2016 Jul 12 04:17:59 Do you guys prefer the "Project" or "Android" project view in Android Studio? Jul 12 04:19:49 udp works fine on mobile Jul 12 04:19:57 you just can't do p2p Jul 12 04:20:14 because of the nat problem Jul 12 04:27:04 surf2b1: both Jul 12 04:37:09 gordon_, what do you use the most? Jul 12 04:40:40 surf2b1: now android Jul 12 04:48:27 I just tried in the new Android Emulator... its eating up battery like hell :P within 10 minutes 51% to 14% on mac book pro. Jul 12 04:48:45 8) Jul 12 04:49:11 t2mkn: mac book pro guy great Jul 12 04:49:46 Article published on March 26, 2015 - "Studies Suggest Teens Getting Shut Out Of Workforce" Jul 12 04:49:54 Article published on July 3, 2015 - "More American Teens Are Getting Jobs. That's Good For Everyone" Jul 12 04:49:59 talk about a quick turnaround.. Jul 12 04:50:09 haha seems like, now i need an imac for using Emulator Jul 12 05:03:08 is it me or macbook ventilation system is.. poor ? Jul 12 05:03:31 when I sit in room without airconditioner it will die from heat Jul 12 05:03:56 but first you want be able to do anything, becaues cpu will drop it's speed gradualy Jul 12 05:14:35 Yo! CursorLoader is giving me StrictMode problems: A resource was acquired at attached stack trace but never released Jul 12 05:14:49 I thought the LoaderManager was supposed to deal with that? Jul 12 06:54:41 Anyone else trying to pull apart the Pokemon Go app to see what's inside? Jul 12 06:55:37 Sorry for the possibly dumb question, but how do I know where a UI Thread is? I'm trying to invalidate a view and it says it must be called inside a UI Thread. Jul 12 07:10:32 Bernzel: Looper.myLooper() == Looper.getMainLooper() - youre in UI Thread Jul 12 07:11:05 Thanks Ashiren Jul 12 07:11:12 generally UI Thread is in activity/fragment lifecycle i.e. if its called in onCreate, onResume etc. Jul 12 07:14:01 copy that! Jul 12 07:29:46 how can i add onclicklistener to a button which is in a linear layout view which is inside my main view of layout ? Jul 12 07:36:29 findViewById, setOnClickListener Jul 12 07:41:25 SimonVT: how can i access the main parent linearlayout? Jul 12 07:41:43 SimonVT: i have a child linearlayout inside my parent layout Jul 12 07:42:04 SimonVT: i have given an id to that child layout , Jul 12 07:42:10 jackhum: stop beeping people Jul 12 07:42:22 thepoosh: sorry , Jul 12 07:42:26 no worries Jul 12 07:42:30 what is the question? Jul 12 07:42:59 There's Activity#findViewById, and in Fragments you can call View#findViewById in Fragment#onViewCreated Jul 12 07:43:54 thepoosh: i have a parent linearlayout inside which i have a child linear layout , i want to add onclick listener to a button which is inside that child layout ,l Jul 12 07:44:42 SimonVT: answered, you can do it in findViewById in Activity and getView.findViewById for internal fragment Jul 12 07:44:51 remember that problem , which gave me npe few hours ago , seems like the problem was the button is in nested layouts Jul 12 07:45:22 There's no problem with findViewById and nested layouts, it searches the entire view hierarchy Jul 12 07:46:13 okay, let me experiment a little on my own , Jul 12 07:46:14 SimonVT: it depends, if he used getView and got the FarmeLayout which is not a parent of the view he's looking for, it will return null Jul 12 07:46:35 but that probably means he's trying to access the view from the wrong place Jul 12 07:46:35 Sure, if the View is not in the view hierarchy where you're trying to find it.. Jul 12 08:39:50 How can you move code to a BaseActivity from onCreate that requires setContentView to have been called? setContentView is called in the child Activity, but super is called before that. Jul 12 08:40:20 Right now I need to duplicate the code in every child Activity, but also don't want to move the code to onStart, since it belongs to the lifecycle of onCreate Jul 12 08:40:55 barq: add in the BaseActivity an abstract method and call it from onCreate in the baseActivity Jul 12 08:41:49 is there a standard voice command to stop voice recognition when working with the speech recognition API? Jul 12 08:42:38 PII request should just be one dialog stating that User information could be used during the operation of this app? Jul 12 08:42:46 thepoosh: Then the method will still be called first, because super.onCreate is called from the child before setContentView is called from the child Jul 12 08:50:45 barq: if you want to force something to happen that is how to do it Jul 12 08:50:52 is there a reliable way to get partial speech results from the speech recog api? Jul 12 08:51:52 I don't understand how that is supposed to work Jul 12 08:52:11 Since the order will still be wrong Jul 12 08:54:41 void oncreate() {super.onCreate(); setContentView(); myMethodCall();} Jul 12 08:55:02 And I want to move myMethodCall to base in order for the code not to be duplicated Jul 12 08:59:22 barq: setContentView(getLayoutId()) Jul 12 08:59:46 getLayoutId either from interface or abstract method. every child activity will have to implement that Jul 12 09:01:08 Thanks, good idea Jul 12 09:02:47 Will try that Jul 12 09:12:00 Hi, the SDKManager aka `android` that is shiped with the Android SDK is it supported anymore? Jul 12 09:18:16 yes Jul 12 09:22:32 ActivityTestRule is for android.app.Activity only. is there a way to test android.support.v7.app.FragmentActivity Jul 12 09:32:38 Ashiren: Seems like `android create project` is outdated, it is still producing a Hello world-app using runProguard instead of minifyEnabled. There are some more issues besides that, but I haven't managed to figure it out yet. That's why I am asking Jul 12 09:33:20 Why doesn't Google accept pull requests which fix their GitHub repos? Jul 12 09:46:31 orzen, yeah, that tool is pretty outdated. Google pretty much supports only AS to create new projects. Jul 12 09:49:04 hmm the sdk manager itself is still supported no? Jul 12 09:50:41 It has been moved inside AS as well Jul 12 09:51:30 Mavrik: Have you had to implement the whole PII thing into some of your apps before? Jul 12 09:51:40 still AS sometimes prefer to launch standlaone sdk manager Jul 12 09:55:55 Why does a fragment is based on transactions rather than just methods? Jul 12 10:11:05 hey ! A quick question, what is the best way to pass a custom object between different activities ? Jul 12 10:11:43 the best way is - don't Jul 12 10:12:04 so how would I handle a connection manager ? Jul 12 10:12:11 longbow: Intents Jul 12 10:12:16 I'd initialize the object in each activity? Jul 12 10:12:46 purplex88: example code ? Jul 12 10:13:07 is it possible to have the SyncAdapter do my syncing at any time it like but at least once a day? Jul 12 10:13:25 longbow: implemet parcelable interface like shown here: https://developer.android.com/reference/android/os/Parcelable.html Jul 12 10:13:36 thanks :) Jul 12 10:13:38 or do I have to set a period/time when it will attemp a sync? Jul 12 10:16:18 longbow: search google for sample code, plently of examples Jul 12 10:33:47 Mavrik, Ashiren: seems like Google missed something... shouldn't there be an up-to-date SDK that is well maintained and then you have the AS using the SDK without implementing a redundant, up-to-date version, that can't be used standalone? Jul 12 10:41:05 Mavrik, are you aware of any way to keep a service running without OS interruptions (g00s mentioned that you may know) I have also posted a question on http://stackoverflow.com/questions/38325958/ Jul 12 11:01:59 Is there a way to in android studio to automatically place a license header on top of all files? Jul 12 11:06:14 yes Jul 12 11:06:48 File -> Settings -> Editor -> File and Code Templates Jul 12 11:07:18 the same way you would remove/change the "Created by ..." above the class Jul 12 11:12:08 How does "FragmentManager fragmentManager = getSupportFragmentManager();" create an object of abstract class? Jul 12 11:12:23 I thought it was forbidden Jul 12 11:13:00 If I want to use FCM in my app do I have to set up a remote db that will hold fcm users? Jul 12 11:13:04 Is that the only way? Jul 12 11:13:19 no Jul 12 11:13:28 FCM as a mechanism is a standalone thing Jul 12 11:13:57 if you want the ability to support sending messages without the console (as messages between users etc.) you'll need to implement a server Jul 12 11:14:32 Ashiren: aah smart! thanks! Jul 12 11:15:46 thepoosh, why would I want persistent tokens? Jul 12 11:15:58 ohh Jul 12 11:16:01 sorry didnt see your message Jul 12 11:16:11 מפ Jul 12 11:16:13 np Jul 12 11:16:29 so if i want to have a php script send messages then I need my own server? Jul 12 11:19:46 kostodo: you can use topics Jul 12 11:20:16 that eliminates the need for a local databasE? Jul 12 11:20:33 if this is the only need you have for DB then yes Jul 12 11:20:46 well there is a site db Jul 12 11:20:49 firebase FCM console is good enough to send pushes to specific topics Jul 12 11:20:57 and to the entire userbase if needed Jul 12 11:21:09 but i dont want to send messages through the console Jul 12 11:21:17 if you want to persist information about specific devices you'll need a DB Jul 12 11:21:18 I want it to happen automatically based on certain actions of a site Jul 12 11:21:25 it will always be to all users Jul 12 11:21:28 so you need to store tokens Jul 12 11:21:44 maybe not Jul 12 11:21:53 probably sending with topics will be enough Jul 12 11:22:13 not sure i quite understand the topics concept Jul 12 11:22:26 kiao2938: https://developers.google.com/cloud-messaging/topic-messaging Jul 12 11:22:42 you can programmatically register the clients to topics Jul 12 11:22:49 and then send pushes only to that topic Jul 12 11:22:55 and not target a specific user Jul 12 11:22:58 but the topic Jul 12 11:23:13 ah i see Jul 12 11:27:46 thepoosh, so how would I subscribe the user to a topic once only on app start? Jul 12 11:29:58 or do i need to worry about that? Jul 12 11:30:06 every time the user starts the app he is subscribed again? Jul 12 11:37:42 kostodo: you can set that in SharedPreferences or something Jul 12 11:41:59 hmm Jul 12 11:42:02 lost :/ Jul 12 11:44:17 * raoul11 pokes thepoosh Jul 12 11:44:18 * Ashiren too Jul 12 11:44:22 u in tlv? Jul 12 11:44:49 raoul11: I made it into TLV Jul 12 11:44:55 well, Ramat Gan Jul 12 11:45:05 thats something entirely diff Jul 12 11:45:17 perma or temp thepoosh ? Jul 12 11:45:20 kostodo: you need to register the user when he registers the first time to FCM in the FIrebaseInstanceIdService Jul 12 11:45:27 raoul11: just today Jul 12 11:45:35 we have an office here but I live far away Jul 12 11:46:06 how do u find the hummidity outside Jul 12 11:46:24 comforting/distressing/killmenao'ing? Jul 12 11:47:04 raoul11: terrible Jul 12 11:47:10 however I grew up around here Jul 12 11:47:15 so I get used to it super fast Jul 12 11:50:48 im melting here thepoosh Jul 12 11:50:53 thinkin of moving to iceland Jul 12 11:50:59 or greenland, whichever is colder Jul 12 11:51:36 thepoosh, in firebase console i cant find anywhere to create new topics. in the android app i've done the following: FirebaseMessaging.getInstance().subscribeToTopic("updates"); Jul 12 11:58:09 kostodo: topics are generated by the client Jul 12 11:58:16 IIRC Jul 12 11:58:34 Yeah that is my understanding but FirebaseMessaging.getInstance().subscribeToTopic("updates"); has not managed to create it Jul 12 11:58:41 Console says no topics available Jul 12 11:59:12 kostodo: https://firebase.google.com/docs/notifications/android/console-topics Jul 12 11:59:19 you need to register first Jul 12 11:59:34 cow_2001: Jul 12 12:00:04 hmm. yeah i've done that. subscribeToTopic Jul 12 12:00:08 thats what I pasted before Jul 12 12:03:05 thepoosh, how can I debug that if its working or not? Jul 12 12:03:19 when i send app level messages the user receives Jul 12 12:03:35 1. the logs will be written Jul 12 12:03:41 2. the topic will be created Jul 12 12:04:23 Hello, I'm not an avid android developper but I need to study the feasability of my app concept. Jul 12 12:04:23 I need to have an app that overlays on others (like FB messenger's bubbles) and take a screenshot of what's below. Jul 12 12:04:23 The overlay stuff seems possible with the SYSTEM_ALERT_WINDOW permission but I don't have a clear answer for the screenshot part. Jul 12 12:04:23 StackOverlow's answers are old and/or contradict themselves Jul 12 12:04:24 topic is definitely not being created. still have This project does not have any topics. showing in the console. Jul 12 12:04:56 Do I need root for /system/bin/screencap or android-screenshot-library , or is there any other solutions ? Jul 12 12:05:43 thepoosh, seems like a similar issue to https://github.com/firebase/quickstart-android/issues/61 Jul 12 12:06:56 kostodo: it takes some time to update but in my experience it works Jul 12 12:06:58 but moght be that Jul 12 12:07:01 *might Jul 12 12:18:58 ANyone that used GPGS save? it is supposed to go into your google drive right? but i cant find it... Jul 12 12:59:03 "adb shell pm clear com.android.vending" doesn't seem to actually clear the purchase history.. Anyone that have done this before and can confirm it is all I have to do? Jul 12 13:00:34 why are you doing this Bernzel ? Jul 12 13:00:40 stuck on inapp testing? Jul 12 13:00:44 raoul11, yes Jul 12 13:01:26 yeah those are anoying Jul 12 13:02:14 indeed they are, can i consume products that are of type "handled" ? Jul 12 13:03:29 are you doing this on a testing device? Jul 12 13:03:36 coz it will mess with your play store settings Jul 12 13:04:14 are you stuck on the consume part? Jul 12 13:04:15 yeah sort of, It's on my one and only phone, but the account which I'm purchasing with is registered as Beta Tester Jul 12 13:04:44 the products to be bought in my app isn't suppose to be consumable, but since I can't do any further testing, what choice do I have? Jul 12 13:05:10 did you try a restart? Jul 12 13:05:19 restart of what? Phone? App? Jul 12 13:05:21 mayb clear app's data and a restart? Jul 12 13:05:24 phone Jul 12 13:05:31 nope, I'll give that a go Jul 12 13:09:52 hm didn't work Jul 12 13:10:04 Just create multiple accounts perhaps?? Jul 12 13:11:49 did you try to clear your app's data? Jul 12 13:12:23 for some reason I can't find any option for that on my Galaxy S7 Jul 12 13:13:28 haha found it now Jul 12 13:14:10 not sure if that voodoo will work Jul 12 13:14:16 think it did a few times for me Jul 12 13:14:42 on others i had to cancel the purchase, and do that process again till it was finally rls'ed Jul 12 13:15:51 well I can't tell if it worked or not I realised now, since I can't purchase anything from the same google account that I use for the developer console "Publisher can't purchase" , and clearing the purchase history on my other account that is setup for testing doesn't seem to work. Jul 12 13:16:01 so there is so much tutorials teaching you android development. but is there any resource which actually would teach you think like android developer? i want to understand why it is how it is, not how it should be Jul 12 13:16:36 newke, Google's own documentation ? They go into depth there Jul 12 13:16:55 you deffo need diff account from the dev account to test inapps Jul 12 13:17:31 yes I know, but if I restart my phone/clear purchase history it will automatically jump back to my dev account Jul 12 13:17:55 newke, tutorials (good ones) will drive u to it Jul 12 13:19:02 Bernzel i keep them seperated, my dev account is nowhere on my testing phone Jul 12 13:19:47 i bought course for android with highest rating. And is a course, where some aussie writes course and you follow along, without an understanding what you are doing Jul 12 13:20:04 writes code Jul 12 13:20:06 * Jul 12 13:20:48 newke, it's high rating because that's what people like. Just get to the point without understanding what's happening behind the curtains. Jul 12 13:21:07 I happen to belong to those people unwillingly I'm afraid Jul 12 13:21:29 newke: https://www.youtube.com/watch?v=SUOWNXGRc6g Jul 12 13:21:45 his tutorials are proper entry point to android dev Jul 12 13:22:45 complete playlist: https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBsvRxJJOzG4r4k_zLKrnxl Jul 12 13:24:03 those are great newke Jul 12 13:24:09 the ones raoul11 linked Jul 12 13:24:28 i also like slidenerd Jul 12 13:32:43 hi all Jul 12 13:32:58 everyone can helped me? i have an ask to gcm Jul 12 13:35:00 hm? Jul 12 13:35:13 i dont really good speak english Jul 12 13:35:24 i have an gcm service fpr push notification Jul 12 13:36:02 it runs. how i can read the token and store in an variable or in an file? Jul 12 13:38:36 I cant seem to get a notification sound when my app is in the background Jul 12 13:38:53 works when its in foreground and onMessageReceived handles it Jul 12 13:39:18 Otherwise its looking for a audio file in the raw/ dir Jul 12 13:39:27 But I just want to play the default notification sound Jul 12 13:39:33 Any ideas how I can do that? Jul 12 13:41:04 kostodo: is this a notification created from the console Jul 12 13:41:06 ? Jul 12 13:41:23 well its one i pushed to FCM from my PHP script Jul 12 13:41:24 with curl Jul 12 13:43:02 in an app I have a webView and a progress bar. When the page is loading I disable clicks on the webview using this code http://stackoverflow.com/a/31086978/2107362 (and it works), but I don't know how to restore the OnTouchListener once the page is loaded. Any hints? Thanks Jul 12 13:43:26 thepoosh, I just want the default sound to play Jul 12 13:45:02 https://developer.android.com/reference/android/app/Notification.html#DEFAULT_SOUND Jul 12 13:45:33 set via the Builder with "setDefaults" Jul 12 13:46:35 dsardari, whats Builder? :/ Jul 12 13:46:53 https://developer.android.com/reference/android/app/Notification.Builder.html Jul 12 13:47:01 ah right sorry Jul 12 13:47:07 Yes I'm doing that Jul 12 13:47:13 in onMessageReceived Jul 12 13:47:23 and it works with app in foreground Jul 12 13:47:33 but seems onMessageReceived is not handling messages when app is in background Jul 12 13:48:25 you're using gcm, right? Jul 12 13:48:31 no fcm Jul 12 13:50:30 hmm. should be pretty much the same. Jul 12 13:52:31 dsardari, i understand there are two different types of payloads for messages: notification and data Jul 12 13:52:43 where can I see the full list of params they accept? Jul 12 13:54:07 How can i run a custom rom with AVD? any advise? Jul 12 13:56:02 kostodo: not sure about fcm tbh, iirc gcm allowed you to set both if you wanted Jul 12 13:56:24 I'm trying to get inject retrofit with dagger2, but I'm getting 2 errors. the first one is this: https://gist.github.com/Syzygy2048/26e198fcebc35185a1f681866bd7bf47 and supposedly I just need to build so that the DaggerAppComponent class is generated. But it seems I can't build due to the second error: https://gist.github.com/Syzygy2048/04b39609df98200e3c9025edd082cd27 Jul 12 13:58:01 I'm not entirely sure I understand that second error. And stackoverflow recommends adding the @Singleton scope... but that doesn't seem to help right now Jul 12 13:58:24 kostodo: check this out if you haven't already https://firebase.google.com/docs/cloud-messaging/concept-options Jul 12 13:58:34 set your priority to high as well Jul 12 14:00:16 cynofans1: wrong channel Jul 12 14:00:33 dsardari, yeah alls good, just that background messages look for a sound file in a res/raw folder. Jul 12 14:00:46 foreground do it right through the builder Jul 12 14:00:58 how i can import this => com.google.android.gcm.GCMBaseIntentService; <= ??? Jul 12 14:02:54 Hello Jul 12 14:02:54 snooky, you probably need to add some of the play services libraries to your project Jul 12 14:03:09 i have, but it dont runs Jul 12 14:03:37 There is a behavior I want to copy from an app but I'm not sure how to copy it. Jul 12 14:04:06 snooky what exactly did you add? Jul 12 14:05:29 compile 'com.google.android.gms:play-services-gcm:9.2.0' Jul 12 14:05:44 I have a local database in MySQL. Jul 12 14:05:58 And I have a listview Jul 12 14:06:05 when I hit click to an element Jul 12 14:06:28 then I go to an editor Jul 12 14:06:45 there I have two options: Go back or hit another button. Jul 12 14:07:03 Cannot resolve symbol "R" <<-- what is this? Jul 12 14:07:30 I want a behavior that if I made any modifications to the element, to be saved. Jul 12 14:07:37 Independently if I clicked back or the other button Jul 12 14:07:55 R is a a file referencing the location of all resources in your project. if it can not be resolved then you need to build your project (try to resolve all compilation errors first) Jul 12 14:08:42 what? Jul 12 14:09:26 rangu, you could possibly work with startActivityForResult and onResult to get the modified values, as long as you don't hand editing over to another app. Jul 12 14:09:42 snooky, what in particular did you not understand? Jul 12 14:10:30 all Jul 12 14:10:33 im german Jul 12 14:10:34 -.- Jul 12 14:11:59 Syzygy: but what if the user terminates the app? Jul 12 14:12:23 snooky, so am I ;) send me a personal message then. Jul 12 14:12:50 you mean a query? Jul 12 14:13:00 Syzygy: If I start activity for result and I don't hit the back button, will it still return a result? Jul 12 14:13:26 rangu, you can set the result in onDestroy, but sometimes you'll have to accept that changes get lost if the app crashes or the user does some weird stuff. Jul 12 14:16:13 Ok. Syzygy so from the listview I should startactivityforResult Jul 12 14:16:19 When I create a new android project in idea with the minimum sdk set to 16 and everything else default (so it makes a "Hello World" activity that extends AppCompatActivity), the app crashes with the following error on my API 16 device: (https://gist.github.com/anonymous/b2f570d1d4570768b8dc2be8be014f6a). FOr reference, this is the generated build.gradle file: (https://gist.github.com/anonymous/0ab1dd14228917e4c4029ba8f393 Jul 12 14:16:19 6d08). Jul 12 14:16:39 rangu, that's one of several solutions. but yes. Jul 12 14:16:53 Does someone know how to fix this issue? Jul 12 14:18:25 Hi there, are there any android developers out there willing to give me a qoute for a small customer job? Jul 12 14:19:14 I am building the backend systems/micro service for an app and I need someone else to build the front end app that calls and represents the data Jul 12 14:19:37 Flaghacker, the link to your gradle file doesn't work. But I would guess that you're missing some specific support lib v7 Jul 12 14:20:03 Syzygy: To send the result back, do I use setResult? Jul 12 14:20:28 I haven't used it in a while, but I think so. Try google. Jul 12 14:23:07 Syzygy, my bad, the link was cut in half because my comment was split in two. Here's it again: (https://gist.github.com/anonymous/0ab1dd14228917e4c4029ba8f3936d08) The support lib seems present... Jul 12 14:24:35 The support lib is kind of fragmented, for example if you want to use recylcer view you'll have to used a separate support lib like 'com.android.support:recyclerview-v7:24.0.0', maybe this is also the case for you? Jul 12 14:26:10 Flaghacker, use at least gradle plugin 2.0 or newer Jul 12 14:26:48 1.3.1 is not compatible with support 24.0.0 Jul 12 14:27:43 Can someone help me fix my error "Application cannot be provided without an @Inject constructor or from an @Provides-annotated method." with dependency injection? It seems kinda ambiguous. https://gist.github.com/Syzygy2048/04b39609df98200e3c9025edd082cd27 Jul 12 14:27:50 Syzygy, I'm not using any feature at all - it's a blank activity that was generated by idea Jul 12 14:28:21 pfn, where do I change that? Jul 12 14:29:44 in your build.gradle at the top of your project Jul 12 14:29:57 If I don't inject retrofit everything seems to work. and the error indicates that it's a problem with retrofit and the parameters that are injected for retrofit Jul 12 14:30:05 Yes, found it. Jul 12 14:30:34 Anyone here use GPGS Save feature? I cannot find the save file on my google drive,is it a hidden file? Jul 12 14:30:39 Idea gives the following error: Warning:Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in D:\Programming\Android\MyApplication\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip Jul 12 14:30:42 It seems to be that I'm doing pretty much the same thing as the NetComponent here: (except updated for current versions) https://github.com/codepath/android_guides/wiki/Dependency-Injection-with-Dagger-2 Jul 12 14:30:49 I guess I have to update my gradle install? Jul 12 14:30:59 Flaghacker, yes Jul 12 14:31:28 there's no install to update Jul 12 14:31:40 edit gradle/wrapper/whatever.properties Jul 12 14:31:55 and set the gradle version to 2.10 or newer Jul 12 14:48:39 pfn, That fixed it thanks a lot! WOuld this be something worth reporting to JetBrains? Jul 12 14:49:20 anyone know where the AS diff tool is located? Jul 12 14:50:41 dsardari, Press Ctrl+Shift+A and search for it :) Jul 12 14:53:56 well, i'm looking for the path. haven't see it anywhere in AS yet. will check more though. Jul 12 14:58:04 Flaghacker, no Jul 12 14:58:33 Why not? Jul 12 14:59:42 jetbrains merges android studio every few months and doesn't make any patches outside of those merges Jul 12 15:00:18 So should I report it to Android Studio? Jul 12 15:00:58 it's already working in Android studio Jul 12 15:01:02 nothing to report Jul 12 15:01:36 SO this will get fixed in a couple of months? Jul 12 15:01:48 yes Jul 12 15:02:23 and as far as I'm aware, intellij 2016.1 already merged android studio 2.0, I don't see how you ran into. this Jul 12 15:02:43 or was it 1.5, I forget Jul 12 15:04:06 A while ago I reported this android related bug to JetBrains, and they assigned someone: https://youtrack.jetbrains.com/issue/IDEA-158091 Jul 12 15:04:18 So are they not going to fix that? Jul 12 15:05:19 they won't if it works in Android studio Jul 12 15:05:26 they'll just fix it by merging Jul 12 15:07:16 Maybe it would be a better idea to install android studio then? Jul 12 15:08:40 For android, yeah Jul 12 15:09:20 * pfn shrugs, uses intellij only Jul 12 15:11:20 nothing compelling in studio for me Jul 12 15:11:45 Bugfixes? Jul 12 15:14:16 You also don't use gradle.. For everyone using the official build tools, recommending IDEA over AS is just bad advice Jul 12 15:18:12 I'm not missing something silly am I? It seems that android's Base64 doesn't use unique base64 encodings. http://paste.debian.net/hidden/de015a96 Jul 12 15:18:30 SimonVT, IDEA uses gradle too? Jul 12 15:18:32 probably missing the check that the padding bytes are zero, I'd guess Jul 12 15:18:38 I never recommended it Jul 12 15:48:49 Hi, anybody here? Jul 12 15:49:40 I have a bootloop problem. can you help me? Jul 12 15:49:55 please? Jul 12 15:50:03 ftmahdi, Maybe explain it first? Jul 12 15:50:48 bootloops aren't handled here Jul 12 15:53:36 so if I provide logcat, you cant help me with the problem. I think it's a java related problem... Jul 12 15:54:11 ftmahdi: This channel is for app dev. Try #android or #android-root if you need help with your device Jul 12 15:54:46 Ok thank you ;) Jul 12 16:01:04 hey guys Jul 12 16:01:17 i have a question about android.mk Jul 12 16:01:58 i want to build a native executable and link with another shared object Jul 12 16:02:45 the problem is that linker cannot find the symbols in that shared object Jul 12 16:03:17 when i run nm or objdump, the .so lib doesn't show any symbols Jul 12 16:03:46 can anyone suggest how to investigate this further? Jul 12 16:04:32 bytefire, it's more or less identical to standard linux compiling, you just use the ndk toolchain. you may need to specify a library location for your shared libs (-L to gcc/ld as I recall) Jul 12 16:05:10 bytefire, if you're trying to link against a system shared lib, that's about to get a lot trickier, there was a developer article about it last week, I don't have the URL handy; tl;dr google is limiting how you can link to system shared libs Jul 12 16:17:15 dragorn: thanks. i am linking with a 3p lib Jul 12 16:17:32 i have checked the path. that looks correct Jul 12 16:17:53 specifying it explicitly also doesn't change much Jul 12 16:19:06 unfortunately it's been a while since i did ndk stuff Jul 12 16:31:26 How many annotations is too many? Jul 12 16:36:33 pfn, Looks like the default project works in idea 2016.2 that came out today-ish? Nice. Jul 12 16:36:52 You were probably right. Jul 12 16:36:58 of course I'm right Jul 12 16:36:59 :P Jul 12 16:37:06 :D Jul 12 16:48:56 everyone can help me? Jul 12 16:49:16 im new and i have a big problem Jul 12 16:50:16 just ask the question. if someone can help, they will Jul 12 16:51:39 how i can store an "super" variable? Jul 12 16:51:52 what is a super variable? Jul 12 16:51:57 i write in the variable and its stand in the variable for all Jul 12 16:52:01 you can german? Jul 12 16:52:04 no Jul 12 16:52:16 can i paste my code? Jul 12 16:52:27 not in here; use something like pastebin or the like Jul 12 16:52:39 ok, moment please Jul 12 16:53:07 sounds like a global... Jul 12 16:53:29 http://nopaste.linux-dev.org/?1119429 Jul 12 16:54:33 so what’re we looking at? what’re you trying to do? Jul 12 16:54:44 when i make the http get on line 81 and 82 it runs Jul 12 16:55:10 i want it so. i make getRegId() in the on create. now. it writes in "regid" variable Jul 12 16:55:31 now i can from all files in all programm read the "regid" Jul 12 16:55:39 you know what i mean? Jul 12 16:55:51 so you want a global variable Jul 12 16:56:08 global variables are generally frowned upon as bad ideas Jul 12 16:56:43 but, if you need something like that, what you’d probably end up doing would be something like a singleton Jul 12 16:56:52 i want "write" the regid on start the programm and than the regid stored in this variable Jul 12 16:58:09 but you have to make a request to get the id Jul 12 16:58:35 the way you’re doing it currently should be ok Jul 12 16:59:33 although you probably don’t want your web request to be an AsyncTask Jul 12 17:00:15 do you have an example? im new @ android Jul 12 17:00:22 so i need an response Jul 12 17:00:29 i must learn -.- Jul 12 17:00:34 what kind of learning materials are you using? Jul 12 17:00:42 http Jul 12 17:00:47 i need an function Jul 12 17:00:51 no, i mean for learning android Jul 12 17:01:00 open a website. and write the response in an global variable Jul 12 17:01:13 i mean what kind of books are you reading, or what classes are you taking? Jul 12 17:01:23 nothing Jul 12 17:01:34 probably should get something, then. Jul 12 17:01:49 the Google Udacity course is ok. The Big Nerd Ranch book is ok too Jul 12 17:01:49 i need android for one project Jul 12 17:01:56 i dont want learn android. Jul 12 17:02:08 i programming in c, phyton, php, Jul 12 17:02:20 go get some learning materials Jul 12 17:08:02 What is the best way to simultaneously download multiple json strings from a server? Jul 12 17:08:38 I have a list of codes and want to download json strings from my server for each, like /get// Jul 12 17:08:48 but it's bad to wait between requests Jul 12 17:09:04 Maybe I should add a batch mode, idk Jul 12 17:09:07 can i ask ndk questions here or is it mostly for apps? Jul 12 17:09:29 how i can split my code in a lot of files? Jul 12 17:10:12 http://nopaste.linux-dev.org/?1119429 i want line 58 - 87 in a seperated file Jul 12 17:10:13 \: Jul 12 17:10:28 inb4 thepoosh or someone goes berserk Jul 12 17:11:17 copy + paste? Jul 12 17:11:25 lol Jul 12 17:11:26 Hey guys.. I was on here a while ago about this email I received stating -> " that collects personally identifiable information (PII) without disclosure. Apps like this may be considered in violation of our User Data policy. " . I Would just like to know what I should be doing to avoid having the app removed from playstore ? Jul 12 17:11:40 oh sorry, i was wrong, what i meant was _cut_ + paste :D Jul 12 17:12:04 fu Jul 12 17:12:54 add a privacy policy mayb? Jul 12 17:13:04 anyone know how to compile perf for arm with the ndk? Jul 12 17:13:04 best to contact their support team and ask tbh Jul 12 17:13:36 cart_man: are you collecting names or photos or device IDs without asking? Jul 12 17:15:40 rubenwardy: Well the SDK we are using seems to be doing that for us already Jul 12 17:16:08 snooky: if you want to split things into a separate file, then make a new class to do so Jul 12 17:16:31 yes but how i can "start" the function then? Jul 12 17:16:46 dude, there is no way around this: You have to learn Java Jul 12 17:25:50 rubenwardy: Is it not ok to just Tell them that this will indeed happen and if they Decline then I graciously quit the app Jul 12 17:25:51 ? Jul 12 17:27:08 What data are you gathering and what do you use it for? Jul 12 17:27:35 Showing a prompt like "WE WILL COLLECT ALL YOUR DATA" will definitely put people off your app Jul 12 17:28:05 you were already told, disclose this information Jul 12 17:28:24 the user data policy says what you need to do already Jul 12 17:28:41 why is it so hard to read Jul 12 17:31:00 rubenwardy: Well the SDK gathers and its for analytics ... Its the Device ID and then the persons name and surname Jul 12 17:31:22 pfn: I have read it I just want to make sure before I release Jul 12 17:31:27 Which SDK? Jul 12 17:31:41 CleverTap Jul 12 17:31:47 Why do you need the name and surname for analytics? Jul 12 17:32:01 you were already given advice yesterday Jul 12 17:32:06 rubenwardy: I am doing what I am told soo : / Jul 12 17:32:06 You app still collects stuff, even if you're using a library Jul 12 17:32:11 and continue to get the same advice Jul 12 17:32:24 just do what the warning says Jul 12 17:33:28 Ghez it sounds soo bad .. " This app will collect some private data " Jul 12 17:33:30 ehhh Jul 12 17:33:39 it is bad Jul 12 17:33:41 stop using clevertap Jul 12 17:34:34 pfn: If I had a say then sure but they already have an IOS app and demanded the android use the same stuffs : / Jul 12 17:34:53 then warn the user about it Jul 12 17:35:00 It's pretty simple Jul 12 17:35:53 "Please note! This app might use some private data like your Name and Surname " -> Accept , Decline Jul 12 17:36:01 ehhh Jul 12 17:36:09 then provide more details Jul 12 17:36:13 indicating what it will be used for Jul 12 17:36:18 "collect and upload" Jul 12 17:36:19 and if you're told to do this Jul 12 17:36:30 make your boss/PM add this information Jul 12 17:37:06 "For the purpose of analytics, this act will collect and upload personal data like your name and surname" Jul 12 17:37:11 *app Jul 12 17:37:27 why would any analytics services collect name/surname? Jul 12 17:37:43 It is silly, raoul11, but apparently it does Jul 12 17:37:57 doesnt sound right Jul 12 17:37:59 there's a fine line between analytics service and spyware Jul 12 17:38:49 i think this line has been crossed Jul 12 17:39:09 dont see what analytics benefit is there from collecting names Jul 12 17:40:21 Anyway, back to my question: I have a list of items and need to make a http request to fetch JSON for each. I'd like to do them simultaneously, as otherwise they're all waiting for each other to connect. How can I do this? Jul 12 17:41:21 use multiple threads? Jul 12 17:41:41 Do I initialise multiple HttpUrlConnection objects in an AsyncTask, and then wait for each of them to finish? Jul 12 17:42:04 raoul11: I've been advised not to use raw thread on android Jul 12 17:42:09 sounds like a good plan Jul 12 17:42:29 threads, handlers and messages Jul 12 17:44:06 runnables also Jul 12 17:46:15 rubenwardy: There's nothing wrong about using raw threads on android, it is just that there are so many other classes that will give you much more (which is also somewhat true for normal Java). Jul 12 17:47:49 Hello, I was just wandering, the tabs arent showing up when I launch the avd. http://pastebin.com/mTT9Qtn3 Jul 12 17:48:05 layout http://pastebin.com/AhQiKEax Jul 12 17:49:24 ActionBar tabs are deprecated, use TabLayout Jul 12 17:50:15 And don't catch Exception Jul 12 17:50:25 Are fragments only useful when you are creating app for both phone and tablet? Are there other common uses? Jul 12 17:50:42 Especially not when you completely silence it Jul 12 17:51:08 Im just going to use it for mobile tbh Jul 12 17:51:30 I've just been following tutorials to implement tabs, so tablayouts better? Jul 12 17:54:12 Yep Jul 12 17:55:27 has anyone here used this library for IAP? https://github.com/anjlab/android-inapp-billing-v3 Jul 12 17:59:11 purplex88, frags are useful for tab layouts etc Jul 12 17:59:17 to implement the swipig Jul 12 17:59:20 *swiping Jul 12 17:59:29 well, only for tabs? Jul 12 17:59:50 if i don't have tab, i shouldn't use frags? Jul 12 18:00:51 use them when you need them, purplex88 Jul 12 18:01:34 Is there anything good I can read on how to get AsyncTask working with Robolectric? Jul 12 18:01:49 thats the problem i don't know if i need them Jul 12 18:02:09 then you probably don't Jul 12 18:02:12 Haven't had any luck with anything I've found Jul 12 18:03:17 there are 5 chapters only frags alone in book.. i guess i will still read them to know. Jul 12 18:03:19 Trying to use ShadowAsyncTask, but I'm not sure how to tell if it's tying in or not. It isn't getting me past the "java.lang.RuntimeException: java.lang.IllegalStateException: Calling this from your main thread can lead to deadlock" message Jul 12 18:03:34 > Incremental mode is disabled due to multi-dex legacy mode Jul 12 18:03:39 why can't jack just solve all my problems Jul 12 18:06:56 don't use multidex legacy mode Jul 12 18:06:56 duh Jul 12 18:07:05 for development, you should always be minsdk 21+ Jul 12 18:07:35 blocky: https://android.googlesource.com/platform/system/extras/+/master/simpleperf/ Jul 12 18:07:48 You'd have to check out a full aosp tree to build that, unfortunately Jul 12 18:08:06 We'll be shipping it in the NDK in r13 if all goes according to plan, but that obviously won't help you today :) Jul 12 18:09:28 danalbert, so are you a googler? Jul 12 18:09:34 It's also probably only going to work on a rooted Nexus device because pretty much all the other kernels have bugs Jul 12 18:09:38 pfn: yes Jul 12 18:09:46 ah, sounded like it, which group? Jul 12 18:09:47 danalbert: I got it built thanks Jul 12 18:10:06 blocky: cool, file bugs if you have issues Jul 12 18:10:13 pfn: NDK Jul 12 18:10:21 lol at all the kernels having bugs :P Jul 12 18:10:22 danalbert, that explains that ndk comment the other day :P Jul 12 18:12:00 nuget Jul 12 18:12:12 nuget android Jul 12 18:13:49 * Ping_2_Ur_Pong does this Jul 12 18:13:52 I could use some help with espresso tests. Anyone here want to offer advice? I am working on migrating from robotium to espresso. One activities tests converted fine, but my second activity converted runs tests before the activity is ready. Jul 12 18:16:15 Are you using an ActivityTestRule with the correct activity class? Jul 12 18:16:29 the resurgence of the googlers Jul 12 18:16:55 do a lot idle here? Jul 12 18:17:02 used to Jul 12 18:18:11 they're doing a push to improve android dev tools right? Jul 12 18:18:20 * pfn shrugs Jul 12 18:18:24 they always say they are Jul 12 18:18:36 * blocky looks at danalbert expectantly Jul 12 18:19:40 danalbert might be going to get a sandwich first and then improving tools Jul 12 18:20:04 https://youtu.be/gHZrgSmBOmE Jul 12 18:20:57 kroot with all the battery optimizations lately like doze, etc - are there any guides , for that scenario you actually DO want your app to run all the time, but do it the right way w/o fighting the platform - like if you wanted to write a GPS app that recorded location every few seconds, etc. (lame example, but for hypotheticals only) Jul 12 18:21:15 sandvich Jul 12 18:21:41 Well, I figured out the Robolectric ShadowAsyncTask issue. The description on http://robolectric.org/extending/ is much better than http://robolectric.org/custom-shadows/ and helped me understand how to use them correctly Jul 12 18:21:48 g00s: I think startForeground covers most of those things Jul 12 18:22:10 kroot ok thanks, hopefully that doesn't go away :D Jul 12 18:22:48 my app talks to bluetooth devices and has to monitor them with alarms Jul 12 18:23:06 kroot: yes: ActivityTestRule<>(CheckoutActivity.class, false, false); Jul 12 18:23:15 then manually starting the activity. Jul 12 18:27:24 GMS 9.2.1 Jul 12 18:30:13 rebootd: Does the activity do something before displaying the UI? Jul 12 18:40:03 kroot: double checking..seems like there is suppose to be an asynch response handled via Otto then loading a fragment. The test code hits the first assert before the response is handled. Jul 12 18:43:06 kroot: also, the activity base class launches a splash screen. (Just found that) Jul 12 18:52:59 wow jack is really picky about proguard files Jul 12 18:56:35 > Caused by: com.android.jack.antlr.runtime.RecognitionException Jul 12 18:59:48 I'm having an issue, when implementing the tabs after following a tut, well the adding fragments to it anyway Jul 12 19:00:44 I'm getting wrong argument type and requres android.app.v4.listfragment for the adapter.addfragment(fram1 line Jul 12 19:00:57 http://pastebin.com/3Q13jj20 Jul 12 19:01:18 here is pagefragment code if you need to see what it is. http://pastebin.com/2ndxhH12 Jul 12 19:01:30 How do I alter the code to fix this issue? Im not sure. Jul 12 19:01:42 where are you getting that error? Jul 12 19:02:53 im getting that error on line adapter.addFragment(fram1, "ONE"); Jul 12 19:02:59 what line Jul 12 19:03:06 specifically on fram1 Jul 12 19:03:12 what line number Jul 12 19:03:22 i’m not gonna read through the entire listing looking for that line Jul 12 19:03:52 on pastebin? Jul 12 19:03:59 hold on Jul 12 19:04:10 line 49 Jul 12 19:05:46 It’s because your pagefragment is the wrong type Jul 12 19:05:50 it says wrong argument found in pagefragment2 and requires android.app.v4.listfragment Jul 12 19:05:55 yup Jul 12 19:05:56 how do i fix? Jul 12 19:06:16 in the pagefragment, delete the line ‘import android.app.Fragment' Jul 12 19:06:21 not sure, because Im not sure what is required to include android.app.v4.listfragment Jul 12 19:06:34 then let Android Studio fix it for you, choosing the v4 fragment Jul 12 19:07:06 using the listfragment? Jul 12 19:07:36 val row: TypedViewHolder.pwitem = Option(view).map(TypedViewHolder.from(_, TR.layout.pwitem)).getOrElse { TypedViewHolder.inflate(getLayoutInflater, TR.layout.pwitem, c, false) }; ahh, that's so satisfying Jul 12 19:07:44 yeah Jul 12 19:08:01 ahh fixed Jul 12 19:08:18 rebootd: you might need to add in an IdlingResource to tell it to wait longer Jul 12 19:08:18 got rid of that listfragment one as well Jul 12 19:08:21 thanks Jul 12 19:12:28 kroot: thanks. that sounds right. Jul 12 19:23:07 kroot: you're alive? Jul 12 19:28:31 hi, im trying to compile a native binary which depends on another third party native shared object lib Jul 12 19:29:44 but linker reports undefined reference errors Jul 12 19:30:43 thepoosh you're still alive ! Jul 12 19:31:05 the undefined references all belong to the shared lib it depends on Jul 12 19:31:39 g00s: today was a long day Jul 12 19:31:48 had a 1.5 hour commute Jul 12 19:32:02 sup? Jul 12 19:33:03 thepoosh construction work, detour, etc ? Jul 12 19:33:13 traffic ? Jul 12 19:33:14 nope, far office Jul 12 19:33:27 had to drive a few towns over Jul 12 19:35:12 not much going on, few days ago watched droidcon de talk on real time data processing for android. was pretty good, i think everyone going down that route begins to struggle with the same problems. but they didn't even bother with persistence, or graphing data persisted Jul 12 19:35:43 it was good talk overall but slides left out a bunch of details, etc Jul 12 19:38:11 thepoosh saw this sunday http://www.economist.com/news/business/21701810-startup-nation-running-out-steam-talent-search Jul 12 19:40:05 g00s: yeah, this is a discussion that returns all the time Jul 12 19:40:34 there are talks of importing high tech employees and there are commercials about tech army service all the time Jul 12 19:56:45 I'm having Emulator problems... I get this... Google Play services out of date. Requires 9256000 but found 9080270 I have googled it, but no answer seems to work... any sugestions? Jul 12 19:57:15 emulator cannot be updated Jul 12 19:57:24 the emulator says I need to update Google Play services... but I downloaded the latest emulators... should I delete the emulators and start over? Jul 12 19:57:25 use an older version of play services in your app Jul 12 19:57:36 or use a real device to test play services Jul 12 19:57:37 or genymotion Jul 12 19:57:54 pfn: genymotion has no play services Jul 12 19:58:04 AVD is not up to date? Jul 12 19:58:11 pfn: the real device works... genymotion does not... so your saying the emulators are just not going to work for me unless I use old play services? Jul 12 19:58:24 ? I thought genymotion allowed installing gapps Jul 12 19:58:31 that was like one of the main selling points Jul 12 19:58:44 genymotion does not work either... I am trying to do Email Password auth with Firebase... just fyi... Jul 12 19:59:02 * pfn shrugs Jul 12 19:59:04 test on a device then Jul 12 19:59:31 pfn: you can install whatever you want but it doesn't come with PS built in Jul 12 19:59:44 that's kind of annoying, but reasonable Jul 12 19:59:51 I waas trying to do a screen cast of the app... is there a way I can display my android app on screen? Jul 12 19:59:55 vysor Jul 12 20:01:45 IrishGringo, if you install play services into Genymotion it'll update and work properly. Jul 12 20:02:29 genymotion gapps sucks Jul 12 20:05:42 No. Jul 12 20:06:27 what's the best way to see all running activities, services, threads, and native code for my app at any point in execution? i'm seeing a situation where it seems like i have native code running after the java service has been destroyed. Jul 12 20:06:28 pfn: vysor works ok? Jul 12 20:06:37 yes Jul 12 20:22:33 IrishGringo why AVD were you using? so i guess they still haven't found a way to keep GMS up to date on existing AVDs? Jul 12 20:23:43 s/why/which Jul 12 21:33:08 damn it kitkat! https://developer.android.com/about/dashboards/index.html Jul 12 21:52:14 hi guis Jul 12 21:52:19 guys Jul 12 21:53:03 i have been seraching regarding how to know wich keywords did a user search for when he first got to an app in gplay Jul 12 21:53:11 but im not being able to find anything Jul 12 21:53:33 does anybody knows how to keep record of keywords user search for when getting to your app? Jul 12 21:53:46 keep track Jul 12 21:53:47 sorry Jul 12 22:39:18 guys Jul 12 22:39:41 there must be any kind of feature to know keywords used by users when getting into your google play's app page Jul 12 22:39:49 im going insane traying to look how to Jul 12 22:40:01 what Jul 12 22:40:24 you can get something if they click an affiliate link, but I’m not sure if you get anything if they search Jul 12 22:46:29 you mean is not possbile to know wich keywords they used to reach your app's gplay page? Jul 12 22:51:53 it doesn’t seem like it is Jul 12 23:17:45 Hi guys. I have asked this question a day or two ago, but it seemed that there was no real activity here on the channel (I didn't see anybody talking for hours at all) so I'll ask it again. Ok so my question is how do you handle your background tasks during configuration change? In the past I usually used classic solution with a retained fragment, and in my last two projects I use EventBus' sticky events which I handle and Jul 12 23:17:45 then simply remove from the bus. But what is your way of doing this? Jul 12 23:27:27 alex: just depends on who's on at the time Jul 12 23:28:36 i'm in the same boat, everything new is based on sitcky EventBus events, but the goal is to move to rxjava Jul 12 23:48:40 i've spent the whole day fighting it Jul 12 23:53:05 nvidia shield a decent development device? pretty cheap @ $200 Jul 13 00:01:50 dsardari: While I'm at reading various artilces about Rx programming for the last weeks, I don't quite understand how exactly Rx directly addresses Android-related config change issue? Jul 13 00:02:20 AlexBerdnikov it doesn't. you have to manage a few things yourself Jul 13 00:03:34 g00s: well, just like with EventBus, I guess... I mean, as I understand I can implement my "analogue" of a bus with Rx, right? Jul 13 00:03:55 yeah ... Jul 13 00:04:41 g00s: but what do people usually do when they don't use EventBus or Rx? Retained fragment? Is that only goof option? Jul 13 00:05:29 TBH, for almost two years of my Android development experience I have never heard about anything other Jul 13 00:06:09 AlexBerdnikov thats kind of a quagmire, lots of different ways & opinions ... Jul 13 00:07:18 g00s: Can you at least hint me on them? I mean, what ways except retained fragment do you know or maybe even used in the past? Jul 13 00:07:54 How can I get "view hierachy" of my activity at runtime? Jul 13 00:08:37 To check the structure of layouts and views Jul 13 00:08:39 All the more or less decent articles in the Internet says all the same, like "here are 3 ways how not to do it, and here's a retained fragment way, use it all the way." Jul 13 00:09:19 So I wonder what way really experienced guys choose Jul 13 00:09:57 AlexBerdnikov a lot of people take shortcuts, like saving to sqlite on bg thread w/o worrying if it ever completes when user presses home ;) Jul 13 00:11:19 g00s: well, yes, I'm sure many people really does that, but I charge people with money for my job so I can't afford such a luxury :) Jul 13 00:11:19 just put a warning 'not for monkeys!' Jul 13 00:12:42 AlexBerdnikov i more or less do it the same way the ancient & wise old-school AOSP apps do things Jul 13 00:12:54 even though its a ton of boilerplate and nonsense Jul 13 00:13:04 not as ancient as my way ;) Jul 13 00:13:14 for example, i copied AsyncQueryService out of .. uh Contacts or Calendar , i can't remember Jul 13 00:14:09 AlexBerdnikov at the last i/o summit there was an app architecture presentation, did you see that ? Jul 13 00:14:29 it was kinda high level, like 'this is what you should do' but i think there is some code on github Jul 13 00:14:41 maybe it even uses Yigit's JobQueue thingy Jul 13 00:14:53 g00s: Nope. SHame on me. Can you provide me some links? Or maybe keywords for Google? Jul 13 00:16:52 g00s: About AOSP... I joined the party way later than you I guess, I'm in Android development for only two years so I learned mostly from offical docs (hate it), blog articles and CommonsWare book which I found very useful. Jul 13 00:16:57 AlexBerdnikov its called 'android application architecture' Jul 13 00:17:07 Oh.. :0 Jul 13 00:17:08 :) Jul 13 00:17:21 by Yigit Boyar Jul 13 00:17:24 take it from g00s hes a billionaire who knows all Jul 13 00:17:48 if i was a billionaire , i wouldn't be doing android lol Jul 13 00:17:50 sasser: not sure if I get the joke :) Jul 13 00:18:35 AlexBerdnikov did you find it yet? i have it on the iosched app running on my tablet ;) Jul 13 00:18:52 it was May 20 Jul 13 00:19:36 https://www.youtube.com/watch?v=70WqJxymPr8 Jul 13 00:19:54 yup Jul 13 00:20:05 Yeah, thank you very much, I'll certainly watch it today. Jul 13 00:20:17 g00s: and what is your opinion on using sticky events for overcoming config changes? Jul 13 00:20:46 i never did that Jul 13 00:21:14 g00s: ok, thank you for the info then! Jul 13 01:10:28 Hey - I'm prototyping an Android app, I'm pretty new to Android development. I'm wanting to store a handful of simple Java objects to disk - fewer than 100 objects, of fewer than a dozen simple properties each. Jul 13 01:11:21 ContentProdivers / sql - its pretty easy if you know about android, not sure if there is something that would get you off the ground faster though. Jul 13 01:11:28 What would you recommend for doing this? Roll my own serialization to/from json? SQLite? SQLite + some ORM? I've looked at a few ORMs, they all seem either too advanced for what I need (greendao) and/or a little too brittle (sugarorm) Jul 13 01:11:48 https://developer.android.com/guide/topics/providers/content-providers.html Jul 13 01:12:06 thanks, I'll give that a look Jul 13 01:17:14 is r.id.content automatically added as viewgroup for every app? Jul 13 01:21:41 I am trying to get synchronous Javascript execution to work in a WebView. My code is pasted here http://pastebin.com/6WV9yk4e Jul 13 01:23:33 needham: there is no such thing in JS Jul 13 01:24:03 I have a Recycler view with a large collection bound to it, say 500+ items. When onBindViewHolder is called I make a async HTTP request to load some data. But when I scroll really fast down the list, how do i cancel the requests for all items that are no longer in view? I am seeing 100's of requests start in the background because of how RecyclerView loads, i think onBindViewHolder is called for every item i scroll past Jul 13 01:24:19 Unfortunately the javascript does not get executed in the WebView (i.e never reaches to line Log.d("test", "here");). It appears locking Main Thread seems to somehow prevent the javascript on UI Thread. Not able to figure out why. Jul 13 01:24:28 should I be using a strategy where I wait for them to stop scrolling or something before i start making these requests and only for items that are in view, if so, how do i do this? Jul 13 01:24:49 develCuy I mean Javascript injection Jul 13 01:25:16 dependency injection? or running JS from Java? Jul 13 01:26:05 running JS using WebView.evaluateJavascript Jul 13 01:28:23 Anyone ever use NavigationView element? Jul 13 01:29:49 For some reason when I programatically add a header to it, the header is the wrong height, but when I specify it in xml, its correct Jul 13 01:35:36 develCuy Is my question clear? Jul 13 01:41:05 needham: I guess so... you can try to deploy your js stuff to a folder the browser can read Jul 13 01:41:28 so you don't need to inject, just add it to the source code Jul 13 01:41:39 it will "download" from a local repo Jul 13 01:45:50 sylon been a while since i did this but yeah, you would detect fling start and stop fetaching things until it settled. and yeah, if scrolling but item hasn't been fetched you would cancel it or ignore if started Jul 13 01:46:22 by now there are probably RV lib adapters that do these things .. Jul 13 01:48:37 g00s: i tried googling but didn't find anything, other than that picasso library that everyone keeps recommending for images, but I have more than just images to deal with Jul 13 01:55:16 is there a library I can use in conjunction with a RecyclerView to have a different layout show when an item is clicked? Jul 13 01:55:17 Like, in the list, each item uses ViewA, but when clicked, it changes to ViewB? Jul 13 01:56:36 Is there a way to login to web pages on Android like with HTMLUnit? Jul 13 01:58:15 MarkyC no lib is necessary for that ... Jul 13 02:12:25 hi, i'm trying to implement a website that does image uploading, I can currently specify ... but when it goes to my camera, I can't go to the gallery (usually via a swipe) to select an image ive already taken, it forces me to take a new picture which doesnt work for my case Jul 13 02:13:41 i noticed that the facebook app can access the gallery but the facebook mobile site m.facebook.com just goes to the gallery like my app does Jul 13 02:14:59 g00s: The way I have it set up is my list item contains two views, and I set the visibility to GONE/VISIBLE depending on whether the list item was clicked or not. Is there a better way? Jul 13 02:16:27 MarkyC yeah, you override the method in adapter that says ' i have 2 kinds of views ' Jul 13 02:17:16 g00s: isn't that for when I need odd rows (or something) to have a different view? Jul 13 02:17:40 All my rows have the same view, it's just on click that it changes Jul 13 02:18:04 so then its not all the same view :| Jul 13 02:20:29 g00s: ahhh, I think I get it: I need to keep a reference (in the Adapter?) of the currently opened view, then override getItemViewType() ? Jul 13 02:21:44 any idea why doing file uploads doesn't give me gallery as an option? I just have camera and documents... "documents" does give me access to my gallery but the name is counterintuitive (ie makes me think of pdf's, word docs etc) Jul 13 02:21:47 you'll keep a reference to the open position and create the right view for the slot Jul 13 02:22:15 tomasm- show your code / stacktrace ;) Jul 13 02:22:30 g00s: sounds like a plan, thanks! I don't have to do animations today, but would this technique be easy to animate? Jul 13 02:22:48 this is html5, so basically Jul 13 02:22:52 i'm not so good with animations. the default will be cross fade between the two so it should work ok Jul 13 02:23:10 g00s: nice, thanks! Jul 13 02:23:14 ~g00s++ Jul 13 02:30:46 I know you all fanbois Jul 13 02:30:55 but are there any android phones that have even a reasonable batteyr life Jul 13 02:33:15 my moto g 2 had excellent battery life overall Jul 13 02:33:34 my vzw note 5... man Jul 13 02:33:36 granted i didn't leave location enabled, and was really paranoid with what i'd leave open Jul 13 02:33:39 12-14hr tops Jul 13 02:33:41 and I dont do much with it Jul 13 02:33:59 anyone ever have issues with an sdcard becoming corrupt Jul 13 02:34:08 I even tried some app that basically blocks some background data when screen is off Jul 13 02:34:21 It seems to happen often like every 7 days. All data saved just disappears. Jul 13 02:39:32 ron_frown with android 6 battery life should be improved, everything is stopped most of the time :D Jul 13 02:40:38 i m battery g00s Jul 13 02:40:43 instead of batman Jul 13 02:40:45 8) Jul 13 02:41:29 i like my droid-1 and lumia 521 had removeable batteries Jul 13 02:41:54 i guess its that or water resistance though ... Jul 13 02:42:10 and if the device only gets updates for 18 mos, i guess whats the point **** ENDING LOGGING AT Wed Jul 13 02:59:58 2016