**** BEGIN LOGGING AT Thu Jan 07 02:59:59 2016 Jan 07 03:00:03 and if he says "yes because you didnt answer my question" thats an instant lawsuit :) Jan 07 03:00:27 I440r: Don't be an idiot, just say you have a permit. Done. If you don't, get one. Jan 07 03:00:44 i dont need a permit to exercise a right Jan 07 03:00:54 Who cares. Jan 07 03:01:05 I440r if you were a minority, yes, good chance you're under arrest :D Jan 07 03:01:32 g00s white :) Jan 07 03:01:43 I440r is pretty feisty here, i can imagine how police interaction goes haha Jan 07 03:02:10 g00s had an interaction with a cop earlier today. he saw my car with no plates and no inspection stickers :) Jan 07 03:02:28 wth is the matter with you Jan 07 03:03:04 i have rights and im going to take advantage of them. they try penalize me for exercisign them and they are going to have some splanin to do in court :) Jan 07 03:03:14 you have fun with that Jan 07 03:03:34 s73v3r, already have, have never been arrested for it, ticketed for it or pulled over for it Jan 07 03:03:43 I440r: It's a requirement to display a license plate to drive a car on the road. Want to excercise your freedom there? Don't drive. Jan 07 03:03:55 not even when doing 45 mph past a cop in a 35 zone omw home Jan 07 03:04:00 I440r driving isn't a right, its a privilege Jan 07 03:04:06 keep pushing your luck. Jan 07 03:04:31 <_genuser_> darken: probably should do that. I just end up having too many test classes and activities. and then I don't want to delete them thinking they might have somethign useful. And a clean project would ensure that I'm not using anything from those other test objects. Jan 07 03:04:55 arahael, "the activity licensed by state DMVs in connection with which individuals must supply personal information to the DMV (the operation of MOTOR VEHICLES) is integrally related to interstate commerce" -- Reno V. Condon: Jan 07 03:05:03 maybe keep your test classes and such in a /test directory? Under a test build type Jan 07 03:05:21 no. just no Jan 07 03:05:21 <_genuser_> darken: sometimes, if the versio hist is important, I'll delete the contents of the original folder and copy on top the new folder (keeping repo directory) and just addremove and keep history that way. Jan 07 03:05:21 18 USC 31: A Motor Vehicle is something used for commercial purposes on the highway Jan 07 03:05:39 one is not required to use a motor vehicle to conduct commerce, though Jan 07 03:05:50 <_genuser_> s73v3r: test class that was about my projects? Or you're talking to someone else? Jan 07 03:06:07 _genuser_: the test class stuff is about your projects, yes Jan 07 03:06:30 s73v3r, what makes an automobile a motor vehicl is the purpose to which it is put. i.e. if its not used for commercial purpposes its not a motor vehicle and the state has no authority over you use of it on a public highway. NONE what so ever. Jan 07 03:06:31 I440r: You sound like one of those people who claim that the government doesn’t have the power to levy taxes Jan 07 03:06:45 <_genuser_> s73v3r: by test I mean, stuff I was cooking up to make somethign work. And not "unit-tests" or any other stuff that tests the actual funcitonality. Jan 07 03:06:50 I440r: yes they do Jan 07 03:06:54 <_genuser_> s73v3r: in that case test just meant what I was "trying out". Jan 07 03:07:17 s73v3r, i have over 50 u.s. supreme court cases, federal cases and state cases that say "no they dont" Jan 07 03:07:18 period Jan 07 03:07:24 s73v3r i'm guessing the Malheur reserve has internet access Jan 07 03:07:43 I440r: if you did, then things would be different. you don’t, you are wrong, end of story Jan 07 03:07:52 i can go 99 in a 35 the wrong way down a 1 way street, drunk off my ass and they cannot touch me lawfully Jan 07 03:07:59 yes, they can Jan 07 03:08:10 they will arrest you, and throw your ass in jail Jan 07 03:08:12 they have the POWER to. not the authority Jan 07 03:08:16 yes, they do Jan 07 03:08:28 s73v3r, k Jan 07 03:08:39 you sound like one of those people who believes taxes are illegal too Jan 07 03:08:53 <_genuser_> s73v3r: taxes are illegal!! Jan 07 03:08:55 s73v3r, state taxes no. federal taxes are also not unlawful Jan 07 03:09:09 <_genuser_> ok ok just joking. Jan 07 03:09:31 tho they are highly questionable and i do have theories about this subject,,, they are not ones im going to be proving in court any time soon Jan 07 03:09:34 <_genuser_> taxes are necessary to run the stuff. but high taxes? using taxes to turn poor against "rich". class warfare by politicians... that is all just wrong. Jan 07 03:10:16 the federal government did not have the authority to tax the people directly untl they enaced the 14th amendment and created the federal statutory citizen. Jan 07 03:10:28 no. this ends now Jan 07 03:10:33 way too offtopic Jan 07 03:10:46 <_genuser_> true that. I was thinking we're going to be hitting OT territory fast. Jan 07 03:11:08 s7 i agree, i was OT.. but you were too :) Jan 07 03:11:23 i wasn’t the one spouting bullshit Jan 07 03:11:50 yes actually you were. i have case law to support me. you have years of ignorance on the subject supporting your view Jan 07 03:12:12 again, if you were correct, then things would be different. but you’re not. Jan 07 03:15:18 <_genuser_> heh, s73v3r declares you wrong! then you're wrong! Jan 07 03:15:53 even after the u.s. supreme court et al has declared me right numerous times?.... k :) Jan 07 03:15:57 i’m not the one declaring him wrong. I’m saying that if he was right, then the world wouldn’t be the way it is today. Yet, everyone is acting like he’s wrong Jan 07 03:16:11 is that because they’re all silly, or in some conspiracy? Jan 07 03:16:26 or is the simplist, and most rational answer that he’s not correct? Jan 07 03:17:33 I440r: they clearly haven’t. Otherwise those rulings would have gone into effect. They haven’t. Jan 07 03:17:35 <_genuser_> s73v3r: mine was just a joke. It sounded as if you're saying, "you're wrong, so you're wrong". it was more funny than anything else. Jan 07 03:17:38 Well, there's another answer. "The world is totally messed up, as is America". Jan 07 03:18:13 it’s not messed up enough to where SCOTUS rulings would simply be ignored, and things carried on as if they never happened Jan 07 03:18:41 <_genuser_> s73v3r: crowd control, population control, politicians controlling the masses - those are discussions for another time, maybe even another channel. Jan 07 03:19:04 <_genuser_> s73v3r: for now, I just thought it was a light hearted attempt at humor. I really just thought your definitive tone was funny. :) Jan 07 03:19:21 i do admit that the reading of it was odd Jan 07 03:19:49 <_genuser_> I get a good chuckle out of stuff like this. and it makes "online chatting" worth it. :) Jan 07 03:19:57 i think the way I440r gets out of trouble with police is he gives them a headache Jan 07 03:20:09 <_genuser_> while I do the exact same task over and over messing up one step each time. Jan 07 03:20:22 <_genuser_> but I think I finally have the library setup correctly. :) Jan 07 03:21:39 huzzah Jan 07 03:22:35 <_genuser_> huzzah indeed! :) Jan 07 03:35:45 yo nerds is it safe to use the syncronized keyword in ontasktremoved? Jan 07 03:44:35 It's always safe to use synchronized, the question you should ask yourself is more "Is it a good idea?" Jan 07 03:45:07 Is it a good idea, is that method somehow timed? Jan 07 03:59:48 <_genuser_> so onCreateView gives me access to a view. Can I findViewById and find a single LinearLayout and then insert into it contents of another xml layout file? Jan 07 03:59:52 <_genuser_> sort of merging the two views? Jan 07 04:00:16 <_genuser_> or would I need to create a mergable view to being with? Jan 07 04:13:52 you can addView to it Jan 07 04:14:48 <_genuser_> pfn: yeah, I think I have it working. I just had to get the LinearLayout and typecast it to ViewGroup and then call addView on it. Jan 07 04:15:21 <_genuser_> ok, I think my custom dialog that can rotate despite calling activity being locked to an orientation is complete. Jan 07 04:15:36 <_genuser_> it handles all rotation crap. and you just have to extend it and add your own view. Jan 07 04:16:01 <_genuser_> now whether one needs to use it is another conv. Jan 07 04:47:27 evening all Jan 07 04:55:52 Hey guys. Quick question on what UI widget to use. I have 10 categories, and only one category can be selected at a time. The button itself has two states for the drawable, a checked state and unchecked. Should I uses Buttons? ToggleButtons? An array of Checkboxes? Jan 07 04:56:02 Here is what they will look like (if it makes a difference) https://i.imgur.com/83mJByp.png Jan 07 04:56:38 <_genuser_> dagnabbit Jan 07 04:56:44 <_genuser_> can't track key presses in a fragment? Jan 07 04:57:23 <_genuser_> liuwenhao: without any further context of UI, this looks good. Jan 07 04:59:03 _genuser_: Thanks. This isn't implemented yet, just a mockup of what they will look like. I'm trying to figure out whether ToggleButton or checkbox would be better Jan 07 05:00:31 I know some people use an Array of checkboxes but I'm not sure if that's the best option Jan 07 05:02:27 I like the two buttosn each explaining what it is rather than a checkbox Jan 07 05:02:53 5 or 10 is different than true or false. switches represent true or false well, but not 5km or 10km Jan 07 05:07:15 <_genuser_> technically that's a radio button. you pick one. Jan 07 05:07:34 <_genuser_> but nothing wrong with a nicer UI. We're not restricted to windows 3.1 days. Jan 07 05:13:16 liuwenhao why not use a spinner, 1 in 10 seems basic spinner stuff Jan 07 05:14:53 _genuser_: I forgot RadioButton even existed. That would probably be the easiest to implement Jan 07 05:15:08 g00s: No spinner, I don't get to decide on the UI, just have to implement it unfortunately :) Jan 07 05:37:05 <_genuser_> liuwenhao: once you have the UI control, you have need array of the right amount of them. Jan 07 05:37:11 <_genuser_> so it's just as easy then. Jan 07 05:44:41 _genuser_: Thanks, I have it working now. So far so good Jan 07 05:45:22 <_genuser_> liuwenhao: responding slowly because distracted with a UI custom control that's finally done. :) Jan 07 05:45:29 <_genuser_> importing into the project next. Jan 07 05:47:34 I have a low quality android sunrise Jan 07 05:48:00 and all I want is to be able to type commands and send them to a python server from the phone Jan 07 05:48:26 is this possible? Jan 07 05:48:36 Does the python socket library work on android? Jan 07 05:54:40 Laserbear why not send commands to your python server from a normal android java app Jan 07 06:12:00 i guess Jan 07 06:12:26 lol Jan 07 06:12:32 how would I do that lol Jan 07 06:13:08 you can open up a socket from java too :D Jan 07 06:25:11 <_genuser_> what do you guys this of importing in an Android Library module (so code is available for tweaks) instead of just importing in compiled aar file? Jan 07 06:25:40 <_genuser_> I like it in an Android Library because it's self-contained, but I like the code to be directly tweakable incase I find bugs. Jan 07 06:25:51 <_genuser_> after some testing, I might just include the compiled one. Jan 07 06:49:40 how do you handle the phone running out of batteries while plugged into usb/usb debugging while you're developing? Jan 07 06:50:05 I start an implicit intent for an image. OnActivityResult I getData() and that data is always a URI. But sometimes it seems to be in a different format. Someitmes it tells me /externalstorage/path/dir/pics/something.jpg and other time it is giving me /-1/content://something.something. Does anyone know how to get the type of resource a URI actually is? Jan 07 06:50:30 i tried a powered hub and it still ran out of batteries on a game i'm working on. just 2 hours of running tests and the phone is dead. while plugged in Jan 07 06:51:15 ramagos lol, it will charge faster if the display is off Jan 07 06:51:37 most devices charge at different rates depending on whether the screen is on Jan 07 06:52:01 er.. how do i interact with the app if i can't see it Jan 07 06:53:04 i tried to find some usb device controller for my particular PC setup so it would output a few extra 100 mAH but i couldn't find one Jan 07 06:53:24 i tried a y splitter cable to draw extra power but it's not enough. Jan 07 06:53:32 seems like a suboptimal testing environment. Jan 07 06:54:11 i'm starting to think that taking a productivity hit is just the way things are. Jan 07 06:54:57 i just want the phone to not die when it's plugged into a power source while i'm usb debugging/developing. is it so much to ask? Jan 07 06:55:39 ramagos http://www.androidpolice.com/2015/06/29/video-power-down-using-your-phone-while-it-charges-may-cause-it-to-throttle-your-charging-speed-a-lot/ Jan 07 06:56:31 i doubt its a problem of the host not supplying enough current. if your really killing it and the device is getting hot, its probably going to protect the battery by not charging much Jan 07 06:57:58 the problem comes when running automated tests Jan 07 06:58:27 use something like appium and the test dies because the battery dies and we don't want to use a simulator. Jan 07 06:58:40 "why did the test fail?" "the battery died" Jan 07 06:59:43 naturally the phone is connected via usb to enable usb debugging so the tests can actually run. but i guess continuous integration is not possible then. Jan 07 07:01:37 i wish phone batteries were more like car batteries. as long as gasoline is being burned by the vehicle, the battery provides electricity. your headlights don't go out while driving Jan 07 07:02:10 Any idea how to tell when getData() onActivityResult returns a content provider uri vs a uri that is a dir? Jan 07 07:03:52 I was previously able to connect a wall charger to the phone and do some hackery over wifi debugging and the phone seemed to be staying alive but when i switched to USB due to latency issues causing flakiness in appium (due to wifi network etc) the phone jsut doesn't draw enough power Jan 07 07:05:10 Hey, can I register a listener with "android.net.ConnectivityManager.CONNECTIVITY_ACTION" in my custom Application instance Jan 07 07:05:16 If yes, where? In onCreate? And when do I unregister it? Jan 07 07:07:54 astroduck: I feel like you probably don't want to register it there Jan 07 07:08:11 register it in a service or activity Jan 07 07:11:58 eghdk: But I want a receiver in nearly every activity/fragment, and connecting it everywhere seems a little too much, so I was thinking of using an event bus and register 1 receiver in my App and send events on any change, I already have invested heavily in the event bus so that won't be much work Jan 07 07:17:01 eghdk: Do I even need to unregister a receiver in my Application instance? Won't it get unregistered when app is destroyed? Jan 07 07:17:15 No, you need to unregister it Jan 07 07:23:19 CedricBeust: So is registering a receiver in every activity ok? Will if affect my app's performance? Jan 07 07:28:35 <_genuser_> I added a new android module to the project. and now rebuilding it failing. Jan 07 07:28:42 <_genuser_> the R file in my main project is... not found. Jan 07 07:29:20 <_genuser_> any tips on where to look? there's a gradle error (single error) saying error merging manifests or smething. Jan 07 08:57:31 Hi. We are using Robolectric for our unit-tests in our Android app. We want to see our test coverage in Sonar, but it's now showing. What could be the issue here? Thanks in advance. Jan 07 09:20:22 Hi guys, I have been trying to write a remote service using AIDL that gets some data from the api over the internet. I am asking for an approach to best request and get data over http in a remote service. Jan 07 09:35:09 Hello. Some apk don't work if not updated to the last version. Is it exists any method to make working old version without update to the last new? Maybe change some version info directly in apk? How to do that? Jan 07 09:37:46 minSdkVersion? Jan 07 09:41:20 grekkos: but how to make this is calls? Jan 07 09:42:52 danijoo: where to see Sdk version? Jan 07 09:44:15 Anatoli_k, are you an app developer or a user? Jan 07 09:44:59 danijoo: user. Jan 07 09:45:26 Anatoli_k, this is not the right channel for you then. This is for app development Jan 07 09:47:26 Sdk used for development i ask about tips how to start not the last version apk if any developers know this. Jan 07 09:48:41 danijoo: Sdk used for development i ask about tips how to start not the last version apk if any developers know this. Jan 07 09:49:37 I wont help you modify an apk that is not your own work Jan 07 09:53:32 danijoo: minsdk 15 but i dont know how this is can help Jan 07 09:54:28 Anatoli_k, this is not your app, right?> Jan 07 09:57:55 danijoo: if wont help - anyway thanks for try to answer. But if it was my apk - be sure i just open source code and just change version checks. Dont think that this is too difficult. Jan 07 09:58:49 theres a reason for this version check Jan 07 09:59:58 danijoo I can use IDA and bytecodeviewer if this is help Jan 07 10:00:12 I already told you I wont help Jan 07 10:01:14 I tald u thanks. Jan 07 10:01:53 Have a good day. Jan 07 10:03:37 Hello guys. Some apk don't work if not updated to the last version. Is it exists any method to make working old version without update to the last new? Maybe change some version info directly in apk? How to do that? Thank u for help. Jan 07 10:15:38 Hi. I have been receiving errors when instantiating new intents.... Null reference errros but it only happens in 4.4.2 and mostly on tablets Jan 07 10:16:01 http://imgur.com/jacoj Jan 07 10:16:25 danijoo,lol yea ok Jan 07 10:19:49 dear android developers, who can recomend me a simple app which uses multiple SQLite tables and good practices Jan 07 10:25:17 xcolors: I guess you have to be more speciifc than that. Jan 07 10:34:53 hi Jan 07 10:35:31 is it possible to install both store version and dev version of an app side by side? Jan 07 10:37:35 Kartagis, yes. you only need to change the applicationid for your debug build (and maybe name to identify it) Jan 07 10:41:25 name to identify it meaning package name? Jan 07 10:41:37 like com.foo.bar Jan 07 10:42:38 yes Jan 07 10:42:47 you can set that in manifest Jan 07 10:43:31 or in gradle like applicationIdSuffix '.debug' Jan 07 10:43:42 (in debug section) Jan 07 10:43:48 Kartagis: ^ Jan 07 10:59:51 loke: I need a tutorial or some source codes which are using multiple tables in a SQLLite db Jan 07 11:04:45 thats fairly straight forward Jan 07 11:04:49 xcolors: Right, but what is it that you want to know? Using more than one table is no different from using only one. Jan 07 11:05:04 its not even android specific Jan 07 11:05:31 That said, many years ago I wrote an Android client for Google Buzz. That use used a whole pile of SQLite tables. I released the source for reference, even though it's old and outdated. Jan 07 11:05:42 You're welcome to look at it. Not that I know what you could learn from it though. Jan 07 11:07:38 I'll really apreciate Jan 07 11:07:56 if you can give me the link Jan 07 11:08:25 xcolors: Sure: https://github.com/lokedhs/dhs-buzz/tree/master/androidclient/src/org/atari/dhs/buzztest/androidclient Jan 07 11:09:45 loke: ty ty Jan 07 11:23:20 so im accessing a php file in my app which access my db and sends data back to the app as a json object. im doing all of this through doInBackground async task, wouldnt that access my db over and over.. (using many resources) can i just access it say, every 5 minutes? Jan 07 11:40:24 thornekey, didnt get that.. a php file ? you mean an http request to a remote server (wether its php doesnt really matter?) Jan 07 11:40:44 sorry yes, thats what i mean accessing a php file on my server through a http request Jan 07 11:40:54 Anyone know of any libs that let you swipe left/right using gestures recognised by the front facing camera? Jan 07 11:40:58 i know the file type does not matter im just saying :) Jan 07 11:41:12 so if you just call the doInBackGround when you need to update the data its fine Jan 07 11:41:38 Is doInBackground only called once? Jan 07 11:41:41 if youre worried about resources on server side you need to check that Jan 07 11:42:41 well if you call execute on it once, it does it only once Jan 07 11:42:53 ok, cool thats what i was a bit confused about :) Jan 07 11:43:16 cos i thought that if i made a new thread, the thread is constantly running Jan 07 11:43:23 just make sure the user cant trigger it too fast so they could pretty much do a DoS Jan 07 11:43:43 would some sort of in app timer be appropriate to do it Jan 07 11:43:59 probably it would do it Jan 07 11:44:13 still it makes sense to design the server side in a way to avoid this Jan 07 11:44:56 ok hm Jan 07 11:46:04 all its receiving is a json obj so i think ill just do a timer in the app Jan 07 11:49:24 also another question about json, i asked the other day but cant quite remember the lib (or even if it is really what i need) but im currently getting my output json obj is being received as a string, so how would i go about accessing certain keys, etc.. Hmm Jan 07 11:51:17 Is this possible to use dll library in Android apk? Jan 07 11:52:14 no Jan 07 11:52:57 dll are a windows feature Jan 07 11:53:21 you can if you use mono Jan 07 11:55:11 or you build native :_ Jan 07 11:58:05 hehe Jan 07 11:59:37 Hey all. I'm quite new to android development, so am still getting used to the lingo and how things work. What I'd like to do is; have an app running in teh foreground and listen for speech. When it hears key words, it should trigger an action. Eg, if it hears 'video' it will swap to an activity that will play a video Jan 07 11:59:48 What do I need to be googling to figure out the speech recognition bit? Jan 07 12:00:37 Are Services what I'm after? Like create a speech-recognising Service? Jan 07 12:01:14 'android speech recognition' a lot of resources using this search words Jan 07 12:01:18 I only need it to run while the app has focus so I'm not too sure if Services are correct Jan 07 12:02:04 ktwo: Yeah, there is a lot. Problem is, there's too much and I don't know the lingo to narrow it down to what I need. Eg, I've found a lot that taps into the OK Google API which isn't what I need Jan 07 12:20:07 hi Jan 07 12:20:47 hi Jan 07 12:21:26 I'm using telnet to set mock gps data using "geo fix " for the emulator, but LocationManager.getLastKnownLocation() is returning null. What am I missing? Jan 07 12:21:45 because its not the last known location Jan 07 12:21:48 its the current location Jan 07 12:22:05 it didnt record it previously as the "last known" one Jan 07 12:22:09 if you get what i mean Jan 07 12:22:25 yup Jan 07 12:22:32 are you using android studio? Jan 07 12:22:34 yea Jan 07 12:22:47 http://prntscr.com/9n4hq5 use this Jan 07 12:22:53 in tools>android>android device monitor Jan 07 12:23:00 go to location tab to set it Jan 07 12:23:37 hey anyone here ordered from amazon lately ? im going to order a nexus 5x but i want to be it delivered an exacty day. Is it possible ? Jan 07 12:24:16 sci-fic, i dont use amazon, but doesnt it have same day delivery option for more $$ Jan 07 12:27:35 thornekey, i tried the ADM method before I tried the telnet method Jan 07 12:28:14 In GoogleAnalytics android, is there a way to send a hashmap Jan 07 12:28:45 actually, maybe there's a better way to acheive my goal. I want to assert that location data exists before proceeding. Jan 07 12:30:12 Is there a standard way to do this? currently im doing `if (getLastKnownLocation() != null)` Jan 07 12:30:20 jonky, this is how i would do it http://pastebin.com/tFG7f20Q Jan 07 12:31:46 hrm... Jan 07 12:32:25 ok Jan 07 12:34:44 i have a question, but I dont know how to phrase it Jan 07 12:35:03 take your time :) Jan 07 12:35:32 and thanks. i'll get back to you when my brain is more compliant Jan 07 12:35:49 no problem :)) Jan 07 12:44:10 hey guys im going through the tutorials for android studio and i would like to use my actual phone for development Jan 07 12:44:19 yet android studio is still not seeing my mobile device Jan 07 12:44:29 enable debug ode Jan 07 12:44:39 ode for debugging Jan 07 12:44:53 :p Jan 07 12:45:10 or "to", I think Jan 07 12:45:14 already enabled Jan 07 12:45:20 eagles0513875, what phone Jan 07 12:45:28 samsung galaxy trend 2 lite Jan 07 12:45:51 install samsung adb drivers Jan 07 12:45:57 remove all something stuff from your computer and install the adb drivers Jan 07 12:46:13 they usually come with whatever the samsung's software was called Jan 07 12:46:17 where do i get said drivers from? Jan 07 12:46:18 k? Jan 07 12:46:32 keis Jan 07 12:46:34 kies or what not Jan 07 12:46:45 as this phone doesnt have kies if that is what you are referring to Jan 07 12:46:48 http://developer.samsung.com/technical-doc/view.do?v=T000000117 Jan 07 12:46:50 im currently getting my output json obj is being received as a string, so how would i go about accessing certain keys, etc..? Jan 07 12:47:05 yeah kies, but not sure if it's needed nowadays... I don't use samsung crap anymore :p Jan 07 12:47:17 thornekey, parse a json object from it Jan 07 12:47:31 Zharf: im on android 4.4.4 and it doesnt have that Jan 07 12:47:35 danijoo, how do i do that? im new to json Jan 07 12:47:43 also Zharf if i try to use a virtual device Cannot launch AVD in emulator. Output: emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed! is another error i get Jan 07 12:48:01 install HAXM Jan 07 12:48:01 thornekey, with gson or jackson library Jan 07 12:48:10 ok thanks Jan 07 12:48:11 Zharf: where does one get that from Jan 07 12:48:25 danijoo, so a lib is the only way to go? Jan 07 12:48:30 there is no 'native' way to do it Jan 07 12:48:40 eagles0513875, SDK manager, however that only downloads the installer... it'll be in the /extras/intel or something Jan 07 12:48:41 define native Jan 07 12:48:56 sorry, i mean without external libraries Jan 07 12:49:08 android has json built in imo Jan 07 12:49:17 i thin org.json lib Jan 07 12:49:21 so i dont need gson? Jan 07 12:49:59 org.json is too manual for me Jan 07 12:50:05 ohk Jan 07 12:50:06 i see Jan 07 12:50:13 Zharf: any ideas about why i cant use my phone to develop and test on? Jan 07 12:50:26 eagles0513875, did you install the drivers Jan 07 12:50:43 yes as my system is able to see it as a media device Jan 07 12:50:48 unless you are referring to other drivers Jan 07 12:50:55 adb drivers are different Jan 07 12:51:01 including a lib is not a bad thing thornekey :) Jan 07 12:51:14 check the link I gave above Jan 07 12:51:33 i know that :) i was just wondering if i had to use a lib or if it could be done easily without one thats all :) Jan 07 12:51:42 but ill look into gson :) Jan 07 12:52:20 can be done. Jan 07 12:52:40 but org.json sucks imo Jan 07 12:53:01 Zharf: that link works only with eclipse or applies only to eclipse anyway Jan 07 12:53:48 eagles0513875, doubtful.. unless you clicked something that you weren't supposed to Jan 07 12:54:21 im using android studio defaults Jan 07 12:54:24 thing is that is not based off eclipse Jan 07 12:54:39 Zharf: this is the getting started http://developer.samsung.com/technical-doc/view.do?v=T000000182 Jan 07 12:54:48 Eplebit: thx for answer. Jan 07 12:54:55 this is not the page I linked you to Jan 07 12:55:19 i went to the one you linked me to Jan 07 12:55:36 eagles0513875, the page I linked you to has SAMSUNG_USB_Driver_for_Mobile_Phones.zip Jan 07 12:58:00 ahh thanks for that Zharf sorry i didnt see that Jan 07 13:19:31 Hello. There are a lot of options online for converting PDF to images in android. Which one to pick? Anyone here used any one of them successfully Jan 07 13:23:16 danijoo, is the latest version of gson 1.5? Jan 07 13:24:29 no idea Jan 07 13:41:14 <_3mpty> Architecture question: in mvvm (or something around that) should I pass context to my ViewModel or rather pass interface that activity implements and keep android related stuff on activity level? Jan 07 13:42:23 <_3mpty> In one side testing such viewmodel will be annoying in other it will generate boilerplate code Jan 07 13:47:27 Every time the Android SDK Manager tells me it's got some updates for me, the updating process takes forever + fills my disk (C:\) to capacity. And that's even *without* apparently succeeding in downloading/installing all the default/recommended items. Jan 07 13:47:53 _3mpty: The code AS generates seems to heavily favour having your Activity implement an Interface specified by your Fragments to facilitate communication. In practice, this leads to "fat" Activities Jan 07 13:47:56 Is this an indication that something's wrong, or is 12GB free space on C just not enough to update Jan 07 13:48:09 _3mpty: The Google IO app is an example of this: https://github.com/google/iosched/blob/master/android/src/main/java/com/google/samples/apps/iosched/welcome/WelcomeActivity.java Jan 07 13:48:25 joakimk, remove all the emulator images you don't need Jan 07 13:48:28 they take a ton of space Jan 07 13:48:29 joakimk, stop downloading all api levels and choose wisely instead Jan 07 13:48:39 Right now it's left me with 4KB (!) free space on C. Any clues on where I can begin to find + delete stuff? Like the unneccessary images? Jan 07 13:48:54 sdk manager lets you delete them :) Jan 07 13:49:12 joakimk: open sdk manager and delete everything except the latest and earliest SDKs you plan to support Jan 07 13:49:24 danijoo: Not sure I did check all API levels... Looking at the Packages list now, it's mostly labelled "Not installed" Jan 07 13:49:52 if that would be the case, it would be far less then 12 gb Jan 07 13:49:57 joakimk: I feel like something else is taking up your space Jan 07 13:50:02 The SDK manager's packages are stuff like, Android 6.0 and down to Android 2.2, right? Jan 07 13:50:10 joakimk: yes Jan 07 13:50:19 Seems it failed to install 6.0, and that was with 12G free space! Jan 07 13:50:35 All the lower APIs are "Not installed" Jan 07 13:50:45 Are you selecting all the emulator images? Jan 07 13:50:50 joakimk, you can use windirstat to visualize what's taking the most space on your disk Jan 07 13:50:51 like Wear, TV, etc Jan 07 13:51:08 MarkyC: Let me post a pic :) Jan 07 13:51:30 joakimk, also, run disk cleanup to clear temps and such Jan 07 13:52:16 MarkyC: http://snag.gy/sdvu1.jpg Jan 07 13:52:35 youhave 3 images per level Jan 07 13:52:40 4* Jan 07 13:52:47 you can remove at least 3 of them Jan 07 13:53:28 <_3mpty> MarkyC: thanks, I will check that example Jan 07 13:53:29 danijoo: we're talking about inside the 6.0 package, right? Jan 07 13:53:35 you most probably dont need more then one of the google apis x86 image Jan 07 13:53:40 yes Jan 07 13:53:42 joakimk, that doesn't tell us what's under the rest of the things :) Jan 07 13:53:57 Zharf, I fear, the same :( Jan 07 13:54:09 4 installed emulator images per level :p Jan 07 13:54:13 I double checked, there's no indication on the top level if there's something installed in there Jan 07 13:54:54 It's all marked "oOt installed" Jan 07 13:54:59 hehe, "Not installed" Jan 07 13:55:24 oh sorry., I went for the checkboxes :/ Jan 07 13:55:37 just making sure.. but yeah, those emulator images will probably take several gigs each Jan 07 13:55:39 but you have all waer and tv installed which are not neccessary Jan 07 13:55:49 look at this as a reference how an api level looks for me: http://prntscr.com/9n5bvc Jan 07 13:55:53 but can it be, that "only" from the 6.0 package it downloaded MORE than 12G?? Jan 07 13:56:05 yes Jan 07 13:56:10 if you include the emulator images Jan 07 13:56:14 which you don't need Jan 07 13:56:16 and, as I said, this same thing happens every time I try to update.... oh ok Jan 07 13:56:19 one emulator image is arround 1 gb Jan 07 13:56:31 right Jan 07 13:56:37 yeah the udater always wants to trick you into installing everything :p Jan 07 13:56:41 updater* Jan 07 13:56:45 unfortunately Jan 07 13:56:47 so, under 6.0, I'll un-install everything except... what? :) Jan 07 13:56:59 SDK platform is essential Jan 07 13:57:03 the rest is up to you Jan 07 13:57:10 joakimk, for minimal developing you need SDK platform and maybe one emulator image (Intel x86) Jan 07 13:57:16 and maybe the sources if you want them Jan 07 13:57:19 get rid of TV and Wear, then Jan 07 13:57:21 at least Jan 07 13:57:25 yes Jan 07 13:57:39 I like to have the sources for hunting down bugs Jan 07 13:57:49 yup same here Jan 07 13:57:50 what about ARM EABI v7a System Image, and Atom_64 System image. Jan 07 13:58:13 <_3mpty> single atom image with google apis should be enough Jan 07 13:58:21 joakimk, do you use emulator? do you use native code (anything with jni)? Jan 07 13:58:26 I do use emulator, yes Jan 07 13:58:26 joakimk, one is enough if you dont build for NDK Jan 07 13:58:51 uh, well... I'm working on a native Android app... Jan 07 13:58:56 one of the x86 images for HAXM Jan 07 13:59:09 then you'll likely want armeabi-v7a image Jan 07 13:59:47 deleting the images, and I'm back up to 9,5G Jan 07 14:00:00 just TV + Wear Jan 07 14:02:15 :> Jan 07 14:02:23 thanks for the help! Btw, is it a good idea to have API < 23 also? My app has compileSdkVersion 21 Jan 07 14:02:28 in the manifest.xml Jan 07 14:02:41 joakimk: I would look into something like CCleaner to free up some more space... 10GB left on a drive is scary Jan 07 14:02:42 you need the compileSdkVersion or it wont compile Jan 07 14:02:59 MarkyC: I'm awaiting a new drive ;) Thanks tho, already got CCLenaer Jan 07 14:03:11 MarkyC, I'm working on a 180G SSD, it's hard to keep it not full Jan 07 14:03:13 and you usually want some key sdk levels between your min and max Jan 07 14:03:18 I'm running with 5-10G free all the time Jan 07 14:03:32 silly work doesn't give me a larger SSD Jan 07 14:03:32 Zharf, get a normal hdd and only have important stuff on the ssd :) Jan 07 14:03:50 danijoo, it's a work computer, I would if it was my own... although I wouldn't use an SSD at all ;) Jan 07 14:03:54 I don't trust SSDs Jan 07 14:04:03 and they're so small Jan 07 14:04:18 danijoo: So, in the SDK manager, I should check (install) the SDK Platform for Android 5.1.1 (API 22) and Android 5.0.1 (API 21)? Jan 07 14:04:40 just whichever you think you need Jan 07 14:04:52 do I need something else from those packages, like, say, the ARM EABI system images? Jan 07 14:04:56 no Jan 07 14:05:04 danijoo: Zharf: My work is similar. We have PS, Office, every browser we support, AS, IntelliJ. Plus I've installed PHPStorm, Spotify. I'm working with 5GB free at all times Jan 07 14:05:04 if you want to run an emulator on this version yes Jan 07 14:05:17 unless you want to run tests on an emulator on an older version Jan 07 14:05:36 * Zharf never uses an emulator these days Jan 07 14:05:39 so then I'd also include the ARM EABI v7a system images? Just that? Jan 07 14:05:45 I do use an emulator Jan 07 14:05:53 if there's a bug I need to test on some configuration, I'll tell my boss to get a new device ;) Jan 07 14:06:03 joakimk, are you writing native code (native = c++) Jan 07 14:06:12 Java code Jan 07 14:06:19 then you don't need armeabi Jan 07 14:06:20 then you dont need arm images at all Jan 07 14:06:23 aha Jan 07 14:06:23 use x86 images Jan 07 14:06:30 they are faster with HAXM Jan 07 14:06:57 <_3mpty> looks like you also don't need NDK Jan 07 14:07:03 joakimk, you can run a newer image than you target, it's just like installing it on a device that has a newer platform version Jan 07 14:07:20 it all depends on what platform version you want to run it on Jan 07 14:07:22 <_3mpty> and ndk is taking more than 3gb of space Jan 07 14:07:54 yeah, 3.4G for me, on linux though Jan 07 14:16:31 thanks again! Is there any good docs on what's a "standard setup"? I'm about to install a new HDD, so I'll have to re-install everything next week :) Jan 07 14:17:26 not really. its all important for certain tasks Jan 07 14:17:31 its up to you what you do. Jan 07 14:19:12 joakimk: I write Android apps in my spare time. My setup looks like: Marshmallow (6) + ICS (4.0) emulator atom 32/64bit images, HAXM, Android Studio Preview (for that hot reload) Jan 07 14:19:49 spare time... Jan 07 14:19:55 Zharf: I'm a Java/Web Developer for my day job Jan 07 14:20:13 whats wrong with doing it in spare time? Jan 07 14:20:15 sure, but what's this spare time you speak of? Jan 07 14:21:00 :) Jan 07 14:21:12 or is it the 100+ extra hours I've done at work? saying to myself I'll take some time off some day but never do? Jan 07 14:21:23 Zharf: When I was looking for my current job, one the my main criteria was work/life balance. I was previously at a startup. I built the Website, API, Android/iOS apps. I worked 80 hour weeks some weeks. I'm 24, I never want to be in that position again Jan 07 14:21:35 The HAXM is found under Extras, but what's the Android Studio Preview? Jan 07 14:22:12 joakimk: a beta version: http://tools.android.com/preview-channel Jan 07 14:22:16 your choice to say no to the 100+ ;) Jan 07 14:22:31 danijoo, sure, no one expected me to do them, but I like my job Jan 07 14:22:37 I was without a job for 8 years, after that pretty much the only thing I've enjoyed Jan 07 14:22:53 joakimk: If you've ever used jrebel for hot code reload, Android Studio has a similar feature baked in as of the preview versions Jan 07 14:22:56 I often spend my weekends doing job related things Jan 07 14:23:06 Im using jrebel right now Jan 07 14:23:11 its pretty nice Jan 07 14:23:22 cant use instant run :/ Jan 07 14:23:29 <_3mpty> better than AS instant run Jan 07 14:23:33 Stacktrace doesn't get written in logcat in android studio Jan 07 14:24:17 _3mpty: I've never used jrebel for Android Jan 07 14:24:30 MarkyC: Not familiar with it, no Jan 07 14:25:13 jrebel also seems to be more relyable to me Jan 07 14:25:24 even on projects where I can use instant run Jan 07 14:25:34 <_3mpty> MarkyC: works well Jan 07 14:25:43 I believe it. AS Instant Run is buggy as hell right now. Jan 07 14:25:54 <_3mpty> instant run was kinda random for me Jan 07 14:25:59 MarkyC, also it does not support tons of stuff Jan 07 14:26:05 like multidex Jan 07 14:26:22 I was doing simple view.setVisible(GONE) and view.setVisible(VISIBLE) in code, and it wasn't taking the changes. I thought it was my code... nope, Instant Run bugs Jan 07 14:26:23 like other vm languages Jan 07 14:26:26 <_3mpty> jrebel till december was to expensive but they dropped price for base version when instant run was presented by google Jan 07 14:26:43 <_3mpty> also protify is worth of trying Jan 07 14:27:09 if you want to sbt, yes Jan 07 14:27:51 <_3mpty> it still uses gradle configs so it's ok for me Jan 07 14:28:08 gotta run! Copied out the links, I'll check all this again when I do a fresh install :) Jan 07 14:28:21 Is it a NullPointerException not including the required permissions? Jan 07 14:29:34 mohsen_: sometimes AS wouldn't print the stack trace when debugging on a live device and it crashes before the app fully loads the main activity. Try setting a breakpoint on your first line of code, letting the debugger settle, then hit play and hope for the best Jan 07 14:29:43 <_3mpty> mohsen_: I'm not sure but it should be security exception Jan 07 14:29:46 <_3mpty> or it was for me :P Jan 07 14:29:52 <_3mpty> (and my case) Jan 07 14:31:05 I see. Jan 07 14:31:48 After the programs execution seems like the exception has got written in the logcat Jan 07 14:32:10 but why it didn't happen at the exact time the exception has been thrown? Jan 07 14:33:11 mohsen_, maybe logcat was busy printing other stuff? Jan 07 14:33:20 your exception might got queued Jan 07 14:34:18 danijoo: I think so, I think I should give logcat some moments by putting a breakpoint as MarkyC said Jan 07 14:36:41 hi there, is there a way to show cards in a listview via xml, without messing around with adapters? I have static content in cardviews. Jan 07 14:37:20 you cant show anything in listviews without an adapter Jan 07 14:37:33 anything similar? Jan 07 14:37:42 like something scrollable but with cards Jan 07 14:37:48 ScrollView Jan 07 14:37:50 agaurav77: ScrollView Jan 07 14:37:53 Look guys, something is weird now, the previous times I run apps this way, the app would kept running in android studio unless I closed it from my phone, but now that I run them the run button in android studio get's enabled again so that I can run it again? Jan 07 14:38:25 danijoo, MarkyC: thanks :) Jan 07 14:39:03 It seems like android studio does not keep tracking of the execution of the app after it gets run in the phone. Jan 07 14:39:58 So maybe that's why it does not catch the exception that is thrown during runtime? Jan 07 14:41:47 mohsen_: unplug the phone, uninstall the app, plug the phone back in, click the play button (it will install the app) Jan 07 14:41:59 <_3mpty> logcat runs on device, android studio just read those Jan 07 14:43:04 mohsen_: also worth looking into: make sure the search field has nothing in it in Logcat on AS, because it will filter Jan 07 14:43:59 <_3mpty> about case above - you can run your app again, why not? Jan 07 14:44:26 <_3mpty> it will update your apk with new one Jan 07 14:45:33 _3mpty: But if there is a run button in android studio, there should be an stop button too? but as soon as click on the run, it gets enabled again and the stop button disables Jan 07 14:47:15 <_3mpty> both are disabled when you have build in progress, after complete build you can do it again Jan 07 14:47:55 <_3mpty> don't mind stop button usually it behaves in strage ways Jan 07 14:48:24 How buggy is this android studio Jan 07 14:48:41 MarkyC: I did as you said, now when I click on run I get this: Error: Activity class {com.mohsen.charge/com.mohsen.charge.MainActivity} does not exist. Jan 07 14:49:29 mohsen_, file->invalidate Cache/Restart Jan 07 14:49:31 <_3mpty> right now it's not that bad but in old days before AS 0.5 that was wild ride :D Jan 07 14:49:34 then restart your computer Jan 07 14:49:43 then try it again :p Jan 07 14:50:10 <_3mpty> still less annoying than xcode :P Jan 07 14:51:12 Oh by AS you mean Android Studio? I thought alot figuring why MarkyC used as in his message Jan 07 14:51:43 <_3mpty> yup Jan 07 14:52:04 I must have installed ADT Jan 07 14:52:18 <_3mpty> oh, stop button worked :D Jan 07 14:52:32 I never used the stop button ever Jan 07 14:52:38 what does it actually do? Jan 07 14:53:00 <_3mpty> closed activity Jan 07 14:53:47 <_3mpty> I never needed that before anyway and looks like i will keep it in that way Jan 07 14:54:27 <_3mpty> "Stop app" feature, maybe it will be more helpful with instant run Jan 07 14:54:39 <_3mpty> when you want ensure that you pushed fresh build Jan 07 14:55:03 <_3mpty> not just instant update Jan 07 14:57:06 <_3mpty> mohsen_: Don't install ADT or you gonna have bad time Jan 07 14:58:49 _3mpty: So many people are using it maan, plus, eclipse is my favorite IDE. Jan 07 14:59:18 _3mpty: So many people are using it maan || noone uses eclipse for android anymore Jan 07 14:59:24 Eclipse sucks Jan 07 14:59:32 <_3mpty> if you dive into intelij idea once there is no going back, after that all other looks primitive Jan 07 14:59:35 pfn: you mean ADT? Jan 07 15:00:00 no, eclipse Jan 07 15:00:17 No maybe I just keep using InteliJ for android, but I do my other stuff by eclipse Jan 07 15:00:25 pfn: I don't think so. Jan 07 15:00:32 <_3mpty> btw i heard that some company want to invest into new android-eclipse like tool from scratch Jan 07 15:01:08 Guys look at this stacktrace: http://pastebin.com/Shg4NCiA Jan 07 15:01:36 its a NPE Jan 07 15:01:38 The NullPointerException has happened in a class I don't have accessed to. Jan 07 15:01:56 it might be a param you pass in Jan 07 15:02:08 <_3mpty> MainActivity.java:73 Jan 07 15:02:34 <_3mpty> breakpoint, run and check your stuff Jan 07 15:03:22 _3mpty: The exception isn't thrown there, it has happened in a method which has been recursively called by that method in line 73 in MainActivity Jan 07 15:03:36 <_3mpty> yup Jan 07 15:03:36 danijoo: What is an NPE? Jan 07 15:03:43 <_3mpty> but there you're passing something Jan 07 15:04:12 <_3mpty> o calling that causes exception Jan 07 15:04:32 But I passed what was needed, according to the library's doc] Jan 07 15:05:12 <_3mpty> double check that Jan 07 15:05:29 <_3mpty> with breakpoint stop inspect your variables Jan 07 15:05:35 <_3mpty> and states Jan 07 15:14:08 _3mpty: Is the permission correct:? Jan 07 15:15:19 <_3mpty> looks good Jan 07 15:16:01 <_3mpty> but I wouldn't connect that with your NPE Jan 07 15:16:29 I think it's a bug in Apache Commons Net Jan 07 15:17:04 show your code that belongs to the error Jan 07 15:18:23 Hi, I'm trying to close keyboard after some view is clicked. Jan 07 15:18:23 http://pastebin.com/eS2aWxaR Jan 07 15:18:28 This is my code and it is not working Jan 07 15:19:42 it works fine Jan 07 15:19:57 It should Jan 07 15:19:58 but it is not Jan 07 15:21:44 false Jan 07 15:21:51 you didn't call it Jan 07 15:22:19 Im 100% calling it Jan 07 15:22:45 so you claim. Jan 07 15:22:55 the other part of this method is working fine Jan 07 15:24:20 http://pastebin.com/Fj6kyHwN Jan 07 15:24:22 full method Jan 07 15:26:23 danijoo: http://pastebin.com/5ATxi6t4 Jan 07 15:28:00 cwek, then you're doing something to show the keyboard again Jan 07 15:28:16 hm.. Jan 07 15:31:37 do you think keyboard is still up because EditText is still "active"? Jan 07 15:33:03 cwek, no, you can close keyboard while it is still focused Jan 07 15:33:39 then I'm not doing anything else to keep it up Jan 07 15:34:05 so you claim, but that call works fine to dismiss Jan 07 15:35:11 The exact same code worked in as a Java desktop application, but it's not working in android Jan 07 15:38:39 mohsen_, thats not helpful Jan 07 15:38:44 because the context is missing Jan 07 15:38:47 (your code) Jan 07 15:39:28 But you asked for the code that belongs to the error. Jan 07 15:40:09 mohsen_, but 3 lines with not matching line numbers and variables that arent explained are not helpful Jan 07 15:40:26 pfn: I created new project, created EditText nad button that should close the keyboard, still not working. Any clue what am I doing wrong? Jan 07 15:41:29 h Jan 07 15:42:01 is talking about a FOSS project considered advertising here? Jan 07 15:42:58 i don't wanna be B& lol Jan 07 15:46:43 I have a few services for GCM, im declaring them in the manifest file what happens when proguard is minifying? does it knows to update the names? Jan 07 15:46:58 Do i need to add a rule for those classes? Jan 07 15:47:15 is android written in java? Jan 07 15:47:28 no Jan 07 15:47:31 lol Jan 07 15:47:34 but apps are written in java Jan 07 15:47:53 android is wriiten in c right? Jan 07 15:48:06 its a linux kernel Jan 07 15:48:13 ye, so c Jan 07 15:48:48 cwek, oh, you need FromWindow not FromInputMethod Jan 07 15:49:10 me and some friends are working on a project to design a new OS for android devices thats FOSS and boots to a terminal where you can use a package manager Jan 07 15:49:45 nonsec: every android device? Jan 07 15:49:52 hopefully Jan 07 15:50:26 danijoo: This is my whole project: http://pastebin.com/VFUcyvVq Jan 07 15:50:30 we want it to be an alternate to android for people who would rather not use proprietary software on something they paid for and own Jan 07 15:51:13 we plan on adding support for ios once we get it developed Jan 07 15:51:34 but we'll see Jan 07 15:52:55 pfn: what do you mean by that? Jan 07 15:53:41 that is quite clear Jan 07 15:57:43 nonsec, why should I use your OS over android? Jan 07 15:58:49 I'm not interested in using a terminal on android Jan 07 15:59:15 I'm not interested in using a package manager either Jan 07 15:59:18 An interesting idea but I think it's probably not on-topic for the channel and it's going to pull everyone into a spiral of arguing Jan 07 15:59:43 for that matter, there are debian/Ubuntu userspace installs for android, no? Jan 07 15:59:58 theres even ubuntu mobile soon (tm) Jan 07 16:00:24 I would recommend you look at firefox os and jolla/sailfish/meego/maemo which was a dpkg based linux os that predates android for mobile devices Jan 07 16:00:29 the problem is that traditional desktop software works like shit on mobile Jan 07 16:00:30 there is ubuntu touch, but it's not well supported Jan 07 16:00:47 why would your offering be better? Jan 07 16:01:01 is your team bigger or better funded? Jan 07 16:01:16 its just me and a few friends from irc Jan 07 16:01:18 it's not well supported because there's no open source graphics or wifi drivers for mobile chipsets Jan 07 16:01:30 we have just started laying out the ground plans Jan 07 16:01:36 hate to crush your dreams but if nokia and ubuntu can't pull it off Jan 07 16:01:42 (and firefox) Jan 07 16:01:56 this is what everyone says Jan 07 16:02:02 I suggest you look at the n900 revival project if you really want something like that though Jan 07 16:02:07 always the "you can't do it" Jan 07 16:02:34 but it's just a dream right now, realizing it is a whole nother thing Jan 07 16:02:48 thx for the advice dragorn Jan 07 16:03:03 neo900 Jan 07 16:03:14 :D Jan 07 16:03:36 we plan on reverse engineering the drivers Jan 07 16:04:23 well, good luck Jan 07 16:04:39 im trying to reach out to anyone who may be interested in being part of the project Jan 07 16:05:02 nonsec, you should ask in android-root Jan 07 16:05:02 we're calling it desu OS (tentativey) Jan 07 16:05:05 we are app developers Jan 07 16:05:06 k thx Jan 07 16:05:17 i didn't know that tbh Jan 07 16:05:26 thats why there are channel topics ;) Jan 07 16:05:46 the topic here is unclear Jan 07 16:06:18 well, other than first sentence in the /topic, "this is for application development", sure :) Jan 07 16:08:30 nexus 5 doesn't work on all carriers in US, right? otherwise 180 for a refurbished would be a good deal Jan 07 16:10:33 ah, sry my hexchat only shows it from | root/custom ROMs, head to.... Jan 07 16:11:17 my hexchat shows the full topic :p Jan 07 16:11:36 danijoo: No comment on my issue? Jan 07 16:13:26 no sorry Jan 07 16:14:03 Everything seems fine, I don't know why it doesn't run properly on android Jan 07 16:14:37 mohsen_: I think people need moar info (as stated before). Jan 07 16:16:05 TacticalJoke: have you by any change experience with Kapt? Jan 07 16:16:12 *any chance Jan 07 16:16:16 But other than those info I gave the only things remained are xml design files and other stuffs Jan 07 16:16:39 Nah, vigilancer. Jan 07 16:17:09 mohsen_: Oh, sorry, you did post more. Jan 07 16:17:47 Do regular Java libraries really work on android? Jan 07 16:17:55 pfn, afaik no CDMA support Jan 07 16:18:06 Maybe that's the issue? Jan 07 16:18:27 some do, some dont Jan 07 16:19:24 Which part is failing? For all I know, `hostDir + fileName` could be wrong on this platform. Jan 07 16:19:53 Oh, that is all FTP. I guess there's no "this platform". Still, I wonder which part is going wrong. Jan 07 16:20:53 My only assumption is that Apache Commons doesn't properly work on android Jan 07 16:20:57 pfn: I believe nexus 5 model D820 support cdma Jan 07 16:21:18 thanka Jan 07 16:21:25 yeah, it's not single sku Jan 07 16:22:29 not sure about all carriers tho, using d821 Jan 07 16:23:45 Isn't there any FTP library specifically written for android? Jan 07 16:24:08 do you guys develop those root apps? or just basic android apps? Jan 07 16:24:45 nonsec, there are 400 people in here. a mix of both ;) Jan 07 16:25:19 ye, i don't know why my hexchat does that, but for some reason it scrolls to the end of topics lol Jan 07 16:27:14 root apps suck, there's little market appeal outside of some core utilities Jan 07 16:27:25 like a rom manager and su management Jan 07 16:32:21 well personally i like the terminal emulator but even with root it doesn't really give you a full linux feel. so many commands are missing, even from busybox Jan 07 16:33:17 <_genuser_> has anyone installed a non android OS on a phone after rooting it? Jan 07 16:33:22 <_genuser_> like a linux distro? Jan 07 16:33:31 many people have Jan 07 16:33:33 <_genuser_> I"m sure the drivers are a hassle. Jan 07 16:33:34 i have Jan 07 16:33:39 <_genuser_> nonsec: what did you install? Jan 07 16:33:45 nonsec, well install debian in chroot and you get it all Jan 07 16:33:55 ^ Jan 07 16:34:04 just chroot a linux distro Jan 07 16:34:32 <_genuser_> so then it has just the debian no more android, correct? Jan 07 16:34:44 I don't even bother to unlock the bootloader on most of my nexus devices anymore Jan 07 16:34:53 thats not yet possible Jan 07 16:35:00 _genuser_, no Jan 07 16:35:10 _genuser_, you still have android, you just launch a terminal into a debian chroot Jan 07 16:35:15 you can't do fuck all with it, though Jan 07 16:35:17 pretty useless Jan 07 16:35:20 thats what i want to create though Jan 07 16:35:21 <_genuser_> pfn: heh, I always wonder if rooting app installs spyware. so I'd rather just leave it unrooted. Jan 07 16:35:29 unless your goal is to have a mobile debian cmdline userspace Jan 07 16:35:46 I only keep my nexus 7 unlocked, so I can flash firmwares up and down all day long Jan 07 16:36:01 so _genuser_ i have this idea to develop a new OS for android that does just that Jan 07 16:36:04 <_genuser_> pfn: yep, that's what I thought. It's essentially a playbox really. what I'd really be curious about would be full on distro install. Jan 07 16:36:07 <_genuser_> but drivers would be a pain. Jan 07 16:36:08 nexus 7 can flash from 4.3 up and down to 6.0.1 Jan 07 16:36:17 which makes it an awesome testing device Jan 07 16:36:29 that sounds pretty cool Jan 07 16:36:47 so if I absolutely have to test on something that I don't have, I can flash down to 4.3 with the nexus 7 Jan 07 16:36:56 otherwise, all my devices remain locked since it's not worth the bother Jan 07 16:37:05 and its very stable too, correct (as in, it handles being flashed multiple times well) Jan 07 16:37:24 nonsec, stability is irrelevant, it's flashing the entire OS Jan 07 16:37:44 you just have some moderate wear on the flash Jan 07 16:37:46 nonsec, what should I do with a cmd on my phone Jan 07 16:37:59 i cant see a case were this is useful :/ Jan 07 16:38:06 it's not useful Jan 07 16:38:11 <_genuser_> pfn: back few years ago someone in #android-root was like, anybody who doesn't root their phone is just stupid. Jan 07 16:38:12 not for a user, and not for most developers Jan 07 16:38:17 <_genuser_> pfn: because I told him I hadn't rooted mine Jan 07 16:38:27 it's not useful. it might be entertaining, if that's your jam Jan 07 16:38:27 _genuser_, thats because its android-root Jan 07 16:38:32 ^ Jan 07 16:38:33 ofc they say you should root :p Jan 07 16:38:34 if you want to do stuff with root, sure, root, but otherwise, it's not useful Jan 07 16:38:40 duh Jan 07 16:38:57 <_genuser_> sure, but a more balanced person would be like, ok we can help you with root. we recommend you root. Jan 07 16:39:00 dev tools have gotten to a point where root isn't really necessary anymore Jan 07 16:39:09 <_genuser_> not like pfft, if you don't rootz teh fone, yer stooooped. Jan 07 16:39:11 particularly now that I figured out how the fuck ANDROID_HVPROTO works Jan 07 16:39:17 do you have a shell open or something danijoo? Jan 07 16:39:25 nonsec, what should I do with a cmd on my phone Jan 07 16:39:26 _genuser_, so you expect the equivalent of the ricer community to be reasonable? :P Jan 07 16:39:35 <_genuser_> dragorn: haha!! Jan 07 16:39:48 nonsec, yes. but not on my phone Jan 07 16:40:03 I always imagine _genuser_ to be a gentoo user Jan 07 16:40:03 <_genuser_> dragorn: I was there out of curiousity. was surprised by the passion. didn't need to root my phone. so once someone told -dev channel was for dev talk, I moved to this one. Jan 07 16:40:14 then why did you ask me that danijoo? Jan 07 16:40:18 cant think of why i should cd arround on my phone Jan 07 16:40:19 <_genuser_> pfn: yep, a gentoo user. Jan 07 16:40:33 _genuser_, I'd imagine you'd be all for rooting with a nick/meaning like that Jan 07 16:40:34 <_genuser_> pfn: this irssi is running in screen on my fileserver running gentoo. Jan 07 16:40:48 i mean, i never thought ¨i wish i could do this in a shell here now¨¨ Jan 07 16:40:48 and yeah, I can't stand ircing from irssi from phone Jan 07 16:40:49 _genuser_, there's uses. most of them are dumb and *horrifically* insecure. the only ones still remaining really are to debloat carrier crapware... to which i say... dont' buy a carrier phone if you care :P Jan 07 16:41:06 dragorn, until recently, that wasn't really possible Jan 07 16:41:10 only very very recently Jan 07 16:41:22 <_genuser_> pfn: truth be told, I tried to install debian on an old laptop. wouldn't. ubuntu, it was too slow. then I was able to use grub4dos to chainload the gentoo install CD .iso without having to burn it to usb or cd. Jan 07 16:41:25 e.g. we only started getting single-sku phones in the US in the last year Jan 07 16:41:34 _genuser_, I love the sense of near-delusional optimism that somehow a custom kernel will get you better... anything, in most cases :P Jan 07 16:41:48 pfn, you say that, but for any carrier but sprint and vzw there's been nexus Jan 07 16:41:54 <_genuser_> pfn: after that I just stuck with gentoo. out of habit some. out of it's leanness. my fileserver has just the kernel, drivers, ssh, samba, raid stuff. nothing else. Jan 07 16:41:58 pfn, and it's totally possible to get unlocked phones on vzw Jan 07 16:42:02 dragorn, yeah, and I've been a vzw customer for the past >10 years Jan 07 16:42:05 pfn, you just need to be willing to pay unsubsidized Jan 07 16:42:13 they aren't bootloader unlocked Jan 07 16:42:16 i've had unlocked phones on verizon for ~4-5 years Jan 07 16:42:17 poor muricans :( Jan 07 16:42:26 <_genuser_> dragorn: probably a lot ofpeople believe that. in my case as I just mentioned, it was the first distro that installed on my laptop. so I stuck with it. Jan 07 16:42:27 if your asking about the thing i was talking about earlier danijoo, the reason is so you can use the full processing power of your device, and not be held back by the limitations of the android environment Jan 07 16:42:34 dragorn, sim unlocked, sure, not bootloader unlocked Jan 07 16:42:38 pfn, you just go to samsung, or moto, and buy the dev model Jan 07 16:42:41 nonsec, for what? Jan 07 16:42:41 pfn, bootloader unlocked Jan 07 16:43:03 dragorn, moto x dev model was 2013, before that, was there any samsung dev model? Jan 07 16:43:04 * pfn shrugs Jan 07 16:43:08 danijoo: for whatever its capable of Jan 07 16:43:09 pfn, I ran a s4 for years fully unlocked custom builds on vzw, they were perfectly happy. $600 dev from samsung Jan 07 16:43:19 s4 was also about ~2013 Jan 07 16:43:20 and I had a dev moto turbo hd, some other moto stuff Jan 07 16:43:27 nonsec, so you cant imagine a usecase yourself :P Jan 07 16:43:40 i can imagine plenty danijoo Jan 07 16:43:48 pfn, anyhow, it was possible. verizon is an outlier of shit hardware still, agreed, and it's onyl recently gotten *easy*, but it was possible Jan 07 16:43:51 like what? Jan 07 16:43:55 <_genuser_> dragorn: I have an s4 from verizon. and I can't root it, or use it properly on tmobile. talk,mms,data work. SMS doesn't work. Jan 07 16:43:57 dragorn, agree Jan 07 16:44:03 _genuser_, you bought it from verizon :P Jan 07 16:44:09 <_genuser_> dragorn: so when I need to txt, I'm attaching blank picture to force it to be an mms, lol. Jan 07 16:44:20 _genuser_, I didn't say verizon phones were unlocked, I said you can get unlocked hw that works on verizon :P Jan 07 16:44:21 dragorn, single-sku devices make it much better now Jan 07 16:44:23 danijoo: for one playing games, another compiling code Jan 07 16:44:25 pfn, oh absolutely Jan 07 16:44:33 <_genuser_> dragorn: my work gave it as work phone. then they upgraded it to an iPhone. and mine crapped. so I figured I could use my old work one for personal use. Jan 07 16:44:35 nonsec, i can play games and use full resources on android Jan 07 16:44:38 pfn, verizon still kicks and whines a bit about it, but nothing a sim puncher wont' solve Jan 07 16:44:55 I have a ton of nano sim from vzw already, since my moto x took nano Jan 07 16:44:55 and nobody will ever write a good programm on a 4" touchscreen Jan 07 16:45:03 I can just plug anything into anywhere now Jan 07 16:45:13 dragorn, and I use scissors to cut microsim down Jan 07 16:45:17 dragorn, that's what I do when I travel Jan 07 16:45:20 danijoo: how can i disable the android stuff running in the background when i chroot to my linux disk? Jan 07 16:45:27 I used scissors to cut down microsims in mexico and thailand Jan 07 16:45:40 pfn, yeah; i prefer the punch just because it's more reliable for me and less thinking. I'm $10 lazy. Jan 07 16:45:42 japan wouldn't even offer a sim, them uppity fuckers Jan 07 16:45:43 danijoo: because its using up most of my proccessing power and RAM Jan 07 16:45:47 <_genuser_> man I wrote some super complicated code months ago. and now I can't figure it out. Jan 07 16:45:56 _genuser_, sucker :p Jan 07 16:45:59 <_genuser_> rather can't start the task of understanding it again. Jan 07 16:46:05 nonsec, every OS needs run obviously. Jan 07 16:46:17 <_genuser_> pfn: it's all documented and properly designed. I just need to read the comments to see what I was doing. and I'm slacking. Jan 07 16:46:18 you just see it as android ram because thats the root os Jan 07 16:46:23 if you run a debian it wont be much less Jan 07 16:46:25 nonsec, don't boot the android init Jan 07 16:46:29 just be debian instead Jan 07 16:46:31 nonsec, launch your debian init instead Jan 07 16:46:37 oh Jan 07 16:46:44 that's simple OS 101 :p Jan 07 16:46:49 s/OS/linux Jan 07 16:46:51 pfn have you done this? Jan 07 16:46:59 for android? nope, don't really give much of a fuck Jan 07 16:47:10 <_genuser_> pfn: OS 101 is: if you don't see a start button, find a nerd friend... Jan 07 16:47:12 but still theres no reason to do that _on a phone_ Jan 07 16:47:25 pfn well everything i've read says that won't work Jan 07 16:47:27 if I want features like what you said, i dont want them on a touchscreen with a few " Jan 07 16:47:27 or, even easier, just replace /bin/init with the init of your choice Jan 07 16:47:39 of course it works, but stuff like keyboard, etc. won't be available Jan 07 16:47:49 pfn thats the whole issue Jan 07 16:47:51 and you won't have all the android services Jan 07 16:47:56 nonsec, so install the userspace you need Jan 07 16:47:57 so in the real world. when an app has multiple pages like login screen, loading screen, main listview, etc. those are 1 activity and multiple fragments? Jan 07 16:48:03 android uses more memory than a blank shell, but it's also, you know... usable. :P Jan 07 16:48:06 nonsec, anyway, you're way OT here, no one here is interested or cares Jan 07 16:48:23 DrBenway, or multiple activities and no fragment at all :) Jan 07 16:48:30 <_genuser_> DrBenway: depends on how you design it. ideally login screen, main screen should be their own activities. Jan 07 16:48:33 android services: keyboard, bluetooth, usb, etc. Jan 07 16:48:35 danijoo: is one more recommended than the other? Jan 07 16:48:42 ok Jan 07 16:48:45 * pfn releases android-sdk-plugin 1.5.13 Jan 07 16:48:48 <_genuser_> DrBenway: cleaner is more recommended. Jan 07 16:48:50 pfn really dude? you're gonna be like that? Jan 07 16:48:51 DrBenway, google recommends to use lots of fragments Jan 07 16:48:52 when would you use different fragments? Jan 07 16:49:06 <_genuser_> in that case an activity will be cleaner and contianed unit of code that does X. Jan 07 16:49:06 but I prefer different activities for different purposes Jan 07 16:49:18 <_genuser_> fragments will be like children running around the house when you have guests over. Jan 07 16:49:24 do most android phones ship with kernels that have swap as an option? Jan 07 16:49:38 duboisj, no, swap to flash is a terrible idea Jan 07 16:49:46 i guess fragments make sense when you have parts of your app that doesn't change (like a title bar) Jan 07 16:49:52 <_genuser_> DrBenway: you might use fragments to add additional views on a tablet, for example. Jan 07 16:50:00 ok Jan 07 16:50:00 duboisj, it's better to kill an app than thrash the write cycles on your non-replaceable system flash. plus it's SO much slower that the performance isn't worth it Jan 07 16:50:00 duboisj, android doesnt swap Jan 07 16:50:10 android throws OOMs and kills apps if memory is low :p Jan 07 16:50:25 I know android doesn’t swap: I mean does the kernel even have the ability most of the time, or would it need a recompile? Jan 07 16:50:25 DrBenway, IMHO, fragments are good when you have multiple elements of your UI and you want to rearrange them on different screens Jan 07 16:50:44 DrBenway, if all your fragments are full-activity, I don't know that there's any real benefit to the model Jan 07 16:50:48 also, is there a concept of activity stack? like i'm in my normal app and go into option and then i want to pop back out of the options to wherever i was Jan 07 16:51:06 DrBenway, thats the default Jan 07 16:51:12 ok Jan 07 16:51:18 DrBenway, there are of course subtleties about how data is preserved in fragments, and doing other clever things with them Jan 07 16:51:22 if activity B is started from A, the stack is AB Jan 07 16:51:33 and pressing back will pop B and you land in A again Jan 07 16:51:36 (unless A is closed) Jan 07 16:51:44 finished* Jan 07 16:51:45 cool Jan 07 16:51:52 <_genuser_> if you don't want to have to rebuilt on orientation changes, just use a big fragment and set retain instance of something. Jan 07 16:51:55 <_genuser_> that's one place where I like it. Jan 07 16:51:56 i should have enough info to get going. thanks guys Jan 07 16:52:05 DrBenway, also you can have multiple views which obscure or show/hide, so for instance your main activity might have the container holding all your activity views hidden and the splash screen shown, then you hide the splash and show your activity, but that wouldn't necessarily need ot be 2 activities or 2 fragments Jan 07 16:52:52 _genuser_, sure, there's all sorts of subtleties where fragments might make sense, but the "every activity is a stub that holds a fragment" model isn't necessarily vital either Jan 07 16:53:17 DrBenway, if you're just starting out, your other option is "just follow the google model in their tutorials". Once you know how they think that should work, youc an start cutting corners or changing it to fit what you want Jan 07 16:53:24 <_genuser_> dragorn: correct, no, it's not. just to have a fragment inside an activity for the sake of it is pointless. Jan 07 16:53:27 DrBenway, but at least you're not trying to translate it to your layout w/out knowing what's going Jan 07 16:53:36 any link? Jan 07 16:53:37 <_genuser_> dragorn: but cheap and dirty orientation change workaround, then sure. Jan 07 16:54:02 right now, my app flow is pretty damn simple, so i'm not really afraid Jan 07 16:54:04 DrBenway, for the google tutorials? They have a lot of samples up on developer.android.com Jan 07 16:54:08 i was just looking for a general direction Jan 07 16:54:13 plus just their code snippets, etc in the API docs Jan 07 16:54:42 <_genuser_> you can cheat like dragorn is saying. Jan 07 16:54:49 <_genuser_> or you can sit down and watch a ton of youtube videos. Jan 07 16:55:04 i have to get my tasks done too ;) Jan 07 16:55:04 <_genuser_> the only difference is, teh first one will teach you so much. Jan 07 16:55:08 heh never thought the official docs would be considered cheating :P Jan 07 16:55:16 <_genuser_> the youtube vides and tutorials will just waste your time. Jan 07 16:55:33 <_genuser_> dragorn: no, I just wanted to chime with a dramatic statement and then agree with your statement. Jan 07 16:55:38 i dunno... i have a one activity app and i need to make a login screen. nothing else Jan 07 16:55:44 it's hard to screw up Jan 07 16:55:54 <_genuser_> DrBenway: AS already gives you a login screen template. Jan 07 16:56:00 <_genuser_> you just need to put the code for the actual login behidn it. Jan 07 16:56:00 AS? Jan 07 16:56:06 <_genuser_> android studio Jan 07 16:56:09 cool Jan 07 16:56:19 <_genuser_> unless you're on eclipse. Jan 07 16:56:32 <_genuser_> in which case one of tehse guys will probably give you some talking to. Jan 07 16:57:38 nah... i keep myself on latest dev techniques Jan 07 16:58:03 <_genuser_> alright you guys for encryption... how many bit for a password do you prefer? Jan 07 16:58:16 sha512? Jan 07 16:58:29 <_genuser_> I'm not talking about key bit-strengh. but the initial password that's used to derive the key in AES for example. Jan 07 17:00:51 Hey all. I've got MyFragment extends Fragment implements MyInterface. MyInterface defines a couple of methods. I'd like to addOnPageChangeListener to my View Pager so that onPageSelected, the selected MyFragment has one of the MyInterface methods called. Doing this; MyFragment thisFragment = (MyFragment) pageAdapter.instantiateItem(pager, position); thisFragment.myMethod(); throws a 'Fragment could not be cast as ... Jan 07 17:00:57 ... MyFragment' error. Anyone know what I'm doing wrong? Jan 07 17:01:54 <_genuser_> does pageAdapter.instantiateItem return a fragment? Jan 07 17:01:58 <_genuser_> or a MyFragment? Jan 07 17:03:23 philm88, show the code Jan 07 17:03:58 <_genuser_> you can his women, you can have his ramen, but to ask for the man's code!!! Jan 07 17:04:00 <_genuser_> the nerve Jan 07 17:07:57 most people's code isn't very valuable :P Jan 07 17:08:01 unless it's hard core algorithms Jan 07 17:08:13 <_genuser_> pfn: heh, most people's code is just if-else's Jan 07 17:08:17 especially from people asking for help Jan 07 17:08:53 I swear I wont reuse his ClassCastException without asking for written permission :p Jan 07 17:09:18 <_genuser_> you say that.... Jan 07 17:10:09 I wish javadoc.io did a source explorer, too Jan 07 17:10:11 that'd be great Jan 07 17:11:24 _genuser_, don't just generate a aes key from a password directly using any messagedigest Jan 07 17:11:30 use pbkdf2 Jan 07 17:12:25 <_genuser_> SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"); Jan 07 17:12:45 <_genuser_> it will do 256bit encryption if I tell it to. Jan 07 17:13:33 <_genuser_> but the initial password... you know if the user gives it "pass" and the thief guesses "pass", well then 256-bit and PBFD@34 KD Lang and Frank Sinatra will all be pointless. Jan 07 17:13:49 that's a user problem Jan 07 17:13:56 but 256bit is a reasonable start Jan 07 17:14:22 <_genuser_> altho, on a device, with android 5.0.1 if I go anything over 128, it's a whole minute or more to encrypt/decrypt. Jan 07 17:14:45 how much data? it's generally pretty fast Jan 07 17:15:01 <_genuser_> roughly 4KB'ish. Jan 07 17:15:06 that's wrong Jan 07 17:15:20 <_genuser_> on android 4, on s4, it was just doing it in 6seconds. Jan 07 17:15:40 <_genuser_> but the device got a push for android 5.0.1 and I upgraded it. Jan 07 17:15:54 <_genuser_> the same encryption routines takes 30seconds plus. Jan 07 17:15:56 I use aes 256 all day long with no negative performance Jan 07 17:16:05 <_genuser_> pfn: on a phone or desktop? Jan 07 17:16:09 phone, of course Jan 07 17:16:27 <_genuser_> ok, your own code or third party app that does the encryption for you. Jan 07 17:16:46 my own code Jan 07 17:16:59 <_genuser_> I see some of my excel sheets might go to 20KB. Jan 07 17:17:24 my own file is 70kb Jan 07 17:17:36 $ ls -l ~/passwords.kdbx Jan 07 17:17:36 -rw-r--r-- 1 pfnguyen Administ 69438 Jan 5 17:35 /c/Users/pfnguyen/passwords.kdbx Jan 07 17:17:52 <_genuser_> ok, I see some of the data can go 2MB and in few cases even 4MB. Jan 07 17:18:01 other people have larger Jan 07 17:18:24 <_genuser_> are you encryption on main thread or in a service? Jan 07 17:18:53 <_genuser_> I noticed on galaxy s4, moving from main thread to IntentService the time went from 5second to 10seconds. Jan 07 17:19:05 <_genuser_> 10'ish. 10-12 avg. Jan 07 17:19:18 <_genuser_> but on android 5.0.1 oh geez, it just takes waaay to long. Jan 07 17:20:11 <_genuser_> pfn: how many files to you encrypt with a given password? Just the passwords.kdb file? Jan 07 17:21:25 only that single file, but that doesn't matter, you said 4kb as taking many seconds Jan 07 17:21:26 which is wrong Jan 07 17:21:39 <_genuser_> pfn: I asked that for different reason. Jan 07 17:21:53 <_genuser_> pfn: I'm going to have multiple files 10-200 encrypted. Jan 07 17:22:21 <_genuser_> for that reason, what I'd like to do is: at start maybe pick a randomly filled byte[] or let's say 20 bytes. Jan 07 17:22:32 <_genuser_> that's the real password that is used to encrypted everything. Jan 07 17:22:42 <_genuser_> the user's pass is used to encrypt THAT byte[]. Jan 07 17:23:04 <_genuser_> so if they change it, the app is not re-encrypting all 200 documents. Jan 07 17:23:31 <_genuser_> alternatively, I could just tell them to pick a really nice long password, enforce it and just use it to encrypt all docs. Jan 07 17:24:13 oh, the common approach is to protect a single key with a password Jan 07 17:24:21 yeah, re-encrypting on password change sucks Jan 07 17:25:33 <_genuser_> pfn: so I have a really high iteraction count. that's definitely contributing to it. Jan 07 17:25:50 <_genuser_> KeySpec spec = new PBEKeySpec(password, salt, 65536, KeySize); Jan 07 17:26:10 <_genuser_> I see lot of examples use 10000. Maybe if I lowered it, it would help. Jan 07 17:26:29 yes, key transformation rounds on mobile sucks Jan 07 17:26:34 if you move it into native code, it's faster Jan 07 17:26:46 <_genuser_> AES/CBC/PKCS5Padding <-- that's the specific cipher I'm using. Jan 07 17:27:12 <_genuser_> pfn: native, as in some c++ code. using ndk, etc.? Jan 07 17:27:26 yes Jan 07 17:27:42 <_genuser_> where do you store the salt and IV that's used? Jan 07 17:27:44 well, profile each step, I was having performance issues with aes key transformations Jan 07 17:27:55 store wherever you want, it's public info Jan 07 17:28:19 <_genuser_> ok, that's was my conclusion after reading tons of security articles. Jan 07 17:28:37 <_genuser_> that salt and IV are public and you can store them just byte[] in a readable fiel, whatever. Jan 07 17:28:55 <_genuser_> one other question: are you using the builtin bouncy castle? Jan 07 17:29:04 <_genuser_> it's limited to what like 128bit, no? Jan 07 17:29:28 <_genuser_> You can't do 256-bit encryption on bouncycastle that's included in dalvik, at least. Jan 07 17:29:39 bc isn't limited to 128 Jan 07 17:29:53 <_genuser_> the android version is. I read that all over online. Jan 07 17:30:06 <_genuser_> and my own test shows it would just throw an exception saying it wasn't allowed. Jan 07 17:30:30 On my Nexus 5 (running 6.0.1) I have no /storage/sdcard0 symlink, even though the init.hammerhead.rc has the following line: "symlink /sdcard /storage/sdcard0". Can anybody tell me why this is? Jan 07 17:31:31 _genuser_, false Jan 07 17:31:41 _genuser_, it supports 256bit no problem Jan 07 17:32:02 lonimurar, #android-root Jan 07 17:32:20 <_genuser_> pfn: reading my notes. I think it was device/OS-version dependent. Jan 07 17:32:38 pfn: but is this really related to rooting? Jan 07 17:32:45 <_genuser_> I was seeing errors with it. I will try again. I do remember from my notes that it isn't supported on all devices. Jan 07 17:32:48 _genuser_, nope, at least not any significant version Jan 07 17:32:53 lonimurar, yes, you wouldn't have that problem otherwise Jan 07 17:32:54 <_genuser_> so you might have to query for what's supported the lower it. Jan 07 17:33:04 _genuser_, on jvm, 128bit is the limit without policy Jan 07 17:33:10 <_genuser_> pfn: good to know. I'll re-run my code and that might actually speed it up too. Jan 07 17:33:17 pfn: what makes you think that? Jan 07 17:33:24 _genuser_, but on android, all bit values are supported Jan 07 17:33:28 <_genuser_> pfn: yeah, that was another issue too you needed policy updates on jvm. Jan 07 17:33:32 lonimurar, the fact that everyone else's nexus 5 doesn't have this problem Jan 07 17:33:43 and the fact that you're reading into init files, means that you rooted and have this problem as a result of such Jan 07 17:33:47 danijoo: _genuser_; whilst copying my changes to pastebin I noticed an error where one Fragment in the list was of the wrong type (: Thanks for your help (: Jan 07 17:33:54 <_genuser_> pfn: ok, nice. glad we talked. I'll update my code to try 256 bit again and see what it does. Jan 07 17:34:11 pfn: how do you know other people on Marshmallow don't have this "problem"? (The device is working fine btw.) Jan 07 17:35:55 lonimurar, because no one's complained of it, thus not a problem Jan 07 17:36:15 pfn: because you wouldn't really notice Jan 07 17:37:04 pfn: the only reason why I noticed is because I'm trying to migrate my WhatsApp media from my old phone and its database uses absolute paths (referencing /storage/sdcard0) Jan 07 17:37:26 <_genuser_> whatsapp is quite quirky in everything. Jan 07 17:37:38 <_genuser_> they're super curious to have your phone number. Jan 07 17:39:10 lonimurar, in that case, blame whatsapp; I guess it's not there anymore, misread the direction of your broken symlink Jan 07 17:39:53 ugh, wtf is play console not letting me publish an update, it keeps telling me to check list for errors (in pricing&distribution) but there are no errors... pos Jan 07 17:40:32 <_genuser_> lol pricing. Jan 07 17:40:35 <_genuser_> it wants you to pay... Jan 07 17:40:43 pfn: I know WhatsApp is to blame, but I also don't understand why the symlink line from init.hammerhead.rc isn't working Jan 07 17:41:36 we’re probably not going to know either. We’re app developers, not root people Jan 07 17:41:43 An unexpected error occurred. Please try again later. Jan 07 17:41:46 * pfn kicks play console Jan 07 17:41:49 I’m setting a cookie for some of my requests, but I’m not sure if it’s actually going out. How would I monitor/see that? Jan 07 17:42:04 could be worse. could be an expected error Jan 07 17:42:07 lonimurar, maybe because it's not running, or it runs too early, who knows Jan 07 17:46:15 hmm, javascript on chrome is broken Jan 07 17:46:19 it submits fine on firefox Jan 07 17:50:34 I want some text to be always upright to the user, no matter how they rotate the phone, at any angle. Can I do this using just a textView? Or do I need to use OpenGL? Jan 07 17:51:21 doesn't have to be opengl, but it can't be done with a textview Jan 07 17:51:30 it would be a custom view that draws text based on orientation sensor angle Jan 07 17:52:55 of course, how will you determine what is always upright to the user, gravity? Jan 07 17:52:59 what if they're lying on their side Jan 07 17:53:04 or hanging upside down Jan 07 17:53:45 spiderman would 1-star rate that. Jan 07 17:53:51 lol Jan 07 17:54:03 Yeah, I figured I could use something like this:http://stackoverflow.com/questions/2558257/how-can-you-display-upside-down-text-with-a-textview-in-android Jan 07 17:54:16 but interesting questions, pfn Jan 07 17:54:22 I'll have to think about it more Jan 07 17:55:22 and yes, you could force redraws with rotation, that would work Jan 07 18:08:56 http://www.cnet.com/news/blackberry-going-all-in-on-android-phones-for-now/ Jan 07 18:09:14 blackberry might have a thing going if they can make nice hardware keyboard phones Jan 07 18:09:22 with regular updates, etc. Jan 07 18:09:30 I like the priv Jan 07 18:09:35 its just too expensive for me Jan 07 18:09:42 perhaps. they’re the only ones doing it. At least until Samsung jumps on that bandwagon too :p Jan 07 18:09:43 but the concept is nice Jan 07 18:10:48 last i read the high end of the android phone market was most turbulent / hardest to make money because of apple - but maybe they have an in because of past enterprise / IT familiarity Jan 07 18:12:21 if they make a landscape hardware keyboard android for <500 i buy it Jan 07 18:13:05 not sure where BB stands these days wrt giving countries access to their data (india), their survival is also determined by how others see their core services as being more secure than competition Jan 07 18:13:08 BB wasn’t into the landscape keyboards Jan 07 18:13:46 and a hardware keyboard is probably going to add about $100 to the price of the phone, due to manufacturing costs, warranty costs, etc Jan 07 18:14:55 yeah i'd rather have a more weatherproof phone , harder to do with slider Jan 07 18:15:12 i thought at CES we'd see more waterproof phones Jan 07 18:20:11 "BlackBerry says it will keep operating in Pakistan after resolving a dispute with Islamabad over user data." Jan 07 18:20:32 this is just last week Jan 07 18:21:11 "Pakistan asked BlackBerry (BBRY, Tech30) in July to give the government access to all encrypted traffic that flows through the company's servers, citing security concerns. BlackBerry refused to comply with Pakistan's order." Jan 07 18:21:54 i think they won this one with pakistan, but lost to india in 2013 Jan 07 18:33:53 how do I open a port for socket Jan 07 18:34:02 i got public ip but it isn't open Jan 07 18:34:11 have opened it on the firewall / hub Jan 07 18:52:48 Is there a way to use google maps without adding a new Module into your project? Jan 07 18:53:27 you can fire an intent to open a map in maps app Jan 07 19:00:48 danijoo: Can I not have a Frame containing the maps window? Jan 07 19:01:26 if you add play services lib for maps. Jan 07 19:03:15 danijoo: Yea I have that on now Jan 07 19:04:51 i suppose you could embed a webview going to the maps site Jan 07 19:04:57 but the user experience would probably be poor Jan 07 19:06:16 ok fixed it thanks Jan 07 19:06:18 * nomic lurks Jan 07 19:09:12 Hey Jan 07 19:49:46 Anyone know if this true the cloud test lab is in the google play? Jan 07 19:50:27 i mean the google developer console Jan 07 19:50:47 I designed a launcher icon for my app in inkscape and exported it as PNG at 1200*1200 pixels. I imported the icon in android studio using new ImageAsset. But the launcher icon seems pretty small on my phone and tablet screen. Should I save the icon at larger resolution? Jan 07 19:52:31 andromod, you should have it in the right resolution Jan 07 19:54:35 What's the best/fastest android emulator for Mac? Jan 07 19:55:28 genymotion or android emulator 2.0 Jan 07 19:55:41 danijoo like I said I used android studio "New->Image Asset" option to import icon. I thought it automatically generate icons for all screen densities. Jan 07 19:56:20 never used it :/ Jan 07 19:56:29 im used to do it by hand Jan 07 19:58:29 hey awefawe Jan 07 19:58:31 danijoo can you please elaborate? I mean do you use an online resizer or use any other tool? Jan 07 19:58:55 an image program Jan 07 19:58:58 gimp Jan 07 19:59:01 nothing more Jan 07 19:59:49 Hm. Fling gestures don't seem to register more than half the time, when swiping left->right and top->bottom on Android Wear. Opposite directions register 100% of the time, however. Jan 07 20:00:02 danijoo ok thanks! Might as well try that. Jan 07 20:00:17 Oops. *right->left, I meant. Jan 07 20:00:50 danijoo is the resolution(1200*1200) be the problem? Jan 07 20:01:08 Anyone have any idea why that might be> Jan 07 20:01:54 I dont have the resolutions that are required in my head Jan 07 20:02:09 but you have to match them exactly Jan 07 20:02:15 or it will look weird Jan 07 20:03:38 Hey all Jan 07 20:03:46 I got a question Jan 07 20:04:05 danijoo yeah I know that much. Thanks! Jan 07 20:04:23 I hear that the free cloud test lab is in the Google Play Developer Console but how do you whitelisted a app? Jan 07 20:05:20 Sorry for the newbie question:) Jan 07 20:06:52 hey danijoo Jan 07 20:08:14 I dont know perlsyntax Jan 07 20:09:36 i was just say hi Jan 07 20:09:55 Does anyone know why I need this answer: http://stackoverflow.com/a/4812512/1193321 in order to get an image from a gallery? Why do some galleries give me an actual file path and some don't? Jan 07 20:09:57 ok :p Jan 07 20:10:02 hi Jan 07 20:10:31 yep Jan 07 20:11:12 Danijoo,I found out that google test lab comeing out soon i mean go pass beta yes.:) Jan 07 20:14:16 hi there, any RxJava/Android experts in here? Jan 07 20:17:50 Does anyone know why I need this answer: http://stackoverflow.com/a/4812512/1193321 in order to get an image from a gallery? Why do some galleries give me an actual file path and some don't? Jan 07 20:18:01 sorry didn't mean to send that one again Jan 07 20:18:12 but if anyone does know the answer it's still a valid question lol Jan 07 20:18:36 I want my retrieve data hourly from a web server and update my contentprovider's data. Is a SyncAdapter what I should use to do this? Jan 07 20:18:58 eghdk, because some items may not come from local filesystem Jan 07 20:19:10 eghdk, e.g. google photos stores half of its shit in the cloud, you can pick a photo and it won't come from local Jan 07 20:19:17 philwantsfish, yes Jan 07 20:20:01 danijoo: From a quick glance at SyncAdapters they say it syncs data between both parties. Can it just sync one-way, from webserver to device? Jan 07 20:20:14 Guys is there something I am missing here? I can not get this WebView to load a website -> http://pastebin.com/68xN7LBw Jan 07 20:20:41 where does it say that Jan 07 20:20:58 danijoo: http://developer.android.com/training/sync-adapters/index.html Jan 07 20:21:04 it runs code Jan 07 20:21:14 you can do whatever you want in the sync adapter philwantsfish Jan 07 20:21:18 ths is just an example Jan 07 20:21:25 perfect, thank you! Jan 07 20:21:28 RatherOutspoken: Don't gestures Jan 07 20:22:07 Fling! Just the guy I was looking for. It turns our you don't work so well on Android Wear! Jan 07 20:22:33 So what do you suggest instead? Jan 07 20:22:43 I really just need swipes in each of the four directions. Jan 07 20:35:34 Could someone please check this piece of code out for me? The class is pretty simple and should not be a mission to just load a normal page? Still I get a white screen -> http://pastebin.com/68xN7LBw Jan 07 20:37:36 Activity_idle id: android.os.BinderProxy@1ae63e6b Jan 07 20:48:21 RatherOutspoken: try replicant! Jan 07 20:49:06 hello people. sorry if the question is not really related but i dont know any better place to ask... i'm trying to build an instagram client but for some reason in the instagram api docs i didnt find any viable request to get the current user feed. there was a GET /users/self/feed request, but it's no more available, do you have any idea what i can do? thanks Jan 07 20:51:47 fling: Not sure what you mean by that Jan 07 20:53:26 RatherOutspoken: literally Jan 07 20:54:04 so, has android wear gotten any traction? can you do android pay from android wear? Jan 07 20:54:26 I don't know any reason to get one yet, or write apps for one Jan 07 20:54:28 don't think any wear (android/ios) is getting much traction Jan 07 20:54:41 fling: afaik replicant doesn't have an android-wear variant Jan 07 20:55:26 How do I upgrade Jquery Mobile ? It seems like I have this problem - > http://stackoverflow.com/questions/30875099/cannot-call-determinedvisibility-never-saw-a-connection-for-pid BUT I do not know how to upgrade Jquery mobile Jan 07 20:55:47 Do I upgrade on the device or the host that compiles ? Jan 07 20:58:13 why choose to use jquery when you don't understand it at all? Jan 07 21:00:05 pfn: I did not choose it at all ... infact I do not know WHY I would even need it to make android WebView work...but thats the only thing that came up when I googled my problem... if you checked out my pastebin you will see that I just created a basic class to try and get WebView working Jan 07 21:00:36 webview works fine Jan 07 21:01:55 pfn: _> http://pastebin.com/tXMi7ki3 Jan 07 21:02:32 pfn: I am sure it does... I just cant seem to figure out what I am doing wrong there Jan 07 21:02:50 any number of a million things Jan 07 21:02:59 Im getting a white screen Jan 07 21:03:13 your layout could be wrong, you don't have internet permission, etc. etc. etc. Jan 07 21:03:28 and what is onBackClicked Jan 07 21:03:49 I checked both that.... its just a quick button I made to check something... going to remove it Jan 07 21:04:07 using android:onClick is a recipe for failure Jan 07 21:06:01 pfn: Ok I would use the other method Jan 07 21:06:44 But I still need to get the WebView working Jan 07 21:10:05 every couple of months i come back to this: should i be using jcenter or mavencentral ... Jan 07 21:10:23 you don't publish anything, what does it matter Jan 07 21:10:47 you use wherever your artifacts are published to Jan 07 21:10:51 ok, wondering if there were things on jcenter that weren't on mavencentral Jan 07 21:10:56 yes, there are Jan 07 21:11:07 you use whatever repo has the artifacts you need Jan 07 21:11:37 and central is included by default with gradle Jan 07 21:11:38 so you use that until something is on jcenter that you don't have Jan 07 21:24:24 so, i'm dealing with the onPause/onResume part of an opengl application and i'm strugglinh with something. I have a GLSurfaceView and i'm using setPreserveEGLContextOnPause. I call correctly mGLView.onResume(); and mGLView.onPause(); but I also destroy my gl objects before pausing and recreate them when resuming. my problem is that when i am resuming, it says the context is gone Jan 07 21:24:37 i am using: Jan 07 21:24:42 mGLView.queueEvent(new Runnable() { Jan 07 21:24:42 @Override Jan 07 21:24:42 public void run() { Jan 07 21:24:46 to run my gl code Jan 07 21:24:58 to make sure that it runs on the gl thread Jan 07 21:25:10 but it's like if that thread has changed or the context is not yet ready Jan 07 21:27:49 I'm using a RecyclerView to display a list of timers. Each timer can be started and stopped individually, but only one can be running at a time. Is there an easy way to automatically have the text on my items update once per second? Jan 07 21:28:30 the current time on the timer is gotten by a function, since only a start and stop time are stored, so data binding isn't really an option Jan 07 21:28:56 dillonb there is Chronometer view Jan 07 21:29:09 Oooh Jan 07 21:29:36 hithere Jan 07 21:29:39 damn it, my device keeps showing up as offline again no matter what i do Jan 07 21:30:12 g00s: thanks, I'll look into this Jan 07 21:30:36 pushing project to github - instead of build.gradle I see being committed locally final push have some generic stuff Jan 07 21:30:47 went through this https://github.com/codepath/android_guides/wiki/Getting-Started-with-Gradle Jan 07 21:32:56 g00s, might be a bad cable. Ive had that before Jan 07 21:33:06 truckcrash using wifi and usb Jan 07 21:33:36 usb...cable? :P Jan 07 21:33:42 but yes wifi is a different story Jan 07 22:12:42 is there a way to detect that an glsurfaceview has lost its context? Jan 07 22:12:47 some kind of callback or i dont know Jan 07 22:26:12 usually not, troulouliou_div2 Jan 07 22:26:54 EPG, noticed that ;( Jan 07 22:28:23 does anybody have experience using Retrofit Jan 07 22:30:14 i’m copying the examples all over the web for adding a header to a request, but clearing and adding to the interceptors list is giving me an UnsupportedOperationException: http://hastebin.com/axofikafaq.java Jan 07 22:30:28 retrofit 2.0.0-beta3 Jan 07 22:34:33 ghostmoth: I do Jan 07 22:35:11 i can’t figure out the above ^ and why google turns up nothing for it Jan 07 22:35:43 here’s one of the examples all over the place, exactly what i’m implementing: https://futurestud.io/blog/retrofit-token-authentication-on-android Jan 07 22:36:04 httpClient.interceptors().clear() and httpClient.interceptors().add(…); both fail Jan 07 22:39:02 ghostmoth: so what are you trying to do? Jan 07 22:39:07 add in a token interceptor? Jan 07 22:39:19 Yeah Jan 07 22:39:25 I mean that is how I used retrofit, to add in a token. Jan 07 22:40:57 it’s acting like the returned list is immutable Jan 07 22:42:41 from the method call: ` * Returns a modifiable list of interceptors that observe the full span of each call: … ` Jan 07 22:42:58 wyoung Jan 07 22:45:52 hmmmm Jan 07 22:53:08 hi I am making application that displays alot of local images but memory is keep rising every image to reach to 50Mb sometimes ,is that normal ? Jan 07 22:53:22 iam using Picasso Jan 07 22:54:09 Picasso.with(getContext()) Jan 07 22:54:09 .load("file:///android_asset/"+assetsPath) Jan 07 22:54:09 .resize(questionImageView.getWidth(), 0).into(questionImageView); Jan 07 22:54:29 Could someone please check if this code for a basic WebView is right? I get a whit background only - > http://pastebin.com/tXMi7ki3 Jan 07 23:15:27 Why are you calling setWebViewClient twice? Jan 07 23:17:52 another thing: you need to add http:// or https:// to the URL. Jan 07 23:18:13 At least I thought you had to, maybe I'm wrong Jan 07 23:23:06 guys should I use memory cache when Loading images from assets ? Jan 07 23:27:54 liuwenhao: Well I do now actually know.. I tried it since nothing else worked Jan 07 23:31:41 liuwenhao: I CAN NOT believe that was the problem Jan 07 23:33:37 TarekMA: Are you writing your own image loading implementation? If you're not using Picasso, I would suggest you look into it Jan 07 23:33:52 liuwenhao: Ok but I can not seem to get it to load into the frame that I placed into the Layout Jan 07 23:34:13 TarekMA: Picasso uses LRU cache by default Jan 07 23:35:05 cart_man: pastebin your XML and code Jan 07 23:36:02 TarekMA: https://futurestud.io/blog/picasso-influencing-image-caching Jan 07 23:36:11 hi i m intercepting metachanged intent from vlc and several other apps but i need to identify if the original intent is coming from vlc or not; is it possible somehow to send a generic intent to detect if vlc is running or not ? Jan 07 23:37:46 liuwenhao: http://pastebin.com/bbSzHYSi Jan 07 23:38:01 android:layout_height="0dp" Jan 07 23:38:04 change it to match_parent Jan 07 23:38:32 oh are you using fragment? Jan 07 23:46:54 liuwenhao: Ok soo check my new layout please Jan 07 23:50:29 liuwenhao: Jan 07 23:50:32 ugh sory Jan 07 23:50:47 http://pastebin.com/TLiXtAis Jan 07 23:51:57 Hi again! Quick question: Does anyone know of a nice way to implement something similar to the ExpandableListView with RecyclerView in a NavigationDrawer, with elements changing at runtime? (Like, the user favourites another category, it’s live added to the drawer) Jan 07 23:58:28 Okay, problem solved. Jan 08 00:01:32 cart_man: http://pastebin.com/raw/nV41bD0j worked fine for me, just tested it out Jan 08 00:02:05 Is it not loading at all? Jan 08 00:03:22 justJanne: There is an interesting RecyclerView library that has functionallity similar to ExpandableListViewhttps://github.com/h6ah4i/android-advancedrecyclerview https://github.com/h6ah4i/android-advancedrecyclerview Jan 08 00:03:27 I've never used it though so YMMV Jan 08 00:04:22 liuwenhao: I do not know why but the browser insists on taking the entire screen Jan 08 00:07:01 liuwenhao: Anyway thanks for the help..im going to bed Jan 08 00:07:03 Cheers Jan 08 00:09:27 liuwenhao: I’ve seen that, but my question was aiming at libraries that integrate such a behaviour with the navigation drawer Jan 08 00:09:47 I’ll probably end up waiting for Mike Penz’ MaterialDrawer to integrate with his FastAdapter Jan 08 00:10:23 MaterialDrawer is great, I use it in every project. Just override some of the methods to load a custom RecyclerView / Adapter and you'll be good to go Jan 08 00:11:54 hm. I’ll look into that. Jan 08 00:13:08 liuwenhao: How are you doing that? The documentation is a bit lacking. Jan 08 00:13:23 Do I just set a custom recyclerview and adapter? Jan 08 00:21:33 Good question. I just override the header so I'm not sure what classes you would have to extend to override his adapter and RecyclerView. Jan 08 00:22:05 probably BaseDrawerAdapter Jan 08 00:23:45 Actually, in DrawerBuilder there is a method .withRecyclerView that you can pass your own view into Jan 08 00:23:57 https://github.com/mikepenz/MaterialDrawer/blob/develop/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java Jan 08 00:36:16 Im using a Object Stream to pass an object from client to server, if i use a .readObject() will it block the client while the server doesn't send a message? Jan 08 00:38:50 Mantij don't those use java serialization ? probably better to use something else, like protobufs Jan 08 00:39:16 g00s yeah im using a message class that implements serialization Jan 08 00:40:04 g00s, just want to know if they block the user or not, i don't know if they are synchronous or not Jan 08 00:40:32 i'd assume they are blocking i/o Jan 08 00:42:18 Im writing a client/server app, i have them connecting through sockets, just wanted to know if they Block or not, so i can code accordingly Jan 08 00:42:28 so i should assume its asynchronous Jan 08 00:46:11 Mantij: they are blocking Jan 08 00:46:19 but you shouldn’t use streams anymore anyway, Jan 08 00:46:23 use channels nowadays Jan 08 00:50:32 justJanne, thank you very much, i'll look into them Jan 08 00:51:06 But be warned, while they’re faster and more efficient, the java.nio system requires you to implement SSL etc completely yourself Jan 08 00:52:36 i haven't read much about channels, so i was experimenting with the streams, but i will take that in account, i will educate myself on that matter Jan 08 01:00:43 https://en.wikipedia.org/wiki/Non-blocking_I/O_%28Java%29 Jan 08 01:00:58 Very efficient, very neat, low-level IO system Jan 08 01:06:45 justJanne, yeah it seems a pretty good solution, so a basic idea is just pass a channel through a socket? Jan 08 01:08:11 Actually, you can wrap a socket in a channel (like what I’m doing), but it’s more efficient to do it directly Jan 08 01:08:29 if you’re not going to implement your own deserialization, you might just as well use streams, though Jan 08 01:10:46 Im just going to stick with streams, was just a bit curious about channels, but i will explore with the idea a future app for sure Jan 08 01:11:26 on android, nio isn't important, you're not going to be running a billion concurrent connections Jan 08 01:11:43 it's nice to have nonblocking io, but not worth reimplementing the world Jan 08 01:16:29 pfn: For me I got almost 3 times performance increase by doing noncopy deserialization Jan 08 01:16:38 Which was possible thanks to nio Jan 08 01:17:07 (For an IRC app which uses a binary protocol to communicate with the bouncer) Jan 08 01:17:39 justJanne, 3 times faster than nothing is still practically nothing :p Jan 08 01:18:10 pfn: 3 times faster than "almost 2 minutes to connect" is a lot. Combined with better compression, I got connection times down to unnoticeably low amounts Jan 08 01:18:28 (2 minutes to connect for loading 500'000 recent IRC messages) Jan 08 01:18:53 2 minutes to connect? yuck, and 500k recent messages? more yuck Jan 08 01:19:15 why wouldn't you just retrieve the last 100 messages instead of all? Jan 08 01:20:09 that is just the last 20 messages. Jan 08 01:20:11 for all channels Jan 08 01:20:15 I have a *lot* of channels Jan 08 01:20:29 if i do a string.split do the individual strings in the array contain the specified delimiter or will they have been stripped? Jan 08 01:20:30 in almost 2 dozen networks Jan 08 01:20:39 I440r: they will be stripped. Jan 08 01:20:41 theyre stripped I440r Jan 08 01:20:49 kind of what i expected, ty Jan 08 01:20:55 docs dont really say heh Jan 08 01:21:15 its just heavily implied :P Jan 08 01:21:20 going to implement a full justification method Jan 08 01:21:32 which is stupidly lacking on textviews Jan 08 01:22:00 not the in the docs i read Jan 08 01:22:43 is the array mutable? Jan 08 01:22:51 strings are immutable Jan 08 01:22:56 i mean can i do array[n] += " "; ? Jan 08 01:23:05 strings are. the array elemtns shouldnt be Jan 08 01:23:07 arrays are mutable, but you can't just grow them Jan 08 01:23:32 but array[n] += works fine, assuming array is a type that supports + Jan 08 01:23:33 not growing the array. growing the elements within it by replacing them Jan 08 01:23:44 that wont change the original string though Jan 08 01:23:47 just fyi Jan 08 01:24:08 so all i have to do is keep a total length and whil it is < cols add a space to the end of the next string in the array Jan 08 01:24:15 no it will replace them i get that Jan 08 01:25:00 look into StringBuilder, it seems like you're trying to re-invent the wheel Jan 08 01:25:34 might be, except i know that full justification isnt supported anywhere from what i have read. will look at stringbuilder tho Jan 08 01:25:46 I meant for string building / modification Jan 08 01:26:07 kk Jan 08 01:27:55 seems like stringbuilder only builds one string Jan 08 01:28:07 https://github.com/pfn/keepassj/commit/831648321f9c9274235d74df9f6098b9990609d4#diff-cc3b2820ce439dd18501b3143cdd01f5 Jan 08 01:28:10 wow, that was an ugly bug Jan 08 01:28:11 i still need to s.split(...) the original string Jan 08 01:28:37 yes but its better to use StringBuilder to append stuff to your string than manually doing it via char arrays Jan 08 01:29:15 was going to do string_array[n] += " "; Jan 08 01:29:37 but an array of stringbuilders might be better Jan 08 01:31:09 while(total_length < cols) { string_array[i++] += " "; } or something along those lines Jan 08 01:31:18 erm lenght++ in there of course Jan 08 01:31:38 but thats going to be garbaging a lot of strings lol Jan 08 01:31:53 not with stringbuilders Jan 08 01:31:57 yup Jan 08 01:32:37 i understood why you suggestd it. i did a bit of rtfm, a stringbuilder is a string with some extra storage space so u can append to it Jan 08 01:33:37 its not a string, its a manager of a char array Jan 08 01:33:47 so you're extending / contracting an array, and converting that to a string when youre done Jan 08 01:33:57 ya Jan 08 01:35:19 rather than using string everywhere in your api, you can make like google and CharSequence Jan 08 01:35:25 and whether it's a string or stringbuilder is irrelevant Jan 08 01:35:30 seems extremely inefficient to me. take string, split it to an array. convert each element of that array into a new array of stringbuilders, append to each element as needed then reconstruct the original string from the array of builders Jan 08 01:35:46 what exactly are you trying to achieve Jan 08 01:35:55 full justification Jan 08 01:35:58 and manipulating strings is inefficient Jan 08 01:36:09 no reason for it to be inefficient Jan 08 01:36:12 full justification is extremely hard to achieve on variable width fonts Jan 08 01:36:29 you don't want to be arbitrarily padding with spaces Jan 08 01:36:34 its fixed width Jan 08 01:36:36 write a justifying Layout Jan 08 01:36:45 yeah if you truly want a good solution to that, I dont even think modifying the string works, you need to create your own text layout Jan 08 01:36:56 and while its text its going to an imageview not a textview Jan 08 01:37:18 update StaticLayout Jan 08 01:37:18 what are you splitting your string on anyway? Jan 08 01:37:24 doesn't matter, you should use a text layout Jan 08 01:37:32 JustifiedStaticLayout extends StaticLayout Jan 08 01:37:34 spaces obviously lol. Jan 08 01:37:47 ew Jan 08 01:37:58 yes, don't do that Jan 08 01:37:59 android supports left or right justification not full Jan 08 01:38:03 create a JustifiedStaticLayout Jan 08 01:38:11 yeah ^ Jan 08 01:38:23 whihch is only goginto be left or right not FULL justified Jan 08 01:38:24 be wary though, the StaticLayout code is horrific Jan 08 01:38:54 text layout is complicated business Jan 08 01:38:59 monospace layout is a lot easier Jan 08 01:39:09 this font is monospace Jan 08 01:39:20 im not fscking with variable width fonts Jan 08 01:39:32 https://github.com/android/platform_frameworks_base/blob/master/core/java/android/text/StaticLayout.java Jan 08 01:39:34 read and weep Jan 08 01:39:54 heh my java skillz are minimal Jan 08 01:40:01 pathetic even Jan 08 01:40:24 might even be better to just do a native justify function Jan 08 01:40:36 yea, that would probably be way more efficient Jan 08 01:40:48 i could code that in forth in 2 minutes flat lol Jan 08 01:41:32 then write it in forth Jan 08 01:42:44 if it can be done in java easily and efficiently i tend to do it there just for the java exp Jan 08 01:42:57 Static layout also has its own issues, the last time I used it, it wouldn't report the right text width or height. It was *close* but not correct Jan 08 01:43:02 among other things that I dont remember Jan 08 01:43:03 but i think this is a candidate for doing it native Jan 08 01:47:32 oooh i fixed mu bug from yesterday, no lock, no passing messages to the ui thread Jan 08 01:48:23 i was doing something like n++; if(n > max) n = max; and betwen the n++ and the clip onDraw was using the too large value Jan 08 01:48:50 n = Math.min(n + 1, max); fixed Jan 08 01:48:58 tho thats probably not the best way eithyer Jan 08 02:00:07 Anyone have the patience for what is hopefully a simple (but newbie) question? Jan 08 02:00:16 dont ask to ask Jan 08 02:00:17 just ask Jan 08 02:02:43 Ok. :o) Have installed latest Android Studio with Java SE JDK. Am running into version issues. If I render inside Android Studio in version 23, I get rendering issues. If I change it back to version 21, the rendering issues go away but I cannot select items within the design view of activity_main nor content_main. (If I do a lot of switching bewteen versions -- I can get things Jan 08 02:02:43 done. But obviously it isn't a practical solution.) Jan 08 02:04:07 This is not a helpful suggestion, but have you tried working with the text view instead of the design view? Jan 08 02:04:12 It's infinitely better Jan 08 02:05:43 I agree with Pyuruku for the most part -- design view is pretty awful Jan 08 02:05:46 Pyuruku: I can get to the text view. However, I am working through various online tutorials that have the user start with setting themes and such through the GUI. It's a steep jump to the code when just starting. Jan 08 02:06:02 Design view has not been my friend. Agreed. Jan 08 02:06:15 you still set themes through the gui when in the text view, at the top of the device preview Jan 08 02:06:41 or do you not have the preview enabled in text view? Jan 08 02:07:34 Two things happen with theme. First, most illustrations indicate I should have the word theme or such on the button. I get noactionbar. Anytime I dare touch it, it immediately goes into rendering errors that won't go away unless I change the version and rebuild. Jan 08 02:08:59 The whole design preview window is shit really Jan 08 02:09:07 I ignore render warnings most of the time Jan 08 02:09:27 and "word theme or such on the button" I think you mean style Jan 08 02:09:50 if they want you to add a style to your button then you can append `style="@style/myStyle"` to the xml tag Jan 08 02:10:15 I looked back at the resource I was using. It defaulted to "AppTheme." Mine didn't. Jan 08 02:10:30 It was the theme for the entire layout. Jan 08 02:10:46 ok Jan 08 02:11:01 well, to answer your initial question, render issues with android studio are a crapshoot Jan 08 02:11:09 if it renders on 21, just stay on 21 Jan 08 02:11:27 if you cant select things, then enable the tree view thing that appears on the right and select views that way? Jan 08 02:11:35 Yeah...I just cannot always add widgets or textfields when in 21. It makes me go back to 23 to select or add elements. Jan 08 02:12:13 Yes...I could possibly use the tree view to get to things that already exist. Jan 08 02:12:56 Right now, since I've ignored it for the last 10-15 minutes, it has suddenly decided to allow me to select items again. I sometimes wonder if the thing is just so slow, it gets lost. Jan 08 02:13:05 outside of that... not much I can say Jan 08 02:13:11 the whole designer thing is really shitty Jan 08 02:13:22 you should just move onto text editing asap Jan 08 02:14:34 Yeah. *sigh* I'm not impressed with that part of it. Very frustrating. There's just a fundamental premise the tools they offer should work. Jan 08 02:14:35 If you need to preview on different Android versions you're better off just setting up multiple emulators Jan 08 02:15:14 Also, never expect things Google ships for Android development to work as intended :) Because a lot of times they are broken or half baked Jan 08 02:15:15 I've got an AMD machine and have Genymotion running. I see to be able to get the app to display fine in various vms. Jan 08 02:15:19 Anchac: all android related IDEs since the beginning of time have been utter shit in the performance department Jan 08 02:15:52 I close and reopen android studio every few hours because typing becomes unbearably laggy Jan 08 02:16:00 and its up to 3gib of ram Jan 08 02:16:28 Ish. Jan 08 02:17:24 So the folks that are writing Android apps professionally are just coping as they can? (Or did they stay with the old Eclipse/Java combo for now?) Jan 08 02:17:59 I do it professionally (I'm actually at work right now) and I just cope Jan 08 02:18:06 Anchac: Pretty much every professional Android dev uses AS Jan 08 02:18:06 like I said, I restart android studio periodically Jan 08 02:18:16 and I always build from the terminal Jan 08 02:18:30 I notice the specs say 4 GB of RAM is recommended. Tried it on a machine with that and it's painfully slow. I've got 10 GB on the machine I am running and it is tolerable. Is the 4 GB recommendation rubbish too? Jan 08 02:18:36 in offline mode (why the fuck is offline mode a thing) Jan 08 02:18:46 thats comical Jan 08 02:18:46 Pyuruku: are you on canary build? I haven't had memory leak issues in a long time Jan 08 02:18:46 lol Jan 08 02:18:53 liuwenhao: yes Jan 08 02:19:12 what os are you guys running? Jan 08 02:19:32 however I dont auto update, I tend to find a version that is manageable and stick with it for as long as possible Jan 08 02:19:38 Windows 10 on my work/dev machine, OSX on my laptop Jan 08 02:19:38 osx here Jan 08 02:20:04 Windows 7 Jan 08 02:20:50 So how much minimum RAM would you all suggest based on your own experiences? Jan 08 02:20:52 Anchac: 8gb is fine for Android development (although I wish I had 16gb for when I'm running linux in a vm) Jan 08 02:21:01 the bigger thing is having a SSD and decent cpu Jan 08 02:21:27 I wouldn't suggest anything lower than 8gb Jan 08 02:22:01 Thanks! That (the memory size suggestions) are good to know. Jan 08 02:23:17 I've got an AMD FX6120 (six core) which was considered fast when I bought it. (It's always fast at the time you buy it...) Jan 08 02:23:56 liuwenhao: I just updated to the latest canary build because of you Jan 08 02:24:02 I will now blame all issues on you Jan 08 02:24:04 :^) Jan 08 02:25:08 Thanks for the input, guys. I will aim for the code window in the near future. For now, I'll just lurk here... Jan 08 02:25:25 I don't use Android Studio on OSX so I dunno what the issues on that platform are Jan 08 02:25:40 But hopefully it works fine :) Jan 08 02:25:58 liuwenhao: I would take a wide guess and say Mac's implementation of java is being stupid again Jan 08 02:32:33 Hey Android-dev. Thanks, Bitmap Image is not shown and drawn while it shows in screenshot! why?? Jan 08 02:33:04 Can any body take some time to answer my question http://stackoverflow.com/questions/34668366/bitmap-is-not-showing-in-subsampling-scale-image-view-but-shown-in-screenshot Jan 08 02:33:07 http://stackoverflow.com/questions/34668366/bitmap-is-not-showing-in-subsampling-scale-image-view-but-shown-in-screenshot Jan 08 02:34:27 Xami: Does it work on other devices? Could be a note 3 specific issue Jan 08 02:35:21 its probably a hardware acceleration issue of somesort Jan 08 02:37:01 I usually run intellij and don't really notice performance issues Jan 08 02:37:15 I restart intellij only when my computer reboots Jan 08 02:37:34 pfn: you live without all of the android specific ide things? Jan 08 02:37:44 and I normally have about 5 to 6 projects open Jan 08 02:37:59 there are no android studio things missing Jan 08 02:38:21 just some minor stuff I never use, like gradle integration and the navigation editor Jan 08 02:38:40 you can disable gradle in android studio?! Jan 08 02:38:44 intellij has just about everything necessary from android studio Jan 08 02:39:06 as I understand it, yes Jan 08 02:39:32 you can import from alternative project formats besides gradle and not have to sync with gradle Jan 08 02:39:43 people who use android studio with sbt tell me so Jan 08 02:39:49 but can I disable the plugin completely? I dont use gradle inside android studio at all :S Jan 08 02:40:16 @Pyuruku Jan 08 02:40:17 why would you Jan 08 02:40:29 it's how android studio knows how to parse your project Jan 08 02:40:50 sup guys... Jan 08 02:40:54 turn off gradle and android studio won't know anything about your project Jan 08 02:41:02 could you please answer to my question Jan 08 02:41:16 http://stackoverflow.com/questions/34668366/bitmap-is-not-showing-in-subsampling-scale-image-view-but-shown-in-screenshot Jan 08 02:41:28 pfn: right, I want to disable all auto gradle builds / syncs or whatever then D: Jan 08 02:41:50 why would you Jan 08 02:41:58 it doesn't interfere Jan 08 02:42:15 it does interfere Jan 08 02:42:20 it slows android studio down to a crawl Jan 08 02:42:22 for me at least Jan 08 02:42:35 then turn off auto refresh Jan 08 02:44:10 hmm, I think I'll write yet another league of Legends app Jan 08 02:44:19 oh I already have that disabled ;__; Jan 08 02:44:21 god damnit Jan 08 02:44:32 then it's not slowing your ide to a crawl Jan 08 02:44:41 Increase the heap you allocate it Jan 08 02:44:41 right, so then the ide just sucks Jan 08 02:44:43 typical Jan 08 02:44:48 should I try software acceleration to render that image Jan 08 02:44:59 Xami: yes set the layer type to software Jan 08 02:45:19 Ok. Thanks Jan 08 02:52:53 so i'm doing the Sunshine app tutorial and I'm about to finish. Anything else that I should look at to learn android dev? Jan 08 02:53:12 the reference manual at d.android.com Jan 08 02:53:49 yeah i plan to read that. Jan 08 02:53:51 thanks Jan 08 02:57:07 Each time I start a new project, it defaults to version 23 to render project in the (just don't use it) IDE. Any way to permanently set that to another version rather than having to set it each time? Jan 08 02:57:30 target sdk version in your build.gradle file Jan 08 02:57:47 however, you should always target the latest sdk version... so remember to put it back? Jan 08 02:58:14 whats the render issue anyway? Jan 08 02:58:43 Ah! I see it. :o) Ugh. I have to turn it back. :o( Okay then... Jan 08 02:58:59 whats your render issue? **** ENDING LOGGING AT Fri Jan 08 02:59:58 2016