**** BEGIN LOGGING AT Sun Aug 07 02:59:57 2016 Aug 07 03:37:45 hey ... as a new droid dev ... i try out all these gitHub repos and keep getting errors. is there something Im completely missing ? Aug 07 03:38:32 RxAndroid demo & the Udacity Firebase demo. will not even load or build ter or AS Aug 07 03:48:52 hey guys. I have a TextView I use as a huge log. Sometimes it gets to megabytes of text. Is the text kept in memory? Aug 07 03:48:58 as in, should I rotating or something? Aug 07 03:52:20 that sounds like a bad idea :D Aug 07 03:55:10 Rotating will move megabytes of memory from one place to another, really not a good idea Aug 07 03:55:18 like g00s said, you don't need that much data Aug 07 03:56:26 right. I think I should just rotate to a file. This can have upwards of hundreds of MBs as it's intended to be open a lot Aug 07 03:57:19 I guess I really trying to see if these strings were all just kept in memory. I was hoping for a truncate method or something Aug 07 03:57:22 thanks guys Aug 07 03:57:23 Why would you even have that much data in a text view? Think the user is going to read 1MB of text? Aug 07 03:57:37 yea ;) Aug 07 03:58:16 literally, there are things that need logged overtime and people need to read. 1Mb of text is not much once you consider formatting and shit Aug 07 03:58:21 or filtering Aug 07 03:58:52 It's preposterous. Nobody will read 1Mb of text Aug 07 04:17:24 CedricBeust: think of it this way. I'm using a textview as remote log output (like syslog's udp target for example). It's possible that >1Mb is useful somewhere Aug 07 04:17:57 I don't buy that. No human will read 1Mb. Search through it maybe, read it? Never. Don't do that. Aug 07 04:18:26 CedricBeust: true. Litreally 'read' is wrong. I just want it somewhere. Aug 07 04:18:48 Put a screenful worth of characters in the text view with "..." at the end, done. Aug 07 04:19:03 so you're right. I was previously keeping many megabytes in a textview without noticing or caring since the target device has >1Hb Aug 07 04:19:06 Gb * Aug 07 04:19:24 ac_slater_ is the log just a bunch of timestamped thingies ? Aug 07 04:19:30 g00s: yea Aug 07 04:19:50 probably better off just using a recyclerView Aug 07 04:19:58 oooo Aug 07 04:20:25 awesome Aug 07 04:21:02 also, look at Listview transcript mode Aug 07 04:21:28 interesting Aug 07 04:22:38 Still no good reason to hold 1Mb of user facing text Aug 07 04:23:56 I don't know much about shaders but is there a simple blur shader I can plop into my libgdx game? Aug 07 04:36:20 barodapride if you render the scene to a texture its pretty easty to do with a simple blur kernel Aug 07 04:38:59 ok, I'll have to google it up Aug 07 05:03:41 man firefox is killing me Aug 07 05:04:25 w4ffles lol, i just tried that little experimental feature, to put your tabs on the side - it ate all my cpu Aug 07 05:05:03 ff doesn't use resources well on my mac, so i use safari. it seems to be best in that regards Aug 07 05:07:16 w4ffles this thing - tab center : https://testpilot.firefox.com Aug 07 05:11:20 that looks pretty cool Aug 07 05:11:35 reminds me of opera Aug 07 06:55:27 Hello Aug 07 06:55:39 I'm following a tutorial about content providers: http://www.tutorialspoint.com/android/android_content_providers.htm Aug 07 06:55:51 The code calls getContentResolver() inside an Activity (AppCompatActivity). That method is defined just as throw new RuntimeException("Stub!"); in Context and it's not overridden in the tutorial code. Aug 07 06:56:09 The result is an application crash, obviously. Aug 07 06:56:19 What is that method supposed to do? Aug 07 06:56:53 Why is it called in this tutorial https://developer.android.com/guide/topics/providers/content-provider-basics.html too without being defined? Aug 07 07:05:20 arancio, hmm? Aug 07 07:05:27 it is defined Aug 07 07:05:39 arancio: if it crashes, show the strack trace Aug 07 07:06:10 public ContentResolver getContentResolver() { Aug 07 07:06:12 throw new RuntimeException("Stub!"); Aug 07 07:06:13 } Aug 07 07:06:22 That's the definition I see Aug 07 07:07:38 that's because some subclass should take care of implementation Aug 07 07:08:01 Better make it abstract then Aug 07 07:08:48 It's really confusing. Android documentation says it is abstract Aug 07 07:09:03 Sorry but I'm totally new to android. This is my first tutorial Aug 07 07:09:21 Tackling content resolvers as a total beginner is hard Aug 07 07:09:30 arancio, just don't think about it, why are you looking into android's internals? Aug 07 07:09:51 in your activity getContentResolver will return an object, shouldn't crash the app Aug 07 07:10:02 because when I click a button, the application crashes. I'm stepping into the call. 1 sec Aug 07 07:10:08 iprime: which is why I asked for a stack trace... Aug 07 07:10:13 arancio, it probably crashes for another reason Aug 07 07:10:16 Leeds, indeed Aug 07 07:11:00 i'm betting on an NPE :) Aug 07 07:11:56 There is something wrong going on here. I'm stepping into the calls around the point where the application crashes and all I see are methods throwing exception. Even Uri.parse() looks defined like that Aug 07 07:12:53 arancio, can't you just pull the stack trace like Leeds suggested Aug 07 07:12:56 Yeah, even the Uri constructor is a stub! Aug 07 07:13:10 you should use pastie.org or similar service tho Aug 07 07:14:11 there is no trace. The app crashes on the phone and the debugger goes blank Aug 07 07:14:31 even when I'm stepping over Aug 07 07:14:38 I'm confused Aug 07 07:14:49 do you see any log at all? in 'logcat'? Aug 07 07:15:25 when you say 'crashes' - you mean it just silently exits? Aug 07 07:15:58 Ok. I got a trace Aug 07 07:16:01 1 sec Aug 07 07:16:57 Sometimes it just exists and sometime I guess I dialog "Unfortunately, My application has stopped." Now I got the dialog and a trace. I'm pasting it, 1 sec Aug 07 07:18:33 * Leeds twiddles thumbs Aug 07 07:20:23 Here it is: http://pastebin.com/V2jmVJsP Aug 07 07:20:39 pastie.com is not very responsive Aug 07 07:20:43 today Aug 07 07:20:58 it pretty much tells you what's wrong Aug 07 07:21:57 which is: Unknown URL content://com.example.provider.College/students Aug 07 07:22:02 have you defined such provider? Aug 07 07:23:14 uh, I saw it now. It should be defined as far as I can understand. I'll look into it. Aug 07 07:24:00 Thanks for the guidance so far. I was a bit lost. I didn't even see the stack trace before. I'm accustomed to Visual Studio Aug 07 07:24:23 lol Aug 07 07:24:34 yeah well, i suggest you read up on some docs Aug 07 07:26:47 That's what I'm trying. It's my first day Aug 07 07:26:52 Sorry Aug 07 07:27:41 oh it's fine, it just seems that starting android with content resolvers might be steep as someone's mentioned Aug 07 07:27:52 do you want to build a concrete app or are just learning/exploring? Aug 07 07:29:17 I have an application in mind but at the same time it's hard to figure how to make a complex application without an overview of the platform. So today I'll be just "exploring" following some tutorials Aug 07 07:31:13 better to start with things like the application lifecycle Aug 07 07:37:40 Leeds: this tutorial has several chapters. One of the previous chapters was about activity lifecycle Aug 07 07:39:19 Is it what you mean? This is the tutorial: http://www.tutorialspoint.com/android/ Aug 07 08:14:33 hi all Aug 07 08:15:40 <_xor> To the people here who have and/or are currently using Kotlin: How's it looking these days? Worth using in a production project? Aug 07 08:15:51 <_xor> I'm going to take a closer look later today, but just curious :) Aug 07 08:17:40 guys, I have 2 pages of views for my app. one important and the other is less important, but I like quick switching between them. Aug 07 08:18:19 at first I thought to add them to a viewpager in portrait mode, and side y side in landscape. Aug 07 08:18:40 with fragments. Aug 07 08:19:16 but because I need to update them a lot from activity and they are just 2 fragments, I thought maybe using fragments is not a good idea. Aug 07 08:19:28 so I could use approach here: Aug 07 08:19:39 https://www.bignerdranch.com/blog/viewpager-without-fragments/ Aug 07 08:19:57 and handling them all in activity will eb better. Aug 07 08:20:00 what do you think? Aug 07 09:24:16 Can anyone suggest custom ROM for HTC desire 816G Aug 07 09:38:23 Deadsh0t: Go to #android-root and ask there :) Aug 07 09:38:43 Ok Aug 07 09:42:58 hi all, I'm looking to hire a freelance dev urgently, please PM me. Aug 07 09:56:19 michael_mbp: No advertising, jobs or otherwise Aug 07 09:57:47 I am making an app that plays a video on loop... but after some repeats the video starts freezing and lagging Aug 07 09:57:57 any idea why this happens? Aug 07 10:00:43 my crystal ball shows a memleak Aug 07 10:38:13 Oh sorry SimonVT Aug 07 10:48:03 SimonVT: any advice please, on how I could find a dev short-notice? Aug 07 10:48:13 and I'm looking for someone experienced. Aug 07 10:49:45 Nope, just not here Aug 07 10:53:41 ok thanks. Aug 07 11:47:53 http://stackoverflow.com/questions/38807634/google-play-game-services-save-feature-not-working-consistently <- anyone familiar with GPGS and save? Aug 07 11:52:36 michael_mbp, what kind of project are you building? Aug 07 12:44:46 Hey, I'm wondering if it's possible to hide or not render a fragment until I do something else? Because currently I have the fragments all loaded... Aug 07 12:45:57 or if it's possible to change fragment Aug 07 12:46:25 lg188, i don't know about fragments but you can check out the setVisible() method. You can set if a view is visible, invisible or not drawn at all ircc. Maybe that will help Aug 07 12:51:49 lignux: mhm, it does draw the space for it, right? Aug 07 12:52:04 That might help indeed Aug 07 12:58:29 lg188, you can set if you want to draw space for it or not Aug 07 13:15:04 I want it to lol, just not sure if it is default behaviour Aug 07 13:17:55 Is the MVVM pattern actually used in Android development? Aug 07 14:13:34 hey , i want to programatically edit shared_prefs of a certain app i have , Aug 07 14:13:37 but each reboot it reqrites the old prefs back to the /data/data/appname Aug 07 14:13:52 rewrites Aug 07 14:15:25 Hey guys. I've just started to learn android development. And I have just completed my Java basics. Where should I start? Read a book? Or study from the website (https://developer.android.com/training) ...??? Aug 07 14:28:06 * mmkumr is waiting!! Aug 07 14:45:28 study website Aug 07 14:50:56 and be prepared to enter a very confusing world... Aug 07 14:53:36 it's not confusing if you know how to read Aug 07 14:53:50 sadly, most people here seem not to Aug 07 14:58:08 they know how to read youtube title, sadly Aug 07 14:58:39 adq back from vacation ? Aug 07 14:59:28 not sure i'm done yet :> Aug 07 14:59:29 i'm trying to communicate to a background service from an activity with localbroadcastmanager but for some reason my broadcast receiver isn't picking up the local broadcast, even if I use getapplicationcontext for both. i am registering the receiver in service onCreate and unregistering in onDestroy Aug 07 15:00:04 is it not working because the service is in a separate process? Aug 07 15:03:17 iridescascade that is correct Aug 07 15:03:24 LBM is for in-process only Aug 07 15:07:52 eventbus and its ilk has the same problem, guess I have to do full broadcasts or some binder stuff Aug 07 15:12:30 iridescascade yeah Messenger, binder, etc Aug 07 15:12:35 i'd avoid broadcasts Aug 07 15:13:02 yeah, i don't want to do broadcasts if avoidable. Aug 07 15:13:16 thanks for confirming Aug 07 15:14:55 nothing wrong with doing broadcast Aug 07 15:15:30 using a messenger and binder is far more complex Aug 07 15:16:10 if you need 2way communication, by all means, use them Aug 07 15:16:31 but for 1 way messaging stick to broadcast Aug 07 15:16:57 broadcasts leak data though? Aug 07 15:17:41 they don't Aug 07 15:18:12 you can target broadcasts so only a single component can receive it Aug 07 15:18:42 you can also restrict receiving. broadcasts by permission Aug 07 15:18:54 the converse for sending is also available Aug 07 15:21:47 since iridescascade already has a bg service, binder / messenger are easier Aug 07 15:25:17 I'll see which results in less code. Already have much boilerplate Aug 07 15:29:55 a messenger and binder are universally harder Aug 07 15:30:48 only time it's easier is if you want 2way Aug 07 15:43:49 iridescascade are you already binding to the bg service ? Aug 07 15:44:09 or is it more decoupled, like putting stuff in content provider, etc Aug 07 15:47:28 the activity is only to edit some settings, no binding Aug 07 15:48:14 but why is the service in separate process ? Aug 07 15:48:34 it starts at boot Aug 07 15:50:06 in ImageView#setImageBitmap(Bitmap), does the Bitmap get stored anywhere or just displayed? Aug 07 15:50:20 Im wondering if I change that bitmap later, will the imageview's display update or not? Aug 07 15:51:46 iridescascade this is what i had in mind https://github.com/commonsguy/cw-advandroid/blob/master/AdvServices/RemoteClientEx/src/com/commonsware/android/advservice/client/BshServiceDemo.java Aug 07 15:52:22 but yeah, lots of ways to skin the cat. if you go broadcast route, make sure other apps can't spoof them and send them to you Aug 07 15:52:32 if thats a concern Aug 07 15:53:03 Q about Localization: Default is en. If there is an translation for de_AT, but not for de_DE will de_DE load all untranslated from de_AT or load Translations from en? Aug 07 15:53:05 well the update is just to let the service know the connection settings changed, it would not accomplish a lot :D Aug 07 15:54:21 again, ezpz with a broadcast Aug 07 15:55:47 gdev, en Aug 07 15:55:57 make a values-de if you want a fallback for de_AT Aug 07 15:57:06 pfn: And why is that so? The problem is, that the service prodviding translations do not submit values-de but rather values-de-rDE Aug 07 15:58:38 so? move them Aug 07 15:59:45 would be no problem, but the service has GitHub integration, and automatically repushes then :) Aug 07 15:59:55 note: crowdin ;) Aug 07 16:11:44 pfn: sorry and thanks for your help! Aug 07 16:17:58 For calculating the tilt with the accelerometer, do you use two or all three axes in the calculation? Ie. atan2(Gy, Gz) or atan2(Gy, sqrt(Gx*Gx + Gz*Gz)) Aug 07 16:22:47 Is there noone using Google Play Game Services? Aug 07 16:38:48 Anyone ever worked with Shared element activity transitions? Cant get it to work Aug 07 16:39:48 The shared element is in a listview, going to detail view Aug 07 16:42:28 Can I do this from a fragment to a full activity? Aug 07 17:03:38 Anyone know if its possible to do a shared element transition from a fragment with a listview to a full activity? Aug 07 17:04:44 of course it is Aug 07 17:06:03 Anything special I have to do? I just had it all set up and it wasent working pfn Aug 07 17:06:10 The shared element was a WebView Aug 07 17:06:23 nothing special Aug 07 17:07:11 Any idea why it wouldnt work? I just grabbed the view from the listview in the frag, and passed it along with ActivityOptionsCompat.toBundle Aug 07 17:07:25 it was doing a different transition but no WebView showed up Aug 07 17:11:54 Wait what is sharedElementName? I thought it was supposed to be the transitionName Aug 07 17:12:42 Is that just transitionName Aug 07 17:31:15 drose379, aren't there docs/examples for this? Aug 07 17:33:53 Yes, not working for me though iprime Aug 07 17:34:18 not working with any view or just the web view? Aug 07 17:34:50 I've only tried it with the WebView Aug 07 17:55:19 Does anyone know how to check if a record exists in a firebase DB for android? I'm having a hard time figuring out how to do something that I would think is really simple to do... Aug 07 18:07:08 I'm having a really hard time adapting to this no sql stuff... Aug 07 18:08:15 what I'm trying to do is select top 1 * from mytable where userid = "asdf" Aug 07 18:08:50 actually... select count(*) from mytable where userid = "asdf" Aug 07 18:09:03 thats really all I'm looking to do Aug 07 18:09:25 except asdf would be the generated UID from when the user created their account Aug 07 18:19:16 hello world, is there a way to tell android emulator to boot into recovery mode? Aug 07 18:19:25 i have tried the standard adb thing Aug 07 18:49:48 What's the best way to abstract out the networking layer in my application? Joined a new project. My first task is to modularize and write tests for the networking side... but I'm kinda lost on where to actually start. Aug 07 18:58:47 pfn: i'm trying to get broadcasts to go only to my service. when i don't add intent.setClass(getApplicationContext(), MyService.class) it works but when I add it, it stops working. tried intent.SetComponent(new ComponentName("packagestring", "packagestring.MyService")) it doesn't work either Aug 07 19:01:10 iridescascade: What kind of broadcasts? Aug 07 19:01:21 are they your own broadcasts? Aug 07 19:01:24 yeah Aug 07 19:01:44 Are you using LocalBroadcast? Aug 07 19:01:48 no Aug 07 19:02:02 it's a separate process service Aug 07 19:02:25 Oh okay. nvm then. I thought it was your own broadcast in the same process. Aug 07 19:04:42 should work fine Aug 07 19:14:10 I switched to intent.setPackage(getPackageName()) and that works, should be sufficient :D Aug 07 19:39:33 Does anyone know how to check if a record exists in a firebase DB for android? Aug 07 20:17:11 Should an app be designed so its asynchronous? Aug 07 20:17:26 ie, not waiting for a DB call to return data before moving on programmically? Aug 07 20:17:43 I'm used to PHP Aug 07 20:23:26 firemouth yes Aug 07 20:23:51 g00s: so... any hints / suggestions how i could check to see if a user exists, and if it doesn't, add it into the database? Aug 07 20:23:56 or am i going about this the wrong way Aug 07 20:24:02 but your question is still somewhat ambiguous , and its a big topic Aug 07 20:24:20 g00s: no argument, i'm trying to wrap my head around app development... very different from my experience Aug 07 20:24:22 you do all of those things off the main / ui thread Aug 07 20:25:04 not in the onCreate? Aug 07 20:25:15 firemouth luck for you, a new book came out https://www.amazon.com/Android-Concurrency-About-Deep-Dive/dp/0134177436 Aug 07 20:26:54 but there are plenty of blogs / articles discussing this too , so Aug 07 20:27:09 http://stackoverflow.com/questions/38807634/google-play-game-services-save-feature-not-working-consistently <- anyone familiar with GPGS and save? Only every 2nd commit gets saved...i have to save twice for it to work...how come? what am I doing wrong? Aug 07 20:27:24 meinteil you ask this q about GPGS every day ... Aug 07 20:27:25 i have a feeling i'm going about this the wrong way ... Aug 07 20:28:02 meinteil: it is more likely that someone will look at your code when you do minimal examples, not a bunch of code Aug 07 20:28:53 firemouth probably a good place to start is I/O session on architecture Aug 07 20:29:25 firemouth https://www.youtube.com/watch?v=70WqJxymPr8 Aug 07 20:29:26 g00s: probably. just having a hard time believing that checking for a user id in a database is so difficult :) Aug 07 20:29:32 there is a repository on github to study Aug 07 20:30:17 you might start the operation in onCreate - but you shouldn't block the UI thread waiting for it Aug 07 20:31:34 on that note "Japanese Olympic champion racks up $5,000 bill playing Pokémon Go in Brazil" lol Aug 07 20:31:51 g00s: lol yeah i saw that... welcome to roaming rates Aug 07 20:33:22 if it makes any sense... I'm using a listener on a firebase object to check if the userid exists in my users table. If it does, I want it to then continue getting the current information from the database for that user. If it doesn't, I want it to push the object I'm using into the DB. Aug 07 20:33:30 well, push is teh wrong word, I'm actually setting it Aug 07 20:33:59 firemouth also look at rxjava Aug 07 20:34:31 Is it easy to get 360 tilt sensing with accelerometer? Aug 07 20:34:34 although, a lot of the GMS stuff is async and i never bothered using rx with it, kinda a mess Aug 07 20:34:48 I'm doing my best to keep it simple and do it the "proper" way Aug 07 20:34:59 I really don't think I'm doing anything all that complicated, lol Aug 07 20:35:10 Check if user is in DB... if not, create it. Aug 07 20:35:23 but I've been watching videos / googling for a few hours now. Aug 07 20:35:36 getting kind of beat down for such a simple task... lol Aug 07 20:35:47 could spit this out of PHP in my sleep Aug 07 20:36:51 just thinking out loud.. i'm wondering if I should approach it differently... Aug 07 20:37:03 like, try to update it and if it doesn't exist the DB will automatically create it? Aug 07 20:37:26 set kind of works that way, but the problem I have is if a user saved additional information, that is lost. Aug 07 20:37:53 because the set command automatically deletes any keys that you don't pass to it Aug 07 20:37:58 firemouth its tricky coordinating all the lolcycles with async ops, much ink has been spilled, the debate continues, people are still looking for better ways Aug 07 20:38:35 g00s: yeah... having a hard time wrapping my head around it :) Been stuck in sequential land for too long. Aug 07 20:38:51 feels like i need to know whats happening everywhere all the time Aug 07 20:39:02 and that gives me the feeling i'm going about it the wrong way ;) Aug 07 20:39:24 the guy who did ^^ presentation also has https://github.com/yigit/android-priority-jobqueue Aug 07 20:39:38 but its going slow, doesn't seem to be working on it much Aug 07 21:21:03 Best way to simulate slow network speeds on the emulator? Aug 07 21:40:28 I have a problem with permissions. I have android.permissions.READ_CONTACT added in the manifest file but when i run the app it still says permision denied -> required android.permission.READ_CONTACT Aug 07 21:40:45 anyone have any idea why's that? Aug 08 00:36:48 Anyone ever worked with WebView, for some reason whwnever I load from cache, the image in the webview only displays every other time Aug 08 01:28:23 How can i update Google Play Services on a AVD? (Nexus 5 Api 23 x86) Aug 08 01:29:15 Cmaj6 can't really Aug 08 01:29:28 then i dun goof'ed hard Aug 08 01:29:34 i mean, you can find some hack on google but there is no push-button official way to do it Aug 08 01:30:12 so what's the work around, targetting a lower version? If so, how do i do that Aug 08 01:30:51 The version on the AVD is 8087470, the AVD is running API 23 Aug 08 01:31:00 how can i target the version that's currently on the AVD Aug 08 01:31:17 just change your app's dependency to use 8.0 O.o Aug 08 01:31:33 lol Aug 08 01:33:01 actually i'm not sure if thats 8.1 8.3 or 8.4 **** ENDING LOGGING AT Mon Aug 08 02:59:58 2016