**** BEGIN LOGGING AT Thu Dec 01 03:00:00 2016 Dec 01 03:08:31 I am trying to setup Unit testing, and starting with adding "testCompile 'org.mockito:mockito-core:1.10.19'" to my app graddle file. As per the setup instructions. But my test class cannot resolve "org.mockito.Mock" in an import. How can I check what version of the mockito lib I actually have available/installed in Android Studio? Dec 01 03:14:35 Baulde: Hard to tell with such little info. What does your import statement look like, and what does your build.gradle look like? Dec 01 03:17:16 I just managed to come across a forum post of the same issue. http://stackoverflow.com/questions/31219624/android-studio-gradle-cannot-find-mockito the fix was changing my gradel testCompile with androidTestCompile for the mockito dependancy. Not a clue as to why this makes a difference Dec 01 03:18:07 Hmm, I've never had to do that with Mockito. Dec 01 03:18:35 Are you import JUnit? That's required. Dec 01 03:18:40 importing* Dec 01 03:19:11 Yes I have that right before " testCompile 'junit:junit:4.12'" in my dependencies in the gradle file Dec 01 03:20:55 Found this: Simply testCompile is the configuration for unit tests (those located in src/test) and androidTestCompile is used for the test api (that located in src/androidTest). Since you are intending to write unit tests, you should use testCompile. Dec 01 03:27:48 so im a bit confused about what resources directory i need for a quad hd display. xhdpi doesnt work, neither does xx nor xxx Dec 01 03:27:59 the resources are not displayed right on any of them Dec 01 03:35:33 I dropped in a new dependency into my app and used apk analyzer to see that's it's dropping in two .so files. With gradle... is there a way to remove those .so files by name? Dec 01 03:36:21 eghdk isn't there an exclude file directive in gradle? not sure thats the best way for this Dec 01 03:37:47 I'll give it a go. thanks Dec 01 03:43:22 are there any alternatives to firebase that have aggregation? Dec 01 03:51:03 what is aggregation Dec 01 03:54:09 the ability to run metrics on a large chunk of the data, averages, sums, etc Dec 01 03:55:32 at the moment, my options with Firebase are to download the entire node and process clientside. Or have a running count happen whenever an event is added/changed, which will be very difficult to keep synced Dec 01 04:06:19 parco: thanks for the explanation Dec 01 04:07:12 * xrandr is rather stumped. I have an activity, it is declared in my Manifest file, but it keeps saying ClassNotFoundException when I try to launch it. Dec 01 04:09:04 xrandr, does your package match your class path? Dec 01 04:09:07 Spending four hours on what should be a trivial bug and making no progress. #justandroidthings Dec 01 04:10:01 meanwhile StrategicJoke, an iOS developer, is cranking out feature after feature Dec 01 04:10:12 haha Dec 01 04:11:11 The thing about Android is that I simply forget what I was going to do because I get distracted by wrestling with the framework. Dec 01 04:11:29 So, whichever features I was going to implement tonight, I hope I somehow remember what they were. Dec 01 04:12:54 dragorn, where do I check my class path? Dec 01 04:14:02 xrandr, your directory structure; ie if your package is defined as "com.foo.something" and your activity is defined as ".myactivity" then your code should be in com/foo/something/myactivity.java Dec 01 04:16:40 TacticalJoke you could be on the cutting edge of flutter when it comes ... :D Dec 01 04:17:07 dragorn, hmm ok. Dec 01 04:17:12 :D Dec 01 04:17:26 dragorn you getting rain or snow ? Dec 01 04:17:30 g00s, rain Dec 01 04:17:40 have to sleep, thanks for your helps :) Dec 01 04:17:41 g00s, it's quite warm; 40s Dec 01 04:17:44 raining hard here, that would be a lot of snow :) Dec 01 04:20:20 It's -1(C) here right now. Dec 01 04:21:31 dragorn, here is a snippet of my project structure: http://pasteboard.co/4q2Gn3ZQ2.png Here is a pastebin of my AndroidManifest. http://pastebin.com/tDxkENMp Can you possibly see what is wrong? Dec 01 04:23:13 seems legit to me Dec 01 04:26:39 dragorn, this is the error i am getting: http://pastebin.com/bkYJ7gDW Dec 01 04:32:34 xrandr even if this is your app, this is app dev - not app uh, recovery or whatever you trying Dec 01 04:33:01 g00s: no, not yet Dec 01 04:33:02 and since you don't have the source code, and getting this from apk, all bets are off for normal help here Dec 01 04:33:22 gordon_ what has to happen ? Dec 01 04:33:34 jill / jayce compiler Dec 01 04:34:07 same thing for kotlin Dec 01 04:34:29 but even so, wouldn't those java 8 features scala 2.12 wants depend on the runtime ? Dec 01 04:34:45 it would Dec 01 04:34:53 so only android N+ for 2.12 Dec 01 04:35:04 hrmf Dec 01 04:35:35 android holding all the jvm languages back :P Dec 01 04:35:48 guessing ceylon guys have similar problems Dec 01 04:35:50 but when 2.11 support will end android O will be 70% :P Dec 01 04:36:01 I like what golang guys are doing Dec 01 04:36:09 which is ? Dec 01 04:36:35 you write all logic in go, and generate jni bindings and objc bindigs with one command Dec 01 04:36:53 and then import module in AS, add only view Dec 01 04:37:23 i think the best bet is for me to start fresh, and copy/paste relevant code Dec 01 04:37:24 (xamarin does something similar) Dec 01 04:37:40 xrandr: copy-pasta method Dec 01 04:38:01 xrandr: That's the first thing you should've done. Dec 01 04:38:23 I would've created a project in Android Studio and imported every file manually. Dec 01 04:38:30 xrandr going to use version control and backups this time right ? :D Dec 01 04:38:51 later - https://lukaseder.files.wordpress.com/2014/07/copypasta.jpg?w=662 Dec 01 04:39:22 anyway Dec 01 04:39:34 is it possible to use websockets with exoplayer for video playback ? Dec 01 04:39:36 gordon_ how is your kotlin stint going at work ? Dec 01 04:39:52 g00s: I stoppped :D Dec 01 04:39:57 lol why Dec 01 04:40:09 other features Dec 01 04:45:06 I've fixed my bug. Now I'll spend three hours trying to figure out why that fix works. :D Dec 01 04:45:21 Also praying that it does work. Dec 01 04:51:35 TacticalJoke the next support lib will break whatever you did anyhow ... Dec 01 04:51:49 :D Dec 01 04:52:05 Gladly, though, this is non-support stuff. Dec 01 04:53:01 Really complex scenario involving theme-attribute lookups (via Context.obtainStyleAttributes) wherein, as far as I can see, platform-cached values were causing issues. Dec 01 04:53:28 I mean "framework-cached values". The framework was caching the values and this was causing upset. Dec 01 04:54:19 These cached values were being used only very occasionally, leading to a very hard-to-track-down bug Dec 01 04:56:04 To be fair, I was doing something wrong. But, damn, these bugs are hard to track down. Dec 01 04:57:08 Accidentally repeated myself. My brain is fried. Dec 01 05:15:30 The support libs are compiled with -fcapricious Dec 01 05:40:37 How can I have my app listen/poll for new sent SMS messages? There's a BroadcastReceiver intent for received messages, but not for sent. IFTTT implements this feature, but it's not open source so I can't see how. Dec 01 06:15:19 What's a good way to save data that is in my model? I assume database would be the best solution. Any specific tools I should use? e.g. ORM. Dec 01 06:39:31 Is there a way to intercept fresco request url, like Glide's GlideModule? Dec 01 06:39:43 I want to change thumbs in it Dec 01 06:41:42 Syzygy: yes, you could use a database and, yes, you could use an ORM. Or not. Dec 01 06:42:16 Of course I could, I was more looking for recommendations though Dec 01 06:42:27 there are different choices Dec 01 06:42:42 some database are not even Relational, so you don't need an ORM Dec 01 06:43:46 SharedPreferences? Serialize to file? XML? json? SQLite? ORM? No? Store on a server through a Web API? Store on Firebase? On Realm? Dec 01 06:44:01 The last two are not relational database but are real-time Dec 01 06:45:10 If you really have no idea, try something easy and see if you can work with it. If not try something else Dec 01 06:45:18 Devil's in details Dec 01 06:45:51 Need a real-time database? Firebase is excellent except when it sucks. When exactly it sucks depends on you Dec 01 06:46:30 Syzygy: I could not make a choice until I tried myself few choices and read some tutorials Dec 01 06:46:42 raoul11: good morning Dec 01 06:46:51 morning Melatonina Dec 01 06:47:08 guess I'll go for ORM for now Dec 01 06:48:18 regarding pre-launch report: it seems to stuck in its own flow limbo - theres facebook login/share/invite buttons, and pre-launch keeps launching them - which opens a webview and all sorts of facebook activities Dec 01 06:48:43 can you specify a flow with firebase testlab? Dec 01 06:53:29 Syzygy: can I ask you what is your app about? Dec 01 06:54:29 location based reminder Dec 01 06:54:42 db for what the person needs to be reminded about Dec 01 06:57:28 when they enter a place Dec 01 06:57:31 Cool Dec 01 06:57:34 Thanks Dec 01 06:57:54 exactly Dec 01 06:58:21 great, now my OrmLiteConfigUtil produces a ClassNotFoundException :/ Dec 01 06:58:29 without any class mentioneded... Dec 01 06:59:45 Syzygy: have a look at Realm. Object-oriented DB for mobile. https://github.com/realm/realm-java Dec 01 06:59:49 Syzygy: no ORM Dec 01 07:01:51 I'll try get ormlite to work for now Dec 01 07:04:10 https://gist.github.com/Syzygy2048/e75fd0dac63432452a89b7c3e8da80ea any idea what could be wrong? Dec 01 07:14:51 Sorry, no Dec 01 07:16:36 do you use multidex Dec 01 07:17:03 lately it solves the ClassNotFoundException problems :s Dec 01 07:17:42 I don't use it atm Dec 01 07:22:36 Ashiren, so you suggest implementing multidex? Dec 01 07:22:55 yes ~ Dec 01 07:23:12 and/or do you have play-services in your dependencies Dec 01 07:25:01 * raoul11 multidexes thepoosh Dec 01 07:25:13 several, yes Dec 01 07:26:06 Multidex doesn't work Dec 01 07:27:03 you have it in your application class? Dec 01 07:27:08 yes Dec 01 07:27:20 oh ok, then thats not it ~ Dec 01 07:28:10 Technically the class is it's own application independant from android, but it's needed to generae the database schema for android Dec 01 07:36:24 great... step through it with the debugger and suddenly it works Dec 01 07:39:28 quantum bug, you changed the outcome by observing it Dec 01 07:39:38 apparently Dec 01 07:41:41 do you use instant run Dec 01 07:41:44 so what IS android usage access? I cant find any information on what it is, not even the android.app.usage page on developer.android tells me wtf it is Dec 01 07:42:20 oO Dec 01 07:55:26 raoul11: HAI Dec 01 07:57:18 hi thepoosh Dec 01 09:50:27 * raoul11 thepooshes thepoosh Dec 01 09:50:48 * thepoosh is all pooshed up Dec 01 09:51:03 testlab is a bit anoyin Dec 01 09:51:14 why's that? Dec 01 09:51:16 have to disable a fuckton of features so it wont go into limbo thepoosh Dec 01 09:51:20 do you have a login screen? Dec 01 09:51:25 there was Dec 01 09:51:29 sux Dec 01 09:51:38 got limbo also on firebase invites Dec 01 09:51:48 and any inapp activity i have Dec 01 09:52:04 nice of them to give you 15 tests a day for free. Dec 01 09:55:36 In onMeasure of a view, how can i know which dimension was wrap_content and which wasn't Dec 01 09:55:43 Or in any other method Dec 01 09:58:50 So I have this idea of having my users creating different "profiles" (using Firebase), so that when they select different profiles they will load the same set of data but from a different "profile" so to speak. Like "String name_1, name_2" etc from the server. Now does anyone have a tip on how to perform some "setting" telling the server which profile to load. Would you do this locally with preferences somehow, or make some Dec 01 09:58:50 algorithm in the cloud? Dec 01 10:17:00 1meh Dec 01 10:17:51 i have recyclerview grid, mostly with 2 columns, but sometimes spanning, or noe vievholder is tall as 2 other smalls Dec 01 10:18:55 and i want margin beetween items INSIDE recyclerview Dec 01 10:19:23 so some viewholders should have only right margin, others only left margin Dec 01 10:19:44 but since this grid is kinda irregular, i dont know how to do that in good old ItemDecoration Dec 01 10:22:00 if i'm using RealmChangeListener to observe my model, is it good practice to use notifyDataSetChanged() on my adapters? Dec 01 10:23:13 (my adapters are currently using RealmLists as datasets) Dec 01 10:59:10 Hey guys, I got a question. Currently I get a error message called permission denied, when i call in adb shell "run-as de.jakouf.whatevertest export", but when I run it like "run-as de.jakouf.whatevertest" and then in the next line, "export" (as user from app de.jakouf.whatevertest) it is working. Is this a correct behaviour? Dec 01 11:01:00 jakouf: Sure it is Dec 01 11:01:15 jakouf: otherwise it would behave differently Dec 01 11:02:04 Melatonina: I thought the the run-as command would allow the command following the packagename to run as this user Dec 01 11:22:30 for example "ls" and "run-as de.jakouf.whatevertest ls" gives also different outputs Dec 01 11:55:01 Will a treemap.entrySet remain sorted? Dec 01 12:18:19 what kind of collection should i create for storing adapters for a view? Dec 01 12:20:51 meaning, what type should i use to make the collection compatible for all adapters? Dec 01 12:47:10 how i can put google play on emulator? Dec 01 12:47:17 i have a emulator with google apis Dec 01 12:59:01 hi, I am getting a crash with this stack trace(which doesnt pass from my code). https://gist.github.com/oshamahue/cb250158763d17a4d4104c9e308063d0 does anyone has idea how it is triggered? Dec 01 13:04:00 JuliusN, the same type of collection for all adapters. Dec 01 13:04:40 vudu, do you do any layout stuff (add or removeView)? if so you're likely doing something wrong Dec 01 13:06:39 Syzygy: yeah to me it seems like not all adapters extend the same class Dec 01 13:07:04 When you extend an adapter you can create a collection to store the data in. Dec 01 13:07:14 (at least that's how I've always done it) Dec 01 13:07:34 that way it doesn't matter what the adapter extends, the collection is created and defined by you. Dec 01 13:08:20 i was thinking of a collection that would store all my adapters in an activity so i could iterate through them and call notifyDataSetChanged() on each one whenever i need to refresh Dec 01 13:08:58 that seems entirely different from what you asked for earlier. Dec 01 13:09:31 i guess i suck at english then Dec 01 13:09:41 Most of my adapters have a method like this: Dec 01 13:09:43 but that is what i meand by "storing adapters for a view" Dec 01 13:09:46 public void setItemList(List list){ Dec 01 13:09:46 itemList = list; Dec 01 13:09:46 notifyDataSetChanged(); Dec 01 13:10:06 ah Dec 01 13:10:59 @Syzygy yes but I don't think it is related to what I do. It seems something happens within the fragment lifecycle Dec 01 13:12:18 Seems like RecyclerView.Adapter is an entirely different implementation from regular Adapters... that's kind of a shame, so no Collection you could use for that. Of course you could always do List and then do checks to cast to the correct adapter... but I assume that would be fairly bad practice Dec 01 13:12:47 yeah recyclerview's adapter was exactly my issue Dec 01 13:14:37 vudu, in that case it seems like you're adding or removing the fragment wrong. I had a similar issue but the error message specifically mentioned fragments (although that might be because I have nested fragments). Dec 01 13:14:42 try this https://gist.github.com/Syzygy2048/3f3766c6ac35d32a888f4c624610466d Dec 01 13:16:10 JuliusN, I recommend something like what I did, that way everytime you update the data, it automatically notifies. No need for that collection then. Dec 01 13:16:45 If you don't want to notify at that point, you can always overload the method Dec 01 13:17:55 but i would still need to keep track of all adapters Dec 01 13:18:20 but it's not a big issue actually, i was just curious if adapters are compatible in that way Dec 01 13:18:49 but your implementation is worth considering Dec 01 13:18:54 i'll keep that in mind, thanks Dec 01 13:21:15 Syzygy: I have the exact same code on my base activity Dec 01 13:22:07 if you can reproduce it, try to step through with a debugger and look at the view ids/hierarchy to see what's causing this Dec 01 13:28:52 Syzygy: yeah I wish I could reproduce it. :/ Dec 01 13:43:57 If I have some application-wide data/state, would the correct approach to make it available to all activities be to load it in my Application onCreate? The data should be persistent, so I plan to load it from disk in the Application onCreate, and write it to disk in the application onDestroy. Dec 01 13:44:51 avoid putting too much load on application oncreate Dec 01 13:45:28 It would mostly be instantiating my managers, and tell them to load the data in another thread. Dec 01 13:45:39 do it in your activity Dec 01 13:46:11 But what's the point of saving the data when leaving from one activity, just to load it the moment after in the next? Dec 01 13:48:40 the point of doing it in an activity (or a service or elsewhere) is to not do it inside Application based on what you asked originally Dec 01 13:49:01 but you should consider the app lifecycle in all cases anyway Dec 01 13:50:48 What I want is to have some data loaded from disk available to all my activities. Would the correct approach be to load it in each activity's onCreate, and save it in each activity's onDestroy? Dec 01 13:51:24 of course not, you probably just need a singleton instance Dec 01 13:51:37 and access from it what has been loaded from any activities Dec 01 13:51:59 Hmm, ok. Why shouldn't it go in the Application class? Dec 01 13:52:00 just be careful to not abuse of singleton Dec 01 13:52:27 because application class is a bit special, and if you have something heavy/blocking it will defer your activity from being shown until it has done it Dec 01 13:52:59 Isn't the same the case for the Activities? Dec 01 13:53:05 nope Dec 01 13:53:16 Pardon me for asking so many questions, I'm just trying to understand. Dec 01 13:53:25 the recommended approach is to show/display your activity as soon and as fast as possible Dec 01 13:53:35 and then indicate to the user something is being loaded/refreshed whatever Dec 01 13:53:48 If I do something blocking the activity onCreate, won't that prevent the activity from being rendered? Dec 01 13:54:19 yes it can too but onCreate runs on the ui thread Dec 01 13:54:25 it really depends Dec 01 13:55:25 I've never really liked using singletons, as I feel state objects should be used as much as possible. But if it's the norm, I'll just go with it Dec 01 13:55:46 well, there is no norm Dec 01 13:55:57 and so many ways to store and access data, persistent or not Dec 01 13:56:21 choosing a good if not the best way requires much more context and overview Dec 01 13:56:51 just don't worry and do something generic enough that if later on you want to improve it you just have to change your code inside the generic cases Dec 01 13:57:05 totokaka, https://github.com/xxv/android-lifecycle might be handy for you if you're not aware Dec 01 13:57:06 What are some things usually done in the Application lifecycle methods? Dec 01 13:57:18 I'll check that out Dec 01 13:58:04 totokaka, nothing if possible, but some framework would require to be loaded before activities to inject or prepare specific stuff, eg fabric/crashlytics, WCL lib (official android wear data com helper), etc Dec 01 13:58:24 Ok Dec 01 13:58:27 or if you want to track leak with canary Dec 01 13:59:24 the link i just pasted to you, totokaka, is not about Application but only Activity and Fragment Dec 01 13:59:30 Yeah, I noticed Dec 01 13:59:43 again, if you're new to this, avoid crippling your Application class Dec 01 13:59:44 I'll go with a singleton instance for now, and reconsider later Dec 01 14:39:18 Hi, I'd like use ContrainsLayout can I use in production app? Dec 01 15:12:25 I have emulator running on 5554 port, and I redirected it to 2345 (because emulator for some reason only accepts local connections) Dec 01 15:12:26 Now, I've got a weird situation: after "adb connect localhost:2345" I see 2 devices, and the one by 2345 is shown "offline", but "5554" is fine. What could cause it? Dec 01 15:13:39 (essentially, I'm doing it because for remotely connecting to 2345, I see a single "offline" device) Dec 01 15:17:01 I mean, "adb devices" show them in that way Dec 01 15:17:18 s/show/shows Dec 01 15:22:14 Although, you know, it might be something with the way socat redirects the ports. I just did the same with netcat, and I see no more offline devices Dec 01 15:23:16 Ah, no, forget it, netcat actually didn't work at all :Ь Dec 01 15:27:02 Hi-Angel: I don't know if you should go to #android either #android-root Dec 01 15:27:07 maybe #android Dec 01 15:27:22 cristian_c: why? Dec 01 15:27:26 Hi-Angel: but I think you are offtopic here Dec 01 15:27:30 why? Dec 01 15:27:42 Hi-Angel: wny here? Dec 01 15:27:45 *why Dec 01 15:28:06 Why offtopic? Connecting to an emulator is the most basic part of development process o.O Dec 01 15:28:46 Hi-Angel: are you developing an app and testing it on an emulator? Dec 01 15:28:59 I need to test an app on emulator Dec 01 15:29:10 But I develop this app :) Dec 01 15:29:16 Kind of Dec 01 15:30:28 Hi-Angel: it seems yours is an emulator issue (I don't know what emulator you are usig) and not a development issue Dec 01 15:30:44 maybe you should read the emulator documentation Dec 01 15:30:53 *using Dec 01 15:31:14 Hi-Angel: ssh? Dec 01 15:31:15 -_- Dec 01 15:31:20 'adb connect' Dec 01 15:31:48 cristian_c: it's the android studio's emulator, and I've read everything I could in its help (it didn't have anymore docs) Dec 01 15:32:15 ah, integrated ide Dec 01 15:32:22 cristian_c: nope, not quite Dec 01 15:32:46 I mean, usually it is, but I don't need the rest of Android Studio, so I'm manually running the emulator Dec 01 15:33:10 Everything is fine though, the problem is irrelevant to the way it is ran Dec 01 15:33:13 ok, it's an android studio issue Dec 01 15:33:23 I guess so Dec 01 15:34:24 Hi-Angel: I0ve used adb connect in past Dec 01 15:34:28 I've Dec 01 15:35:16 Hi-Angel> Now, I've got a weird situation: after "adb connect localhost:2345" I see 2 devices, and the one by 2345 is shown "offline", but "5554" is fine. What could cause it? Dec 01 15:35:49 so, you0ve done by command line Dec 01 15:36:21 Right Dec 01 15:36:28 I've also encountered similar issues with adb (usb) and adb connect Dec 01 15:36:46 Hi-Angel: what client OS? Dec 01 15:36:53 Ubuntu Dec 01 15:37:09 Hi-Angel: ok, it's a bit tricky Dec 01 15:37:27 You meant "host" OS, didn't you? Dec 01 15:37:35 In an emulator is android Dec 01 15:37:38 usually, with classic usb adb I've to launch adb kill-server and then sudo adb devices Dec 01 15:38:04 Hi-Angel: sorry, the os where you connect to emulator from Dec 01 15:38:33 Ah, well, the problem can be seen straight from the host, so it's Ubuntu Dec 01 15:38:50 I launch with sudo because of permission issues Dec 01 15:39:05 Let me try :) Dec 01 15:39:18 with adb connect it's a bit more tricky, I don't remember exactly all the steps Dec 01 15:39:43 but usually I had to make several attempts before to establish a connection Dec 01 15:40:18 Hi-Angel: exactly what are all the commands you've typed to establish a connection? Dec 01 15:41:29 cristian_c: well, right now, with sudo: "./adb kill-server", "sudo ./adb connect localhost:2345" (it automatically starts the server), "sudo ./adb devices" Dec 01 15:41:31 Nothing changed Dec 01 15:41:49 (I remember also some users sent me to another channel when I talked about issues with adb connect) Dec 01 15:41:52 I didn't see explicit permission issues either, thoguh Dec 01 15:41:52 (adq) Dec 01 15:42:45 devuser, check the post on reddit.com/r/androiddev someone just asked the same thing Dec 01 15:43:19 Hi-Angel: adb kill-server and sudo adb devices are commands I use with an usb connection Dec 01 15:43:31 you remember wrong Dec 01 15:43:31 Hi-Angel: adb connect uses different commands Dec 01 15:43:52 adq: maybe, I've the logs Dec 01 15:49:38 thanks carcrash Dec 01 15:50:12 no prob Dec 01 15:52:30 Hi-Angel: ok, being adb connect based on ip addresses, have you typed adb tcpip portnumber? Dec 01 15:52:39 with 2345 = portnumber Dec 01 15:53:08 instead of 555 Dec 01 15:53:13 *5555 Dec 01 15:55:29 cristian_c: nope Dec 01 15:55:46 https://developer.android.com/studio/command-line/adb.html Dec 01 15:56:10 (in past, I also lookedmat the official documentation about this isse Dec 01 15:56:13 *issue) Dec 01 15:56:50 (and some portals stackoverflow-style) Dec 01 15:58:26 ' You can use the forward command to set up arbitrary port forwarding — forwarding of requests on a specific host port to a different port on an emulator/device instance. Here's how you would set up forwarding of host port 6100 to emulator/device port 7100:' Dec 01 16:01:54 http://stackoverflow.com/questions/4784341/how-do-you-connect-your-terminal-with-the-android-emulator Dec 01 16:02:00 (no adb connect) Dec 01 16:02:57 cristian_c: the "adb tcpip" command, as I understood, have to be run not on the host, but on a device or an emulator to start listening for connections. And abd port forwarding forwards host-port requests to acc. device/emulator ports Dec 01 16:04:43 cristian_c: ah, no, I have to use "adb connect" — I actually need to connect "adb" to the emulator from another PC. The reason I'm running it on my PC is to make it finally working. Dec 01 16:04:58 Hi-Angel: more a year ago, I used ssh app on android host as ssh server, and I connect from my desktop pc using adb connect Dec 01 16:05:22 Hi-Angel: ah, ok, remote connection Dec 01 16:05:29 Actually Dec 01 16:05:38 I suspect I've got the reason Dec 01 16:05:54 cross the fingers Dec 01 16:07:36 Emulator upon starting opens two ports, it is 5554 and 5555. For I'm forwarding the 5554 to 2345, I see "broken pipe" errors from socat, but 5555 works fine. Supposedly, I have to forward 5554, but not 5555. At least now I've an idea where to dig Dec 01 16:07:56 *for where to dig Dec 01 16:08:09 good Dec 01 16:08:36 I knew 5555 was the default port, I tried another port in past, though Dec 01 16:09:16 * cristian_c is sad because himself has not saved the command list, maybe Dec 01 16:09:28 *commands Dec 01 16:14:13 Anyone know an event or check for if the cell radio is currently in the high energy state? Dec 01 16:28:08 Anyone seen parts of vector images under AppCompat on 4.4 disappear when swapping them out with setImageDrawable? Which parts disappear isn't consistent and it doesn't always happen. Feels like a race condition. Doesn't happen on 5.0 and up. Dec 01 16:28:21 In my custom view, I put a @ViewDebug.CapturedViewProperty annotation on top of a getter, shouldn't that property now show up in the view hierarchy? Dec 01 16:36:53 is it safe to add a changelistener to a RealmResults object after an asynchronous query? is the query guaranteed to return only after the listener has been added? https://dpaste.de/iuSt Dec 01 16:45:19 anybody else get StackOverflowErrors when using ChangeTransform transitions? Dec 01 16:45:20 Oh my god it was tricky! cristian_c for the record: 5555 (the odd port) was the right one. But! You can't make more than one connection to 5555. Even worse: if there's something connected to, it won't refuse the 2-nd connection, but devices connected afterwards would see it "offline". "Who'd care?" may you ask. See: adb server somehow manages to revive itself after "adb killi-server", and takes the port — and you'd *never* kno Dec 01 16:45:26 on 5.0/5.1 only Dec 01 16:45:57 The salvation is in three six — you'd have to run emulator on somewhere, say, 6665, so that adb wouldn't guess its port Dec 01 16:45:59 they're still like 50% of my userbase so I am reluctant to disable it for them Dec 01 16:47:55 Ah, yeah, and the port forwarding didn't work for the same reason: just when I run socat, the port most of the times magically taken by adb server Dec 01 16:48:58 My god it was mind-blowing to solve! I'm actually spent whole day for this! :D Dec 01 16:50:03 aww Dec 01 16:50:31 http://blog.checkpoint.com/2016/11/30/1-million-google-accounts-breached-gooligan/ Dec 01 16:50:53 http://arstechnica.com/security/2016/11/1-million-android-accounts-compromised-by-android-malware-called-gooligan/ Dec 01 16:51:04 86 apps available in third-party marketplaces can root 74 percent of Android phones. Dec 01 16:51:18 interesting numbers, but not that factual ars-tech.. tut tut Dec 01 16:51:44 Hi-Angel: ah, ok, the second and third devices are in queue Dec 01 16:52:21 I hope so Dec 01 16:52:32 i dont know why Google dont have an API for the VerifyApps feature so that the 3rd-part Market places can just implement it Dec 01 16:58:37 if i start my intent with startActivity is it possible to make it 'permament' so if the app is running and i 'launch' it from appdrawer it goes back to that activity? Dec 01 16:58:53 not to the 'default' Dec 01 16:59:42 no Dec 01 17:04:17 anything is possible if you're willing to make ugly enough hacks Dec 01 17:04:56 you could always just save a variable somewhere (sharedprefs) that specifies which activity you *really* want to launch, and check for that in your mainlauncher activity Dec 01 17:05:26 Caused by: java.security.UnrecoverableKeyException: Failed to obtain X.509 form of public key Dec 01 17:05:30 interesting exception Dec 01 17:29:12 hi Dec 01 17:29:23 I've got a widget composed by a relative layout , and inside it there are a second relativelayout and an imageview. Inside the second relative layout there are a button and an imageview Dec 01 17:29:40 shouldn’t nest relative layouts Dec 01 17:30:24 s73v3r: what is , then, the right scheme? Dec 01 17:30:33 I've tried to position the external imageview below the first relativelayout, but it doesn't appear. If I use the layput_below param in the external imageview, it appears but on the top of the relative layout Dec 01 17:30:37 you could do that with one relativelayout Dec 01 17:30:41 *layout Dec 01 17:30:57 s73v3r: I've tried, in past Dec 01 17:31:41 about the result I'm talking, it should be the opposite! These are the sreenshots: http://imgur.com/a/ioHBN Dec 01 17:31:59 what is the screenshot of Dec 01 17:32:05 cristian_c: try ConstraintLayout Dec 01 17:32:15 s73v3r: thw right widget Dec 01 17:32:25 *on the right Dec 01 17:32:27 and using nested relativelayouts is a call for disaster Dec 01 17:32:41 thepoosh: ok Dec 01 17:32:47 the one on the right is what you want? Dec 01 17:32:55 then what’s the one on the left? Dec 01 17:33:31 thepoosh: I've read also the statelist drawable official documentation, but it's not applicable to that case Dec 01 17:33:53 s73v3r: widget on the left is for comparing Dec 01 17:34:04 i still have no idea what you’re trying to do Dec 01 17:34:10 i see two images Dec 01 17:34:16 one on top of the other. Dec 01 17:34:23 they each have two images side by side Dec 01 17:34:27 what is everything Dec 01 17:34:33 s73v3r: positioning the stripe on the bottom Dec 01 17:34:52 you want the stripe at the bottom Dec 01 17:35:16 so you have a view, with a stripe at the bottom? and an image in the center? Dec 01 17:35:25 s73v3r: the second screen is different by the one only for the layout_below parameter Dec 01 17:35:41 post your layout code too Dec 01 17:35:57 s73v3r: yes, I've placed a square for now , in p,ace of an icon Dec 01 17:36:17 but at the end of the day, you want a view, with an icon in the center, and a stripe at the bottom? Dec 01 17:36:30 s73v3r: http://pastebin.com/jbFfVGaZ Dec 01 17:36:47 s73v3r: yes, as in the left widget Dec 01 17:37:22 ok, the stripe should be layout_alignParentBottom Dec 01 17:37:23 substituting the square with an icon is not very difficult. Issue is related about size and position Dec 01 17:37:24 liefer, i thought there's a more elegant way :D Dec 01 17:37:45 that will put it at the bottom of the parent, the relativeLayout Dec 01 17:37:49 s73v3r: previously I've tried alignparentbottom Dec 01 17:37:50 since many app have 'login' activity then another activity Dec 01 17:38:01 and what happened? Dec 01 17:39:14 you should be able to put your icon image view with aligncenter, and then your stripe with align_parentBottom Dec 01 17:39:22 s73v3r: if you look at the commented code at the end of file, you can see alignparentbottom was previously used Dec 01 17:39:28 hey how do you list all the suid programs on a android device Dec 01 17:39:29 you will also need to tell the icon that it is above the stripe Dec 01 17:39:43 if i want to 'stack' the notifications is it necessary to have summarized notification? Dec 01 17:39:51 groupping isnt enought? Dec 01 17:40:08 cristian_c: You were still using nested relativeLayouts with that, though. Dec 01 17:41:00 try it with just the two imageviews, the icon one set to be centered and above the stripe Dec 01 17:41:14 s73v3r: I thought in a relativelayout objects are placed based on relative positions, and linear layout, instead, in base to the listed prder Dec 01 17:41:33 they are places in relative positions Dec 01 17:41:41 s73v3r: I'll try again only one relativelayout and alignparentbottom Dec 01 17:41:53 and the icon should be above the stripe Dec 01 17:42:08 s73v3r> you will also need to tell the icon that it is above the stripe Dec 01 17:42:19 yes Dec 01 17:42:36 Syzygy: here? Dec 01 17:43:04 s73v3r: this is interesting, the icon (now light grey) is placed on the button (dark grey). The stripe (light grey) should be placed below the button Dec 01 17:43:20 below = south Dec 01 17:43:30 i have no idea what you’re talking about Dec 01 17:43:35 now there’s a button? Dec 01 17:43:43 s73v3r: yes Dec 01 17:43:49 dark grey Dec 01 17:43:56 then why weren’t you just using a button to begin with? Dec 01 17:44:07 s73v3r: http://pastebin.com/jbFfVGaZ Dec 01 17:44:07 Because overriding Button is hard Dec 01 17:44:20 the second object of the second relativelayout Dec 01 17:44:38 either use an ImageButton, or get rid of the button entirely and put your touch event on the icon Dec 01 17:44:44 There's little point in using two RLs here Dec 01 17:44:44 or the view as a whole Dec 01 17:44:51 s73v3r: button is displayed well Dec 01 17:45:05 what does the button have in it Dec 01 17:45:47 Dagmar: is it wrong? Dec 01 17:46:07 s73v3r: I've thought to use an imagebutton, in past Dec 01 17:46:27 The code that handles RelativeLayout is much more complex than the code that handles LinearLayout. Dec 01 17:46:38 Would you like to troubleshoot a complex problem, or a simple problem? Dec 01 17:46:46 Dagmar: yeah, I think so Dec 01 17:47:13 This could be simplified by just using a LinearLayout in place of one of them Dec 01 17:47:19 Dagmar: some days ago, I've trid also linearlayout, but I can't placemthe objects Dec 01 17:47:51 Dagmar: yeah, I've used a linearlayout with a relativelayout inside it, in these dsys Dec 01 17:47:56 Your top-level layout is a relativelayout with _two_ objects in it, side by side. Dec 01 17:48:10 That could readily be replaced with a linearlayout Dec 01 17:48:15 Dagmar: I'll try again linearlayout, btw Dec 01 17:48:19 _Simpler_ is easier to troubleshoot. Dec 01 17:48:51 You can literally just use the XML editor and change the word "RelativeLayout" to "LinearLayout". The editor will change the closing tag for you Dec 01 17:48:59 Then you just set it to horizontal orientation Dec 01 17:49:07 Dagmar: ao, linearlayout could contain a relativelayout + imageview (stripe) Dec 01 17:49:28 and the relativelayout could contain button + imageview (icon) Dec 01 17:49:59 Anything can contain pretty much anything else. Dec 01 17:50:00 Dagmar: ok, but for example linearlayout has the orientation property Dec 01 17:50:08 Whether it makes any sense at all is another matter. Dec 01 17:50:17 Yes, it does have that property. Dec 01 17:50:27 and relativelayout often use different and peculiar properties, as explained in tge official doc Dec 01 17:50:31 It's a thing you can just click on in the properties window Dec 01 17:51:19 Dagmar: ok, I'll make further tests with the tips (I use a simple text editor, for now) Dec 01 17:51:40 o.O Dec 01 17:51:43 No wonder you're struggling Dec 01 17:51:55 Dagmar: s73v3r thepoosh , thanks Dec 01 17:52:01 Life's too short, man. If you can install and use Android Studio, do so. Dec 01 17:53:19 Dagmar: I'm using since little time an android emulator, for testing the widget part and it is quicker than testing on the device Dec 01 17:53:42 You're making a widget? Dec 01 17:53:52 You want to use AS and may god have mercy on your soul Dec 01 17:54:12 I think I'll use android studio editor if it will make me the life easier Dec 01 17:54:51 ok, thanks for the tips Dec 01 17:56:55 android studio editor is worthless Dec 01 17:57:41 Yet noobs make _insane_ layouts without it Dec 01 17:57:48 (ant debug command is not bad, btw, for building, in my little case) Dec 01 17:57:53 (for now) Dec 01 17:58:59 noobs make insane layouts *with* it Dec 01 18:02:26 why use ant... Dec 01 18:03:18 In my little case, I began so Dec 01 18:03:44 unless you started 3 this project 3 years ago... Dec 01 18:03:54 I do not exclude I'll use the AS ide Dec 01 18:04:33 what’ll you use instead? Dec 01 18:04:54 I think AS editor has auto-completion features, this could be good Dec 01 18:06:56 s73v3r: for now, I've not found too much issues with command line tools and simple text editor, but I can pass to an IDE, I'm not fanatic of command line Dec 01 18:07:00 :) Dec 01 18:07:09 Napalm: you around? Dec 01 18:07:45 writing java with a plain text editor isn’t much fun. debugging isn’t, either. Everything else, though, is fine Dec 01 18:07:53 you can even have a terminal window open in AS if you wish Dec 01 18:08:25 s73v3r: yes, I think you are right about debugger Dec 01 18:08:35 using jdb from command line is a mess Dec 01 18:08:37 so I'm thinking of ditching Firebase for something that has aggregation. Any ideas? Dec 01 18:08:51 jdb = java gdb Dec 01 18:09:32 yes, jdb is worthless Dec 01 18:09:39 unless you have no GUI at all Dec 01 18:19:20 I'm moving mine out into Bitcoin after seeing Fidelity's 10-year prediction be a _negative_ rate Dec 01 18:19:22 !@#!@ Dec 01 18:22:21 hello is this a help channel? Dec 01 18:26:28 MyPrecious: Regarding app development, yes. Dec 01 18:26:36 parco: yes Dec 01 18:33:28 I need to develop an android app for a project which involves google account authantication from a specific domain, I couldnt find a way to do it Dec 01 18:39:06 MyPrecious: I probably can't help on that topic, but FWIW that sounds like the kind of question which is so vague that nobody could answer it. :E Dec 01 18:41:31 for example in the first activity screen I want user to login a valid specific university account(for example: exampleuniv.edu). Dec 01 18:41:36 https://developer.android.com/training/id-auth/authenticate.html Dec 01 18:41:39 ^ MyPrecious Dec 01 18:42:18 if you don't use oath but another authentication mechanism/servicesw with your univ, then you have deal with it directly or build something to communicate with it Dec 01 18:42:28 many univs got a radius server running for example Dec 01 18:43:21 I'll try oath then Dec 01 18:43:36 no, don't try anything, first you need to know what the auth mechanism your univ is used and what is supported Dec 01 18:43:54 s/used/using/ Dec 01 18:53:58 how can I learn that? Dec 01 19:18:35 That guy who keeps calling it "Constrained layout"... Dec 01 19:19:25 TacticalJoke: i hear that one's twice as fast as the related layout Dec 01 20:04:20 TacticalJoke: http://i.imgur.com/9gK9bFW.png Dec 01 20:04:53 usefulness debateable but I decided to do it Dec 01 20:05:01 missingno: I'm glad you use `parent` rather than `activity`. :D Dec 01 20:05:11 Loads of people incorrectly use the activity as the context of inflation. Dec 01 20:05:22 (Which is wrong because views can have themes now.) Dec 01 20:05:40 There was even a talk about how to inflate stuff in which the guy made this mistake! Dec 01 20:06:00 biggest mistake when inflating is not merging with the parent Dec 01 20:06:39 ppl end up easily with additional linearlayouts or other viewgroups because of that Dec 01 20:06:56 and nested hierarchy is bad on android Dec 01 20:08:39 oh I've experienced pain from that Dec 01 20:08:55 tried to make a fragment use a contextwrapper, but somewhere there was a ((Activity) getContext()) Dec 01 20:09:28 I am not sure what you are saying adq Dec 01 20:09:45 iirc you should never attach to the parent in a recyclerview, it causes weird bugs Dec 01 20:10:04 oh i was not talking about recyclerview sorry, just inflating layout in general Dec 01 20:10:23 I think he means using `` as the root node of an included layout (rather than, say, ``). Dec 01 20:11:30 missingno: Using `activity` (rather than `parent.getContext()`) should work in general. The problem is that if one of the Views has a theme applied (which, of course, the activity won't have) then this info is simply lost. Dec 01 20:12:30 Though maybe I misread what you typed. :s Dec 01 20:13:17 Okay, yeah, I probably did misread. Never mind. Dec 01 20:18:37 * TacticalJoke walks away from explosion without looking back. Dec 01 20:56:28 im having some issues getting something to draw correctly on all displays, there is some underlying principal about this that I do not understand. I have read all the google docs on supporting multiple displays but i cannot get this to work properly everywhere and i dont understand it Dec 01 20:57:30 its a tile map, i construct the view by copying the correct tiles into a bitmap with no scaling. then when that bitmap is fully constructed i draw it into the view. Dec 01 20:58:02 trouble is, it comes out looking all messed up with the wrong tiles being drawn depending on what display its being drawn to Dec 01 20:58:40 the display density/size should not have any baring on me picking a tile out of one bitmap and then drawing that tile into another but it does Dec 01 20:59:23 my tiles are all 48x48 and i can have any odd number of tiles in view from 5x5 to whatever. Dec 01 21:00:10 i read the map file, and the map gives me the index to the tile to be drawn. i know that my tile bitmap is 8 tiles wide by N tiles high but... if the display is one size it works, if its another it does not Dec 01 21:02:46 to my thinking this should all work independent of the screen size/density Dec 01 21:02:52 whers the link? Dec 01 21:24:07 and of course your all assleep :P~ Dec 01 21:24:33 <_genuser_> is there any ops around? Dec 01 21:24:49 dont think theres anyone here cept us chikkins Dec 01 21:25:14 mark4: where are you loading the image out of? Dec 01 21:25:20 also, define “doesn’t work" Dec 01 21:25:33 <_genuser_> I'm sure this s73v3r guy is a hidden op. Dec 01 21:25:36 does it not fit? does it wrap around? Does it just look ugly? Dec 01 21:25:45 out of a bitmap i made in the gimp. its a png thats 8 tiles wide by N tiles high Dec 01 21:25:51 <_genuser_> ugly is also down to the content of the image, no? Dec 01 21:26:05 mark4: no, i mean in the app Dec 01 21:26:35 is it loaded from a drawable resource? do you have different versions for the different density buckets? Dec 01 21:26:45 can you show an image of what you’re getting? Dec 01 21:27:08 i can send you the APK if you trust me, so you can see whats happening, its like my draw scene code is not calculating the correct pixle coordinates within the tile png and is drawing the wrong stuff Dec 01 21:27:22 i wouldn’t have time to run an apk Dec 01 21:27:23 erm how do i take a screen shot of my AVD ? Dec 01 21:27:36 <_genuser_> hmm, guess at this point any attention getting would be labelled as trolling. I'll quit adding jokes. :) Dec 01 21:27:37 same way you take a screenshot of anything else on your desktop Dec 01 21:27:56 <_genuser_> mark4: alt-prtScn Dec 01 21:28:04 _genuser_, jokes welcome :) Dec 01 21:28:19 s73v3r, where doe sit put them? Dec 01 21:28:20 <_genuser_> select the AVD, then alt-prtscn, and it will take a screenshot of just that selected window. Dec 01 21:28:49 erm didnt seem to ask me to select a window, didnt seem to do anything atl all Dec 01 21:29:05 i think it saves it to the desktop? Dec 01 21:29:05 <_genuser_> then imgur.com -> New Post (green button on top), ctrl-v (to paste), and grab the URL. Dec 01 21:29:25 <_genuser_> alt-prtscn, saves it to your windows clipboard. You can paste it directly into imgur.com Dec 01 21:29:26 im in linux, thers nothing in ~/Desktop Dec 01 21:29:28 oh! Dec 01 21:29:31 i can use the gimp ! Dec 01 21:29:38 <_genuser_> oh... scrot on linux. Dec 01 21:29:51 yeah, that sentence right there is why more professionals probably don’t use that program :p Dec 01 21:30:10 <_genuser_> which sentence...? Dec 01 21:30:13 ok i got a screenshot Dec 01 21:30:19 mark4's Dec 01 21:30:41 lol Dec 01 21:30:41 <_genuser_> s73v3r: I thought scrot one. heh. There's another program called "escrotum" lol. Dec 01 21:30:53 yea it is a badly chosen name for an art package :/ Dec 01 21:31:03 like wtf were they thinking~ Dec 01 21:31:25 SCReenshOT Dec 01 21:31:29 <_genuser_> if it's free and you're spending your own time dev'ing it, I'll let the dev name it. as long as it's not mean or offensive. Dec 01 21:31:59 they were thinking “GNU Image Manipulation Program”. What’s wrong with that? Completely oblivious to the rest of the world Dec 01 21:31:59 <_genuser_> yiati: lol, now try to make sense of escrotum Dec 01 21:32:01 <_genuser_> :p Dec 01 21:32:32 <_genuser_> s73v3r: they love there recursive acronyms. Dec 01 21:32:35 <_genuser_> *their Dec 01 21:32:52 how do i pste this image to imgur.com? im not signing up for some stoopid account just to paste a temp image lol Dec 01 21:33:04 When using mockito for testing in android studio. When I run a test or test suite. Does it always have to launch the emulator? I thought if I had set it up properly I could run the tests without a device or emulator active? If you can run tests without a device or emulator, how do I configure the run to do so? Dec 01 21:33:05 <_genuser_> just go to imgur.com, hit New Post from the top. Dec 01 21:33:09 <_genuser_> no signing up needed. Dec 01 21:33:52 i click on new post. i click on browse.... NOTHING happens. Dec 01 21:34:21 <_genuser_> just drag the image on. alternatively, ... ((( use windows ))) Dec 01 21:34:23 * _genuser_ ducks. Dec 01 21:34:42 cant drag the image Dec 01 21:35:09 does this happen with an actual device? Dec 01 21:35:18 and maybe post your drawing code as well Dec 01 21:35:19 all i want to do is BROWSE to the file and upload it Dec 01 21:35:28 not ^c ^v or drag/drop bullshit Dec 01 21:35:40 why can’t you drag the image? Dec 01 21:36:07 because if i try drag and drop the image all i do is draw a line through it Dec 01 21:36:28 do none of these fucking image paste sites let you BROWSE to the freeking image? Dec 01 21:36:30 fucking idiots Dec 01 21:36:55 yea. thats the second one i tried that does have a browse button which does fuck all Dec 01 21:37:11 oh. i know why Dec 01 21:37:30 you disallowed access to the filesystem with your browser? Dec 01 21:37:32 the browse button does a popup. i disabled ALL popups of any kind for any reason in firefox Dec 01 21:37:40 and im not enabling any of them again Dec 01 21:37:41 ever Dec 01 21:37:52 so maybe i can email this png to you :/ Dec 01 21:37:54 enable the damn popup for the browse to window Dec 01 21:37:55 no Dec 01 21:38:48 no never going to happen. im not enabling any popups in my browser ever. the instant you allow one its abused. if i could disable javscript and flash they would also be terminated with EXTREME prejudice Dec 01 21:39:16 and then you would keep bitching about websites not catering to you Dec 01 21:39:19 no idea how i can drag/drop an image out of an editor without drawing into that image :/ Dec 01 21:39:30 s73v3r, i said if i could i would Dec 01 21:39:44 you save the image to a file Dec 01 21:40:02 yes its in ~/screenshot.png Dec 01 21:41:32 ugh. every time i try to view a PNG my system launches internet expunger under wine :/ Dec 01 21:41:54 so change it. Dec 01 21:41:56 which does not know how to display it Dec 01 21:42:14 <_genuser_> what is your DE? Dec 01 21:42:21 cinnamon Dec 01 21:42:46 <_genuser_> not familiar. does it use its own file mgr? Dec 01 21:43:11 <_genuser_> you should be able to right-click, open with and set permanent assoc Dec 01 21:43:34 yes. when i double click the image it launches internet expunger under wine which does not know how to display a png :/ Dec 01 21:43:37 <_genuser_> also +1 for using a DE with a stripper name Dec 01 21:44:00 it only has one other suggestion. and that the gimp Dec 01 21:44:21 surely there’s a “Let me choose the program” suggestion Dec 01 21:44:34 http://imgur.com/a/pToVn Dec 01 21:44:38 <_genuser_> what's the distro Dec 01 21:44:39 i think maybe i got it Dec 01 21:44:43 does that link work for you Dec 01 21:44:51 <_genuser_> I always just use feh for viewing Dec 01 21:44:57 it works Dec 01 21:45:00 so what’s the issue Dec 01 21:45:01 wht is feh Dec 01 21:45:15 the brown blobs in there are trees Dec 01 21:45:23 its not drawing the correct tile Dec 01 21:45:53 it doesn’t look like it’s an android thing Dec 01 21:45:55 i dont draw tiles into a view, i have a bitmap thats exactly N x M tiles wide and draw into that. that temp bitmap is then drawn into the view once its completed Dec 01 21:45:59 <_genuser_> feh https://wiki.archlinux.org/index.php/feh Dec 01 21:46:15 the minimap in the top right corner is drawn just fine Dec 01 21:46:18 yeah, it looks mostly like it’s an issue with your tile drawing code Dec 01 21:46:34 the red blob in the middle is my character Dec 01 21:46:46 the tile drawing code works perfectly on some displays Dec 01 21:46:48 so the brown tiles should be green? Dec 01 21:46:50 not so much on others Dec 01 21:47:08 there are 3 or 4 different types of tree. oak, fir, dead etc :) Dec 01 21:47:36 the wall looking thing to the north of my red blob character is actually a castle Dec 01 21:47:52 have you looked at what devices it works fine on, compared to which ones it doesn’t? Dec 01 21:48:36 right now i dont have any that its working on but in the past all i had to do was scale every tile to a new size and put them in drawable-xyzzy for the right screen density. i never questioned that till now Dec 01 21:49:12 and you’ve done that now? Dec 01 21:49:24 because i can have eveyr screen density listed on the dev site catered to and... nothing draws right on my current qhd display Dec 01 21:49:37 and do you have a brown tile in your tileset? Dec 01 21:49:51 yes thats all stuff drawn out of my tileset Dec 01 21:49:56 its just not the right stuff Dec 01 21:50:26 and you’re sure the tilemap indexes are right? Dec 01 21:50:31 my tile source bitmap is 8 tiles wide by N tiles high for however many tiles i have Dec 01 21:50:35 positive Dec 01 21:51:06 for tile M i divide M by 8 and thats my Y index and the remainder is the X offset Dec 01 21:51:07 then it’s a bug in the code that grabs the tile out of the tileset Dec 01 21:51:15 i know every tile is 48 x 48 Dec 01 21:51:29 a bug that only manifests itself on certain screen densities Dec 01 21:51:34 get my confusion? :) Dec 01 21:51:48 thers a link in there somewhere that I am not understanding Dec 01 21:51:53 but you said it happens on all your devices Dec 01 21:52:15 right now its happening on all my devices and every avd i create. Dec 01 21:52:26 regardless of density/resolution Dec 01 21:52:34 but the android sdk has changed. yea regardless Dec 01 21:52:39 so it doesn’t only happen on certain screen densities Dec 01 21:52:41 that was not the case previously Dec 01 21:53:22 not any more so... maybe my code IS wrong and what used to work with most of the time with older sdk versions no longer does Dec 01 21:53:29 Baulde: Yes you can run tests without an emulator or device. Those tests you are running are integration tests, not unit tests Dec 01 21:53:40 Baulde: this guide by Google is actually pretty good https://codelabs.developers.google.com/codelabs/android-testing/#0 Dec 01 21:53:59 mark4: everything I’m seeing looks like a bug in the tile selection code Dec 01 21:54:03 maybe in the cropping code Dec 01 21:54:13 problem is, the method im using is not rocket science, its just using rects on one bitmap to a rect on another bitmap and drwing Dec 01 21:54:16 has the tilemap image changed recently? Dec 01 21:54:24 no. the tilemap is the same Dec 01 21:54:45 if you load up an older build of your game, does the problem still show itself? Dec 01 21:54:48 yiati, Thanks, I'll look over that. I am trying to run database tests. But could not figure out how to run them without launching an emulator. I kept reading mentions of being able to do it without a device/emulator Dec 01 21:54:50 and i loaded it in the gimp last night to look at it. the tiles are 48 x 48 and the tile image is 8 by N tiles Dec 01 21:55:10 is the brown tile right next to the tree tile? Dec 01 21:55:27 sort of. i can load an older apk thats on a device and that works but it was built with the old tools Dec 01 21:55:37 old tools? Dec 01 21:55:52 yes. google is updating the sdk constantly Dec 01 21:56:10 that’s not what people mean when they say old tools Dec 01 21:56:11 a apk i built over a year ago works on the device i tested it on Dec 01 21:56:16 the same code built now doesnt work Dec 01 21:57:05 if you take the tileset image you have now, and package that in with the apk from a year ago, what happens? Dec 01 21:57:39 i did not try it but its the same image. no edits to that base tile set since i drew them Dec 01 21:58:12 are you sure? your git history shows that the tileset hasn’t changed since then? Dec 01 21:58:49 its not git but mercurial but i dont need to check history, i drew the tiles and only ever made one change to them Dec 01 21:58:55 check Dec 01 21:59:40 the original tile set was 72x72 not 48x48 i re-scaled every tile from 72x72 to 48x48 and pasted them into thye current tiles.png which was working fine back then and has not been edited a single time since. Dec 01 21:59:59 i just opened that tiles.png in the gimp last night and the tiles are all 48x48 and look just fine Dec 01 22:00:08 i think your code is off Dec 01 22:00:32 i KNOW this is a bug in my code - but... its one of them squirly bugs that makes no sense Dec 01 22:00:32 i can’t see anything in android that would cause you to have errors in your tile selection code Dec 01 22:00:47 post your code, then Dec 01 22:00:59 no of course not, please dont think this was a "my code isnt working, its googles fault!" things heh Dec 01 22:01:21 i don’t Dec 01 22:01:48 s73v3r, im considering it but there are things in there that you would instantly zone in on as the culprit. for example... its making calls to an NDK library that i wrong that im not pasting the code for lol Dec 01 22:02:00 let me look at the code a few minutes and then ill paste it Dec 01 22:02:10 without that, we’re not really going to be able to help Dec 01 22:02:10 even though its top secret... shhhh dont tell anyone Dec 01 22:02:16 i know Dec 01 22:02:25 the only thing that really jumps out to me is a possible off by 1 error Dec 01 22:02:37 yea those are very common Dec 01 22:02:37 given that the tile in 0,0 is brown, when it should be a tree Dec 01 22:02:51 which is why i asked if the brown tile is next to the tree tile Dec 01 22:03:33 except this does not look like an off by 1, its not drawing the wrong tile, its not drawing the tiles correctly at all, its picking up pieces of 2 or more tiles but picking up the right number of pixles, just not from the right place in the tile map. Dec 01 22:03:45 no the brown tile IS the tree Dec 01 22:03:59 then what’s the green tile? Dec 01 22:04:09 but you get what I was saying, it’s brown when it should be green Dec 01 22:04:14 this is layerd, theres a ground layer and an object layer. the green tile is grass in the groun d layer Dec 01 22:05:03 so wait, the problem isn’t that it’s choosing the wrong tile, the problem is that it’s choosing a rect in the middle of tiles? Dec 01 22:05:05 to draw a scene i draw into a 1x1 tile bitmap (i.e. 48x48) Dec 01 22:05:29 i draw the ground layer into it, then the object layer. then i draw that into the scene bitmap to later be drawn into the view Dec 01 22:05:37 tada! Dec 01 22:05:40 yup Dec 01 22:06:02 so the issue is with the offset used to position the source rect Dec 01 22:06:08 yes Dec 01 22:06:34 which is read out of a MAP file. a map file has 2 layers for every location. a ground layer and an o bject layer. a tree for example is an object Dec 01 22:06:49 mobs are drawn separately Dec 01 22:06:54 that shouldn’t matter Dec 01 22:07:02 ya Dec 01 22:07:15 gime a sec Dec 01 22:08:33 step through your tile selection code Dec 01 22:08:37 https://paste.pound-python.org/show/EbaZyUrTHUNmwiO8tOQL/ Dec 01 22:08:45 check what coordinates it’s selecting for tiles Dec 01 22:09:37 actually thats not a bad idea, i dont need to step, i can set a brekpoint and see the tile X/Y thas picked for any given tile and see if it makes sense (by looking at that tile in the tiles.png) Dec 01 22:10:05 dont laugh at my java leetness. i know its a negative value on the 1337 scale Dec 01 22:10:11 also, invest in longer variable names Dec 01 22:10:24 yea thas a bad habit of mine, Dec 01 22:10:33 i tend to decrease verbosity not increase Dec 01 22:10:47 U and V are standard for texture coordinates, but everything else should be a longer name Dec 01 22:10:56 i dont like variableToHoldFudgeFactorForComplexFunction varible names Dec 01 22:11:10 ra is even worse Dec 01 22:11:15 ra? Dec 01 22:11:21 one of your variables Dec 01 22:11:23 i have a variable called ra ? lol Dec 01 22:11:25 the sun god Dec 01 22:11:26 q is just flat out wrong Dec 01 22:11:40 q is the guy from star trek Dec 01 22:11:49 q is a "i dont care about this variable name" variable Dec 01 22:11:56 then why even have it Dec 01 22:11:59 its always a temp store for something thats obvious from context Dec 01 22:12:06 not that i can see Dec 01 22:12:23 and you’ve just told me that it’s reused for different things. don’t do that Dec 01 22:12:45 well this code is not for general consumption but... ill take your suggestions under consideration (actually consider, not just say i am... i bow to your superior knowledge). Dec 01 22:12:58 q is usually a local variable Dec 01 22:13:09 mark4 this is basic stuff from 'code complete' like 20 years ago, not superior knowledge Dec 01 22:13:20 i know it’s cool to be all “my variables are short and reused”, but it makes it extremely difficult for anyone to read it Dec 01 22:13:27 even yourself, a few months down the line Dec 01 22:13:27 oh. your looking at code i scratched together in 10 minutes lol. its run ONCE and never run again. its commented out Dec 01 22:13:45 then get rid of it Dec 01 22:14:12 thas why its commented out. i keep it because if/when i get an actual artist to draw a tileset for me i need to run thaqt code ONCE on the new artwork Dec 01 22:14:15 you have source control. no need to keep a bunch of dead code around. let alone at the top Dec 01 22:14:38 make that it’s own little utility Dec 01 22:14:41 its used to calcualte an avg r/g/b value for each tile in the set. this is then used as a color value to draw that tile in one pixle in the mini map Dec 01 22:14:48 s73v3r its pointless Dec 01 22:15:09 s73v3r is not pointless Dec 01 22:15:12 don't waste your time, mark4 has been programming for a long time. its the way it is Dec 01 22:15:28 oh I misunderstood Dec 01 22:15:31 the intent is to eveually REMOVE that code from the source and recode it in C and have gradle run it and create a dynamic data file to be used in the game Dec 01 22:15:43 this isnt even in gradle right now, it will be Dec 01 22:15:53 at the very least, it should be at the bottom of the file. Dec 01 22:16:01 so if the tile png is ever modified the build will recreate the talbe Dec 01 22:16:02 how goes breakpointing the code? Dec 01 22:16:17 didnt do it was too busy defending my bad habits lol Dec 01 22:16:19 gimme a sec Dec 01 22:17:42 ok set 2 breakpoints but it stopped on a blank line. rebuilding Dec 01 22:18:23 i backlogged (heavy lol), mark4, are you storing your images inside res/drawable-nodpi/ ? Dec 01 22:18:48 because that would probably help you to avoid scaling issue depending on how you load them as bitmap Dec 01 22:19:13 adq no but i tried that and it looked the same Dec 01 22:19:24 thas really the place that makes sense to me tho Dec 01 22:19:31 right now there just in res/drawable Dec 01 22:19:50 funny thing is, there are other items in res/drawable that are being drawn just fine Dec 01 22:19:57 always were, on any display Dec 01 22:21:39 cool stuff http://www.infoworld.com/article/3146205/microsoft-windows/cosmos-looks-to-make-net-apps-soar.html Dec 01 22:24:03 mark4, well i did some similar things (layered tiled map based on some pictures too), i put all tiles inside drawable-nodpi/, i'm loading them with BitmapFactory.decodeResource... which takes a bitmapOptions, and this bitmapOptions has .inDensity = DisplayMetrics.DENSITY_DEFAULT and .inTargetDensity = DisplayMetrics.DENSITY_DEFAULT Dec 01 22:24:20 and i never had any troubles due to dpi scaling or inconsistencies Dec 01 22:25:18 thats how i load my tile maps too Dec 01 22:25:37 oh. wait. DENSITY_DEFAULT let me look at the tile loading Dec 01 22:26:32 in worst scenario, you can still use Bitmap.createScaledBitmap Dec 01 22:26:46 line 638 of the pasted code loads the tile set into the tileSet bitmap Dec 01 22:26:52 and force it to scale it to the desired dimension, but i'm sure this should not be necessary Dec 01 22:27:45 how do i set that DEFAULT_DENSITY property? Dec 01 22:27:51 on what do i set it? Dec 01 22:28:08 hello guys :) question please : could I buy a google play account for a friend using my credit card which I used to buy my own google play account ? Dec 01 22:29:51 mark4, on the bitmapoptions object you pass in parameters to the decodeResource method Dec 01 22:30:02 alikyo: i wouldn’t, as your account would be tied to theirs. But it is something you can do Dec 01 22:30:10 adq im not passing one in at all Dec 01 22:30:25 mark4, e.g., bitmapOptions.inDensity = .. but remember to move your pic to drawable-nodpi and clean all-the-things too Dec 01 22:31:24 decodeResource(Resources res, int id, BitmapFactory.Options opts) <-- this one? Dec 01 22:31:37 yup Dec 01 22:31:38 mark4, i don't know more, good luck, at worst you can always scale the bitmap to the desired size Dec 01 22:31:45 s73v3r : ok clear, thank you Dec 01 22:32:03 you might not have fixed the problem, dont know but your suggestion makes sense anyway :) Dec 01 22:38:19 Scaled bitmaps pretty much universally look like crap Dec 01 22:38:43 God help you if you actually target hdpi Dec 01 22:42:29 hi, Dagmar Dec 01 22:43:48 does anyone here know init.rc ? Dec 01 22:52:09 yiati: it looks like what I want is a ContentObserver pointed at content://sms/sent Dec 01 22:52:24 isn’t that what we told you yesterday? Dec 01 22:55:40 Yeah I believe that's what s73v3r was mentioning with the sms database yesterday. Dec 01 22:55:46 sparr: did you get it working? Dec 01 23:00:58 The Android Monitor built into Android Studio these days is so good that I wish is was an option for debugging JVM stuff Dec 01 23:01:36 setting the default density on the bitmaps as i decode them does not affect the outcome. Dec 01 23:03:07 oh duh i forgot one step. brb :) Dec 01 23:03:37 mark4: Are you just trying to load images into an ImageView? Dec 01 23:03:52 not quite Dec 01 23:04:30 im constructing a bitmap which is n by m tiles and drawing the tiles in 2 layers into that bitmap. that bitmap is then drawn to the view Dec 01 23:04:44 something aint werkin right any more but im tracking it down maybe Dec 01 23:06:48 yiati: haven't even started coding it yet. have never done android dev before, so now I'm trying to get the app to build in Android Studio. Dec 01 23:07:04 sparr: Ah cool Dec 01 23:08:04 oddly, when I just do Build > Make Project, it runs fine. But when I add a Gradle task to 'assemble' in an attempt to get an apk, I get a syntax error in the code Dec 01 23:08:45 "Error:(127) Error: Expected resource of type styleable [ResourceType]" Dec 01 23:08:59 that error on this line of code: else color = drawables.getColor(1, 0xff000000); Dec 01 23:09:25 while this preceding line doesn't produce an error: if (contactType == ContactsDatabase.PUSH_TYPE) color = drawables.getColor(0, 0xa0000000); Dec 01 23:09:44 the code was originally a ?: but I split that up in an attempt to figure out what the error means Dec 01 23:10:56 it’s expecting an R.color value Dec 01 23:11:33 there are no getColor() constructors with (int, int) Dec 01 23:12:05 https://i.imgur.com/PTSuCsc.png Dec 01 23:12:13 yeah Dec 01 23:12:25 but it’s taking an index and a resource value Dec 01 23:12:34 i don’t know what you’re trying to pass in, but it isn’t that Dec 01 23:13:12 this isn't even my code. I'm just trying to get an already-working app to compile with no changes :( Dec 01 23:13:21 not gonna happen Dec 01 23:13:21 sparr: It happens when your attrs array has more than one element. Dec 01 23:13:27 When you try to get 1 or above. Dec 01 23:13:45 I think the reason it happens is that `attrs` arrays need to be alphabetically sorted if there are (I think) three or more. Dec 01 23:13:50 It's a weird Android thing. Dec 01 23:13:56 You can suppress the warning. Dec 01 23:14:09 https://github.com/WhisperSystems/Signal-Android/blob/0a569676f7a57144374a24faef566b2ca3233290/src/org/thoughtcrime/securesms/contacts/ContactSelectionListAdapter.java#L125-L126 Dec 01 23:15:10 TacticalJoke: what attrs array? Dec 01 23:15:11 Yeah, you get the error because you're saying `drawables.getDrawable(1, ...)` rather than `drawables.getDrawable(0, ...)`. Dec 01 23:15:19 STYLE_ATTRIBUTES Dec 01 23:15:32 You can ignore it. Dec 01 23:15:41 I can't ignore it. It's an error blocking the build. Dec 01 23:15:51 Though I would put STYLE_ATTRIBUTES members in alphabetical order if I were you. Dec 01 23:16:03 Just Alt+Enter over it. You can suppress it. Dec 01 23:16:13 not if its an error Dec 01 23:16:17 "Though I would put STYLE_ATTRIBUTES members in alphabetical order if I were you." <-- I have no idea what this means Dec 01 23:16:17 You can. Dec 01 23:16:24 @SuppressWarnings("ResourceType") Dec 01 23:16:35 that’s a warning. he’s saying this is an error Dec 01 23:16:38 Error:(126) Error: Expected resource of type styleable [ResourceType] Dec 01 23:16:39 Information:1 errory Dec 01 23:16:46 sparr: Try it. Dec 01 23:16:48 (ignore that "y" at the end) Dec 01 23:17:05 It's only an error when building the release version, AFAIR. Dec 01 23:17:09 Alt+Enter over *what*? Dec 01 23:17:18 they’re still gonna have to fix it at some point Dec 01 23:17:23 You should get a warning in IntelliJ. Dec 01 23:17:27 s73v3r: There's nothing to fix. Dec 01 23:17:38 that’s not what the compiler is saying Dec 01 23:17:41 s73v3r: can you explain what needs fixing, in words that I might understand? Dec 01 23:18:00 Have you encountered this before, s73v3r? Dec 01 23:18:01 I don't see any arrays here, so TacticalJoke's comments about an array are super confusing to me Dec 01 23:18:05 Because I have spent hours on this. Dec 01 23:18:27 if it was a warning, it would say warning Dec 01 23:18:36 sparr: drawables is your array Dec 01 23:19:19 ahh, ok Dec 01 23:19:29 sparr: Place `@SuppressWarnings("ResourceType")` above onBindViewHolder. Dec 01 23:19:29 in android studio is it possible to point at a referenc to a bitmap and have it show me what that bitmap looks like? Dec 01 23:19:31 I'm just calling a method on that array Dec 01 23:19:40 i need to see what it thinks the bitmap looks like Dec 01 23:19:54 wihtout drawing it in the code itself, i need the debugger to show me the bitmap image Dec 01 23:20:12 not while debugging, I don’t think Dec 01 23:20:25 thats not helpful :/ Dec 01 23:20:35 sounds like a basic sort of thing a developer might want to look at Dec 01 23:20:45 sparr: You're getting an error/warning which is not important at all. Dec 01 23:20:54 It's trying to help you avoid making a mistake, but it's arguably wrong. Dec 01 23:21:02 There are two ways to stop it. One is what I just posted. Dec 01 23:21:22 If you try what I just posted, I'll tell you the other way. :p Dec 01 23:21:46 while I'm building with the suppression attempt, can you tell me what the actual failure is? Dec 01 23:22:01 It's expecting a declare-styleable thing. You're not giving it that. Dec 01 23:22:05 It's a Lint thing. Dec 01 23:22:11 Some Lint things can be suppressed. Dec 01 23:22:14 it’s what it says. It’s expecting a resource ID, which you’re not giving Dec 01 23:22:32 s73v3r: It doesn't really need it, though. Dec 01 23:22:34 why is it expecting a resource ID? that method should just be expecting two ints Dec 01 23:22:44 sparr: Because that's the *typical* solution. Dec 01 23:22:48 resource IDs are ints Dec 01 23:22:50 Doesn't mean it's the only one. Dec 01 23:22:57 Information:BUILD SUCCESSFUL Dec 01 23:22:59 Information:481 errors Dec 01 23:23:01 Information:0 warnings Dec 01 23:23:03 haha, woot? Dec 01 23:23:06 TacticalJoke is right, the compiler seems to think drawables is not a TypedArray object but rather a Drawable Dec 01 23:23:14 but they annotate parameters to say that they expect certain kind of things Dec 01 23:23:26 Imagine that Dec 01 23:23:36 s73v3r: This is just a lint warning Dec 01 23:23:46 ok, now, is there a straightforward way to get the unsigned apk from my computer to my phone? Dec 01 23:23:52 now that I've had gradle build it Dec 01 23:23:54 It's an attempt to help you avoid making a mistake, but it's too restrictive here. Dec 01 23:23:59 sparr; yeah. Plug it into the USB cable Dec 01 23:24:08 I've got build/outputs/apk/Signal-Android-release-unsigned.apk Dec 01 23:24:15 sparr: You should sort those array elements into alphabetical order. Otherwise things can silently fail. Dec 01 23:24:17 sparr: Once ADB connects you can click that play button and it'll push the thing to the phone Dec 01 23:24:26 plug your phone in, and just hit Run Dec 01 23:24:44 Dagmar: "once ADB connects" as indicated how? Dec 01 23:25:05 s73v3r: I created a new task for Gradle to build the unsigned APK. hitting run just reruns that task. Do I need to switch back to another task? Dec 01 23:25:06 sparr: As indicated by you'll see it spew a bunch of stuff to the Android Monitor window at the bottom. Dec 01 23:25:49 sparr: `new int[]{R.attr.contact_selection_push_user, R.attr.contact_selection_lay_user};` should be changed to `new int[]{R.attr.contact_selection_lay_user, R.attr.contact_selection_push_user};`. Dec 01 23:26:21 Those attrs must be in alphabetical order, AFAIR. Dec 01 23:26:28 Or else it'll silently fail when there are three or more. Dec 01 23:26:41 Two will work fine either way, but it doesn't make sense to violate the system here. Dec 01 23:26:43 Dagmar: "no connected devices", and the logcat tab wants me to 'Please configure android SDK' Dec 01 23:26:56 hi everyone Dec 01 23:27:03 sparr: Did you enable debugging _on your phone_? Dec 01 23:27:06 yes Dec 01 23:27:25 sparr: Then I suggest you look into why it is it's not identifying to the computer properly Dec 01 23:27:45 ADB is the way to do this. Pretty much everyone does it. Dec 01 23:27:49 went to 'about phone', tapped the build number 7 times, went out and into developer options, the unlabeled slider is ON and the usb debugging option is ON Dec 01 23:27:49 does work intl x86 Atom system image on Amd Cpu ????? Dec 01 23:27:56 sparr: try verifying the location of your android sdk in your ide Dec 01 23:28:17 ok, re-plugged USB a few times, now I get a popup on the phone telling me the computer can't communicate with the phone Dec 01 23:28:29 What unlabeled slider? Dec 01 23:28:31 asks me to install one of two programs on my computer. android file transfer or samsung something? Dec 01 23:28:50 Dagmar: the one at the top that's just On/Off Dec 01 23:28:52 sparr: that's happened to me before, I just used a different usb cable to get it to connect to adb Dec 01 23:28:55 There is an entry under developer options specifically named "Android debugging" Dec 01 23:29:16 zylum-: does something need to be installed/running on my computer for it to connect to? Dec 01 23:29:24 sparr: ADB. Dec 01 23:29:25 does work intl x86 Atom system image on Amd Cpu ????? Dec 01 23:29:31 yes Dec 01 23:29:31 ...which Android Studio will launch on it's own Dec 01 23:29:40 sparr: depends on your os, windows you might have to install the usb drivers for your device Dec 01 23:29:40 sparr: Some devices might need special software. So maybe. Dec 01 23:29:41 Dagmar: I have "USB debugging" but not "Android debugging" Dec 01 23:29:47 Especially if we're talking Samsung. Dec 01 23:29:52 sparr: but I don't use windows so idk for sure Dec 01 23:29:53 yes samsung. galaxy s7. Dec 01 23:29:58 I'm on a mac Dec 01 23:30:04 sparr: There's no harm in installing it. Dec 01 23:30:18 Well, I'm talking from Windows experience. Dec 01 23:30:20 tx : me ? Dec 01 23:30:48 sparr: Even the old Nexus devices needed a special driver. Not sure whether that applies today. Dec 01 23:31:08 I did no such usb thing on my mac Dec 01 23:31:11 Google has a generic USB driver that comes in with Android Studio that handles most devices Dec 01 23:31:27 it just kinda worked Dec 01 23:31:35 it needed drivers on Windows. not on Mac Dec 01 23:31:37 missingno: My recent Moto devices worked instantly. Dec 01 23:32:02 I've had old phones that needed manual udev grants in Linux Dec 01 23:32:08 ok, I ran adb from the sdk platform-tools directory, and it started the daemon Dec 01 23:32:16 yeah that should be all you need Dec 01 23:32:30 sparr: You don't need to manually run adb. Dec 01 23:32:44 Assuming you're using Android Studio. Dec 01 23:32:54 hello my device is named like "android-5022dXXXXXXXX" in my router how can i change this name? Dec 01 23:33:23 derpila: try #android. This is for app development Dec 01 23:33:33 TacticalJoke: what DO I need? Dec 01 23:33:45 a stiff drink :p Dec 01 23:34:02 sparr: Just run from Android Studio. Dec 01 23:34:22 anyone know that Intel-x86 Atom system image works on AMD CP Dec 01 23:34:25 ? Dec 01 23:34:28 Android Studio still says 'No Connected Devices' in the android monitor panel Dec 01 23:34:32 IRIB: try it Dec 01 23:34:43 and the android monitor panel logcat tab says 'Please configure Android SDK' Dec 01 23:35:00 that’s your problem Dec 01 23:35:12 Studio doesn’t know where the SDK is, so it’s not able to run ADB properly Dec 01 23:35:36 It should have installed it, so it better know where it's at Dec 01 23:37:32 Android Studio: "Where it at, doe?" Dec 01 23:37:37 sparr: File > Settings > Appearance & Behavior > System Settings > Android SDK - verify that it's the correct path Dec 01 23:37:43 ivi Dec 01 23:37:52 Amd Cpu is shiity Dec 01 23:38:22 ok, I changed the task from my gradle build back to the default one for the project, then hit Run. as soon as I did that, I both got a dialog asking which device to run it on, including my connected phone and an emulated nexus, and the logcat tab started scrolling logs Dec 01 23:40:04 Is it party time now? Dec 01 23:40:41 yes. You should find your party hat under your chair Dec 01 23:40:54 sparr's paying for drinks. Dec 01 23:41:52 it made me install the SDK version to match my phone OS. did that. Dec 01 23:42:13 then it prompted me on the computer to uninstall and reinstall the app on the phone, I allowed it Dec 01 23:42:52 and now the freshly installed app is running on the phone. with none of its previous configuration. I've got my fingers crossed that it didn't lose its data. Dec 01 23:43:17 sparr: What do you mean by "install the SDK version to match my phone"? What exactly did you install? Dec 01 23:44:15 I originally had the sdk platform tools for... v25 installed? Dec 01 23:44:26 I had to install v22 to build the app previously, since that's what it wanted Dec 01 23:44:42 I think what it installed when it prompted me just now was 24 Dec 01 23:45:11 Okay, to match the previous build environment. Dec 01 23:45:16 aaaand... nope, lost all my data when I reinstalled the app. that's probably a bug report for the devs of the app Dec 01 23:45:40 i don’t think so Dec 01 23:45:48 unless that data was stored on a server somewhere Dec 01 23:46:40 Yeah, in some cases adb will need to uninstall the existing app (losing private data) before pushing the new APK. Dec 01 23:46:57 yeah Dec 01 23:47:04 this is usually when the apk signing differs Dec 01 23:47:13 or the app on the device is newer Dec 01 23:47:41 20/20 hindsight Dec 01 23:47:49 there goes a whole bunch of messages I'll never get back Dec 01 23:50:40 looking forward, how can I stop that from happening in the future? Dec 01 23:50:51 stop what? Dec 01 23:50:52 should I have something like titanium backup save a copy of the app's configuration/data? Dec 01 23:50:56 you can yeah Dec 01 23:50:59 sparr: Was the existing app a *release* version while you were pushing a *debug* version? Dec 01 23:51:26 TacticalJoke: not sure if I pushed release or debug. when I made APKs I was going to push the unsigned release apk, but the "just click run" method is completely opaque to me. Dec 01 23:57:53 so im running my code on a avd i KNOW it will never work on but... im not getting ANYTHING in logcat at all. i have no filters Dec 01 23:58:25 i know it will fail and i know WHY it will fail here but in order to fix that i need logcat Dec 01 23:58:41 im getting nothing. not "nothing for my app". just straight up NOTHING at all. Dec 01 23:59:55 closed AS, closed avd. launched again and now im getting logcat Dec 02 00:00:00 stupid android studio Dec 02 00:01:25 so, I've got the app compiled and running on my phone. I'm going to make changes, and I'm sure they won't work the first time around. Can someone recommend a good tutorial on debugging app behavior in situ? Dec 02 00:03:46 i could run Intel x86 64image system on Amd cpu it is very fast on my amd cpu Dec 02 00:05:13 tx: Ti backup doesn't like my unrooted phone. Is there another backup app you'd recommend that could save me from this situation in the future? Dec 02 00:06:03 typically apps don't have access to other apps data Dec 02 00:06:11 does the app you are using have its own backup feature? Dec 02 00:08:37 not for the data in question Dec 02 00:09:38 try using an app like es file explorer to browse for the data Dec 02 00:09:44 it's probably just an sqlite database file Dec 02 00:09:49 What data is this? Note that this data will disappear if the user uninstalls the app, changes devices, etc. Dec 02 00:10:06 Also if they click "Clear Data". Dec 02 00:10:21 sparr: what is your overall goal Dec 02 00:10:33 If it's import then what tx mentions above becomes relevant: why doesn't it have a back-up feature. Dec 02 00:10:34 do you just want to run your own build of signal, or are you trying to work on it? Dec 02 00:10:37 important* Dec 02 00:10:54 it’s a secure messaging app Dec 02 00:11:01 if i’m thinking of the right thing Dec 02 00:11:16 in that context, it does make sense that data would go away on uninstal Dec 02 00:18:31 "it’s a secure messaging app" Dec 02 00:18:31 well Dec 02 00:18:36 you're probably fucked then lol Dec 02 00:19:21 sparr: are you just wanting to run your own build, or are you wanting to be a dev on it? Dec 02 00:19:27 It's a testament to the app's security. :D Dec 02 00:20:10 shmooz: Hai. Dec 02 00:20:52 hi TacticalJoke ! hows it going? Dec 02 00:21:06 Pretty well. How 'bout you. :D Dec 02 00:21:17 still playing tribes Dec 02 00:21:50 Whoa. That's still going. Dec 02 00:21:51 TacticalJoke: where is your app? I never tried it Dec 02 00:22:31 yeah, people still join, there's a party everyday Dec 02 00:22:43 Still haven't production-released. :E Dec 02 00:22:50 Did you stop working on your app? Dec 02 00:23:15 yeah, well no but yeah, I'm still programming it in my mind Dec 02 00:23:39 it's finished except for a few bugs and a few more features Dec 02 00:23:49 Do you use your app? Dec 02 00:24:04 yeah I still use it whenever I go out Dec 02 00:24:18 walking around listening to shoutcast Dec 02 00:24:30 instead of TuneIn or Winamp Dec 02 00:24:34 That's cool. You don't really have to release something if it's being used already. Dec 02 00:24:50 I use mine almost all day, but I will release. Dec 02 00:24:58 My app has literally changed my life. Dec 02 00:25:02 well that was my first and possibly last android app Dec 02 00:25:12 I hate android now Dec 02 00:25:22 *audience gasps* Dec 02 00:25:32 bye my friends Dec 02 00:25:43 when people ask me to recommend a tablet, I tell them to get a windows tablet Dec 02 00:25:49 weren’t you trying to write an app that supported back to like API 8 or something? Dec 02 00:26:06 s73v3r: it supports back to API 3 Dec 02 00:26:14 *even louder gasp* Dec 02 00:26:17 that explains why you’d hate android Dec 02 00:26:36 And he wasn't using version control! Dec 02 00:26:46 I think it would change shmooz's life to learn Mercurial or Git. Dec 02 00:26:51 one of the reasons is the constant updates to new SDK versions Dec 02 00:26:59 Updates are good. Dec 02 00:27:01 it’s once a year Dec 02 00:27:04 not that bad Dec 02 00:27:21 yeah, I couldn’t trust anyone who didn’t use version control Dec 02 00:27:22 but the biggest reason is it's not a useful mature OS Dec 02 00:27:36 s73v3r: Are you still using Mercurial? Dec 02 00:27:52 no. Every job I’ve had is git Dec 02 00:28:04 you'd think they would have let the user choose if they want dark or light backgrounds since the first version Dec 02 00:28:04 Ohh. I thought it was you who was using Mercurial. I wonder who it was, then. Dec 02 00:28:25 i’ve used it in the past, but haven’t in a long time Dec 02 00:28:42 I never upgraded my Nexus 7 further than kitkat 4.4.4 because I can't stand lollipop and later Dec 02 00:28:44 i like Mercurial a lot, probably more than git. but I don’t get to use it a lot Dec 02 00:28:51 thanks for the help, folks. I think I'm gonna give up on this attempt to patch an android app for a while. Dec 02 00:28:54 shmooz: I think you're stuck in the past. Dec 02 00:29:10 losing my data was a rather unexpected side effect that I'm gonna need some time to get over Dec 02 00:29:11 s73v3r: Ah, it must've been that. Dec 02 00:29:18 the future is full of babies learning to reinvent the wheel Dec 02 00:29:28 sparr: We offer a massage service. Please check with reception. Dec 02 00:31:35 shmooz: You should let us life-coach you. Learn Mercurial/Git, set `minSdkVersion` to 21, maybe drop Tribes for something else. Dec 02 00:31:51 Though maybe Tribes doesn't have a better successor. Dec 02 00:31:57 I'm going back to doing ASM and C Dec 02 00:32:04 he’s regressing Dec 02 00:32:08 and REAL apps, not this dinky android crap Dec 02 00:32:11 shmooz: Maybe you should invent a time machine. Dec 02 00:34:06 shmooz: Did you even switch to Android Studio? Dec 02 00:34:55 TacticalJoke: I did, but it's not much better than eclipse imo Dec 02 00:35:08 and so I still prefer eclipse Dec 02 00:35:14 I rather think that having the messages encrypted and passed securely had a *much* higher priority than the background color in the first release Dec 02 00:35:56 I tried AS when it came out, and then this summer again, it's not bad, but eclipse runs faster on my slow box Dec 02 00:36:44 hello boyz, anyone know how to make use of "@SystemApi" methods? Dec 02 00:36:55 as for example: List getPrivilegedConfiguredNetworks() Dec 02 00:37:30 You don't. Dec 02 00:37:38 if using a system app Dec 02 00:37:45 I'm supposed to be able right? Dec 02 00:38:20 fvpinheiro: From reading http://stackoverflow.com/a/27321030, it doesn't seem possible. Dec 02 00:38:23 They used to be called @PrivateApi, which should sort of spell it out for you. Dec 02 00:39:10 It's suppose to be used by system appluca Dec 02 00:39:12 applications Dec 02 00:39:37 ...which, since you are not working for Google, you are not supposed to invoke directly. Dec 02 00:39:41 so If my app is a system application... I should be able to use it, otherwise what's the point of providing primitive for not being used? Dec 02 00:39:48 They may readily change between releases and patchlevels. Dec 02 00:40:01 ok, I have a rooted device and my application is a system app Dec 02 00:40:24 I'm using api 23, and its there the primitive Im trying to invoke Dec 02 00:40:28 ...and unless you work for Google, you trying to use those would be a Very Bad IDea. Dec 02 00:40:57 It's for academic research purposes. Dec 02 00:41:49 Then you can academically research how to write your own versions of those Dec 02 00:42:07 fvpinheiro: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/annotation/SystemApi.java Dec 02 00:42:22 "not for use by apps linking against the Android SDK." Dec 02 00:42:31 "for use by bundled system applications." Dec 02 00:42:54 ye :/ thanks Dec 02 00:42:55 I'm guessing it's impossible; not sure. Dec 02 00:46:06 Though the retention policy is only 'source'. Hmm. Dec 02 00:46:29 Then again, `@hide` also applies. Dec 02 00:47:25 @hide primitives I'm able to use Dec 02 00:47:31 even without system app permissions Dec 02 00:47:55 Ah, true. Just a JavaDoc thing. Dec 02 00:48:01 You're not going to be able to use getPrivilegedConfiguredNetworks in particular because it returns the WPA/WEP keys Dec 02 00:48:19 Those are supposed to be stored and *only* accessible by the OS itself later Dec 02 00:48:43 Allowing them to be read would let any jerk who wanted to start stealing people's wifi configurations with their trojan app Dec 02 00:49:45 Its right but to install a trojan app as a system app you'll need to be rooted Dec 02 00:49:50 so it wouldn't work Dec 02 00:50:01 there is a lot of android malware that roots the phone Dec 02 00:50:12 btw, some @SystemApi primitives I can use! Dec 02 00:50:23 just a different one and it worked. Dec 02 00:52:16 It seems that some @SystemApi can be used. Trying it on my own system application. Dec 02 00:52:35 fvpinheiro: What happens when you try to call this one? Dec 02 00:52:38 But getPrivilegedConfiguredNetworks doesn't work still Dec 02 00:52:56 it returns reflection exception Dec 02 00:53:11 Which exact exception? Just curious. Dec 02 00:53:18 1 sec Dec 02 00:53:21 going to reproduce Dec 02 00:54:50 it throws java.lang.reflect.InvocationTargetException Dec 02 00:54:59 That's because you're _not supposed to use it_ Dec 02 00:55:26 i believe to be an actual system app, you have to link against a special library Dec 02 00:55:27 I know I'm not suppose to use it, but some @SystemApi functions work. Dec 02 00:55:35 ...and java doesn't really give a damn what UID you are Dec 02 00:55:38 one that Google doesn’t give you unless you’re on the special list Dec 02 00:56:17 that's possible Dec 02 00:56:21 Java does not care about SELinux contexts or uids when it comes to providing or not providing access to various methods and APIs Dec 02 00:56:29 sounds like he's trying to find holes ;-) Dec 02 01:10:15 ??? /usr/include/sys/cdefs.h:41:20: error: token is not a valid binary operator in a preprocessor Dec 02 01:10:15 subexpression Dec 02 01:16:57 thing is, my NDK library has text relocations. but... there are C wrappers that are what is causing it Dec 02 01:17:09 or part of it at least. yet.. i have -FPIC set Dec 02 01:17:12 wtf? Dec 02 01:29:41 i need my build to create a list of the entire thing, its only createing a list file for the asm code, not the code derived from the C code. I need to see my code AND the asm code created from the C in one listing Dec 02 01:29:48 i had that working before, i dont get it Dec 02 01:32:06 your are a prolific IRC user Dec 02 01:32:14 ? Dec 02 01:32:59 if i pass -S it will ONLY create the asm listing Dec 02 01:33:12 i want it to create the .o AND the .s for the ENTIRE build Dec 02 01:33:17 there should be one asm listing Dec 02 01:33:28 i had this working before and i dont understand why its not working any more Dec 02 01:38:52 my listing has only the code from the asm files. not the code from the c files. i need to see them both togehter. Dec 02 01:42:32 was i having the linker produce the listing before? Dec 02 01:42:52 it was a single asm listing that contained a list of my asm files and the asm files generated from the c files Dec 02 01:45:12 im lost i do not undertand why this is no longer working. wtf over :( Dec 02 01:46:03 Melatonina, instead of being snarky with your holier than thou attitude maybe you could say something constructive. OBVIOUSLY im not one of the leet hackers in here Dec 02 01:46:31 and this was working last time i was working on this code. i got both the C and the ASM to be dunmped into the same single listing file Dec 02 01:47:08 mark4: I just joking. I lack the expertise required to help you. I was sorry to read you writing a lot without response Dec 02 01:53:01 Melatonina, sorry, missunderstood what you were saying Dec 02 01:53:45 thougt you were accusing me of never looking for answers to problems other than asking stoopid questions on irc lol. i am looking for the answer to this, its just not jumping out at me Dec 02 01:54:09 and the branch of my code that i was doing this on before refuses to build with the new build tools Dec 02 01:54:19 actually its not the tools. its the new updated header files Dec 02 01:54:23 fscking me over Dec 02 01:55:00 #if __GNUC_PREREQ (2,97) <-- this is in one of the header files provided with the NDK Dec 02 01:55:13 subexpression Dec 02 01:55:25 whch the build tools barfs on Dec 02 01:56:34 \and this looks like a major fsckup on googles part not mine Dec 02 01:56:45 but thats me speaking from years of inexperience Dec 02 02:03:56 mark4 has mistaken the channel for the duck Dec 02 02:04:13 ? Dec 02 02:04:19 the rubber ducky Dec 02 02:04:41 still lost me on that one Dec 02 02:05:00 https://en.wikipedia.org/wiki/Rubber_duck_debugging Dec 02 02:06:35 it wasnt even a debug question. it was a tools usage question Dec 02 02:06:58 more like talking into the abyss Dec 02 02:07:06 no shit Dec 02 02:08:35 if i create an Application.mk and set my toolchain in there it all builds fine. it just doesnt link and it does this silently. no error. simply no library file created Dec 02 02:20:03 mark4: in the last 10 minutes you didn't write anything. Are you still alive? Dec 02 02:20:11 maybe Dec 02 02:23:35 Hello. I'm writing a very simple application that uses LocationService to get the latest location. I understand this needs a permission, so there's a permission check that must be done. However, I'd like to separate the permission logic from my MainActivity, so I'm writing a PermissionActivity to do so. Dec 02 02:25:38 My question is, my PermissionActivity is the one responsible for verifying and requesting permissions, so can other Activities use the permissions, or does it only allow those permissions for PermissionActivity? Dec 02 02:28:08 Basically, doesn't matter. You should be checking for the permission before trying to invoke it. Dec 02 02:28:15 That's about all there is to it Dec 02 02:28:37 Feel free to just lob all that into a class by itself so the check (which takes an eyeblink) always happens before you call the location sevrices api Dec 02 02:28:51 An entire activity for that is a bit overkill Dec 02 02:29:07 Maybe a toast warning the user ("Select yes or this won't work") would be helpful Dec 02 02:30:11 Ah okay, at first I was just attempting to make a permission filter without being an activity, but one thing i would like to do Dec 02 02:30:30 is in the PermissionActivity (or not activity) i'd like to be able to update certain things in the calling Context Dec 02 02:30:42 but it seems to not let me findViewById outside of a context Dec 02 02:31:36 Apologies for my ignorance, it's been tough for me to find specific documentation on these kind of things Dec 02 02:31:42 maybe i'm looking in the wrong places Dec 02 02:32:24 kevr: I'm not sure why your superclass activity would want to use `findViewById`. Instead, it could just raise an event (via an abstract method). Dec 02 02:32:42 `onGotPermission` or something. Dec 02 02:32:52 So, the thing is Dec 02 02:33:12 in the request permission process, there's a callback that's fired when the permission is done being requested Dec 02 02:33:22 onRequestPermissionsResult Dec 02 02:33:31 As far as I know, that only belongs to an Activity. Dec 02 02:34:43 I'm unable to pass this as an Activity to request permissions if it's not an activity Dec 02 02:35:07 TacticalJoke: and oh, i wasn't aware of android events Dec 02 02:35:49 I just mean "call a method that the subclass overrides". On the whole, though, I'm not fully understanding what you're describing. Dec 02 02:37:13 I'm sorry, I'm getting a bit lost in it myself. Let me think for a second how I can concisely explain this Dec 02 02:40:23 hello, I have an AdapterViewFlipper, how to trigger some functionality when showNext() and showPrevious ? Dec 02 02:41:36 I'm in MainActivity. MainActivity has access to a TextView widget referenced by R.id.text_view. On program launch, I'd like to request permissions for ACCESS_FINE_LOCATION, and when that succeeds, I want to text_view.setText("Success"). So, what I did was I wrote a simple class called PermissionFilter. Now, the process for verifying and/or requesting permissions in the application goes something like if Dec 02 02:41:37 ContextCompat.checkSelfPermission(activity, PERMISSION), and ActivityCompat.requestPermissions(activity, permissions[], PERMISSION). According to the doc, when requestPermissions is done, it fires a callback automatically which is named onRequestPermissionsResult (which must be overridden) Dec 02 02:42:25 I'd like PermissionFilter to be able to manage the callback by itself, but it's not an activity, so i can't pass it in as an activity in the permission functions for verifying/requesting Dec 02 02:43:22 Furthermore, when the permission succeeds, it calls back a virtual function, onRequestPermissionsResult, which doesn't exist in something that isn't an Activity Dec 02 02:44:34 can someone explain https://paste.pound-python.org/show/lS1a29tXKCoqmbJRO3ja/ Dec 02 02:45:13 TacticalJoke: I'm not deriving from a super class here. Dec 02 02:46:01 i google that error and the only results that show up are iOS related Dec 02 02:46:43 kevr: Okay. Yeah, I believe onRequestPermissionsResult has to be implemented in an activity. Dec 02 02:46:43 Should I be passing the calling Activity through to use in those functions? Dec 02 02:47:07 Ah, gotcha. Dec 02 02:48:01 home/mark4/Android/Sdk/ndk-bundle/platforms/android-21/arch-arm/usr/include/jni.h:27:23: fatal error: sys/cdefs.h: No such file or directory Dec 02 02:48:13 that one is also fscking me up big time. wtf is with these header files :( Dec 02 02:48:35 i can set it to android-9/10/11/..../24 and i get exactly the same error Dec 02 02:49:01 on a build tree that i have not touched in months and last i ran it it built just fine Dec 02 02:49:12 Alright then, perhaps what I can do is, in PermissionFilter, I can register callbacks, then I can pass the calling activity through and when the activity's callback is fired, I can just tell PermissionFilter to fire all of it's registered callbacks Dec 02 02:49:28 Not completely self-contained, but it should work Dec 02 02:50:14 kevr: Have you considered getting it working first and *then* refactoring it (to extract this filter class or whatever)? That's usually much easier. Dec 02 02:51:02 The only reason for the filter class is because I don't want to tie the permission to the mainactivity, i want to be able to use it in any activity Dec 02 02:51:06 Trying to extract a class and get this system working is doing two big things at once. Dec 02 02:51:18 I've gotten it to work before without using an outside class. Dec 02 02:54:53 Ah. Dec 02 02:55:17 I got it to work. Though, not as independent as I would like, but it works Dec 02 02:55:47 Remember the two steps: #1 Get it working (ugly). #2 Clean it (clean). Dec 02 02:55:55 Don't do #2 before #1. :D Dec 02 02:56:00 :P Dec 02 02:56:17 thanks for your guys time **** ENDING LOGGING AT Fri Dec 02 03:00:00 2016