**** BEGIN LOGGING AT Mon Feb 02 02:59:58 2015 Feb 02 03:07:50 I'm using Android Studio and am trying to build a project that was originally built using Eclipse. It uses ActionBarSherlock but I can't figure out how to get the project to find ABS. Android Studio is reporting it can't find the .aar or .pom file but it is looking under the sdk directory and not in the project directory. Feb 02 03:08:35 How do I get Android Studio to find the ABS module? Feb 02 03:09:13 ActionBarSherlock... there's a name I haven't heard in a while. Feb 02 03:09:24 I've been trying for a couple of days. I've been searching the net but the ABS site only talks about using it with Eclipse. Other info I find on the net is out of date. Feb 02 03:11:05 The app isn't one I wrote. I had installed it from Google Play then my tablet needed repair. When I got the tablet back the app is stated as not compatible with my tablet. Yet I have same tablet and same Android as before repair. App creator says they support Android 2+ and my tablet is Android 4.1.1 Feb 02 03:11:29 I found the source for the app so I'm trying to get to where I can build it and fix the bugs that prevent it from running. Feb 02 03:12:07 Plugh: I'm not sure, but from what I'm reading adding the following to build.gradle (for 'app') might work: Feb 02 03:12:08 compile 'com.actionbarsherlock:actionbarsherlock:4.4.0' Feb 02 03:12:37 yup. I read about doing that. Done it, still no joy. Feb 02 03:13:28 What happened when you tried that? Did it say it couldn't find it? Feb 02 03:13:45 I just want the app to run on my tablet. I'm not concerned with support for really old versions of Android. Any idea if it would be difficult to remove use of ABS? Feb 02 03:13:51 yea, still couldn't find it. Feb 02 03:14:00 Remove it Feb 02 03:14:49 I switched from ABS to normal ActionBar once; it wasn't a huge effort. (Though I didn't have many activities.) Feb 02 03:16:59 <_genuser_> would you guys use List to store local file paths, or just List? Feb 02 03:17:27 I've always been confused about that too, half of the android apis seem to use Uri and the other half String Feb 02 03:17:46 I would just go with List though, you can always Uri.parse() it as needed Feb 02 03:17:49 I'm rather new to building Android apps. What would be the general approach to removing ABS? remove references to it in the class headers then fix the compile errors as they crop up? Feb 02 03:18:02 <_genuser_> I've always just used String in java/c#, etc. but I was curious if Uri affords any more standards compliance. Feb 02 03:18:28 <_genuser_> duncannz: heh, seems like String is fine then. Feb 02 03:18:33 _genuser_: if the paths would only be local I'd go for String Feb 02 03:19:11 yep Plugh, in addition there's not point saving a local path as a file:// Uri, it almost seems worse Feb 02 03:19:17 no point* Feb 02 03:19:56 Plugh: Subclassing Activity instead of SherlockActivity/SherlockFragmentActivity. Using 'getActionBar();' instead of 'getSupportActionBar();'. There might be other things, but I can't think. Feb 02 03:20:10 Letting the compiler guide you will help. Feb 02 03:20:16 <_genuser_> Plugh: yeah, it will be local, onboard storage and external sd card storage. Feb 02 03:20:17 duncannz: yea, that's what I would think. If the reference could refer to an external device at some point then a URI might be the way to go. Feb 02 03:20:47 btw it's android.net.Uri and java.net.URI, we are talking about Uri here not URI Feb 02 03:20:50 lol Feb 02 03:21:34 TacticalJoke: ok, thanks. I can have a start at doing that. As I'm on Linux I can make those changes using regexxer to quickly change them project wide. Feb 02 03:21:39 <_genuser_> it might reference the sd card. but is that really external.... Feb 02 03:21:54 <_genuser_> Yea I was only thinking of android.net.Uri, not the java's URI. that's just a whole other mess. Feb 02 03:22:19 _genuser_: From what I've seen on my tablet, the SD card is mounted as part of the local file system so a string is still fine. Feb 02 03:22:20 You might have to change minSdkVersion, too. Feb 02 03:23:04 TacticalJoke: Already changed it to the version for my tablet. Same version I'm using in my own app that I've been working on in the last couple of weeks. Feb 02 03:23:17 <_genuser_> Plugh: yeah, I've seen SD cards always reported as "local" in file managers, etc. Feb 02 03:26:44 _genuser_: iirc, when I copied my programs database to a the Documents directory so I can access it to check some test results the path was just /sdcard/ but it could also be /storage/sdcard0/... Feb 02 03:31:35 <_genuser_> Plugh: eh, picasso with all its "coolness" doesn't load from a byte array, argh Feb 02 03:37:31 byte array inputstream Feb 02 03:50:08 <_genuser_> pfn: that was for me? Feb 02 03:50:31 hmm, Raspberry Pi 2 Model B Feb 02 03:51:49 <_genuser_> g00s: what about that rpi 2 model b? Feb 02 03:52:04 looks pretty nice, got big upgrade Feb 02 03:53:13 for the same price, which is impressive Feb 02 03:53:33 The B or the B+? Feb 02 03:54:10 I have a B and almost bought a B+ the other day when an online site had a one days sale at $5 off. Feb 02 03:54:46 it's called the 2B, but it's effectively a second-generation B+ Feb 02 03:55:43 the board says "Raspberry Pi 2 Model B V1.1" Feb 02 03:55:55 kinda confusing :) Feb 02 03:56:05 hm... another new version? I didn't remember it being listed that way. Feb 02 03:56:15 http://www.theregister.co.uk/2015/02/02/raspberry_pi_model_2/ Feb 02 03:59:00 looks like El Reg might have broken the embargo - it's 4am on Monday in the UK, about the worst time of the week... wouldn't expect too much until the raspi folks are awake and have had tea Feb 02 03:59:26 _genuser_: why would you even want that? Feb 02 04:03:03 g00s: thanks. Now I want one. :) Feb 02 04:05:47 Is there a Android 3.x Feb 02 04:06:11 <_genuser_> JakeWharton: I'm getting picture from a db stored as bytearrays. I'd rather directly load them into an imageView using picasso or something that manages memory so much better. Feb 02 04:07:51 panda81: we like to think there isn't Feb 02 04:09:34 panda81: only if you're a bee. Feb 02 04:10:04 sasquatch uses 3.0 Feb 02 04:10:51 haha. Was just surprised 3.x is 0.11% of my app install, though for 2.x is 4.8% Feb 02 04:10:52 we don't talk about 3.0 anymore. it's dead to us Feb 02 04:11:22 panda81 do you have more 3.x users or 5.x users ? Feb 02 04:12:06 g00s: more 5.x by long shot Feb 02 04:12:14 phew Feb 02 04:12:18 lol Feb 02 04:13:54 What about the lowest end budget non-smart phones globally Feb 02 04:15:12 <_genuser_> g00s: I have a rpi model b with xbian doing media center stuff. I haven't played with it that much. Feb 02 04:16:06 When I say "getResources().getStringArray(whatever);", what actually happens? Does a file get read? Or is it already in memory? Feb 02 04:18:11 panda81: gingerbread hangs around because it was the only version that could run on 512mb devices for a while Feb 02 04:19:01 Does it make sense that the Application I get from an Activity in its constructor is not my own custom Application ? Feb 02 04:19:32 <_genuser_> JakeWharton: so I guess there's not way to load directly from ByteArray. I'd have to save that byteArray (jpg) into a file on disk and then load from file. Feb 02 04:20:20 Phlow: did you forget to add android:name="" property to your tag in your Manifest? Feb 02 04:24:08 _genuser_, no input stream method? Feb 02 04:24:19 byte array input stream if there is Feb 02 04:24:47 Napalm, it's a little complicated, I'm using Xamarin Feb 02 04:24:57 it's supposed to take care of that for me Feb 02 04:25:49 <_genuser_> pfn: no, just Uri, File, resId, String. Feb 02 04:28:14 my derived application is instantiated, but the activity's application is a default application with a context of my custom application Feb 02 04:28:15 very strange Feb 02 04:28:39 not sure how that maps to android with java Feb 02 04:35:07 Phlow how do you like xamarin ? Feb 02 04:37:35 g00s, haven't tried Xamarin.Forms yet, but so far it's analog to Android java development, just with C# Feb 02 04:37:57 which is nice, cause you get async/await, and .net goodness Feb 02 04:38:46 Phlow have you done any Windows Phone programming ? Feb 02 04:38:56 plenty of portable class libraries out there, and not impossible to write bindings for java and native if necessary Feb 02 04:39:04 g00s, very little Feb 02 04:40:11 the xamarin irc community on the other hand... leaves a lot to be desired. not quite at critical mass Feb 02 04:43:03 oh sweet, tim charper fixed all the mac git osx-installer packages so they work on 10.7 :) i can hold off upgrading \o/ Feb 02 04:46:38 _genuser_: use a request handler which pulls from the database. Pass in a Uri that can be used to query Feb 02 04:55:14 Hmm, I would expect resources (e.g., string arrays) to be loaded from disk into memory before my app becomes visible. But I notice that my app uses exactly the same amount of RAM whether I include a huge string array or not. (But the amount of RAM increases if I actually say "getResources().getStringArray(whatever);"). Feb 02 04:55:52 JesusFreke: 512mb ram? Feb 02 04:56:40 I've read the relevant C++ code (in android_util_AssetManager.cpp), but it's so hard to figure out what's going on. Feb 02 04:58:31 I would expect resources to be lazily loaded, you wouldn't want all your drawables being in memory all the time Feb 02 04:58:41 <_genuser_> JakeWharton: ah, that's the pointers. I'll try to follow that route. :) I have mixed outputs, databd or webservice return values both bytearrays of an actual .jpg file. Feb 02 04:58:47 <_genuser_> JakeWharton: thanks. :) Feb 02 04:58:57 f2prateek: True. Do you think it's best to load a huge string-array resource in a background thread (generally speaking)? Feb 02 04:59:02 Maybe 'huge' is 1,000 entries. Feb 02 04:59:15 (My app's array isn't that big, but I'm curious about the general concept. :) Feb 02 04:59:24 panda81: there's a question mark there, but I'm not seeing a question :) Feb 02 05:00:07 load it, if there's a big latency/delay, then yeah, do it of the main thread Feb 02 05:00:59 I haven't ever used resource string arrays that big so I wouldn't know Feb 02 05:01:09 I actually did some testing. It takes around 70ms to load a string array of 10,000 elements on my device. It takes this amount of time no matter how many times I load it. Feb 02 05:01:18 If I have a tiny array in the same XML file, loading that is instant (0ms). Feb 02 05:02:43 f2prateek: The funny thing is that using getResources().getStringArray doesn't get flagged in StrictMode. Feb 02 05:03:01 I'm guessing they made an exception because loading it on the main thread is sometimes more or less a necessary evil. Feb 02 05:04:16 When is it a necessary evil? Feb 02 05:04:26 And Context.getSharedPreferences *does* get flagged. Feb 02 05:05:07 SharedPreferences writes to an underlying file on disk, so if you access it on the main thread, it will be flagged Feb 02 05:05:10 deuteros__: Hmm, I suppose I'm thinking about maintaining simplicity. So not really "necessary". Feb 02 05:05:34 My point. It's never a necessary evil, you should limit main thread access to UI stuff (especially on startup) Feb 02 05:05:34 f2prateek: But isn't Resources.getStringArray also reading from a file? Feb 02 05:08:32 i dont think i've ever seen apps reading resources from non-UI threads, maybe unless they were bitmaps Feb 02 05:09:03 Okay. Feb 02 05:09:33 I wonder whether anyone really goes to town and calls Context.getSharedPreferences in a background thread. :D Feb 02 05:09:40 They were apps that could get away with this kind of shenanigans, it's just sloppy engineering Feb 02 05:09:46 I'm not gonna be tempted to do that, because of the caching (and the complexity that would bring). Feb 02 05:10:09 Shared preferences are surprisingly expensive, if you're anal, you would read them (and cache them) in a non main thread Feb 02 05:10:23 There's really no downside. Feb 02 05:11:57 deuteros__: The complexity is a downside. Feb 02 05:12:54 Launching the thread in an async task? It's routine Feb 02 05:13:22 It introduces a whole new state into the app: "waiting for preferences to arrive". Feb 02 05:13:42 Put your preferences fields in futures, done. Feb 02 05:14:06 Best of both worlds, lazy reads. Feb 02 05:23:56 I don't see how using Futures removes this complexity. Are you talking about normal Java Futures, or some RxJava thing I don't know about? Feb 02 05:24:12 Regular futures, just lazy loading Feb 02 05:24:38 Okay. Then the complexity is still there. Feb 02 05:24:41 If you need the field from the preferences before you can move on, they get() the future. If you don't,hiding behind a future is smart since by the time it gets requested, it will be there Feb 02 05:24:51 Your app still has to tolerate that extra "wait till we load stuff" state. Feb 02 05:25:02 Like I said, it's routine in all mobile apps Feb 02 05:25:04 async stuff Feb 02 05:25:12 get()ting the future blocks, right? Feb 02 05:25:27 Get used to performTask(callbackWhenTaskIsDone) Feb 02 05:25:33 Yes it blocks Feb 02 05:26:13 But then you're making a blocking call (get()) in order to avoid blocking. I don't see the point. Feb 02 05:26:31 Maybe in some cases it'll help. Feb 02 05:26:41 Read shared preferences in a thread, put all the getters on these fields behind a future. Simple. Feb 02 05:27:09 Okay, I see your point. Feb 02 05:27:17 Though it's not quite bullet-proof. Feb 02 05:27:43 Hi, I'm looking to make a media player that only plays audio in the background and is controlled through an ongoing notification but am unable to figure out. From what I've seen I need to use a service but am unsure then how to create the notification and have the notification buttons send info to the service Feb 02 05:28:23 For example, in my app, I need shared preferences immediately. If I were to use Future.get, I'd block just as much (or as little) as not using Future at all. Feb 02 05:28:52 TacticalJoke that's where rxjava comes in , composing futures ;) Feb 02 05:29:09 so you have a chain of async actions flowing into functions Feb 02 05:29:16 That does sound nice. Feb 02 05:29:28 I think I should finally check it out when my app is stable. :) Feb 02 05:29:53 Yes, Rx adds an interesting layer to this async model Feb 02 05:30:35 TacticalJoke: If you need shared preferences right away ( a reasonable scenario), you still lose nothing by putting them behind futures Feb 02 05:31:03 I think I'd lose some simplicity. Feb 02 05:31:05 You'll block, but then again, you were already blocking by on them Feb 02 05:31:16 I can totally understand doing this as a general practice, though. Feb 02 05:31:24 However, if you manage to restructure your app so you no longer need them right away, then futures will magically speed up your app Feb 02 05:31:33 Yah. Feb 02 05:32:17 And in my experience, it's surprising how far you can go restructuring your app so you can minimize the need for costly resources Feb 02 05:32:21 dvass, custom notification on ics through kitkat and Notification.MediaStyle on lollipop Feb 02 05:32:25 i read my preferences on the main thread. the preference fragment does too, so i don't care ;) Feb 02 05:32:27 I was just reading that there is (or might be: the post is old) a file-system stat if we don't use the same SharedPreferences object again: http://stackoverflow.com/questions/4371273/should-accessing-sharedpreferences-be-done-off-the-ui-thread Feb 02 05:32:56 I might manually cache all mine, just in case. (Slightly more work, but peace of mind.) Feb 02 05:33:18 Yes, caching shared preferences is something worth keeping in mind Feb 02 05:33:18 TacticalJoke come on, stop guessing about what performance problems you are going to have Feb 02 05:33:20 I already have a PreferencesFile thing that has an extent of the entire process, so it's not hard for me to do. Feb 02 05:33:45 I finally figured out what you have to do in Android Studio to use a module. Feb 02 05:33:46 shared preferences are already cached Feb 02 05:33:51 Zharf: yeah I can make the notification but am unsure as to how exactly communicate between mediaplayer and notification and make sure te mediaplayer stays alive when app is closed Feb 02 05:34:08 g00s: True, just talking about caching hot fields from it Feb 02 05:34:25 That's why there's an editor/commit in the first place Feb 02 05:34:28 dvass, pending intents, and you can't really do much other than start the service sticky Feb 02 05:35:28 TacticalJoke: Looks like Brad is suggesting exactly what I am in this SO post Feb 02 05:35:53 TacticalJoke did you see http://hacksoflife.blogspot.com/2015/01/the-four-horsemen-of-performance.html Feb 02 05:36:34 Zharf: do you know of any tutorials that may guide me through this? I have been looking around but haven't come across anything that quite suits my needs. All of them have controls in the activity itself Feb 02 05:37:05 deuteros__: Yeah. Feb 02 05:37:10 g00s: Nah, I'll check it out. Thanks. Feb 02 05:37:17 I think I just figured it out from the documentation myself... Feb 02 05:37:44 i'm not sure if the stat point is still relevant, that was yaffs2 which isn't being used any more Feb 02 05:38:04 You open File -> Project Structure and there you can add a new module. The other module that was listed (your main activity) needs a module dependency added to it. On the right side of the screen you use the other + to add the newly added module as a dependency and that seems to fix up the build process so it can find the add-on module. Feb 02 05:38:06 g00s: Fair point, and either way, by now, it should all be handled by the shared preferences API Feb 02 05:38:41 i remember samsung had an even worse FS :) Feb 02 05:38:44 Plugh: You can create a new module via File > New, too. Feb 02 05:38:47 I never saw any mention of that in my internet searches but most (all?) of the info I found was for older versions of Android Studio and not version 1.0.2 Feb 02 05:38:47 http://eclipser.xmms2.org/git/xmms2-android.git/tree/src/org/xmms2/service/misc/NotificationHandler.java here's what I did notification in my music player service.. Feb 02 05:39:07 deuteros__: Do you mean that caching should all be handled by the SP API? (Just curious.) Feb 02 05:39:13 TacticalJoke: I wasn't trying to create a new one but use an existing third party module. Feb 02 05:39:25 My app, right now, calls getSharedPreferences over and over. I guess I should be caching that SharedPreferences object. Feb 02 05:39:37 TacticalJoke: Ultimately, it should. This tap dancing around the SP synchronous behavior is not good design. You shouldn't force users to do that. Feb 02 05:39:55 Plugh: Oh, sorry, misread. Feb 02 05:40:09 Again, SP is already caching stuff. I think it should go one step further and be fully asynchronous Feb 02 05:40:24 so that developers like ourselves don't have to wrap these calls to make them async Feb 02 05:40:59 AS is now trying to build the app. It fails, of course, when trying to build ActionBarSherlock but that is about problems with missing(?) or incorrect import statements. That is a lot easier to deal with. Anyway, just thought I'd pass along the solution to my problem for future reference. Feb 02 05:41:09 deuteros__: Yeah, it could use Futures under the hood. Feb 02 05:41:48 TacticalJoke, did you actually do any sort of profiling or actually have any sort of performance issue? -.- Feb 02 05:42:07 Or just deprecate getSharedPreferences() and replace it with asyncGetSharedPreferences(Callback cb) Feb 02 05:42:28 Zharf: No, but I'm curious about best practices. Feb 02 05:42:33 sounds very much like premature optimizations attempts :) Feb 02 05:42:45 I'm off again. Its getting late so I'll deal with the import issues tomorrow. Progress at last. :) Feb 02 05:43:10 Actually, I did a little profiling and found that reading my shared preferences took around 0.1ms the first time. Feb 02 05:43:24 And thereafter the time was hard to measure. Feb 02 05:43:33 But it's very small. :) Feb 02 05:44:40 TacticalJoke: That's impressive, you sure that was the first read? Feb 02 05:44:48 It's a flash read, it's tens of ms, sometimes 100+ Feb 02 05:45:38 We have very, very strict criteria for cold starts of our apps, this adds up Feb 02 05:46:10 100ms+ is scary. ;o Feb 02 05:46:17 Yeah, I think it was the first read. Feb 02 05:47:45 If it was a constant <10ms, I wouldn't be so anal about it. Not been my experience Feb 02 05:47:59 How big is your preferences file? Feb 02 05:48:39 Most of them are not that big, I think the parsing is not the bulk of the time (gut feeling). I think most of it is just Flash stat/open Feb 02 05:49:23 Bottom line is that SharedPreferences often comes up in TraceView shown by my teams, so it's easy for me to tell them to go fix that :) Feb 02 06:07:09 http://stackoverflow.com/questions/28264945/playing-media-in-the-background-controlled-by-an-ongoing-notification Feb 02 06:07:17 Could someone take a look at that please? thank you Feb 02 06:18:08 When does onStop run? Feb 02 06:18:23 Can I use it to determine an app close event? Feb 02 06:18:38 is that the only time onStop runs? Feb 02 06:18:46 help me plz Feb 02 06:34:50 Hmm. Checking tonight, and reading one little string from SharedPreferences is taking 4ms+. That's way slower than I thought. Feb 02 06:35:05 Manually reading from a file would probably be faster. Feb 02 06:35:53 Agamemnus: Activity.onStop is called when the activity is no longer visible. Feb 02 06:36:09 then what's onPause? Feb 02 06:37:24 a method! Feb 02 06:37:29 do I get a cookie? Feb 02 06:38:20 No. Feb 02 06:38:28 Do not pass Go, do not collect $200. Feb 02 06:40:19 Agamemnus: http://developer.android.com/reference/android/app/Activity.html Feb 02 06:40:28 look at the flow chart in the class description Feb 02 06:42:07 and the block diagram thingy a bit below that Feb 02 06:43:29 So it's onDestroy(). Feb 02 06:43:41 or Feb 02 06:43:44 Reading a fairly large array from a file is faster than reading a small string from SharedPreferences. Weird. Feb 02 06:43:46 maybe onStop Feb 02 06:43:53 s/array/list of strings/ Feb 02 06:45:12 Agamemnus: What are you asking? Feb 02 06:45:25 I think it must be onStop Feb 02 06:45:34 I need to run a function right before a user closes the app Feb 02 06:46:09 theoretically onStop should be okay since everything is reset after Feb 02 06:46:16 Define "closes the app". Feb 02 06:46:43 I'm not even entirely sure Feb 02 06:47:10 what does this function do? Feb 02 06:47:27 I'm guessing it's a survey. lol Feb 02 06:47:51 :x Feb 02 06:48:03 some of my users are bastards Feb 02 06:48:14 they get the option now of surveys or ads Feb 02 06:48:19 so you'll be a bastard right back at them? :p Feb 02 06:48:21 I think you have no respect for users. Feb 02 06:48:33 and when they choose surveys they still won't do it Feb 02 06:48:45 even tho they had no ads for a while Feb 02 06:49:10 I suspect trying to force them to will just get your app uninstalled that much more quickly Feb 02 06:49:18 but whatever :) Feb 02 06:49:32 i should force them to install an observer app Feb 02 06:49:41 so I know when my app gets uninstalled :x Feb 02 06:50:22 i have deeeeep respect for my users man Feb 02 06:50:35 but they trust me only as far as they can throw me. Feb 02 06:50:44 I'm amazd that users put up with this nonsense. Feb 02 06:50:48 amazed* Feb 02 06:52:05 Oh by the way Feb 02 06:52:15 One thing I still haven't tried is Chartboost. Feb 02 06:52:21 Has anyone done it yet? Feb 02 06:52:37 I'm really tired. The surveys are a real bust Feb 02 06:52:44 for now at least Feb 02 06:54:05 what is it Feb 02 06:55:02 what is what Feb 02 06:55:09 chartboost? Feb 02 06:55:13 just an ad platform Feb 02 06:56:13 oh for some reason i thought it was something like google opinion rewards Feb 02 06:56:29 The surveys might be Feb 02 06:56:31 here: Feb 02 06:56:37 http://www.pollfish.com Feb 02 06:57:05 When was the last time you visited a Daves Discount abortion clinic in person? Feb 02 06:57:41 why, just yesterday! Feb 02 06:58:08 What mode of transportation did you use? Feb 02 06:58:18 unicycle. obviously Feb 02 06:58:25 I'm thinking maybe I can combine pollfish and kiip Feb 02 06:58:30 Heres $0.07 Feb 02 06:58:35 yes! Feb 02 06:58:50 finish a pollfish poll, get a kiip reward Feb 02 06:59:19 honestly it's really good Feb 02 06:59:32 let's say you make 20 cents a reply Feb 02 06:59:34 30 seconds Feb 02 06:59:38 120 minutes in an hour Feb 02 06:59:42 .20 * 120 Feb 02 06:59:50 $24 an hour Feb 02 06:59:56 wait a second... Feb 02 07:00:11 120 30 seconds in an hour, I meant. Feb 02 07:00:28 a second? that'll be $0.0066 Feb 02 07:00:48 It's good money Feb 02 07:00:59 but you could get really exhausted Feb 02 07:01:15 maybe i should pay other americans to do poll Feb 02 07:01:16 polls Feb 02 07:01:28 keep 30% for myself Feb 02 07:01:34 Ive earned almost $20 from google Feb 02 07:01:38 it funds all my app needs Feb 02 07:01:43 that's $16.8 an hour, way better than anything Feb 02 07:02:04 I'll keep my day job :) Feb 02 07:02:32 if I hire 20 people Feb 02 07:02:50 That's $51,000 a day Feb 02 07:02:53 i mean month Feb 02 07:02:54 ugh Feb 02 07:03:04 assuming they worked 24/7 Feb 02 07:03:13 ^_^ Feb 02 07:03:33 remind me never to work for Agamemnus Feb 02 07:03:50 come on it ll be fun Feb 02 07:04:09 I think I just found a pretty unethical way of making a lot of money. Feb 02 07:04:30 beat someone with a wrench until they give your their bank account password? Feb 02 07:04:41 I see Feb 02 07:06:15 why would there be a fart sound app Feb 02 07:06:34 im sure there are dozens Feb 02 07:06:47 yes Feb 02 07:06:57 this is amazing Feb 02 07:07:01 I want an arnold soundboard app Feb 02 07:07:27 my god did i have fun with the flash version Feb 02 07:07:28 https://play.google.com/store/apps/details?id=com.cremagamesstudios.instant Feb 02 07:07:36 and dialpad.com Feb 02 07:07:46 We would order pizzas to peoples houses in hawaii Feb 02 07:07:50 https://play.google.com/store/apps/details?id=com.funziefactory.memesoundboard Feb 02 07:08:09 Agamemnus: you should add fart sounds as rewards, when someone completes a puzzle Feb 02 07:08:24 https://play.google.com/store/apps/details?id=appinventor.ai_kevschwartz90.Obama 2.8 Feb 02 07:08:39 Use google search to find the nearest taco bell Feb 02 07:08:40 this is really horrible Feb 02 07:08:41 or synthesize fart fragrance Feb 02 07:08:41 https://play.google.com/store/apps/details?id=com.neatofun.tourettesguy Feb 02 07:09:02 over 1 million installs for making fun of someone with a disease Feb 02 07:09:14 the guy himself was making fun of people with tourettes Feb 02 07:09:20 Can I run C++ code from Java? Feb 02 07:09:21 even worse Feb 02 07:09:22 He was a big phony Feb 02 07:09:36 was? Feb 02 07:09:38 Is he dead? Feb 02 07:11:11 tourettes guy? Feb 02 07:12:10 yes Feb 02 07:12:23 hes not dead and not touettessed Feb 02 07:12:37 The internet gave him that nickname based on his behavior Feb 02 07:13:09 it's still probably wrong Feb 02 07:13:10 and now you suddenly feel dumb for laughing at it all those years...atleast i did Feb 02 07:13:30 I might have heard it once, not sure Feb 02 07:13:50 ok so back to Chartboost.... Feb 02 07:14:48 http://www.touretteshero.com/ is real Feb 02 07:15:13 I need sample code as how to make a media player that is controlled via a notification because I seem to be unable to make it Feb 02 07:15:16 can someone please help? Feb 02 07:15:17 .01 per video view minimum Feb 02 07:15:50 If I change each of my ads into a video view and I get the minimum, I'll get the same I am getting now Feb 02 07:15:58 god I need to stop implementing ad solutions Feb 02 07:16:12 I'm disappointed each time. Feb 02 07:21:11 once I bind a service to an activity, how do I actually send requests to it Feb 02 07:22:02 is the service in the same process? Feb 02 07:22:07 as the activity, I mean Feb 02 07:22:33 what do you mean by that? Feb 02 07:22:39 the activity calls startService Feb 02 07:22:44 Are you binding to a service in ano.. what? Feb 02 07:22:55 startService isn't used to bind to a service :) Feb 02 07:23:11 it's used to start a service and/or send a command to a service Feb 02 07:23:22 they are two separate things Feb 02 07:23:27 yep Feb 02 07:23:30 and then I bind it Feb 02 07:23:34 I use this code: Feb 02 07:23:34 http://stackoverflow.com/questions/22424149/music-player-implementation-in-android Feb 02 07:23:44 you don't need to do both Feb 02 07:23:55 unless you have a particular reason to do both Feb 02 07:24:27 but in any case, assuming you actually do want to bind to the service, using Context.bindService Feb 02 07:24:38 is the service you're binding to in a different application? Feb 02 07:25:01 I'm guessing probably not. Which makes things quite a bit easier Feb 02 07:25:39 http://developer.android.com/guide/components/bound-services.html Feb 02 07:25:50 look at the "Extending the Binder class" section Feb 02 07:26:00 err: http://developer.android.com/guide/components/bound-services.html#Binder direct link Feb 02 07:26:18 No I'm not Feb 02 07:26:45 I'm just trying to set up a media player that can play music in the background and be controlled via a notification Feb 02 07:27:15 If you were, you would have to either define an AIDL interface, or use Messenger. But for a local service, you basically just pass a reference to your service, and your activity can call methods on the service instance as per usual Feb 02 07:28:02 Yeah, http://developer.android.com/guide/components/bound-services.html#Binder is what you'll want to look at Feb 02 07:28:49 what happens if the activity closes though? Feb 02 07:29:30 it will unbind from the service Feb 02 07:30:29 If you can get away with using startService to send a command to the service, that's often easier than using bindService Feb 02 07:30:32 and the service will stop? Feb 02 07:30:47 but if I call start service again Feb 02 07:30:52 won't it just create another service Feb 02 07:30:54 if that was the only thing bound to it, and if the service hadn't been started via startService Feb 02 07:30:56 no Feb 02 07:31:02 Is there an iOS onStop equivalent? Feb 02 07:31:06 startService will send a new intent to the same service Feb 02 07:31:11 and so if I have already playing audio, it'll just play audio again rather than do a command on it Feb 02 07:31:21 no, your existing service will get the intent Feb 02 07:31:29 oh really Feb 02 07:31:31 you can never have 2 instances of a service Feb 02 07:31:33 so I can just call startService Feb 02 07:31:36 yeah Feb 02 07:31:50 can I pass an intent through bindservice Feb 02 07:31:54 yes Feb 02 07:31:55 or do you only call bindservice once? Feb 02 07:32:11 would it be better to use bindservice then rather than startservice to pass commands? Feb 02 07:32:20 and would I be able to call it from another class Feb 02 07:32:23 if you used bindService, then you only call it once, and then call public methods on the service object that you get Feb 02 07:32:33 I would stick with startService Feb 02 07:33:04 the only reason you would need to use bindService is if you actually need to get the Service object, so you can call methods on it directly Feb 02 07:33:13 ah kay Feb 02 07:33:27 or, for lifecycle reasons Feb 02 07:33:37 if you want the lifetime of a service to be bound to the lifetime of the activity Feb 02 07:36:33 JesusFreke: using the code I linked in the stackoverflow, it seems they have made it so you can pass intents Feb 02 07:36:41 I'd like to harness that in order to send commands Feb 02 07:37:34 dvass: yeah, that's using startService to send a command Feb 02 07:38:07 for the first command yes, then what's the point of binding it? Feb 02 07:38:45 it accepts playback, play, pause, and stop commands Feb 02 07:39:03 yep Feb 02 07:39:08 but does it expect me to do startService Feb 02 07:39:25 what was the point of binding it? Feb 02 07:39:33 forget about binding :) Feb 02 07:39:35 you don't need it Feb 02 07:40:51 okay I won't touch it Feb 02 07:40:54 now for the second part Feb 02 07:42:13 I have another class to create my custom notification, I can't add an onclick listener to the button to then call the method of my activity which does the startservice to send command Feb 02 07:43:12 JesusFreke: how would I go about doing it Feb 02 07:43:25 iirc, notification buttons use a RemoteView, which should allow you to send a PendingIntent as the action of the notification Feb 02 07:43:48 so you could create a PendingIntent that sends the command to the service directly Feb 02 07:44:15 so I wouldn't do startService I'd just do the mediaplayerservice.class ? Feb 02 07:44:55 I don't even know what that means :) Feb 02 07:45:02 in any case, I'm off for now. sorry :) Feb 02 07:45:26 JesusFreke: one second! haha Feb 02 07:45:36 Can the pendingintent substitude startservice Feb 02 07:48:18 http://developer.android.com/reference/android/app/PendingIntent.html#getService(android.content.Context, int, android.content.Intent, int) Feb 02 07:50:22 k Feb 02 07:53:59 i notice certain games in Play store get a visibility bonus due to their subcategory (eg /strategy/medieval).... how strictly medieval does my game have to be for me to choose this category? Feb 02 07:55:19 some of the apps there seem more fantasy Feb 02 07:56:24 can you tag your app as more than one of these sub categories? Feb 02 07:57:09 i havnt uploaded any apps yet but on the google support page it only shows the main game categories (action, strategy, rpg etc) Feb 02 08:01:18 I would like to know how to set a subcategory, too. Feb 02 08:03:06 i wonder if google hand picks them or something Feb 02 08:04:48 Hey JesusFreke, thanks for all the help, I finally got some of the background systems in my app done. GUI systems are all working nicely, I understand a lot more, and my app is getting closer to being finished! :) Thanks! Also, thanks to the others who helped me. Feb 02 08:06:39 maybe, don't see much info on it Feb 02 08:13:29 i wish the play store had more search options Feb 02 08:17:53 njcomsec i know right? the desktop version is so much better Feb 02 08:19:01 you mean the browser one? looks exactly the same to me Feb 02 08:19:15 on an actual pc? Feb 02 08:20:11 yeh.... well there seems to be an extra category "new releases" on the browser one. i guess thats a tiny bit better Feb 02 08:20:12 ogh, the new androidpolice site makes me dizzy Feb 02 08:21:55 ugh, what have they done! Feb 02 08:23:19 i like it Feb 02 08:23:32 albeit i cant for the life of me remember what it looked like before Feb 02 08:23:43 All my article reading happens on mobile Feb 02 08:23:52 it looks nice. but the navigation is akward Feb 02 08:26:55 Napalm: Just wondering: do you read SharedPreferences in the main thread? I noticed today that reading a simple string (where there is no other data in the file) takes 5ms or so each time. ;o Feb 02 08:27:34 I mean each time it's not cached.# Feb 02 08:27:36 -# Feb 02 08:27:38 TacticalJoke each time? once the file is loaded it should just come out of a hash map Feb 02 08:27:43 Yeah, after that it's 0ms. Feb 02 08:27:48 :D Feb 02 08:34:14 TacticalJoke such a hot potatoe, not even Napalm will touch it :D Feb 02 08:34:21 haha Feb 02 08:34:27 lol, potatO Feb 02 08:34:51 I'm thinking that I might be able to get away with just SharedPreferences. Feb 02 08:34:55 And optimize everything else. Feb 02 08:35:14 It's a crazy world if I can't even read SharedPreferences on the main thread. Feb 02 08:35:40 TacticalJoke: yes you can Feb 02 08:35:49 how do i do two debug {} settings if I have two flavors? Feb 02 08:36:14 Okay, glad you said that. haha Feb 02 08:36:17 TacticalJoke: it all depends on if you need the data for synchronous or asynchronous process Feb 02 08:36:28 I need it in MainActivity.onCreate, basically. Feb 02 08:36:33 And my app can't wait. Feb 02 08:36:44 then that is where it must be Feb 02 08:37:17 in other words, if I have something like : buildTypes { debug {} } productFlavors { flavor1 {} flavor2{} } -- how do i do custom settings in debug {} per flavor? Feb 02 08:37:41 TacticalJoke: make your code work.. then optimize where it is required Feb 02 08:37:49 True. Feb 02 08:42:37 Napalm: One thing I don't understand is why StrictMode flags Context.getSharedPreferences but not Resources.getStringArray. Surely they *both* involve disk access? Feb 02 08:42:57 I can't imagine all Resources being loaded into memory before the app runs. Feb 02 08:44:01 TacticalJoke: correct they are not all loaded into memory.. but I expect.. if I remember correctly most are Feb 02 08:44:40 Hmm, okay. So maybe just strings and string arrays and stuff are? Feb 02 08:44:44 And I guess images are not. Feb 02 08:44:52 i believe they are Feb 02 08:45:10 Only thing is that if I have an array of 10,000 elements, it takes around 70ms to load that. Feb 02 08:45:14 It takes me back, but when I last looked it at.. i believe your resource file is mmap'd into memory Feb 02 08:45:18 However, that could just be finding the space in RAM. Feb 02 08:45:19 the resources.arsc file Feb 02 08:46:02 TacticalJoke: that time is most probably more to do with resource lookups and qualifier resolution Feb 02 08:46:12 Okay. Feb 02 08:46:31 The cool thing is that if there is a tiny array in the same file as the huge array then the tiny array takes no time whatsoever to read. Feb 02 08:46:37 TacticalJoke: but I cant quite guarentee that. its been awhile since i looked at that part of the AOSP source. Feb 02 08:47:55 TacticalJoke: why dont you go look at the source and see what happens Feb 02 08:48:04 Yeah, I was looking earlier. My C++ is a bit rusty. :) Feb 02 08:48:28 If you use Bluetooth, can the phone charge faster than Bluetooth discharges? I want to connect a sensor to Android, this will be while the patient is sleeping. Normally you charge the phone during the night, but if you use USB you canot do that since it will be busy for sending the data and cannot be charged. The question is, if you have a Bluetooth connection active, can the phone charge faster than the Bluetooth drains it? Feb 02 08:54:10 trixy sure Feb 02 08:54:14 I'm trying to share something frm an app Feb 02 08:54:20 to my app, is it possible when my app receives it Feb 02 08:54:36 to hide the activity and go back to the original app Feb 02 08:56:18 TacticalJoke: when the application is loaded it extracts the resources.arsc file which contains all "values" resources as one ResTable and then also finds and extras another ResTable as the IdMap. Feb 02 08:56:51 I see. Feb 02 08:56:52 TacticalJoke: so strings and the like are in memory. the time it takes to load 10,000 items is probably just the nature of the code path and the amount of buffering required to load that many items. No disk access. Feb 02 08:57:02 Cool. Feb 02 08:57:11 next time you get to look at the source :P Feb 02 08:57:36 Yeah, I saw that ResTable stuff earlier. I was finding it tricky to follow. Feb 02 08:57:50 Did you use a web browser, or was it the local source? Feb 02 08:57:55 lol whats up with the left shark Feb 02 08:58:08 i have used the repo tool to have a local copy of the git repo's Feb 02 08:58:16 grep on a SSD works much faster Feb 02 08:58:17 ;) Feb 02 08:58:23 Nice. lol Feb 02 09:04:26 Napalm early rise and shine ? Feb 02 09:06:42 g00s: how sure? ;) Feb 02 09:08:10 Can an ANdroid phone be connected to a USB hub so that it can receive data via USB and be charged at the same time? The data would come via USB from a sensor with USB capability and the HUB would be powered externally. Feb 02 09:08:16 Okay, I don't understand this: if I say "getResources().getDrawable(R.mipmap.launcher_icon);", I don't get a warning from StrictMode. Feb 02 09:09:30 trixy i do it all the time Feb 02 09:09:42 so pretty sure Feb 02 09:09:50 g00s: no i think he means something different Feb 02 09:10:24 trixy: you mean a usb device connected directly to a hub that connects to your phone.. so your phone is the bus-master Feb 02 09:10:28 phone plugged in, chargin, on using bt - no problemo Feb 02 09:10:32 Same with "getResources().getDrawable(R.mipmap.testing);". StrictMode, y u no warn me? Feb 02 09:11:06 TacticalJoke, because it's not enough expensive to starve the ui/main thread? Feb 02 09:11:16 use traceview Feb 02 09:11:16 adq: it can Feb 02 09:11:24 I can't get SoftInputMode to work with my simple relativelayout (5 editexts and a button). Do I have to do something weird like placing everything into a scrollview for it to work? If I open a keyboard the elements at the bottom of the screen stay blocked Feb 02 09:11:34 TacticalJoke: because it can be cached Feb 02 09:11:57 TacticalJoke: also, stop over optimizing.. if your drawables are that large they are taking a long time to load.. then you have other issues Feb 02 09:11:58 Okay, but a new image ('testing.png') is still not warning. Feb 02 09:12:17 I know; I'm just trying to figure out what has disk access and what doesn't. :) Feb 02 09:12:35 superstepa: yes, place them all in a scrollview.. that or use adjustPan Feb 02 09:13:13 what could be wrong to get this error ? E/Volley﹕ [26820] BasicNetwork.performRequest: Unexpected response code 401 Feb 02 09:13:51 sci-fi: your URL you passed to Volley is getting a HTTP 401 response.. which is authentication required Feb 02 09:14:22 Napalm:ty so i should talk to web developer ? Feb 02 09:14:47 possibly or supplier the correct WWW-Authenticate header Feb 02 09:14:48 ty Feb 02 09:17:31 Napalm: Weird -- loading a new image (testing.png) is faster than loading a string array with 50 elements. Feb 02 09:17:39 I can't imagine that image being cached. Feb 02 09:20:10 TacticalJoke: probably Locale lookup etc? Feb 02 09:20:32 Hmm, but wouldn't loading the image hit the disk? Feb 02 09:20:41 Loading the image also isn't causing a warning from StrictMode. Feb 02 09:21:08 TacticalJoke: stop guessing and read the source Feb 02 09:21:14 if your that interested Feb 02 09:25:30 Napalm: what is 500 for ? :D Feb 02 09:27:42 g00s: ok great Feb 02 09:27:56 Napalm: yes Feb 02 09:28:08 (about the USB hub) Feb 02 09:28:21 trixy: look at the USB-OTG specs Feb 02 09:28:31 why would you want a physical wire between a sleeping patient at the phone though ? Feb 02 09:28:39 seems no brainer, BLE Feb 02 09:28:53 sci-fi: Internal Server Error.. go read online Feb 02 09:29:36 g00s: i dont want sleeping wire, patient turning in sleep, pulling out cable perhaps Feb 02 09:29:43 but how reliable is bluetooth? Feb 02 09:30:36 trixy ideally the device should have a buffer to store , say 24h worth of data without needing to erase new data Feb 02 09:31:34 trixy if you want reliable bt, use iphone Feb 02 09:32:10 its impossible to say, every phone has quirks Feb 02 09:32:19 well i want it to work against any smartphone, or at leats android and iphone Feb 02 09:32:43 why iphone bt more reliable? and is android bt notoriously unreliable? Feb 02 09:32:56 Hi there. Feb 02 09:33:08 iphone bt is reliable because they helped define the spec Feb 02 09:33:35 basically apple drove wibree with nokia, and a few other companies like nordic semi Feb 02 09:34:16 so they have a robust implementation Feb 02 09:34:52 Morning All Feb 02 09:34:54 i'm talking sbluetooth smart (ble) Feb 02 09:35:06 What should I look for: I want to implement some kind of tutorial. But basically I would just have top half screen (portrait mode) reserved for a few images to sipe right so user will know what's all the fuzz about. Bellow images would be dots for user to know on which image is he. Any ideas what should I search for? Feb 02 09:35:52 Basically like this animation on this site: http://imperial-global.com/ if you hove the image you can go right and dots are visible Feb 02 09:36:22 frojnd: View Pager and View Pager Indicator Feb 02 09:36:26 With that difference that in my app there wouldbe no auto animation. Only if user would like to swipe Feb 02 09:36:31 Ankhwatcher: thank you!! Feb 02 09:36:53 can i enable/disable NFC from API? Feb 02 09:38:41 trixy also, Apple has design guidelines for BT devices which you can follow, to smooth things out Feb 02 09:39:05 https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf Feb 02 09:39:34 so i'd get it working on iPhone first, and then test your mettle with android's ble :) Feb 02 09:40:09 that doc is great; if anyone wonders why gadgets come out for iPhone first, thats exhibit A Feb 02 09:40:55 they even have a mailing list just for bluetooth stuff if you have questions Feb 02 09:42:10 Ankhwatcher: while you are here. Let say I load image from gallery, what would I need to draw a freehand line on that image? Feb 02 09:44:33 frojnd: not sure, never done that. http://stackoverflow.com/questions/12998006/draw-on-android-screen-with-fingers Feb 02 09:45:39 Ankhwatcher: thank you anyway. Will research a little and see what I find. Feb 02 09:53:34 guys i send params with this but i also need to send headers. I'm pretty new to volley and android any idea how can i send headers ? I want to improve this example http://paste.ubuntu.com/10012565/ Feb 02 10:01:02 ¨/join #cygwin Feb 02 10:03:05 g00s_: did you see that the new raspi supports win10? Feb 02 10:03:53 the question is if it's still going to be as limited as pure-RT devices were? Feb 02 10:18:50 hi buds Feb 02 10:22:38 hey Feb 02 10:23:01 Hah. Someone posted an article on /r/programming advocating switching to a base-12 numeral system. Feb 02 10:28:01 Leeds didn't see that Feb 02 10:28:21 they haven't given many details, but apparently they've been working with MS on it for a while Feb 02 10:28:36 i still think google should have an official build for something like rpi, and we can use that for the emulator Feb 02 10:28:56 just need the GUI show up on the desktop Feb 02 10:29:14 Leeds does the Rpi support Oracle JME ? Feb 02 10:29:21 no idea Feb 02 10:29:48 hello. Can anybody help me with Android studio ? Feb 02 10:29:57 I would like to make a .aar Feb 02 10:30:47 But when launching android studio, there's no way to create something different than an application project Feb 02 10:31:24 g00s_, the issue with old RPi is that it has a crappy old arch Feb 02 10:31:29 which isn't supported by Android anymore Feb 02 10:31:41 new rpi is a7 Feb 02 10:31:55 yep, the new one looks very nice Feb 02 10:45:33 Snappy Ubuntu Core on Raspberry Pi 2 Feb 02 10:45:43 never heard of Snappy, or Ubuntu Core Feb 02 10:56:48 g00s_, isn't snappy 15.04? :) Feb 02 11:11:39 hi guys Feb 02 11:11:44 this is the HTC One Max, http://www.htc.com/uk/smartphones/htc-one-max/ Feb 02 11:11:58 I don't know how to account for it in my layouts Feb 02 11:12:47 I was able to produce an emulator of it, giving it 5.9" screen size and 1080x1920 res and I am able to see the problem that was reported to me, but I'm unable to fix it because layout-xxlarge didn't account for it Feb 02 11:19:19 hey guys, i`m thinking again of: should i use async task or something else.....After changing some settings in preferences and resuming to mainActivity i do some changes on the UI. These changes can take a few seconds (more than two, maybe 10, it depends on the case....). Feb 02 11:19:27 The web says one should only use asyncTask for short-time operations and for longer ones use services instead, but it also says: asyncTask for UI-stuff and services for longer stuff (not really UI-stuff). I`ve experienced one case which causes a crash with the combination of async-task and a progress-dialog at orientation change. Feb 02 11:19:28 I now just lock the orientation temporarly until my work is done. Is this ok/safe enough if the operation might take a lil more time or should i still use services or something else? Feb 02 11:20:21 What exactly are these changes? Feb 02 11:21:02 Hey TacticalJoke: we been talking about this a few days ago ;) Feb 02 11:22:01 in background: scaling images . After that: set Images to ImageButtons Feb 02 11:25:46 Ah, yes. It's you. :) Feb 02 11:26:09 There isn't a time limit for an AsyncTask. I've checked the source and everything. Feb 02 11:26:14 It's just a plain old thread pool. Feb 02 11:27:02 TacticalJoke: thx for researching man ;) Feb 02 11:27:07 I think the reason they mention that is that most people use an inner class for their AsyncTask, and inner classes reference their enclosing classes. And of course rotating the screen destroys and recreates the activity. Feb 02 11:27:38 If the activity is destroyed and the inner AsyncTask is still going, it can't be garbage collected yet. Feb 02 11:27:51 i also use it as an inner class......but since i lock orientation i think it should be fince or am i missing something? Feb 02 11:28:06 Perhaps the simplest solution in your case is to use an AsyncTask that isn't a nested class. And to use WeakReference for the Activity. Feb 02 11:28:26 I guess it's fine if they can't rotate. Feb 02 11:28:43 s/nested/inner/ Feb 02 11:29:12 maybe i should add it to a seperate class, use weakReference and lock orientation ;) ? Feb 02 11:29:15 I'm not sure that locking orientation is the best solution, though. Feb 02 11:29:40 in terms of usability? Feb 02 11:29:47 A separate class that uses WeakReference is probably good. Feb 02 11:30:05 Yeah. And it seems like a huge hack to momentarily lock orientation. Feb 02 11:30:45 any of you guys using Android Studio with NDK ? I've got the building figured out, but editing C++ in AS is a drag (highlighting works, but code completion / suggestion doesn't, even with the C++ plugin)... what are you guys using for this? Feb 02 11:30:50 not really. to lock: setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR); to unlock: setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR); Feb 02 11:31:29 TacticalJoke: i think its ok for the user if he cant rotate while i`m applying the changes as long as a progressDialog is shown Feb 02 11:31:36 Can anyone recommend me a good application to simulate running? Feb 02 11:32:16 TacticalJoke: locking at onPreExecute . unlocking at onPostExecute Feb 02 11:36:21 It's creative. lol Feb 02 11:39:52 hi guys Feb 02 11:40:06 try this adkins simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ Feb 02 11:40:09 are QR codes still used alot nowadays ? Feb 02 11:40:15 try this adkins http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ Feb 02 11:40:28 TacticalJoke: class BitmapWorkerTask extends AsyncTask can you explain what means in that context (http://developer.android.com/training/displaying-bitmaps/process-bitmap.html) Feb 02 11:44:34 Odaym: thx, i`ll check that out Feb 02 11:44:58 How do I fix this kind of errors : error: package com.company.smdf.R does not exist ? Feb 02 11:45:18 The type of the params; the type of the progress; the type of the result. Feb 02 11:47:56 TacticalJoke: <.....,....,Bitmap> Bitmap is the param of onPostexecute. Integer is the param of doInBackground. <....Void,....> is what? or am i totally wrong? ;) Feb 02 11:49:47 adkins: the second template parameter of AsyncTask is the Progress Type, if you let your asynctask publish progress update Feb 02 11:49:55 s/template/generic Feb 02 11:50:29 Void is essentially a non-class, indicating that you won't be publishing any progress. Feb 02 11:51:00 It's essentially the wrapper type for void (like Integer for int). However, just like void, you can't have a variable of type Void, and can't instantiate a Void Feb 02 11:53:40 sonOfRa: publish progress update? example? Feb 02 11:54:01 progress=happens in doInBackground? Feb 02 11:54:22 adkins: have you read the (very extensive) documentation? It describes this all in great detail Feb 02 11:55:17 sonOfRa: no havent, sorry, maybe should that ;) you mean this right? http://developer.android.com/reference/android/os/AsyncTask.html Feb 02 11:55:30 Exactly Feb 02 11:57:14 how can a 5.9" screen device respond also to just layout/ folder Feb 02 11:57:19 k then i guess nevermind my questions ;) TacticalJoke: you dont need to answer my last questions.....going to eat something. Thx sonOfRa Feb 02 11:57:23 doesn't make sense Feb 02 12:29:15 http://developer.android.com/reference/android/telephony/SmsManager.html - "Manages SMS operations such as sending data, text, and pdu SMS messages." Feb 02 12:29:29 I know text SMS messages, whar are data and pdu SMS messages ? Feb 02 12:29:59 I even see there's a method called sendDataMessage() and error constant like RESULT_ERROR_NULL_PDU Feb 02 12:36:38 Hey Feb 02 12:39:04 heya Feb 02 12:41:14 Pressing the physical back button and setting hierarchical parent has different behaviours for similar actions. Both lets the user navigate back to the previous activity. Although the later restarts the parent activity, otherwise need to declare it as "singleTop". The whole implementation of this part of the system is just wrong. :/ Feb 02 13:04:23 Hey there shmoon:) Feb 02 13:04:57 Is the nexus 9 good tablet to get for testing android app on? Feb 02 13:05:58 it's official and from google it must be bad Feb 02 13:07:23 Why bad?I was thinking of get one so i don't have to use my nexus 6 all the time but i like bigger sceen:) Feb 02 13:07:52 can i compress a bitmap (from contact list) to zip format to send database ? Feb 02 13:08:10 gordon,That good it from google faster updates. Feb 02 13:08:15 :) Feb 02 13:12:35 It maybe good to get nexus 9 if android goes to 64bits:) Feb 02 13:20:00 Is it possible to partition internal sd card? Like resize it and create a new 1gb partition? Feb 02 13:24:29 For verifying user purchases on a backend, should I use a service account or OAuth2.0?? Feb 02 13:39:21 Hello guys, my colleague has a sony device with probably Android 4.4. I somehow can't acces menu through hardware menu button. It seems like that menu can only be accessed by soft menu in the actionbar. Sounds that familiar to you? Feb 02 13:41:05 On a modern Samsung device I can access menu by pressing on the double square symbol, next to the home button. But on a Sony device I can't. Any idea? Feb 02 13:43:31 It's no longer supported in 4.4. Feb 02 13:43:37 http://www.computerworld.com/article/2475741/android/hallelujah--samsung-is-finally-ditching-the-old-android-menu-button.html Feb 02 13:50:07 Actually, I'm misremembering. The button should still work. Feb 02 13:50:17 It's just that they're always showing on-screen menu buttons where available now. Feb 02 13:50:52 Is your colleague's phone running a custom ROM? Feb 02 13:51:24 I doubt there is a Sony device with a hardware button that has been updated to 4.4 by Sony. Feb 02 13:51:34 s/button/menu button/ Feb 02 14:02:10 can i zip a bitmap image ? Feb 02 14:03:42 ugh Feb 02 14:03:55 sci-fi, can you explain more what are you trying to do? :) Feb 02 14:04:20 get a bitmap from contact list image and zip it to send to database via rest api Feb 02 14:07:32 TacticalJoke, no it's not a custom, but it's a new device, I don't know the type yet. Feb 02 14:08:02 But it's a quite new device and it will soon upgrade to Lollipop. Feb 02 14:08:10 sci-fi, compress is to JPEG isntead Feb 02 14:08:11 Hmm. The thing is, none of the new Sony devices have hardware menu buttons. Feb 02 14:08:17 sci-fi, it's significantly smaller. Feb 02 14:08:27 sci-fi, and hardware accelerated. Feb 02 14:08:54 Number5, it's possible that his firmware just doens't allow that anymore Feb 02 14:08:55 TacticalJoke, what I mean by hardware buttons, are those buttons like home, back and recent apps. Feb 02 14:09:06 Number5, physical menu buttons are effectively deprecated since Android 3.0 Feb 02 14:09:34 Mavrik, ok, I see. So this means I'm forced to use actionbars Feb 02 14:09:46 doh. Feb 02 14:09:50 for last 5 years or so :P Feb 02 14:10:18 Mavrik, come on, Android 4 became popular since 3 to 4 years. Feb 02 14:10:22 I think all new Sony devices have on-screen buttons only. The ones you mention are their on-screen buttons. Feb 02 14:10:41 (Apart from volume control, power, and (sometimes) a camera key.) Feb 02 14:10:44 TacticalJoke, yes that's what I mean. Feb 02 14:10:55 TacticalJoke, even those that don't have replaced the button with multitask button Feb 02 14:11:04 Number5: You talked about a hardware menu button. :D Feb 02 14:11:07 only samsung for some dumb reason kept the menu button alive way past it's support Feb 02 14:11:13 Ya, Mavrik. Feb 02 14:11:29 Mavrik:i will send image to database and retrieve it so often.I was planning to use like this (to decrease internet usage): bitmap to jpeg --> and send to database --> get jpeg image when needed ---> and convert to bitmap again(to use locally) Feb 02 14:11:43 Mavrik:if i compress to jpeg it will loose quality i guess Feb 02 14:11:48 I hate that Samsung places the Back button on the right. Totally inconsistent with everything else. Feb 02 14:11:48 TacticalJoke, try to understand me in a context ;-) Feb 02 14:11:48 i dont want this Feb 02 14:12:03 sci-fi, then don't use huge jpeg compression Feb 02 14:12:23 Mavrik, you're right about Samsung, but don't forget the most people I know have Samsung devices Feb 02 14:12:49 for example ? compress(compress.format.jpeg, 10 ); ? Feb 02 14:12:57 Number5: Note that even ActionBar is old now. We have Toolbar. Feb 02 14:12:59 TacticalJoke, I don't like Samsung too, it's just they have nice "hardware" :P Feb 02 14:13:03 You should definitely be using at least ActionBar, if not Toolbar. Feb 02 14:13:19 Yeah, I like their screens. Feb 02 14:13:56 sci-fi, the range is 1-100, do check out the documentation. Feb 02 14:14:03 TacticalJoke, toolbars? really? man , the developments are quick Feb 02 14:14:06 Number5, what's your point? Feb 02 14:14:13 BTW, I'm just about to move to Toolbar -- does anyone know how to make it display an "up" button if I *don't* set it as the support ActionBar (in other words, if I inflate menus manually, etc.)? Feb 02 14:14:25 I want to avoid the old ActionBar API if possible. Feb 02 14:14:51 Mavrik, my point is, most people are used to Samsung style, like those hard buttons Feb 02 14:14:58 I know it has the ability to set a home button image, but I want it to just show the default 'up' image. Feb 02 14:15:02 Number5, no, they're not Feb 02 14:15:09 Number5, we have huge problems with Samsung users Feb 02 14:15:10 no, they're not Feb 02 14:15:10 While Google recommends otherwise Feb 02 14:15:11 Number5: Even if they were, hardware buttons are a bad idea. Feb 02 14:15:16 because they don't know how to use the menu button Feb 02 14:15:22 and thus can't find options in menus Feb 02 14:15:33 of course, those Samsung devices also hide the three dots menu Feb 02 14:15:35 Number5: On-screen buttons can disappear for full-screen mode. They can change based on context. And so on. Feb 02 14:15:36 Samsung users don't know to use the menu button Feb 02 14:15:37 Than the UI is bad Feb 02 14:15:47 so you're fucked because you get complaints from Samsung users when they don't find options and settings in menus Feb 02 14:15:49 Showing on-screen buttons allows the OS to decide what's best. Feb 02 14:15:58 luckly Sammy stopped doing that crap on new devices. Feb 02 14:16:09 Maverick, than the UI design is just bad. Feb 02 14:16:11 do you know how to set divider padding in a ListFragment? I get on ly 2 methods getListView().setDivider() and getListView().setDividerHeight(); Feb 02 14:16:28 TacticalJoke, I understand Feb 02 14:16:40 elye: What is divider padding? Perhaps you want child padding. Feb 02 14:16:46 As in ListView-child padding. Feb 02 14:17:24 elye, maybe it's better to use cell's padding. Feb 02 14:17:38 elye, you'll probably have to set padding on divider drawable Feb 02 14:18:16 Number5, yes, I agree. The menu button is awful UI design. Feb 02 14:18:41 :) Feb 02 14:18:59 If someone uses Toolbar with the ActionBar API (by calling setSupportActionBar), what is the advantage of using Toolbar? Feb 02 14:19:37 Maybe it's easier to theme. Hmm. Feb 02 14:19:52 TacticalJoke, do you mean by toolbar the bar on the bottom? Feb 02 14:20:17 http://developer.android.com/reference/android/support/v7/widget/Toolbar.html Feb 02 14:20:28 TacticalJoke, it's easier to do animations and effects when you have a Toolbar (which is a normal view) Feb 02 14:20:46 I see. Feb 02 14:24:47 Number5, cell padding doesn't help, i will try with divider drawable padding Feb 02 14:31:13 It seems that if I'm using Toolbar without using setSupportActionBar then I'll have to include Back icons in my resources. Is that right? Feb 02 14:31:28 Seems weird, though, because I don't have to include that image if I'm using setSupportActionBar. Feb 02 14:41:34 what is this method used for http://developer.android.com/reference/android/telephony/SmsManager.html#sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent) ? Feb 02 14:42:24 TacticalJoke, yeah that seems to be right Feb 02 14:42:38 https://twitter.com/Fireproof_Barry/status/562221659516854272 Feb 02 14:43:15 if it woudlnt be like that, you would end with a back button in every toolbar when you have multiple ones. Feb 02 14:43:30 Tapani, lol Feb 02 14:46:22 danijoo: I guess I was thinking that Toolbar could simply have a "showHomeButton" method. Feb 02 14:46:48 I'm confused about why it doesn't. Feb 02 14:47:07 Using Toolbar and then calling setSupportActionBar seems hugely disappointing. I never liked ActionBar's API. Feb 02 14:47:12 yeah. that would be a solution Feb 02 14:47:22 but thats not messy enough for google api :p Feb 02 14:47:49 :) Feb 02 14:49:59 TacticalJoke: why not just use a linear layout ? Feb 02 14:50:55 what kind of alternative is a linearlayout for a toolbar O.o Feb 02 14:51:30 one with less limits and headaches ;) Feb 02 14:52:23 yeah. must be fun to add menu items to linear layouts.. Feb 02 14:52:31 and handling the overflow Feb 02 15:18:20 If I animate a child view outside of it’s parents. How do I get the onclick events? Feb 02 15:19:06 by a listener on the childview Feb 02 15:21:51 So that should still work even outside of the parent? Feb 02 15:23:07 what does the parent has to do with the child views onclicklistener? Feb 02 15:25:10 Isn’t the onClick events passed from the parent to the children and the parent does not get onclick events outside of it? Feb 02 15:25:44 why dont you try it? Feb 02 15:26:36 I already have. Feb 02 15:28:42 if its clickable, it will get the click Feb 02 15:33:59 danijoo: it does not. I had to let the parent be larger and then the onClickEvents are passed to the children. Feb 02 15:34:33 if you dont show what you are actually doing, noone can help you Feb 02 15:35:02 he works for CIA Feb 02 15:35:28 source top secret ? Feb 02 15:39:13 http://pastebin.com/XzXnTNz4 can someone confirm that this is a valid way to access the payment informations from my backend? Feb 02 15:39:24 assuming all the variables are correct Feb 02 15:41:09 ive been researching for an hour and i still didnt find. Is it possible to zip/unzip a bitmap image that taken from contact list ? Feb 02 15:47:03 yes Feb 02 15:53:39 http://developer.android.com/google/play/billing/billing_integrate.html states "make sure to check the returned data signature, the orderId, and the developerPayload String" - However in the API I can't seem to find an orderId. Do they mean the token? What does data signature mean specifically in this context? Feb 02 15:56:09 https://developers.google.com/android-publisher/api-ref/purchases/products Here is the API reference. Both Purchases.products and Purchases.subscriptions are relevant Feb 02 15:59:43 ugh how the hell do you give the FusedLocationProvider mock locations? Feb 02 16:02:53 what is this method used for http://developer.android.com/reference/android/telephony/SmsManager.html#sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent) ? how can you listen to an SMS on a port ? I thought ports were about tcp/ip Feb 02 16:04:03 i dont see any sms in inbox and the other part also doesn't seem to receive anything Feb 02 16:06:25 Can subscriptions have a developer payload? Feb 02 16:56:05 hi all Feb 02 16:56:20 I need to get inspired but I cant find a nice form to re-create Feb 02 17:11:08 Is there a way to get proguard to play nice that doesn't involve -dontwarn almost.everything.** Feb 02 17:13:39 Estel, no Feb 02 17:14:02 the warning is there for you to check if its ok that its thrownn, and ignore it or update your settings Feb 02 17:25:19 <_genuser_> JakeWharton: Jake, you around? Feb 02 17:26:00 Estel: https://github.com/krschultz/android-proguard-snippets Feb 02 17:26:23 thanks Feb 02 17:26:39 <_genuser_> JakeWharton: I've created a new class subclassing RequestHandler and loaded the image myself. But I run out of memory just on six pictures. they're about 2MB each. Feb 02 17:27:30 <_genuser_> JakeWharton: I also tried picasso with very small 56K jpg files and loaded using .load(String path) method and that has other issues where it resizes the GridView to 3/4th of the screen if I use picasso in my imageadapter. Feb 02 17:27:50 2MB compressed? Feb 02 17:27:57 Or 2MB uncompressed Feb 02 17:28:07 <_genuser_> 2MB jpegs. So uncompressed bitmaps would probably be bigger. Feb 02 17:28:41 Bitmaps use width*height*4 bytes of memory Feb 02 17:29:12 <_genuser_> SimonVT: so a lot. :) yeah, I'm just discovering the joys of bitmaps and out of memory errors. Feb 02 17:29:30 That's why you scale Feb 02 17:30:44 <_genuser_> SimonVT: you read it in a bitmap, scale it down and load that into the display. Is that it? So originally you'll create a bigger bitmap but then you'll scale it down and let go off other memory? Feb 02 17:31:31 BitmapFactory can scale it as it decodes Feb 02 17:32:23 Ideally that's what you want to do Feb 02 17:33:07 indeed. return a stream from your request handler and it'll all happen by magic Feb 02 17:35:54 <_genuser_> SimonVT: I see. I'm using BitmapFactory.decodeFile(String, Options) and those options can dictate how it scales it down, correct? Feb 02 17:36:29 <_genuser_> JakeWharton: so I guess, when I write my own subclass or RequestHandler for using with Picasso (because I really want to use the lib), I should create them scaled to conserve memory? Feb 02 17:36:42 <_genuser_> s/subclass or/subclass of/ Feb 02 17:37:03 just return a stream of data, not a Bitmap Feb 02 17:38:03 <_genuser_> JakeWharton: return new REsult(Stream, DISK); ? Feb 02 17:38:07 yep Feb 02 17:38:15 then all the scaling and stuff will happen automatically Feb 02 17:38:20 <_genuser_> JakeWharton: ah, and then picasso will manage memory related issues for me. Feb 02 17:38:27 anyone not from China who released on xiaomi store a paid application? Feb 02 17:38:39 <_genuser_> oh the scaling can then be done using .resize(300,00).centerInside(), etc. Feb 02 17:42:12 <_genuser_> JakeWharton: I'm on v2.4.0 and Result only has one constructor: Result(Bitmap, LoadFrom); Feb 02 17:42:53 so it does Feb 02 17:42:59 guess i was thinking of downloader Feb 02 17:43:43 <_genuser_> I see, so back to creating a bmp myself using BitmapFactory.decodeFile(String, Option)? Feb 02 17:44:05 <_genuser_> or should I look into the downloader Feb 02 17:45:44 <_genuser_> hmm, sounds like I could just use the downloader and it doesn't need to know it's being "downloaded" from disk. Feb 02 17:56:33 <_genuser_> JakeWharton: second thing I noticed: have a default JpedAdapter for GridView. in getView() I use Picasso.with(mContext).load(mFile).resize(200, 200).centerInside().into(mView); Feb 02 17:57:16 <_genuser_> JakeWharton: I have about 45 small jpgs (56k each). When I scroll about half way down, the gridview is resized to 3/4th of the screen. any more touches and it loads it as a new list and jumps to first item. Feb 02 17:57:42 <_genuser_> JakeWharton: if I load the bitmap using BitmapFactory instead of picasso the GridView behaves properly. ....until it runs out of memory, of course. Feb 02 18:01:26 Probably not a Picasso issue Feb 02 18:02:16 <_genuser_> SimonVT: on one hand, I see it as "how could getview using picasso affect this?" on the other hand, when I don't do that, the gridview doesn't get mangled. Feb 02 18:02:46 <_genuser_> SimonVT: but I guess I could tinker with the gridview a bit. it's the only item in a linearlayout on the activity. Feb 02 18:03:08 Or create a simple test case Feb 02 18:04:27 <_genuser_> SimonVT: or that! :) intersting how fun projects are teaching me way more about android internals than I wanted to leran. Feb 02 18:05:44 hey guys, what would be "action" for an intent to open a url via chrome ? Feb 02 18:07:59 ACTION_VIEW Feb 02 18:14:41 thanks Feb 02 18:19:08 Hello, im looking for a library which provide table facility. generally used for showing csv file data. i need to store some numbers in row, columns. Feb 02 18:19:28 <_genuser_> Picasso mPicasso=new Picasso.Builder(mContext).downloader(new DiskDownloader()).build(); Feb 02 18:19:31 <_genuser_> mPicasso.load(mImages.get(position)).resize(300, 300).centerInside().into(mView); Feb 02 18:19:36 JakeWharton: I want to open a link via chrome using intents, can you help me with it's intent uri ? Feb 02 18:19:37 <_genuser_> shouldn't this at least call my download.load? Feb 02 18:30:44 <_genuser_> JakeWharton: I have implemented Downloader interface. created the custom downloder on an instance, used .load() on the instance of picasso, but the .load isn't even firing from the Downloader. Feb 02 18:31:02 <_genuser_> JakeWharton: any recommendations on how to debug this? How to determine why my downloader isn't being used. Feb 02 18:40:08 what's the Uri you're passing in? Feb 02 18:41:11 f2prateek: intent://example.com/#Intent;action=android.intent.action.VIEW;scheme=http;package=chrome;end Feb 02 18:41:29 it will only be called for a network Uri Feb 02 18:42:14 <_genuser_> f2prateek: is that for lxsameer or for my question? Feb 02 18:42:22 that last one was for _genuser_ , not lxsameer Feb 02 18:42:48 g00s_, you there? Feb 02 18:42:51 f2prateek: cool what do you think about the intent uri ? Feb 02 18:42:51 <_genuser_> f2prateek: so if I write my own downloader, it will still only be called for http(s)://, etc. etc? Feb 02 18:43:15 <_genuser_> f2prateek: just because I instantiated it and gave it a non network Uri, it will just ignore it then? Feb 02 18:43:43 anyone else here besides g00s_ and myself doing BLE devel or knows it? Feb 02 18:43:45 yes, because internally the downloader is only used by the network request handler Feb 02 18:44:34 <_genuser_> f2prateek: oh you speak the truth. I just prepended "http://" to my Uri and it went and called it. So I guess, I just have to parse it out on the other end and read a local file quietly. Feb 02 18:44:38 <_genuser_> lol Feb 02 18:44:53 <_genuser_> f2prateek: thanks for pointing that out. I was googling like crazy about "correct" downloader implementation. Feb 02 18:48:33 mark4 for one sec Feb 02 18:48:34 The cleanest way is to use a custom RequestHandler, but just copy the decoding method from the NetworkRequestHandler into your custom RequestHandler Feb 02 18:48:41 marienz, hw or sw? Feb 02 18:48:50 hi~ Feb 02 18:48:53 i got a question :) Feb 02 18:48:55 hang on Feb 02 18:48:56 hurry :) Feb 02 18:49:15 deviceGatt.setCharacteristicNotification(c, true); Feb 02 18:49:18 marienz, oops Feb 02 18:49:21 i do this when im enabling notifications Feb 02 18:49:26 im also writing the descriptor of course Feb 02 18:49:30 mark4, hw or/and sw? Feb 02 18:49:41 is it safe to NEVER change that true to a false when disabling notifications? Feb 02 18:50:27 ugh, I hate the maven android plugin Feb 02 18:51:44 mark4 um i dont know, why do you suspect its unsafe to call it with false? just gotta remember there is a local and device piece to this Feb 02 18:52:14 and just make sure eveything is done serially Feb 02 18:52:21 yes i assume that if it is false and a device notification comes in that the android api will go "errr i dont know this is enabled" and the callback wont happen Feb 02 18:52:41 but if i disable notifications on the device itself but leave that set to true would there be consequences Feb 02 18:52:47 hmm, are there any good bike sensors that do bluetooth le yet? Feb 02 18:53:03 I need some interewsting application... Feb 02 18:53:05 its not me. i want to set it to true/false when setting notifications to on/off Feb 02 18:53:38 someone else does not want to and i sort of follow his logic but it would be too difficult to write here Feb 02 18:54:36 i.e. once we set local = true does it matter if that is wrong :) Feb 02 18:56:41 i always do the remote and local at the same time Feb 02 18:56:59 haven't tried the other way Feb 02 18:57:14 as would i but it would be difficult to convince this other guy and i DO understand why, it does complificat things :) Feb 02 18:58:34 can some one please help me with my intent uri ? Feb 02 18:58:39 f2prateek: intent://example.com/#Intent;action=android.intent.action.VIEW;scheme=http;package=chrome;end Feb 02 18:58:57 how are you using it in code? Feb 02 18:59:25 i use an tag with that link as href in my web page Feb 02 18:59:36 mark4 how does it complicate things? Feb 02 18:59:56 Devices don't necessarily have chrome Feb 02 19:00:19 this is GENERIC ble code. its not code to write a specific descriptor, the code will work for any descriptor, the XML defines what the write is for Feb 02 19:00:27 what's wrong with the simple http link in the tag then? Feb 02 19:00:46 everything about this code is 100%generic. nothing specific what so ever. all the specifics are in the xml Feb 02 19:01:08 mark4 nice Feb 02 19:02:59 nice but SUPER complificated Feb 02 19:04:01 <_genuser_> haha, if I learned to code attentively, I wouldn't have wasted the last 30 minute chasing a bug. Feb 02 19:04:48 wooo first day at new job :) Feb 02 19:07:04 mark4 will it be open sourced ? Feb 02 19:08:36 <_genuser_> lasserix: congratulations. what do you do? Feb 02 19:09:11 mark4 i thought about putting the descriptions in xml, but it just seemed like another source of truth. if the device has good descriptors, its all there. Feb 02 19:09:42 in the end, to do something intelligent with the data, it has to know that this is not just an int, but that its the FrobNiz value Feb 02 19:11:54 mark4 this is what i've been using so far for the most part http://pastebin.com/rcNLutFw Feb 02 19:14:05 crap thats way better than my scratchings :P Feb 02 19:14:14 so lasserix ? Feb 02 19:14:16 what do you do? Feb 02 19:14:56 <_genuser_> OMG!!! 1hr to chase a stupid string.substring bug. Feb 02 19:15:13 mark4 i've waffled back and forth on making the read/write methods blocking, or returning observables. still experimenting though Feb 02 19:15:52 JakeWharton: Is there anything special I need to do for attribution in my app for Otto or Retrofit? Feb 02 19:16:03 * _genuser_ googles the verb "waffle" Feb 02 19:17:09 marl4 bbiab Feb 02 19:17:33 hello there, i'm a "beginner" in android programming and i'm facing a problem with custom views: http://stackoverflow.com/questions/28280070/custom-view-scrolling-zoom-problems Feb 02 19:17:49 would be gratefull if you could help me Feb 02 19:19:16 that's not beginner :P Feb 02 19:19:35 is it ok to have a tag in xml where there was no correspondingn tag? Feb 02 19:19:46 that's beginner Feb 02 19:19:54 yea mark4 Feb 02 19:20:08 ! xml are dumb :P Feb 02 19:20:20 it's driving me insane :P Feb 02 19:22:16 Anyone got any tips for streaming video from a web server to an android device? Feb 02 19:23:34 use an appropriate streaming protocol Feb 02 19:31:49 i might be missing something obvious, but how do I run tests against a release build? Feb 02 19:32:08 there is no differecne between a debug and release build Feb 02 19:32:28 and thats why the anser is: you dont Feb 02 19:33:50 danijoo: i have a case where in debug build has some extra UI elements Feb 02 19:33:55 that i want to test Feb 02 19:34:10 and ensure it doesn't exist in a release build Feb 02 19:34:16 you should make a debug-release-thing in gradle then Feb 02 19:34:24 s73v3r: I am not a lawyer. Both are Apache 2 licensed. Feb 02 19:34:30 which has release settings but is debugable Feb 02 19:35:08 s73v3r: so whatever that means you should comply with. I'm not going to tell you what to do or what not to do. Feb 02 19:35:16 Hey, I'm trying to get a service binding set up between two separate apps. I need to bind from the client app and call "Intent intent = new Intent(this, MyService.class);" but as MyService is in another separate class I can't get a reference to it. Am I doing something horribly wrong? Feb 02 19:35:46 stek1234, yes. you do something horribly wrong Feb 02 19:36:38 <_genuser_> JakeWharton: When returning an InputStream from a Downloader.load(), it's the actual contents of a .JPG file. That should be fine, correct? return Response(new ByteArrayInputStream(jpeg_content), false, jpeg_content.length); Feb 02 19:37:57 stek1234, also I would say: dont do it, you can still do it by passing the service class name as string Feb 02 19:39:30 pfn: what is "an appropiate streaming protocol" example? Feb 02 19:39:55 hls, rtmp, rtsp, rtp, etc. Feb 02 19:40:06 icupp Feb 02 19:40:13 you can also just open mp4 in a videoview *duck* Feb 02 19:40:36 what's a videoview duck? Feb 02 19:40:48 its like normal ducks Feb 02 19:40:53 but it can play videos Feb 02 19:41:07 or my english just sucks :p Feb 02 19:42:26 your english *ducks* Feb 02 19:42:31 true Feb 02 19:43:53 wait. normal ducks can't play videos? Feb 02 19:44:18 depends on the installed OS i think Feb 02 19:44:20 I thought that was just a thing waterfowl did. TIL. Feb 02 19:46:39 <_genuser_> wow, it's gotta be a slow day when a duck joke is entertaining so many so much. Feb 02 19:47:05 its a monday.. ^^ Feb 02 19:47:21 also I'm pre-coffee and pre-breakfast, despite it being lunch time :) Feb 02 19:47:29 also: duck joke. Feb 02 19:47:52 <_genuser_> yeah, I'm getting tired of writing RequestHandlers and Downloaders for Picasso. So I'm taking a break. Feb 02 19:48:02 and Im after work, after lunch and pre-beer Feb 02 19:48:52 on a totally unrelated note: ideavim plugin is pretty nice. I'm almost mouse-free in Studio now. Feb 02 19:51:44 <_genuser_> AndroidStudio? Feb 02 19:51:55 ya Feb 02 19:53:14 yeah, ideavim is great Feb 02 19:53:16 <_genuser_> I gotta try to move my project to it soon. I have AS working in general, just haven't moved my proj to it. Feb 02 19:53:26 it's the one killer feature that got me to switch from eclipse to intellij Feb 02 19:55:25 I'm pretty sure eclipse has vim plugins. though that combined with e.g. cmd-shift-A does let you get around quickly, _really_ easily, without a mouse. Feb 02 20:00:23 <_genuser_> eclipse itself is a pretty killer feature. I mean think of the develoeprs who jump off of cliffs daily because of eclipse... Feb 02 20:00:23 I got a string with this format: "2015-02-08T07:27:26Z", any good way to get it in Date() ? Feb 02 20:00:42 blusky, simpledateformatter Feb 02 20:00:46 part of regular java Feb 02 20:02:16 thx, gonna look into that :) Feb 02 20:02:21 god damn vim Feb 02 20:02:29 still not learned Feb 02 20:02:40 danijoo: but what does the "T" and "Z" means ? Feb 02 20:02:54 if I have a buildType set up that isn't release, but I have a keystore set up for it, say, assembleBeta, it should be signed with the key, right? Feb 02 20:02:54 blusky: they're separators for "time" and "time zone" Feb 02 20:02:56 If I have a view that is supposed to contain content (say, an ad) that is loaded in the background, should I keep a weak reference to that container view, just in case it is removed from the screen (i.e. closing an activity) Feb 02 20:03:17 can someone double check that this function does what I think it does? http://pastebin.com/2s8Qa7xr Feb 02 20:03:22 blusky, you can ignore both i think Feb 02 20:03:42 afaik the 'T' seperates the date from *T*ime Feb 02 20:03:44 mmmh... it's a time sent by an API, I think it should differ depending timezone in fact Feb 02 20:03:58 blusky: that's one of the most-common string-forms of dates, the ISO-8601 format. pretty much every device on the planet can read it. Feb 02 20:04:09 id guess its UTC Feb 02 20:04:21 ok, let's try it :) Feb 02 20:04:28 Z with no value after it is UTC: http://en.wikipedia.org/wiki/ISO_8601 Feb 02 20:05:08 just looked it up. "T" is a divider as I said, and for Z, see ^ Feb 02 20:05:28 im curious why its a Z though Feb 02 20:06:08 quite possibly "zone" from "time zone", since "T" is already taken. though I dunno for sure. Feb 02 20:06:25 maybe Feb 02 20:06:51 or Z(ero) offset Feb 02 20:07:04 should I use this ? https://github.com/dlew/joda-time-android Feb 02 20:07:07 or is it overkill ? Feb 02 20:07:27 if you only want to parse that string into a date, its overkill Feb 02 20:07:35 because its a oneliner with plain java and no lib Feb 02 20:07:59 ok :) Feb 02 20:08:01 thx ! Feb 02 20:08:05 if you do a lot of time manupulation, yoda is pretty cool and mighty Feb 02 20:08:13 Hello Feb 02 20:09:46 ohayo Feb 02 20:09:59 Anyone here collect vinyls? Feb 02 20:10:15 Z == Zulu Time Feb 02 20:10:21 another name for UTC Feb 02 20:10:31 ^^ danijoo Feb 02 20:11:33 so military just though UTC is to mainstream? Feb 02 20:11:58 "lets do our own timezone which is the same as UTC, but with a Z in it!" Feb 02 20:12:56 <_genuser_> oooh some dude is ranting about Volley online. might give that a shot too. Feb 02 20:14:24 Wheres a good place to go to talk about an app idea I have? Feb 02 20:14:49 I don't want to be one of those dudes that like "hey guyz i have dis great idea you should make da app" Feb 02 20:14:56 do you want to get somebody to code it? Feb 02 20:15:00 Yes Feb 02 20:15:23 All I have is the idea -- i have minimal programming/design knowledge Feb 02 20:15:50 :v Feb 02 20:16:10 I need to see if its even possible to do, or whats the best way to go about it Feb 02 20:17:15 <_genuser_> tarsier_: you share you idea. you explain what you can do and what you need. You give away ownership of the idea based on how much someone does for you. Feb 02 20:17:32 Gotcha Feb 02 20:17:34 Am I the only one who thinks it's crazy that there is no open-sourced / community version of the raised button in Material Design? Feb 02 20:17:35 <_genuser_> tarsier_: and of course, you have to trust the other person. and most importatly you don't own the idea anymore as soon as you share it in public. Feb 02 20:17:35 Thanks _genuser_ Feb 02 20:17:37 Unless I can't find something Feb 02 20:18:12 <_genuser_> achuinard: I thought the whole point of Material Design was "we hate microsoft but damnit the simplified UI looks really good. we'll replicate it and call is material design". Feb 02 20:18:33 _genuser_: I don't care what the point is, I want to add a raised button into my app Feb 02 20:18:50 I didn't come here for politics Feb 02 20:18:52 I came here for code Feb 02 20:18:53 <_genuser_> achuinard: I'm sorry, I just meant I didn't think it offered much raised UI. Feb 02 20:18:57 achuinard, you mean this floating action button thingy Feb 02 20:19:06 ? Feb 02 20:19:15 not the floater Feb 02 20:19:18 there are some solid floater libs Feb 02 20:19:20 i'm talking about http://www.google.com/design/spec/components/buttons.html#buttons-flat-raised-buttons Feb 02 20:19:53 huh? isnt that a standard button with a background drawable? Feb 02 20:20:05 at least my buttons with background drawable look like this. Feb 02 20:20:29 yea, but there's always more to it than just a standard drawable Feb 02 20:20:37 you've got the pressed / unpressed Feb 02 20:20:49 so its a selector drawable. Feb 02 20:20:50 so you've got 2 bg colors, which should really be abstracted into XML buttons on a plain old Button object Feb 02 20:21:04 XML attributes Feb 02 20:21:21 like floater:pressed and floter:unpressed Feb 02 20:22:01 maybe we're just spoiled by gradle libs and open source but it really seems like there should be a standard version. there's some elevation / shadow and a certain degree of corner-roundedness - doesn't it make sense that this is something shared and reused by the whole community? Feb 02 20:22:14 so its an state-list with 3 states (3 colors) and if you want to go fancy a ripple effect. Feb 02 20:23:04 so every dev who wants to implement this raised button has to spend a few hours writing a reusable implementation across the app (XML-attribute wise) along with figuring out selectors and small UI details? Feb 02 20:23:36 huh? its just an xml drawable (< 20 lines) and a style where you set that drawable Feb 02 20:23:44 its pretty basic if you ask me Feb 02 20:24:14 in fact its not more work than it was before material design Feb 02 20:24:24 we're just not connecting here Feb 02 20:24:37 anyone have a device free (handy) and a few minutes ? Feb 02 20:24:39 <_genuser_> all this selectors stuff does take a bit of time sorting it out. Feb 02 20:24:55 http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7SDNoT21jRWJkZG8/components_buttons_keyline3.png Feb 02 20:24:55 <_genuser_> but if you have it correctly design for you app, you can reuse it for other componenets. Feb 02 20:25:06 there are 2 diff raised buttons Feb 02 20:25:15 diff text color, diff bg color, and different selected colors Feb 02 20:25:53 you're telling me, instead of having 2 Button declarations in my XML along with maybe 3 attributes on each button (pressed, unpressed, and text color), you think it's okay to have 2 20 line XML drawables? Feb 02 20:26:47 no but im thinking the other way arround Feb 02 20:26:59 for me its overkill to write/include a library just to save 20 lines of code Feb 02 20:27:14 especially if its 20 lines I can copy/paste from project to project Feb 02 20:27:41 does anyone have the file Tiamat_N1-v4.1.0.zip ? Feb 02 20:29:05 If you go this far with libraries, you could also have a library for styling cardviews, toolbars, checkboxes,.. Feb 02 20:29:21 yes, there is one, the AppCompat lib Feb 02 20:29:25 but well.. I dont thik this i a topic to argue about Feb 02 20:29:25 and they don't have the material button support yet Feb 02 20:29:34 its just taste. Feb 02 20:29:40 I like my 20 xml lines :) Feb 02 20:30:09 they have. you use the default button, and throw a simple xml on it. so its literally the same for styling cardviews Feb 02 20:30:19 they even look the same! Feb 02 20:30:34 you could use cardviews and a user woudnt even notice :p Feb 02 20:31:56 using a cardview is what is recommended Feb 02 20:31:58 does anybody know how I can detect a gesture in a view's OnTouchListener without consuming the MotionEvent? Feb 02 20:32:05 so i think any lib that does all the nitty gritty would just be a class extending CardView Feb 02 20:32:15 which I'd love to copy /paste in my app as well and have those 3 XML lines resusable Feb 02 20:32:34 returning false in onTouch(MotionEvent event) causes the gesture to never be detected Feb 02 20:32:50 achuinard, write one then :) Feb 02 20:32:55 returning true consumes the event and therefore the actual view does no longer receive the MotionEvent :S Feb 02 20:32:59 I JUST MAY Feb 02 20:33:06 I might use it if it can convince me Feb 02 20:33:29 But I think most dont need a library for such a small thing (opinion) Feb 02 20:37:01 huh. i was just at weather.com with my 2013 N7, latest Chrome - and a popup said 'Your android may have a virus. Please visit xxxx" Feb 02 20:37:10 sounds legit Feb 02 20:37:19 ya Feb 02 20:37:24 g00s_: better download the apk they offer you Feb 02 20:37:32 and install it right away, with root rights please Feb 02 20:37:39 is there a method/function to grab the ID of every TextView element and pu them in an array? Feb 02 20:37:40 so i guess weather.com ad network is pusing shady stuff Feb 02 20:37:51 yeah Feb 02 20:38:00 i guess thats a good segway into http://phandroid.com/2015/02/02/google-is-paying-adblock-to-unblock-their-ads/ Feb 02 20:38:12 Online ad networks are really hard to police Feb 02 20:39:15 <_genuser_> g00s_: lol and lol on both news. Feb 02 20:39:52 <_genuser_> g00s_: I have seen ads being served on decent sites, where they start downloading an .exe. It think it's pretty hard for ad networks to police the shady people. Feb 02 20:40:46 most ad networks already have "no anti virus ads allowed" in ther TOS Feb 02 20:41:03 because those are 100% scam. or at least 99.99999 Feb 02 20:41:17 but i think its really hard to control it Feb 02 20:41:36 yeah. think about it. Someone uploads 100,000 ads to the ad network. Feb 02 20:42:08 Said ad network crawl all 100,000 URLs. Each page has to be loaded into a VM for windows, android, OSX, and after the URL is loaded, you need to scan the OS, and see did any changes happen. Feb 02 20:42:19 any downloads need to be sent through a virus scanner. Feb 02 20:42:36 Meanwhile, the customer is saying "Hey, we'ed like to start giving you money now, what are you waiting on ?" Feb 02 20:42:38 Well. I think most of them just filter for words like virus in it Feb 02 20:42:42 and block them Feb 02 20:42:55 Google don't :) Feb 02 20:43:26 And of course, as the only company that knows the URLs exist is the Ad Network, the scammer shows *them* malware free ads, then waits a few days, and shows other IPs the malware. Feb 02 20:43:42 you mean google admob? Feb 02 20:43:50 To a lesser extent. Feb 02 20:43:57 hibernation trick Feb 02 20:43:58 Mobile ads are still hard. and new. Feb 02 20:44:01 so old technic Feb 02 20:44:18 google admob does put them into a seperate category "anti virus software" Feb 02 20:44:35 and every monetizer can turn the switch to not have that kind of ads on his site/app Feb 02 20:45:07 you know, when parental control failed (like child app got pr0n ad), don't expect too much about real security Feb 02 20:45:12 fails* Feb 02 20:45:46 http://prntscr.com/60awuc Feb 02 20:46:19 i'm using admob too danijoo :) Feb 02 20:46:34 :> Feb 02 20:46:54 im using admon, chartboost, millenialmedia and mopub Feb 02 20:46:57 by the way, first time I'm trying, i've created few weeks ago an account on xiaomi store, i've pushed an app today to be released on their store, waiting for reviewal process to finish Feb 02 20:46:58 admob* Feb 02 20:47:20 Amusingly, the guy who started the original AdBlock used to work on Google's Ads SRE team. Feb 02 20:47:23 I was suprised to see that they don't provide paid application, only free, though it seems they got an in-app sdk Feb 02 20:47:29 blocked those supspecious antivir ads whereever its posible Feb 02 20:47:41 i block casino gambling too iirc Feb 02 20:47:43 pure scam Feb 02 20:47:47 yep Feb 02 20:48:02 bigvalen, ahah, i did not know that Feb 02 20:48:07 danijoo, What do you think of the various mobile ad networks ? Which ones seem more profitable ? Feb 02 20:48:17 (Adblock != Adblock Plus) Feb 02 20:48:27 you have to use mediation when using various mobile ad networks Feb 02 20:48:37 I think this also helps with revenue (cant proove it tough). Nobody clicks on a casino ad purposly Feb 02 20:48:37 Adblock always had a "Show Google Ads" button, because he wasn't that annoyed by them) Feb 02 20:48:38 it's the only way to manage and maximise properly Feb 02 20:48:53 adq: as in use multiple ones, and do some sort of bidding ? Feb 02 20:48:55 i made some blog posts long time ago: Feb 02 20:49:08 http://tentacleintheads.blogspot.fr/ Feb 02 20:49:16 but it's outdated i guess now Feb 02 20:49:23 bigvalen, for a long time admob was by far the most rentable. but somehow my CTR dropped by 60% in anuary Feb 02 20:49:25 no idea why Feb 02 20:49:29 so atm its mopub Feb 02 20:49:34 bigvalen, bidding is for advertiser, not publisher Feb 02 20:50:12 anuary = january Feb 02 20:50:14 it's more like a weighing machine, the mediation Feb 02 20:50:31 you will take the ads to display from the store which give you the most Feb 02 20:50:57 and depending the ad provider, it can be several factors for "the most", like highest cpm, or a better fill-rate, etc Feb 02 20:50:59 danijoo, Good to know. Feb 02 20:51:01 most of the time it's floored with ecpm Feb 02 20:51:17 that was the time I switched to mopub to use multiple ad networks Feb 02 20:51:30 if one begins to bitch arround, it uses anotherone automagically Feb 02 20:51:48 i only tested few ad networks, including admob Feb 02 20:51:53 but many are very suspicious :( Feb 02 20:52:03 or worst, agressiv against the user and/or the device Feb 02 20:52:05 adq: so you don't want to show ads you dont' think will get clicked ? Feb 02 20:52:12 I was also scared because of all those horror stories you hear about admob Feb 02 20:52:24 "my account got banned without notice and i lost 1000$" Feb 02 20:52:29 bigvalen, you don't want to show ads which will give you less Feb 02 20:52:35 from a revenue perspective Feb 02 20:52:39 * bigvalen nods Feb 02 20:52:39 thats on reddit every 2nd day Feb 02 20:53:13 i've set up a roof near 500$ before paiment Feb 02 20:53:17 so you cannot lose much Feb 02 20:53:30 but admob got strict policies Feb 02 20:53:33 and it's good Feb 02 20:53:33 yep Feb 02 20:53:39 I agree Feb 02 20:53:40 Yeah, most of them are people trying fraud, sometimes accidentally. But any automated system is gonna miss & shoot the wrong people. The ED-209 of the internet. Feb 02 20:53:46 i heard about some ppl clicked only three times in their ads when testing their app Feb 02 20:53:48 and they got banned Feb 02 20:53:55 nevertheless those stories make life feeling risky :p Feb 02 20:53:56 Ouch. Feb 02 20:54:02 lol indeed Feb 02 20:54:14 ED-209 :)) Feb 02 20:54:26 dreadnought style Feb 02 20:54:28 same for those auto-account bans in developer console Feb 02 20:54:52 most of the banned people deserve it Feb 02 20:55:20 happened to me, up to the account termination and appeal rejection, luckily and showing many proof + social leverage, I got it reinstated Feb 02 20:55:27 few monthes ago Feb 02 20:55:41 lucky you. Feb 02 20:55:49 very Feb 02 20:55:53 now i'm totally paranoid Feb 02 20:56:05 using wordcounter on my store description to avoid any redundancy Feb 02 20:56:08 and even more than that Feb 02 20:56:31 yeah. I heard of people getting banned for "THis product is not endorsed with XYZ" and they got banned because mentioning XYZ ^^' Feb 02 20:56:47 while its in XYZ's policy that they have to add this sentence in their description Feb 02 20:56:55 yeah i have heard that too Feb 02 20:56:56 Nice. Feb 02 20:57:04 and thats just rediculous Feb 02 20:57:14 or XYZ requires some legalese bit and that trips the filter, same thing Feb 02 20:57:22 playstoregate is the new keyword for that Feb 02 20:57:22 * bigvalen was working with A Big Multinational. They had 3 people full time doing trademark takedowns on a single ad network. Feb 02 20:57:25 it's nuts. Feb 02 20:57:57 it depends :' Feb 02 20:58:00 question: how am i supposed to develop BLE code when the guy with the ONLY phone in the company that supports BLE is hogging it? Feb 02 20:58:11 it is HIS phone tho lol Feb 02 20:58:44 <_genuser_> so in res/layout I have gridview_item.xml Feb 02 20:59:03 mark4, :D Feb 02 20:59:04 <_genuser_> I can't do inflater.inflate(R.layout.gridview_item, null); it doesn't recognize R.layout.gridview_item Feb 02 20:59:12 is this a retoric question ^^ Feb 02 20:59:23 <_genuser_> anybody got a clue how to address this? It's not seeing any of my layouts like it normally does in other projects. Feb 02 20:59:29 maybe :) Feb 02 20:59:30 mark4 its impossible :( Feb 02 20:59:58 g00s_, its also extremely annoying, he is keeping HIS phone so he can work on the code im assigned to do Feb 02 21:00:14 what kind of company is this :) Feb 02 21:00:20 exactly lol Feb 02 21:00:26 lol Feb 02 21:00:34 there should be dev phones and personal use devices Feb 02 21:00:34 one that does NOT give its developers the tools it needs to do the job they hired them for Feb 02 21:00:34 _genuser_, does it not recoginice the source or R Feb 02 21:00:53 well.. they are paying me a pittance for doing complex engineering so if im sitting here with my thumb up my ass its their call Feb 02 21:00:59 mark4 the ble docs basically dont say shit about how thinsg work in the real world, you have to poke it Feb 02 21:01:08 mark4, exactly Feb 02 21:01:20 this sounds like a "paid free day" if you cant get the phone :p Feb 02 21:01:30 g00s_, try implmenting ISA PNP code some time Feb 02 21:01:41 <_genuser_> danijoo: R.layout are recognized. But then the xml layout isn't recognized. Feb 02 21:01:55 <_genuser_> I cleaned the project to clear it out. Feb 02 21:01:59 adq this looks like a good book http://www.amazon.com/Black-Box-Society-Algorithms-Information-ebook/dp/B00RLHMOO0 Feb 02 21:02:03 thats strange Feb 02 21:02:11 i spent EIGHT FREEKING MONTHS developing low level ISA plug and play code. 2 weeks to isolate, 2 weeks to probe resources, rest of time to program each device with the resources they need... i.e. ONE device Feb 02 21:02:16 unfortunately, many areas of society work like this (playgate) Feb 02 21:02:20 <_genuser_> danijoo: let me restart eclipse just for SnG. Feb 02 21:02:27 g00s_, fiction or real? Feb 02 21:02:29 ah eclipse Feb 02 21:02:30 real Feb 02 21:02:32 mark4, back before decent logic analyzers ? Feb 02 21:02:33 that might be the reason ^^ Feb 02 21:03:04 <_genuser_> danijoo: well, it's never done that thing before tho. strange. restarting eclipse now. Feb 02 21:03:24 bigvalen, what logic analyzer, this was for bally gaming in las vegas. they designed their own 386 motherboard and put a creative labs vibra 16 sound chip on it. i had to make that chip work Feb 02 21:03:35 with just the ISA PNP spec Feb 02 21:03:53 g00s_, looks interesting, but i'm a bit against the "transparency" thingy despite I totally acknowledge the white box model vs blackbox/obscurantism Feb 02 21:03:54 only reason i had to do this was because they were too cheap to BUY a bios for their 386 Feb 02 21:04:00 probably more semantic than technical Feb 02 21:04:12 day i handed over the code in a 100% working state they had the BIOS sales people walking in through the door Feb 02 21:04:24 they took one look at the northbridge and went screamin for mamma lol Feb 02 21:05:04 thats ok. 9 months at 50 hours a week at $45 an hour including per diem Feb 02 21:05:14 those were the good old days lol Feb 02 21:05:28 now you are working on android bLE hahah Feb 02 21:05:40 <_genuser_> nope, that didn't do anything either. Feb 02 21:05:40 for $600 a week pre-tax Feb 02 21:05:45 gimme something fun to work with on ble Feb 02 21:05:53 I can't find any cool sensors that I want to use Feb 02 21:06:07 <_genuser_> anybody got any ideas on why eclipse/my-project wouldn't recognize R.layout. ? Feb 02 21:06:13 TI sensortag is cool Feb 02 21:06:19 _genuser_: Wrong R import Feb 02 21:06:21 pfn go get a ubertooth and get some beacon devices like bluecats or gimbal Feb 02 21:06:25 _genuser_, your xml name contains capital/uppercase letter? Feb 02 21:06:39 or there is a weird error in this xml content or another layout, sometimes it's almost silent Feb 02 21:06:41 write code to interface with those devices WITHOUT using their native APIs supplied by the manufacturer Feb 02 21:06:47 thats something i want to do Feb 02 21:06:47 so this break the parser and prevent you to use the layout Feb 02 21:06:50 happened to me few times Feb 02 21:07:05 g00s_, im working with a ti sensortag lol Feb 02 21:07:14 my code is generic but thats the test device Feb 02 21:07:24 mark4 although, the sensortag app crashes right away on my n7 Feb 02 21:08:05 g00s_, i dont use the sensortag app, there a guy that did a tutorial on ble and he has a sensortag app that only enables 3 of the seonsors, erm actually 2 because one of them also gives temperature Feb 02 21:08:22 yeah dave smith Feb 02 21:08:32 <_genuser_> SimonVT: oh, I'm importing the wrong R file? where do I correct it? in project Build? Feb 02 21:08:45 yes but his state machine running through the onXyzzy() callbacks is no good for me Feb 02 21:08:45 <_genuser_> adq: no, no uppercase letter. "gridview_item.xml" Feb 02 21:08:47 In your import statements.. Feb 02 21:08:59 I'm just guessing tho Feb 02 21:09:08 <_genuser_> SimonVT: I see it. my R.java file does contian the reference to the elements. Feb 02 21:09:25 <_genuser_> import android.R; Feb 02 21:09:33 Well there you go Feb 02 21:10:07 <_genuser_> that was it, thanks. :) it's fine now. now onto solving the actual frickin' problem. :) Feb 02 21:10:32 mark4 yeah, that is kinda a problem. the binder thread doesn't have a looper so you can send your own events to it - there are some concurrency issues https://groups.google.com/forum/#!topic/android-developers/v65-0hNYI7w Feb 02 21:10:43 s/can/can't !! Feb 02 21:11:37 now in his scenario, he may have screwed something up, but they are just throwing these mutable objects between threads with no synchronization Feb 02 21:11:47 g00s ya Feb 02 21:12:03 :) Feb 02 21:12:21 it would have been so much better if the apis had a callback per operation. not a god callback Feb 02 21:12:47 its pretty hard to match request / response Feb 02 21:13:21 i stack up descriptor reads/writes etc in a command queue and after firing one of those i do a while(!flag); and in the onXyzzy() callback i clear that flag so the next command can be fired. thats MAJORLY FREEKING STUPID that i have to do that Feb 02 21:13:35 i didn't implement it yet, but i'll probably have a counter for timeout and mismatched req/responses and recycle the connection Feb 02 21:13:58 mark4 yeah some trampolining Feb 02 21:14:27 yea i said skrew it for the time out for now, i AM doing a sleep() and can count the number of times i sleeped waiting for flag to flip Feb 02 21:14:30 just didnt do so yet Feb 02 21:14:33 well if you looked at my code i used SynchronousQueue as a rendezvous channel Feb 02 21:14:37 so read blocks Feb 02 21:14:55 correct me if i'm wrong, but the Android manifest file in debug (if it exists) gets merged into the apps manifest file? Feb 02 21:15:01 its got a timeout of course, i had 7 seconds or something Feb 02 21:15:23 mark4 and you will notice the reentrant lock with fairness=true also Feb 02 21:15:29 erm wait. what a MORON lol. in my handleMessage i just call synchronized _handleMessage() lol Feb 02 21:15:31 duh Feb 02 21:15:37 <-- i are bad java coderz Feb 02 21:16:12 erm no that wont work crap Feb 02 21:16:15 you didn't convince them to use forth ? Feb 02 21:16:16 i have to use my stupid flag Feb 02 21:16:47 g00s_, actually when i told my boss i had a android native library i was eveloping that allowed for run time script compilation and execution his eyes lit up lol Feb 02 21:17:12 my above synchronized plan wont work Feb 02 21:17:34 because writeCharacteristic and readCharacteristic etc are NOT blocking. Feb 02 21:17:42 they dont block till the char has been read/written Feb 02 21:18:56 anyone use cfm in android? Feb 02 21:19:48 <_genuser_> dang, so importing in huge pictures every single time into a gridview even using picasso is preeeeeeeeeeeeeeeeeetty slow. Feb 02 21:19:48 lasserix: Cold Fusion Markup? Feb 02 21:19:53 yea Feb 02 21:20:07 guess some json includes cfm data for presenting barchart Feb 02 21:20:09 <_genuser_> I think I need to generate thumbnails on picture import and only use those with picasso and. Feb 02 21:21:03 _genuser_: probably, yeah. thumbnails aren't too big to store, and you can just stick them in the cache folder so people can wipe them out if they're bored / need space. Feb 02 21:21:32 im also having listView problems Feb 02 21:22:01 <_genuser_> groxx: true. I guess I was looking for a solution where I point picasso at a folder and amazing fireworks happen and princesses get married to their princes and they all have 2 kids each. Feb 02 21:22:02 man, the amazon kindle app ... when i go to "Store" ... the web stuff is sooo janky. i wonder if thats because webview, or they are using some shitty cordova crap Feb 02 21:22:15 i have a listview defined in my layout, i have a list item xml file, i have a adapter and an arrayList and im not getting ANYTHING displayed Feb 02 21:22:31 actually is pointless trying to fix this right now, i have no development phone to test with Feb 02 21:22:32 blargh Feb 02 21:22:37 <_genuser_> mark4: you've done .setAdapter()? Feb 02 21:22:56 yes Feb 02 21:23:11 listView.setAdapter(bleAdapter); Feb 02 21:23:45 bleAdapter.notifyDataSetChanged(); <-- i do this too Feb 02 21:23:46 _genuser_: sorry. the princess is in another castle. Feb 02 21:24:44 <_genuser_> groxx: as long as she's getting married and having 2 kids!! why can't picasso deliver on that! Feb 02 21:25:16 _genuser_: even with 2 kids, given mortality rate they'll eventually cease to exist. Picasso isn't _that_ magical. Feb 02 21:25:53 i cant even work on my OWN shit here lol because my target is at home :P Feb 02 21:26:05 <_genuser_> groxx: yeah, understood. It's still running on a device running.... java! and dealing with memory management. :) Feb 02 21:26:16 somebody email me a BLE ready android! Feb 02 21:26:39 <_genuser_> groxx: I have it working fine without running out of memory by forcing System.gc() but that defeats the point of using picasso in the first place. Feb 02 21:27:12 <_genuser_> groxx: but the kinda stuff I'm doing it just way too much file i/o and bitmap creation. Feb 02 21:27:45 _genuser_, dont throw away resources, use a pool factory Feb 02 21:28:03 pool your bitmaps and paints and what have you Feb 02 21:28:47 https://gist.github.com/772b3bf1f98a92a7c0e9 Feb 02 21:28:51 <_genuser_> mark4: write my own pool factory? Feb 02 21:29:03 i just pasted yu the code :) Feb 02 21:29:15 http://codepad.org/Q7vzRh4m Feb 02 21:29:17 and heres one use case Feb 02 21:30:26 you can now create a pool of ANY you want :P Feb 02 21:31:10 tho im not sure this will work for Bitmap types, erm Feb 02 21:31:45 <_genuser_> I see. it's just that the whole recycling views and bitmaps... would have been nice to just throw picasso at it and have it take care of everything. Feb 02 21:31:47 mark4, I was always amazed at how much the Bally guys had to do with stimulating early computing Feb 02 21:31:59 <_genuser_> and honestly, I've only played with it for one day. It might still come thru. Feb 02 21:32:13 They are mentioned a good few times in the great book on Commodore. Feb 02 21:32:29 bigvalen, ive not worked for them in years, they were in full on "foot in self shoot" mode when i did Feb 02 21:33:00 they had some games ya but they are more famous for the GAMING machines, not games Feb 02 21:33:05 i.e. 1 arm bandits Feb 02 21:33:22 * bigvalen has the rage, as he spent 30 mins debugging an LED that was supposed to be lit from an android MQTT app to an ESP-01...and it was a faulty LED. Feb 02 21:33:24 DAMMIT Feb 02 21:33:41 lol Feb 02 21:33:43 mark4: they knew their old market, I suppose. Feb 02 21:33:50 Anyway. Screw it. It works now. Feb 02 21:34:00 Now, it's relay time. Feb 02 21:35:49 is there something that lets me pull XML elements into the Java, other than coding them in myself? Feb 02 21:37:28 like, I have a lot of TextViews in the XML. can I pull all TextView elements into an array in the Java without manually adding them? Feb 02 21:39:38 bigvalen: how's MQTT working for ya? Feb 02 21:40:26 <_genuser_> heh, I need to have a "loading..." image in all the gridviews until it actually loads the pictures. Feb 02 21:40:41 _genuser_: they take that long to laod? Feb 02 21:43:28 newbQ: findViewById(), or getChildrenCount() + getChildAt(i), but no. there's nothing built in to do exactly that (and there shouldn't be, it's awfully specific) Feb 02 21:43:34 bigvalen are you using the mqtt client alone, or their android service ? Feb 02 21:45:19 groxx: thanks. Feb 02 21:45:38 is there a better way to dynamically update Feb 02 21:46:28 storePassword System.console().readLine("\nKeystore password: ") Feb 02 21:46:36 a chart? I have mine setup as textviews within tablerows within a table view within a scroll view. Feb 02 21:46:37 I get an error when I try to do that Feb 02 21:46:40 newbQ: hm. not that I know of... though if it's dynamic, you're putting them in somewhere, so you should be able to keep a reference there. Feb 02 21:46:53 Anyone here familiar with RxJava before I go down this hole? Can you do something subscriber.doOnCompleted(action1).doOnCompleted(action2) and have them both execute on completion of the observable? Feb 02 21:47:21 could not find method storePassword() for arguments Feb 02 21:47:27 hwrdprkns, you use two subscribers. Feb 02 21:52:14 <_genuser_> groxx: very! basically, I read some off the web, some from db, and some are part of a big binary file where I have the starting/ending byte location of the jpeg stored in there as byte array. Feb 02 21:52:43 <_genuser_> groxx: so it means my customer picasso RequestHandler has to read them in, read in the entire bytearray, and then pass it to picasso which will then resize and display. Feb 02 21:53:01 <_genuser_> groxx: and picasso is pretty cool at mem mgmt but all the juggling makes all this slow. Feb 02 21:53:35 funky Feb 02 21:53:59 why read the whole thing though? seems like it should be stream-able, just skip(start) and EOF at end. Feb 02 21:56:03 <_genuser_> groxx: basically, it's a jpeg blob. multiple images stuck in a single file along with some meta data. read in teh whole thing, meta data, individual image locations, parse out those and done. Feb 02 21:56:09 groxx, I'm using Mosquitto on my home Nas Feb 02 21:56:13 NAS, even. Feb 02 21:56:19 <_genuser_> groxx: I could streamline so it's read in only once. I"m working on that bit. but it's just a convoluted mess. Feb 02 21:56:29 It's mostly working, though damn, the esp8266 SDK has .. elusive documentation Feb 02 21:57:08 bigvalen: ah, interesting. I guess that has the benefit of working with most internet-able things Feb 02 21:57:27 Indeed. Feb 02 21:57:44 * bigvalen uses pubsub a lot in work, it's a really powerful way of hooking things together with minimal pain. Feb 02 21:58:10 Hopefully Android Wear can invoke an activity for me that'll publish stuff later. Feb 02 22:00:44 i've added a debug AndroidManifest but none of the permissions I set in there seem to be picked up when I try to call checkCallingOrSelfPermission Feb 02 22:02:19 yay i haz the ble phone now :P Feb 02 22:06:01 good evening Feb 02 22:06:57 Mavrik: How do I add two subscribers to an observable? Feb 02 22:08:25 trying out a new to me irc client.... Feb 02 22:08:36 does anyone mind saying anything? Feb 02 22:08:48 ChopEmIntoHaggas: Feb 02 22:08:54 awesome, thanks Feb 02 22:11:07 I don't know what I'm doing wrong here, but I keep getting an error saying that it cant get past line 10 because the variable is null Feb 02 22:11:43 even though the create function is called before the save function Feb 02 22:13:15 what happens on line 10? Feb 02 22:13:30 hwrdprkns: subscribe twice Feb 02 22:14:30 Ugh yeah I figured it out but I have to keep a reference to the observable which kinda sucks since I can't just .subscribe().subscribe() Feb 02 22:14:45 ChopEmIntoHaggas: I'm trying to get the size of an array to loop it, but the array is somehow null. even though I just populated it. Feb 02 22:15:34 ChopEmIntoHaggas: I just realized I didnt show the function that populates the array Feb 02 22:16:23 <_genuser_> now the great idea: how to make darn grid items centered. :) Feb 02 22:16:23 ChopEmIntoHaggas: this one should populate the array http://pastebin.com/9L9Nmmpg Feb 02 22:16:31 <_genuser_> google oh google.... Feb 02 22:19:00 oh. the try/catch arent in the right place, are they? Feb 02 22:19:12 <_genuser_> try catches suck Feb 02 22:20:17 so in that snippet you get the null pointer now on line 15? Feb 02 22:21:10 I only get the null pointer in line 10 for the save function Feb 02 22:21:37 line 10 in that is int n=0 Feb 02 22:22:12 line 10 in the other pastebin link Feb 02 22:22:33 I don't have the prior link, and sorry but I should log off for a bit Feb 02 22:22:40 sorry to not offer any real help Feb 02 22:29:16 isnt there a soft or an app with which you can convert images to mpi or others plateforms ? Feb 02 22:30:43 so if I put in a storePassword and keyPassword directly in the gradle file, I can build with the keystore just fine. However, if I set it from a user prompt, it thinks the password is invalid using System.console().readLine("Password: ") Feb 02 22:30:52 also doesn't work with readPassword() Feb 02 22:31:44 do I need to chomp it or something? Feb 02 22:32:12 is pull to refresh an android ux convention? Feb 02 22:32:59 it started on ios, i think. Feb 02 22:33:03 i'm not generally a fan of it. Feb 02 22:33:10 doesnt google have a web app meat to convert images to mpdi , hdpi ,......? Feb 02 22:33:22 it usually comes with "we don't have an indicator that a refresh is happening or completed" Feb 02 22:42:16 g00s_: Feb 02 22:43:23 its official, i HATE 99.9999% of all android documentation and 300% of all android example code Feb 02 22:45:14 mark4 didn't work on first try :D Feb 02 22:48:36 todays battle is trying to figure out how to solve "error: package com.google.gson does not exist" grrr Feb 02 22:50:21 I've downloaded gson-2.3.1.jar and put it in libs. I added "compile files('libs/gson-2.3.1.gar')" in dependencies of build.gradle. In AndroidStudio I added the library file as a dependancy to my main module. I've cleaned the project and rebuilt. Still complains it can't find the gson package. Feb 02 22:50:44 gar ? Feb 02 22:50:55 typo. jar Feb 02 22:51:25 It is right in the build.gradle file Feb 02 22:51:34 why put the jar in your project anyhow, just do it the normal way Feb 02 22:51:47 yesterday adding something as a dependency was how to get it working. Feb 02 22:51:54 what is the normal way? Feb 02 22:52:38 My internet searches all refer to putting the jar in to libs. Feb 02 22:52:43 just put dependencies { compile ('blah') } Feb 02 22:58:03 I've just removed all references to gson in project structure and in build.gradle. Feb 02 22:58:24 I've removed the jar from libs so I can start clean to solve the dependency issue. Feb 02 22:58:59 Plugh don't forget to sync your gradle stuff Feb 02 22:59:09 Plugh: http://gradleplease.appspot.com/#gson is the "normal" way Feb 02 22:59:37 g00s_: thanks. I'm doing a clean now. Feb 02 23:01:33 groxx: I'll try it. Can't see any date on that page to know how old it is. Feb 02 23:02:00 Plugh: how old? Feb 02 23:03:08 groxx: Failed to find com.google.code:gson:gson:2.3.1 Feb 02 23:03:59 um... that should be a : before the first gson. Typo again Feb 02 23:05:05 Do I still have to add the jar to libs? Feb 02 23:05:24 Plugh: if you're using the dependencies { compile 'gson' } thing, no. Feb 02 23:05:40 that'll pull in gson and all its dependencies (if any) for you Feb 02 23:05:53 groxx, i read a lot of info when trying to find solutions to issues. A lot of them are old enough that they are for android studio 0.x Feb 02 23:06:41 Plugh: the solutions are for 0.x ? that wouldn't be surprising, there's probably still more 0.x info out there than 1.x Feb 02 23:07:29 I have compile 'com.google.code.gson:gson:2.3.1' in the dependencies block of build.gradle. It didn't find it. Feb 02 23:07:58 It is the line right after the compile line for google play services Feb 02 23:10:28 it is trying to find the file somewhere under extras in the sdk directory. Feb 02 23:16:41 i have a list of favorites the app opens into, wherein selecting a favorite goes into a detail screen about that favorite. is using a FAB to add a favorite to this list necessary, rather than having an add in the action bar, to comply with material design? Feb 02 23:17:14 no Feb 02 23:18:19 g00s_, groxx: Thanks for the suggestions. I've been battling this most of the day with no success. Dinner is almost ready so I'm going to give up for today and try again another day. Feb 02 23:21:38 <_genuser_> what's the best way to get teh android screen width in dp? Feb 02 23:21:41 <_genuser_> DisplayMetrics? Feb 02 23:21:58 probably yes Feb 02 23:22:34 <_genuser_> I see it giving back a widthPixels.... will probably have to figure out the dp. Feb 02 23:22:55 should have a density too Feb 02 23:23:09 <_genuser_> zinx: it does. now what does density mean? Feb 02 23:23:19 _genuser_, dp = pixel / density Feb 02 23:23:32 <_genuser_> danijoo: that solves that mystery. thanks. :) Feb 02 23:23:53 <_genuser_> when I'm setting my layout paramters for ImageView it's taking it in dp, is that correct? Feb 02 23:23:54 so what if i have a main action bar Feb 02 23:23:57 plus a tool bar underneath Feb 02 23:23:59 to get density: DisplayMetrics#density (its ja field, not a method) Feb 02 23:24:05 is there any visually appealing way to laoyut thisout? Feb 02 23:24:24 _genuser_, from java code, nearly everything takes pixels, not dips Feb 02 23:24:54 whats "visually appealing" for you? Feb 02 23:25:21 i mean having one action bar stacked above another is maybe the wrong design? Feb 02 23:25:39 if you use toolbar, you could just make it double in width Feb 02 23:25:40 lasserix: if you're going materialy, probably something similar to the tabs arrangement? Feb 02 23:26:06 use the tabs to seperate the action bar and toolbar? Feb 02 23:26:30 no, I just mean that they are visually "a part of" the toolbar, no shadow between, color bleeds between them. Feb 02 23:26:35 exactly double height Feb 02 23:26:36 etc Feb 02 23:26:51 <_genuser_> danijoo: ok, that's perfect. thanks. I'll just have to code it in and it's good to go. Feb 02 23:28:17 _genuser_: use getResources().getConfiguration() it seems Feb 02 23:28:28 _genuser_: it has screenHeightDp and screenWidthDp Feb 02 23:29:40 <_genuser_> zinx: very nice. :) now I just have to arrange this crap so that my ListAdapter and Activity can do all this without the code being scattered all over. :) Feb 02 23:30:02 ahh thanks\ Feb 02 23:30:04 perfect! Feb 02 23:30:48 <_genuser_> I want to keep my UI crap out of the ListAdapter. But I have to code the side of the item in getView(). Feb 02 23:31:02 <_genuser_> s/side/size/ Feb 02 23:31:10 use xmls Feb 02 23:31:37 <_genuser_> danijoo: ok, so I have a xml layout gridview_item.xml. however, I don't know the screenwidth until runtime. Feb 02 23:32:02 you shoudlnt hardcore screenwithds anyway Feb 02 23:32:04 use relatives Feb 02 23:32:21 like "half of the screen" and stuff like that Feb 02 23:32:25 <_genuser_> danijoo: so I have two columns and want to set each item in teh row to be 50% width. Feb 02 23:32:34 yes Feb 02 23:32:50 <_genuser_> danijoo: then I have to know what that was in pixels, so I can tell picasso to resize the image, so it can load the smallest possible image and not waste memory. Feb 02 23:32:53 that would be a linearlayout with a layout_weight of 1 for each of the two Feb 02 23:33:09 picasso dies this automagically, doesnt it? Feb 02 23:33:39 <_genuser_> if I don't call .load().resize(300,300) and leave it to load without resize, it dies horribly too Feb 02 23:34:26 <_genuser_> you know, at least the gridview items can resize themselves using the xml. and I can pull out the picasso part out of the code if I figure out how to. Feb 02 23:34:45 use .fit() then Feb 02 23:35:51 <_genuser_> JakeWharton: so gridview, two columns, each loaded with linearlayout (layout_weight="1") will balance themselves. And I then just tell picasso to .load().fit(); Feb 02 23:35:54 <_genuser_> ? Feb 02 23:36:03 .fit().centerCrop() Feb 02 23:36:11 it will defer the request until it knows the exact display size Feb 02 23:36:50 <_genuser_> ah perfect. thanks, I really appreciate your help as I move my code to picasso. hopefully once I've used it for more than one day, I'll ask less dumb questions. Feb 02 23:38:43 <_genuser_> .... and the chorus erupted, there are no dumb questions, _genuser_ ..... Feb 02 23:38:44 <_genuser_> lol Feb 02 23:38:49 good night to all Feb 02 23:42:42 <_genuser_> JakeWharton: one other question. I have quite a cpu intensive method of retrieving image data. Would it still make sense to generate a .cache/ with 50x50 thumbnails and load using picasso. Or is picasso designed to handle all that and I'm not using it correctly. Feb 02 23:43:12 picasso does no caching of source images Feb 02 23:43:21 only the transformed results Feb 02 23:43:47 if you are requesting the same image, multiple times, and at different sizes then you'll want to have your own cache Feb 02 23:43:59 this is similar to how we let the HTTP client do caching for downloaded images Feb 02 23:44:02 can you guys help me track down a android kernel ? original links are dead Feb 02 23:44:31 wrong channel Feb 02 23:44:54 <_genuser_> JakeWharton: yeah, I have multiple images in a single file as byte arrays, etc. just one of the crazy items to process. and taking them out takes lot of time. Feb 02 23:45:18 <_genuser_> JakeWharton: so I thought everytime, I process one, I should just generate a thumbnail for it. each successive time use thumbnails where available. Feb 02 23:45:26 yep Feb 02 23:45:34 you might want to use something like DiskLruCache for that to keep them out of memory Feb 02 23:45:45 also i saw earlier about the fact that there's no input stream for request handler results. i'm fixing that. Feb 02 23:45:53 XDS2010_: that's an #android-root question, this is app-level stuff. Feb 02 23:45:56 <_genuser_> ok, one new thing to google. Feb 02 23:46:05 https://github.com/JakeWharton/DiskLruCache Feb 02 23:46:24 <_genuser_> JakeWharton: oh, if you do, I'll get the new one and try it out. I went and implemented Downloader and it worked fine. was just a little slow. So I moved back to RequestHandler. Feb 02 23:47:34 <_genuser_> JakeWharton: oh, this cache sounds like it will pay off nicely when used in my gallery view. thanks. I'm going to fix picasso implementation and then probably use this one next. Feb 02 23:49:06 gradle plugin 1.1.0-rc1 is out, i'll let tacticaljoke test it for me :D Feb 02 23:49:42 oh he's not here, dang Feb 02 23:49:44 <_genuser_> JakeWharton: btw, my brother is a fan. his work app was crashing like crazy displaying images. I told him about picasso and it was super fast. He's like oh JakeWharton guy is pretty cool! Feb 02 23:52:25 that's picasso's job. it takes care of the crap so you hopefully don't have to Feb 02 23:52:46 so i'm glad it was able to do it for him Feb 02 23:54:48 <_genuser_> :) Feb 02 23:55:39 /msg memoserv send TacticalJoke gradle plugin 1.1.0-rc1 is out, i'll let tacticaljoke test it for me :D Feb 02 23:55:44 (joke, ofc :)) Feb 02 23:56:06 JakeWharton has something in his pocket for every problem ^^ Feb 02 23:56:12 well yeah. I assume TacticalJoke is already using it Feb 02 23:56:18 Daggers, butterknives... Feb 02 23:56:28 maybe this is the reason why he disconnected Feb 02 23:56:29 Spanish painters... Feb 02 23:57:08 danijoo a pokemon :) Feb 02 23:57:45 he's like the swiss knife for android libraries Feb 02 23:59:13 <_genuser_> danijoo: lol. Feb 02 23:59:40 <_genuser_> judging by his online picture, I think he runs on beer. Feb 03 00:00:05 who does not O.o Feb 03 00:01:13 <_genuser_> right right, alcohol has been known to fix huge amount of bugs.... Feb 03 00:01:34 <_genuser_> it's like wonder water of coding. Feb 03 00:02:24 you know about the ballmer peak _genuser_ ? ^^ Feb 03 00:02:43 http://xkcd.com/323/ Feb 03 00:05:22 <_genuser_> danijoo: lol, that's funny. Feb 03 00:08:33 <_genuser_> danijoo: xkcd.com is making me laugh a little. I did something to the GridView to make it really touchy, now it's just crashing trying to calculate it's auto sizes, LOL. Feb 03 00:12:38 <_genuser_> ImageView View; View.setLayoutParams(new GridView.LayoutParams(400, 400)); and it works. remove this line and it crashes. interesting. Feb 03 00:12:47 so I just watched the video on kotlinlang.org Feb 03 00:13:19 and for demonstration they create a list of Pair(Country, Capital) Feb 03 00:13:34 and put Mainz for Germany -_- Feb 03 00:14:10 JakeWharton: looks like square is getting pretty popular in japan. saw them in quite a few shops. well done to your company :) Feb 03 00:15:40 <_genuser_> Japanese are really cool. every band goes really big in Japan. most things go realy popular in Japan. Feb 03 00:15:54 <_genuser_> <--- said this non-Japanese Feb 03 00:16:25 i'd never heard of this 'line' app before, but i swear every person in japan uses it. crazy. Feb 03 00:17:26 line got big funding in japan Feb 03 00:17:45 <_genuser_> bankai_: are you in Japan? Feb 03 00:17:55 * regan has had line for a while but its scammy with all the stickers and crap Feb 03 00:18:45 scammy? how so? i know they got in a bit of trouble with apple and had to remove some features in their iOS releases Feb 03 00:19:33 line games, add ons, and pestering Feb 03 00:20:42 that's how they make their money ;) Feb 03 00:21:32 I just started on one device and it said sorry you’ve used line on another device, i’m going to delete everything.. 9.9 Feb 03 00:22:23 i read you can only use it on one device, didn't knwo it wouldn't carry everything over, that's arse Feb 03 00:25:40 i saw an interesting paper a few weeks ago about the visual design of asian apps vs western Feb 03 00:25:55 asian apps seemed much more bling, bright, noisy Feb 03 00:27:10 <_genuser_> our apps were bling too.... in the 90s. Feb 03 00:28:41 <_genuser_>
Hello visitor, to my web page
Feb 03 00:34:30 anybody know of a good github library for android? Feb 03 00:34:45 besides the ones on the official github pages Feb 03 00:36:02 Afzal, a good github library, please narrow down a bit :) Feb 03 00:36:04 Afzal: do you mean a library that can connect to github? Feb 03 00:36:33 barbs lol yes, to essentially simplify communicating with the github apis Feb 03 00:36:42 github specifically? or just git? Feb 03 00:36:47 github Feb 03 00:37:40 ah, I only really know of this app that talks to git: https://github.com/AndrewRomanenco/git.android Feb 03 00:37:55 i think it'd use Jgit Feb 03 00:38:25 barbs, completely different. I don't want to deal with git repos. I want to communicate with the GitHub api Feb 03 00:38:38 the eclipse foundation publishes a comprehensive jar against the API Feb 03 00:38:40 yeah sorry, I don't know any Feb 03 00:38:58 also, it's just your standard REST API so, use anything Feb 03 00:39:34 JakeWharton, they do and honestly it's the only library I haven't tried yet Feb 03 00:39:53 <_genuser_> JakeWharton: .fit().centerCrop() is only painting very thin strips. Basically it uses the width of the view (correctly caculated by xml) and since there isn't any height set, it just paints a thin strip. Feb 03 00:40:25 <_genuser_> JakeWharton: is this behavior correct? Should I calculate the height myself and assign it. Or maintain aspect ratio and do .resize() myself? Feb 03 00:41:28 Need two factor auth though, so I'd have to put that in (as with all other libs). JakeWharton, yeah I guess I could write a little library and use Retrofit for the network calls. Feb 03 00:41:47 It's the auth APIs that are driving me nuts Feb 03 00:42:08 it's it just oauth? Feb 03 00:44:52 It's just oauth, but to get that sweet token, you have to sign in with username and password for the first time. Another request if the user uses 2 factor auth. Then call another endpoint to authorize the app and get the token. I haven't been able to authorize the app yet, I was probably missing something the last time I tried just using retrofit for the calls Feb 03 01:03:53 oh wow Feb 03 01:12:33 Hmm, they seem to fix Android Studio bugs really quickly. Feb 03 01:13:02 I was reluctant to file mine, but it got fixed within about a day. Feb 03 01:14:37 they fix 0% of the bugs you do not file Feb 03 01:14:50 so I have no idea why you would be reluctant to file anything Feb 03 01:18:21 I've seen a lot of big-deal Android bugs being ignored for years, so I didn't expect much here. Feb 03 01:19:20 the tools team seems pretty responsive to bugs Feb 03 01:19:31 now framework guys ... heh Feb 03 01:20:01 interesting, google is going to be competing with Uber Feb 03 01:20:24 Yeah, it looks that way. As far as I can tell, the SMS-time-stamp bug still exists in Android, after years (to use one example). Feb 03 01:20:28 even if the bug is ignored, why wouldn't report it? Feb 03 01:20:43 Because it can take a lot of time to craft a good bug report. Feb 03 01:21:13 Reporting a bug can be a losing proposition. Feb 03 01:22:06 i find it unfathomable that you wouldn't help work to improve a tool that you sit in all day Feb 03 01:22:39 Of course I would. Feb 03 01:26:45 There have been times in the past when I've spent hours crafting simple sets of reproducible steps for bugs in software, only to be ignored so many times that I eventually stopped. It would have been unwise to continue. Feb 03 01:26:58 Gladly, that appears not to be the case with the tools team (though I'm not sure about AOSP in general). Feb 03 01:27:53 yes. don't hold them by Android the platform team's standard Feb 03 01:29:34 Their response was so fast that I'm motivated to put a lot of time and effort into reporting bugs in the future. So it's win-win. :) Feb 03 01:30:07 granted i agree that good bug reports can be hard to create Feb 03 01:30:45 and sometimes I wish people wouldn't have bothered on some of the projects i interact with Feb 03 01:30:52 Yeah, I used to help someone out with their up-and-coming chess website. It'd sometimes take me two hours to nail down a concise set of reproducible steps. But the guy was so responsive that I put in the time. Feb 03 01:31:40 You wish they hadn't bothered because their reports were so bad? Feb 03 01:31:58 I'm a newbie to custom images, and I'm looking for instructions on what (or how) to build zip file for multirom install. I've already successfully build firefox os, and have numerous roms, but when I download a premade zip (1 year old) there is only 1 image, along with a few files and folders. Feb 03 01:32:11 no i wish they hadn't bothered Feb 03 01:33:15 Seven_Six_Two: you're probably in the wrong room. this is android app development, not roms / ffos Feb 03 01:33:31 groxx, oh ok, thanks. Feb 03 01:34:13 can somebody reassure me that the following is incredibly stupid: Feb 03 01:34:20 free version "com.blah.app" Feb 03 01:34:26 paid "com.blah.app.paid" Feb 03 01:34:37 that's how you tell the difference in code Feb 03 01:34:57 how the hell did they build this without changing the package structure? Feb 03 01:35:08 package != app id Feb 03 01:36:14 getApplicationInfo().packageName Feb 03 01:36:16 http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename Feb 03 01:36:19 is that the applicationId? Feb 03 01:36:38 <_genuser_> this is so awesome!!! if I change the image width it crashes. if I don't, it doesn't work. :) I know there's a way there somethere. but dangit, it's taking me all this time finding it. Feb 03 01:39:29 matt_j: yes Feb 03 01:40:15 hi guys i just downloaded the android studios from here http://developer.android.com/sdk/index.html SO I CAN RUN PHONEGAP following this http://www.codenutz.com/getting-started-phonegap-android-studio/ i can't seem to find the sdk folder which is might to be in “C:\Program Files (x86)\Android\android-studio\sdk” i have been googling around and nothing. i am using wins 8 anyone know where that file is please? Feb 03 01:40:29 "Note that Kotlin does not have a new keyword." woohoo :) Feb 03 01:41:36 I read that as 'keyboard' for some reason. Feb 03 01:41:38 baako: I think the android SDK manager from android studio should tell you where your current SDK folder location is Feb 03 01:41:48 but I may be wrong, I don't use the Windows version Feb 03 01:42:01 <_genuser_> baako: don't you have to download the SDK separately? Feb 03 01:42:19 The ability to overload operators on arbitrary types (via extension functions) is awesome. Feb 03 01:42:29 and there's that, too. The SDKs are a separate download from android-studio itself Feb 03 01:42:34 As is the fact that operator overloading doesn't involve horrible syntax. Feb 03 01:42:40 _genuser_: according to the link it says it should be in the android studios folder Feb 03 01:43:24 baako: have you run android studio yet? there's a sizable setup process Feb 03 01:43:37 groxx: nope just doing the set up Feb 03 01:43:41 <_genuser_> baako: are you not able to setup the SDK using the SDK Manager? http://developer.android.com/sdk/installing/adding-packages.html Feb 03 01:43:49 groxx: oh yes i have run it sorry Feb 03 01:44:01 am quick start now :D Feb 03 01:44:08 <_genuser_> groxx: what you working on? Feb 03 01:46:49 _genuser_: at the moment, boggling at code, trying to find a non-horrible way to extend it :) Feb 03 01:48:01 <_genuser_> groxx: yeah, I was looking at mine a while ago. I'm trying to take a break from looking at my code. I have all the solution pieces but I can't seem to put them together. I figured I'd take a break and do something else. Feb 03 02:03:13 how do i get the very first main back from android studio? i wanna access the configure option Feb 03 02:04:05 baako: come again? Feb 03 02:05:34 JesusFreke: i want to go back to the first layout you get when you first install the software. where you get options like import project, sdk manager, configure, etc Feb 03 02:05:58 <_genuser_> finally get it working like I want. but hate having to set width/height in code Feb 03 02:06:14 baako: did you open up a project already, or something? Feb 03 02:06:16 baako: File > Close Project. Feb 03 02:06:23 <_genuser_> JesusFreke: you mean: "thank you, come again" Feb 03 02:06:34 _genuser_: not particularly :) Feb 03 02:06:39 TacticalJoke: thanks Feb 03 02:06:51 <_genuser_> JesusFreke: heh, was just a simpsons joke using Apu's line. Feb 03 02:08:21 <_genuser_> I think the oddest thing for me was the project layouts using multiple views. I was trying to get it setup exactly like eclipse, until I figured it's better to just learn AS as AS. Feb 03 02:10:41 i don't know why, but i get a particular kick out of turning on power save mode, typing things into AS, and then turning power save mode off again. Watching it do all its work at once is fun Feb 03 02:10:52 ...I'm cheaply and easily amused. Feb 03 02:11:22 Hi all. I'm trying to use Paho (a MQTT library) along with TLS. To do so, I need to provide it with a SSLSocketFactory. Easy enough, but I can't seem to get it to trust/use a certificate I put in the user truted CA store. Feb 03 02:11:27 ablacksheep: cheaper than most addictions :) Feb 03 02:11:35 <_genuser_> ablacksheep: or... you could youtube!! Feb 03 02:11:56 I receive "CertPathValidatorException: Trust anchor for certification path not found." which makes me think that it's not attempting to use my certificate. Feb 03 02:12:10 yeah, but the power save technique also makes me feel like I'm being productive :P Feb 03 02:12:11 ^ or that, yeah. record Studio trying to do everything at once, play it on a loop. Feb 03 02:12:54 <_genuser_> or just pick your favorite youtube personality and listen to all their videos. it could get entertaining. Feb 03 02:13:08 fullstop: you should be able to provide your own cert store in your app. I've never built anything that does either though. Feb 03 02:13:11 <_genuser_> pewiepie is pretty hilarious, if a bit child...like. Feb 03 02:13:18 too childlike Feb 03 02:13:28 I'm a big fan of the two best friends play zaibatsu, however Feb 03 02:13:56 groxx: right. If possible I'd allow the user to select a certificate or use one from the built-in keystore. Feb 03 02:14:05 His being popular puts a real damper on humanity. Feb 03 02:14:31 <_genuser_> TacticalJoke: so listen to one of the others... like tyler oakley, or something. Feb 03 02:14:48 <_genuser_> TacticalJoke: but I know what you mean. what is the world coming to. Feb 03 02:15:05 fullstop: yeah, personally I'd probably prefer using something in the built-in keystore (though that requires a password, which can be a bit annoying). not sure how feasible it is, but I wish you luck Feb 03 02:15:05 <_genuser_> ablacksheep: zaibatsu? Feb 03 02:15:25 groxx: thanks Feb 03 02:15:39 fullstop: if you haven't seen it before, http://nelenkov.blogspot.com/ has lots of good stuff on keystores (and similar options) Feb 03 02:16:16 not sure if it includes anything that would help here, but it's probably worth checking Feb 03 02:16:28 I've not, but I'll read through it. Feb 03 02:16:43 _genuser_: the dudes who run the Two Best Friends Play channel at some point became known as a Zaibatsu, which I think means gang in Japanese Feb 03 02:16:54 has anyone build a phonegap app using the android studio please? Feb 03 02:17:02 this happened after 2BFP became more than 2 people Feb 03 02:17:19 baako: phonegap has its own channel Feb 03 02:17:29 <_genuser_> ablacksheep: yeah, from GTA zaibatsu were one of the gangs... Feb 03 02:18:13 <_genuser_> ablacksheep: I normally watch a few of them and then move on to the next youtube celebrity. I can't really subscribe and sit by my computer waiting for new episodes. Feb 03 02:18:34 <_genuser_> in other news, I'm really liking bitbucket and my projects backups. Feb 03 02:19:22 oh, the way it usually goes for me is i forget about it for a while, then binge on a saturday night or something Feb 03 02:21:14 <_genuser_> oh, I work from home. so I binge during the day. Feb 03 02:21:21 _genuser_: free + private + decent is hard to beat, yeah Feb 03 02:21:37 <_genuser_> I put one "Elders reach to X" or "Teens react to X" or "youtubers react to X" videos sometimes and they're hilarious. Feb 03 02:22:05 <_genuser_> groxx: true that. Feb 03 02:22:30 <_genuser_> I'll watch just the fail videos sometimes, and they're so much fun. Or the prank ones. Feb 03 02:35:18 how do you download more devices for android studios? I want a samsund S4 Feb 03 02:35:29 Samsung S4 Feb 03 02:36:40 huh, android doesn't have a standard file chooser dialog? Feb 03 02:36:47 I think I found my next phone , The YotaPhone 2 https://yotaphone.com/gb-en/ Feb 03 02:37:20 i thought it was a flip phone for a second :( Feb 03 02:37:43 fullstop no, google doesn't want you exposing the idea of "files" to users :D Feb 03 02:37:53 derp Feb 03 02:38:00 it's e-ink back cover and it can mirror the front Feb 03 02:38:28 I've also noticed that I can't import a certificate from the "Import Certificate from SD Card" choice Feb 03 02:38:32 or from ES File Exploer Feb 03 02:38:40 but it freaking works through gmail. Feb 03 02:41:21 fullstop: fwiw I've only ever imported certificates that were in /sdcard/, no subfolder. not sure if that's actually necessary though. Feb 03 02:41:44 Right, that's where I tried first. Feb 03 02:41:48 it's a mess Feb 03 02:42:15 I also couldn't use my sd card until I formatted it outside of the phone and gave it a label. Feb 03 02:42:47 the storage access framework thing crashed if it had no label. I'm sure that you can guess how it formats the cards, too. :) Feb 03 02:42:55 hint: no label **** ENDING LOGGING AT Tue Feb 03 02:59:58 2015