**** BEGIN LOGGING AT Thu Aug 14 02:59:59 2014 Aug 14 03:02:07 how to update the ui after its been drawn? Aug 14 03:55:11 Hi guys, How do I make tabs like this https://dl.dropboxusercontent.com/u/7816026/archive/tab.png please help Aug 14 03:55:42 use iOS :) Aug 14 03:56:00 robovm!! Aug 14 03:56:08 maybe the turtles in hawaii know Aug 14 03:59:30 :D Aug 14 03:59:38 so not possible? Aug 14 04:01:48 well, of course it's "possible" - custom views are one way Aug 14 04:02:26 you just need custom indicators for the tabs Aug 14 04:04:08 i'm sure it will work well in L Aug 14 04:04:11 :? Aug 14 04:06:20 g00s, can you please give some links to start out Aug 14 04:06:37 hey all, in my main activity i have an imageview set up to be filled after a user logs in. on login, the app downloads a logo specific to the users account. After login the activity returns to main. After login, sharedPref var "logged in" is changed to "true". Me trying to change the imageview by checking the sharedpref in onResume and inflating the imageview does not work until I reload the... Aug 14 04:06:39 ...activity/app. Aug 14 04:06:51 meadhikari sorry - i never tried this myself. i just use stock Aug 14 04:07:38 i'm sure there are tutorials out there though. google custom tab indicator tabwidget Aug 14 04:12:40 Hmm, I am back with more AlarmManager questions. In the documentations, the cancel method says: "Remove any alarms with a matching Intent." Aug 14 04:13:03 Does that mean that the requestCode must match? or the extras from the intent passed to pendingintent? Aug 14 04:13:52 that means intentfilter.match Aug 14 04:14:38 afaik extras are never involved Aug 14 04:18:23 ok Aug 14 04:18:38 so to cancel, I don't have to build the exact intent as long as the requestCode matches Aug 14 04:20:21 oh its filterEquals(Intent) Aug 14 04:24:01 another question, when I run getContentResolver(), is there a difference when I do context. and getActivity(). Aug 14 04:27:31 no Aug 14 04:29:24 thanks goos. Aug 14 04:29:26 g00s Aug 14 04:30:08 yw Aug 14 04:32:19 g00s: you looked at IAB yet ? Aug 14 04:32:26 no Aug 14 04:32:30 i heard it was a pita Aug 14 04:32:36 i have enough pita in my life Aug 14 04:32:50 well it just doesnt work :) Aug 14 04:33:11 but I seem to get the impression everyone has accepted it not working Aug 14 04:33:16 which is just really odd Aug 14 04:39:13 StingRay_ probably because we've come to accept lots of things not working ;) Aug 14 04:41:57 i get to test BLE in the next few days, hopefully that has finally gotten baked fully in 4.4 Aug 14 04:43:25 What's the best approach to handling deprecated functions that have newer api counterparts? Aug 14 04:44:53 dont? Aug 14 04:44:58 if targetSdk=X where fn is not deprecated on X, theoretically compat paths will kick in Aug 14 04:44:58 use the newer ? Aug 14 04:45:23 if you use targetSdk=Y where fn is now deprevated, then you'll need separate code paths Aug 14 04:45:24 I have WebSettings.setTextSize for API level 10, but for 14 and up, the more modern (and non-deprecated) alternative is .setTextZoom Aug 14 04:45:57 cool Aug 14 04:46:31 MicronXD for example http://developer.android.com/reference/android/app/AlarmManager.html Aug 14 04:46:33 so base on the first scenario you mentioned, I should be ok using the now deprecated .setTextSize with my targetSdk=10 Aug 14 04:46:35 see the Note Aug 14 04:46:50 yeah Aug 14 04:46:58 for a little anyhow :) Aug 14 04:47:44 g00s: thanks so much! Aug 14 04:47:57 now i've had great pain when the behavior changed anyhow, regardless my taregtSdk (content provider permissions in android 4) Aug 14 04:48:08 so its probably still good to test Aug 14 04:48:58 If I want to break out into separate code paths, how would that work? Aug 14 04:49:13 This is my first android app. sorry for the newbie questions Aug 14 04:51:03 I was chugging along until I got 3 or 4 "The method X from the type Y is deprecated" where the alternative isn't supported at my targetSdk Aug 14 04:51:50 http://www.youtube.com/watch?v=aRVTVrn9ozM Aug 14 04:54:40 anywhere here works as a full time android dev? Aug 14 04:56:25 detachYo: there are a few Aug 14 04:56:37 that work at companies etc Aug 14 04:57:06 but android is not something you make money off as an individual i think lol Aug 14 04:57:14 with brokem purchase api/flow Aug 14 04:57:20 funny Aug 14 04:57:53 freelancing is nealry impossible on both ios / android Aug 14 04:58:04 well, being an indie dev Aug 14 04:58:34 Again, completely new here, but I was wondering about how Android runs some programs on start for notification purposes. Does the entire application start up, or is there a way on android to start a miniature process that accepts notifications from a server? Aug 14 04:58:51 and then that application obviously starts the full app when you acknowledge the notification. Aug 14 04:59:34 you talking about push ? Aug 14 05:01:53 g00s: I agree, I think the best bet is to join a startup, since they tend to hire more and more devs for ios and android. Aug 14 05:02:45 bankai_au, is that what it is? I never understood what push notifications really meant. Aug 14 05:02:59 I thought it meant that the applications would be alive in the background--the entire applications. Aug 14 05:03:19 have a look at GCM Aug 14 05:04:24 winsoff: the entire application? Aug 14 05:04:48 canvs2321, as in the entire process, just without a foreground activity Aug 14 05:05:00 do you know how apps are ran? Aug 14 05:05:22 or atleast what's loaded when Aug 14 05:05:25 I figured they were merely executed in the application layer and behaved from there. Aug 14 05:05:36 But the actual application launch I have not read about yet. Aug 14 05:05:41 I have an error when I try to find a textview for a pageid that I want to update: http://fpaste.org/125436/79926081 - I suspect I['mm missing the 'obvious', help would be appreciated! Aug 14 05:06:51 Nivag: an error ? Aug 14 05:07:15 "an" ? that some kind of exception then ? Aug 14 05:07:17 :) Aug 14 05:07:24 Nivag: R.id.page_id Aug 14 05:07:33 Nivag: yup, ^ Aug 14 05:07:40 ah, perfect positioning haha Aug 14 05:08:17 oh, just looked, and ide cant find resource error Aug 14 05:08:26 that makes better sense now :) Aug 14 05:10:56 Thanks all, fixed, now works - I knew it was OBVIOUS! :-) Aug 14 05:11:31 anyone here using IAP's ? Aug 14 05:11:51 * Nivag wonders what an IAP is... Aug 14 05:12:16 InAppPurchases Aug 14 05:12:32 should really be anyone here use IAB in their app ? Aug 14 05:12:42 which is the billing api Aug 14 05:13:04 cause thats what I have a problem with, actually not the api, just google … thats who I have a problem with :) Aug 14 05:14:16 StingRay_: Join the queue, Microsoft & Apple both have big problems with Google! :-) Aug 14 05:14:45 I talking about a major flaw Aug 14 05:14:46 don't forget Samsung and Oracle Aug 14 05:14:54 not really a personal problem Aug 14 05:16:02 I don't know about, didn't Steve want to go ThermoNuclear with Google - that sounds pretty personal to me! Aug 14 05:16:45 yes, I dont have a person problem is what I said Aug 14 05:17:24 I have problem with the fact they have a huge flaw in what makes android inviting Aug 14 05:17:48 Steve also parked his car in the handicapped space Aug 14 05:17:52 i think he was a cretin Aug 14 05:17:52 I wonder how many people would be starting android dev if the slogan was "Android, millions of uses, not many pay, and if your app is good enough, they get it for free and there is nothing you can do due to our crappy service/flow" Aug 14 05:19:19 probably the same number contemplating windows desktop shareware Aug 14 05:19:49 Steve Jobs needs to die. Aug 14 05:19:50 Oh, wait. Aug 14 05:20:24 Well at least I should get paid by the University, when I finish the App I'm working on (my first smartphone app!). Aug 14 05:20:30 not really in goo taste that winsoff Aug 14 05:20:44 Heh. You tasted him? Aug 14 05:21:11 oh you're 12 or something Aug 14 05:21:13 :) Aug 14 05:21:39 At least 12 year olds have a good sense of humor. Aug 14 05:21:56 The only reason why older people do not like it is because they have a significantly jaded memory. Aug 14 05:22:55 there is humor, but humor agaist terminal illness no matter the individual, look at it this way, out of all the people in the channel, 20+ have had friend or family die due to some terminal illness and have empathy Aug 14 05:23:07 so yeah, sorry, I lack the humor in this reguard Aug 14 05:23:46 Oh, so if Stalin had terminal cancer, you would cry for him? Aug 14 05:24:02 cry ? no Aug 14 05:24:22 The entire point is that he was a sociopath and manipulative bastard. Aug 14 05:24:34 He had no purpose being here, and that terminal illness prevented him from ruining the ebook market. Aug 14 05:24:58 lots of ceos are sociopaths Aug 14 05:24:59 No, he did not deserve to die for it. No, it is not a vendetta against steve jobs. It's a god damned joke. Aug 14 05:25:05 I think the entire point was wishing some1 dead Aug 14 05:25:08 It was Aug 14 05:25:09 a joke. Aug 14 05:25:13 It's IRC. Aug 14 05:25:13 there is even a book 'the sociopath next door :)' Aug 14 05:25:53 People talk about "respect" for the dead, but they do not care. No one cares. The family gets over it, and they certainly do not get over it by moping about it. Aug 14 05:25:56 It's not the family's problem. Aug 14 05:27:08 Among other things, Jobs was a billionaire who was a central figure behind colluding to illegally lower programmer salaries in San Francisco, and effectively nationwide and worldwide Aug 14 05:27:25 Which is why there is little remorse involved. Aug 14 05:27:30 That affects my wallet...it's parasitism Aug 14 05:28:04 Ologn yeah, but google too Aug 14 05:28:05 Ologn, lol. It is about the spirit of the greed, not the personal attack on your wallet. Aug 14 05:28:06 haha Aug 14 05:28:16 yeah I give exactly 2 rats sh*ts about his passing, may even have been a good thing for many Aug 14 05:29:04 But seriously, irc jokes are just jokes, man. Aug 14 05:29:47 the elite have such disdain for labor, they are closer to their own kind in other companies than their own employees Aug 14 05:30:08 g00s: Which is so weird, because I think they have merely never tried it. Aug 14 05:30:24 like idiots working 12 hours a day at a startup - thats just VC extracting the most labot for the least capital Aug 14 05:30:31 *labor Aug 14 05:30:48 I wonder if there is a website for an idea pool. Aug 14 05:30:56 Google should release an App Bank Aug 14 05:31:05 Where you just donate app ideas Aug 14 05:31:38 g00s, well that's why I never moved to the Bay area...I was out there once, and went to the lame startup my friend worked for, and at like 8 PM Saturday night the entire office was there at their desks in Sunnyvale Aug 14 05:31:49 g00s: I bet as an indie iOS dev you can make enough though Aug 14 05:31:53 or rather it's easier Aug 14 05:32:55 Ologn yeah, probably everybody on adderrall too ... so if you want to play that game you have to take the shit also Aug 14 05:33:48 I don't think making a living on your own Android apps is that tough, it takes time though... Aug 14 05:34:17 Ologn: you see my previous gripe ? Aug 14 05:34:25 Ologn oh yeah, were you the one who recommended http://www.amazon.com/Lean-Startup-Entrepreneurs-Continuous-Innovation-ebook/dp/B004J4XGN6 Aug 14 05:34:28 with the billing and purchase system though ? Aug 14 05:35:04 StingRay_, yes. Well I've been doing ads mostly. Aug 14 05:35:19 g00s, yes, probably Aug 14 05:35:39 g00s, Ries's main idea is the minimal viable product Aug 14 05:35:48 Ologn did you read any of the LEAN books in the oreilly line, like http://www.amazon.com/Lean-Analytics-Better-Startup-Faster-ebook/dp/B00AG66LTM Aug 14 05:36:12 g00s, the best example of an MVP for me is https://play.google.com/store/apps/details?id=com.panaceasupplies.android.panaceadb Aug 14 05:36:20 or, do you recommend any other business books ? Aug 14 05:36:50 yes now i remember Aug 14 05:36:54 g00s, I took an open source Java library that handled Microsoft Access files, maybe did three or four days of work, and release a very minimally viable app Aug 14 05:37:51 g00s, then I looked at user feedback and improved it. What people wanted was not what I thought they wanted. People with MDB/ACCDB Access databases were happy they had something that could do something with their databases even with four days effort Aug 14 05:38:22 Ologn yes, i recall now, that was great job on your part Aug 14 05:38:23 g00s, that's the main book I can think of. Paul Graham's essays are good as well. Aug 14 05:38:48 i think he was getting tired of all the YC stuff peddling cat pictures that will change the world Aug 14 05:39:05 fuck, everybody in SF is changing the world Aug 14 05:39:20 If I want my application to have a multiple geofences for notifications, like apple has, and survive through application close, do I have to declare a service for this? Aug 14 05:40:26 detachYo: is that stuff not done though broadcasts ? Aug 14 05:40:38 and maybe intentServices ? Aug 14 05:40:45 Hmm, might be Aug 14 05:40:47 thats more of a question btw… Aug 14 05:40:48 :) Aug 14 05:40:55 I know I am thinking it could be. Aug 14 05:41:07 Since I've used a broadcast for simila rpurpose Aug 14 05:41:22 cause you dont want a service running and active doing noting for 99% of the time Aug 14 05:41:33 when android has a fair event/broadcast system Aug 14 05:41:39 just a crap billing one :) Aug 14 05:41:57 Android is such fertile ground...I mean, by the time people stop saying you can't make money on Android it will be too late - because by then the big money will have stepped in and it will be too late Aug 14 05:42:24 Ologn: true, but wait till you get to use IAB Aug 14 05:42:29 Any OS that comes out of nowhere and is selling one billion units a year - you can make money on it Aug 14 05:42:35 then you will know why you cant :) Aug 14 05:42:54 well with ads, but you need options to remove those ads Aug 14 05:43:07 users dont like them Aug 14 05:43:20 I bet Candy Crush and Clash of Clans etc. make money w/ IAB...there may be headaches of course Aug 14 05:43:35 consumables maybe Aug 14 05:43:39 not managed though Aug 14 05:43:41 lol Aug 14 05:43:53 managed purchases it my problem Aug 14 05:44:03 that to me does not work at all Aug 14 05:44:25 maybe it's something on my account, some setting of sorts, but cant find any info solutions Aug 14 05:44:26 what is IAB? Aug 14 05:44:29 just same questsions Aug 14 05:44:33 InAppBilling Aug 14 05:44:39 name of the billing lib Aug 14 05:44:42 oh Aug 14 05:44:55 they seem to be on v3 Aug 14 05:44:58 wut Aug 14 05:46:08 I did a business deal with an Android programmer in Australia and we release a version 1 MVP multi-language thesaurus Aug 14 05:46:43 You can never be 100% but I suspect we can push that to making hundreds of months in ads (or more!) Aug 14 05:47:11 All the work was done by open source libraries like mythes and hunspell...we just ported it to Android Aug 14 05:47:53 hundreds a month rather Aug 14 05:49:06 with ads ?\ Aug 14 05:49:35 Sure..some of my apps make hundreds a month with ads, one makes $1000-2000 a month, depending on the month Aug 14 05:49:42 http://pastebin.com/n1dwttVf getting NPE @ line 14 Aug 14 05:49:49 Some are duds of course Aug 14 05:49:52 method is called after verifying file exists Aug 14 05:50:06 Ologn: my point is that should you offer an IAP to remove ads, the process is fundamentally flawed Aug 14 05:50:07 if anyone has any insight i would appreciate it Aug 14 05:50:58 erm is that not just siteLogo being null then ? Jesperhead Aug 14 05:51:40 the imageview exists in the layout. is it not like an "empty frame"? Aug 14 05:51:51 not what I said Aug 14 05:51:56 confused then Aug 14 05:52:00 the java object siteLogo is null ? Aug 14 05:52:05 Jesperhead, I don't know, how about keep verifying everything along the way? Aug 14 05:52:40 StingRay_ it shouldnt be Aug 14 05:52:46 Check? Aug 14 05:52:50 ImageView siteLogo=(ImageView)findViewById(R.id.siteLogo); Aug 14 05:52:57 top of the method? Aug 14 05:53:01 Jesperhead, verify the file exists, verify the fileinputstream is created correctly, verify the bitmap is created, verify the sitelogo object is created etc. Aug 14 05:53:01 ... Aug 14 05:53:39 So it's not a good idea to schedule an alarmmanager fire every minute, checking location? Aug 14 05:53:39 oh dear i got the ...s Aug 14 05:53:42 now ive done it Aug 14 05:53:49 Jesperhead: after that Jesperhead do, siteLogo.setBackgroundColor(0xFF0000); see what happens Aug 14 05:54:38 anyways... too tired to think. I am outty Aug 14 05:55:08 or Log.d("Blah", (siteLogo==null) ? "null" : "not null"); Aug 14 05:55:15 canvs2321: npe now on setbg Aug 14 05:55:40 wonder why Aug 14 05:55:46 shocking Aug 14 05:56:13 Ologn: what ads services you use ? Aug 14 05:56:32 right you're so very subtle indicating that the view is null, what i dont understand is why it matters and how i can resolve it Aug 14 05:56:40 where is this method? is it in scope of your Activity with the layout? double check your xml Aug 14 05:56:46 StingRay_, mainly Admob but also Millennial Media and Inmobi Aug 14 05:56:54 Jesperhead: erm your statement is a worry Aug 14 05:57:10 Jesperhead: why it matters bit Aug 14 05:57:20 StingRay_, this is a good web page to consult - http://www.appbrain.com/stats/libraries/ad Aug 14 05:57:39 StingRay_ sincerely if you only contribute smarmy remarks, keep them to yourself. Aug 14 05:57:57 Jesperhead: you take me wrong, nothing about that is smarmy Aug 14 05:58:07 StingRay_, 40% of installed apps have Admob, 13% Millennial, 11% Inmobi...the top companies are usually more likely to pay etc. Aug 14 05:58:30 Jesperhead: where is this method you are calling? is it in scope of your inflated layout you are trying to get the imageview of? Aug 14 05:58:32 but being an instructor of sorts … I can say that that statement will cause you more problems than this single issue Aug 14 05:58:33 there is any way to make this java code pretier http://pastie.org/9472291 ? Aug 14 05:58:47 Jesperhead: the findViewById is returning null Aug 14 05:59:01 canvs2321: i dont think so actually now that you mention it Aug 14 05:59:03 kamol: can use a Enum, or map Aug 14 05:59:28 Wow, Amazon mobile ads are really shooting up on Android Aug 14 05:59:48 Jesperhead, maybe change your method to pass the reference of the imageview you wanna add this bitmap to Aug 14 06:00:01 i was just thinking the same thing Aug 14 06:00:01 Ologn: thats not really perforance right ? Aug 14 06:00:01 They made it into the top 10 Android ad networks Aug 14 06:00:19 private void loadImageFromStorage(ImageView imageViewSiteLogo) {...} Aug 14 06:00:23 thank you im about to try it Aug 14 06:00:32 Ologn: thats just uses Aug 14 06:01:09 StingRay_, yes, but the big, known companies usually pay on time, and have a decent enough fill rate for ads Aug 14 06:01:19 canvs2321: Enum, not sure… but what kind of map, HashMap? Aug 14 06:01:34 Jesperhead, also don't know the size of the image you are loading, but can set it off on a seperate thread to do the decoding, then return it to a handler to post to UI Aug 14 06:01:39 StingRay_, but Admob has a good ecpm rate and the others find it hard to match that...but I use them for backups Aug 14 06:01:54 canvs2321: relatively small, i dont think it will be necessary Aug 14 06:02:15 more of an icon then a logo really Aug 14 06:02:24 kamol: or SparseArray, just gotta find what works for you Aug 14 06:03:50 key=1-X value = R.drawable.inspire_XXX Aug 14 06:04:02 there are quite a few ways to go about it Aug 14 06:05:21 Ologn: wow, indication of how horrid IAP and the IAB lib is, less than 4% use ?? is that accurate ? Aug 14 06:07:01 canvs2321: or maybe i just called the check before i even set the contentview. Aug 14 06:07:03 StingRay_, they have polled over 5 million phones (although it is possible the current number is less) so they are usually pretty close to the mark Aug 14 06:07:52 Jesperhead: that would do it Aug 14 06:08:13 StingRay_, 3.8% of apps have the IAB library, 8.9% of installs Aug 14 06:08:27 canvs2321: Thank You Aug 14 06:09:07 Ologn: yeah but that means something like 99% of the revanue from IAP that google talks about is mostly all these consumed purchased items, for things like candy crush etc Aug 14 06:09:14 kamol: yep Aug 14 06:09:23 I have an imageview within a horizontal scrollview, the scrollview has padding on the top and bottom. I am getting the touch coordinates and trying to reference them back to the original image's touch values. here is my code http://pastie.org/9472304 Aug 14 06:09:29 im doing other checks as well "isLoggedIn", "hasNetworkConnection". I soon forgot where I had placed it. Thank you very much for your help and more importantly your willingness to assist. It is more encouraging for me to continue learning more. Aug 14 06:09:31 and that the sales for apps are ….well nothing almost Aug 14 06:09:47 What I don't know is if I need to account for the padding I've put on the scrollview? Aug 14 06:10:21 StingRay_ maybe you should read that LEAN book :) Aug 14 06:10:28 also, you need to getout of beta Aug 14 06:10:30 LEAN ? Aug 14 06:10:44 g00s: fix my billing and I will lol Aug 14 06:10:45 actually eric reis has a whole series Aug 14 06:10:55 Jesperhead: main thing is to not always assume something should work when it is not, it is best to start thinking backwords of where things could go wrong Aug 14 06:11:58 i keep meaning to look at gridlayout Aug 14 06:12:04 still haven't used it Aug 14 06:15:51 hmm, ok so I'm now thinking IAP managed type do not work Aug 14 06:16:08 so need an alternative Aug 14 06:21:20 hello anyone have a good tutorial on views lifecycle w/r to activitys? Aug 14 06:21:53 attached to window, detached from window Aug 14 06:21:56 done :) Aug 14 06:22:08 detached is the last thing? Aug 14 06:22:12 and what invokes that to be called? Aug 14 06:22:35 was reading this: https://plus.google.com/+ArpitMathur/posts/cT1EuBbxEgN Aug 14 06:25:32 lasserix: Should finish reading that, or atleast the top post under the picture, did you only look at the picture? Aug 14 06:26:32 reading throighit now Aug 14 06:26:56 kind of tired and my mind is wwaaannnddeeerrrinnngg so i might have to try again tomrorrow ;p Aug 14 06:27:34 "onDetached is when you need to clean up, e.g. remove any Runnables the view may have posted for later that are no longer relevant." ahhh very good to know! Aug 14 06:27:39 What is your concern about the views? Aug 14 06:28:02 nothing, i just don't know have an intrinsnic knowledge, like if i had to tutor someone, Aug 14 06:28:09 *didn't have enough Aug 14 06:28:23 ah ic, so just for deeper knowledge Aug 14 06:28:27 yeah Aug 14 06:28:38 cool Aug 14 06:28:56 im concerned about my salary, so trying to make myself as good as possible so when the time comes to talk to my boss about it i have as many options as possible Aug 14 06:29:03 to fill that knowledge hole Aug 14 06:29:12 heh yeah Aug 14 06:30:02 I realized after every interview that I could have faked my way through them without knowing a thing Aug 14 06:30:36 oh its not about interview, i just like to know my shit. Aug 14 06:30:52 but yeah definatly Aug 14 06:31:00 if you are not goign for an android outfit Aug 14 06:31:00 most important is to sit in the same manner that the interviewer is sitting Aug 14 06:31:09 most poeple have no idea what it takes to make an app Aug 14 06:31:50 the worst is when my boss does a code review and starts arguing that i dont need to do x y and z because he thinks dalvik = normal jvm Aug 14 06:32:11 then i have to spend 3 hours writing test cases and performance code to prove what i already knew Aug 14 06:32:48 Do android wear devices typically come with that lowpower circuit for voice recognition? Aug 14 06:33:01 no Aug 14 06:33:06 only the Moto X Aug 14 06:35:13 anyhone know the tpyical screen size of a wearable watch? Aug 14 06:35:31 guys i have an imageview that i want to have a user be able to touch the image in different places and have a new imageview appear on the screen in its place and some text Aug 14 06:35:43 do i ahve to use a relativelayout to do this? Aug 14 06:35:59 no Aug 14 06:36:03 Jack3k3: relative is a bit heavy Aug 14 06:36:17 Jack3k3: draw it yourself maybe ? or FrameLayout ? Aug 14 06:36:32 well right now my scrolling image finally works but it only works without using linear/relative layouts Aug 14 06:36:37 Jack3k3: do you want to replace the original image view source data or create image views that are on top of the original image view? Aug 14 06:36:47 lasserix: I think its 320x240 Aug 14 06:36:56 Jack3k3: heh, how'd you end up getting it to work? Aug 14 06:36:58 imagine like a checkerboard that you press one square and it lights up blue and has text Aug 14 06:37:01 shmooz: hmm thanks Aug 14 06:37:13 lasserix, horizontalscrollview , and no relative/linearlayout haha Aug 14 06:37:24 ahh Aug 14 06:37:27 well Aug 14 06:37:41 i would recomend subclassing a view of some sort to do all this Aug 14 06:38:02 like you want to add some image on top of the finger location when the user clicks a particular fret? Aug 14 06:38:08 yeah Aug 14 06:38:24 so what i would do is subclass imageview Aug 14 06:38:26 override on draw Aug 14 06:38:36 i mean unless its easier to just draw something, yeah i figured id just have an assortment of images to load Aug 14 06:38:37 dump your original background bitmap iunto the canvas Aug 14 06:38:40 orr Aug 14 06:38:44 there's an easier way Aug 14 06:39:00 so if you subclass imageview and leave all the methods not overriden Aug 14 06:39:06 EXCEPT dispatchDraw Aug 14 06:39:20 dispatchDraw willg et called right before draw gets called (which is called after invalidate) Aug 14 06:39:41 so what you can do is from your touch listener, get the coordinates, check if you need to draw an overlaid image, Aug 14 06:39:57 then call invalidate at the end ofthe tocuh view onTouch method Aug 14 06:40:10 this will cause dispatchDraw then draw to be called Aug 14 06:40:40 in dispatch draw you can use those corodinates to draw anotehr bitmap on top of the normal background Aug 14 06:40:55 and i think that'd be the only method you'd have to override Aug 14 06:40:58 and it should also be possible to remove the bitmap too? Aug 14 06:41:03 yeah Aug 14 06:41:26 you'll want to keep a list of rects that are the bounding boxes of your overlaid images, Aug 14 06:41:35 yeah Aug 14 06:41:35 then check in the touch listener whether the touch event happens in any of those boxes Aug 14 06:41:42 then remove it from the dispatch draw list Aug 14 06:41:50 if like clicking the thing twice should remove it Aug 14 06:41:57 yeah that stuff all makes sense Aug 14 06:41:59 yep exaclty Aug 14 06:42:02 something liek that Aug 14 06:42:08 so look up how to use dispatch draw Aug 14 06:42:21 only thing is i need to look at dispatch draw and subclassing since im not too familiar on that Aug 14 06:42:26 if you subclass image view, that should be the only thing you'll have to override and you can use the rest of your code as is Aug 14 06:43:21 well a hacky solution would be to like add imageviews into the scroll view and set the top and left padding matching the x and y of the touch coordinates Aug 14 06:44:08 haha, and jsut toggle them invisible/visible? Aug 14 06:44:08 you can make a bunch in the beginning (the max a user would need) and set them all to visibility GONE and then on click, get one, set it to VISIBLE then set the margin/padding of left/top to position it properly Aug 14 06:44:13 yeah Aug 14 06:44:38 not sure that would work actually, because of the scroll Aug 14 06:44:50 oh Aug 14 06:44:56 it would be hacky but thats another way (just be sure that the x and y values corresponding to proper because if you scroll the horizontal scroll view i dont know if those values will be true ie raw or not, they may just be relative to the screen itself) Aug 14 06:44:56 nevermind yea i guess it would Aug 14 06:45:23 so you'd have to like add distanceScrolled plus touch x to set the padding to the proper length Aug 14 06:45:36 instead of just tocuh x, if the thing had been scrolled over a bit Aug 14 06:46:07 yeah I actually have an equation already for getting the image coordinates even if its scrolled Aug 14 06:46:24 yeah so just check that but that's another (hacky) way to do it Aug 14 06:46:26 so knowing that + the raw x,y touch cords shoudl let me know where to place the box Aug 14 06:46:34 right Aug 14 06:47:03 just curious, aren't there a billion guitar fingering apps out there already? ;p Aug 14 06:47:16 yeah haha Aug 14 06:47:24 tbh i dont know ifany of them are actually any good Aug 14 06:47:26 im making this mostly cause im bored and want to try it Aug 14 06:47:37 yeah cool that is an awesome reason Aug 14 06:47:41 more power to you Jack3k3 Aug 14 06:48:00 :) Aug 14 06:48:19 Anyone know how to properly use IsInEditMode() for custom views? Aug 14 06:48:23 thanks for the help lasserix Aug 14 06:48:37 np Aug 14 06:54:13 Friends.... ALLO OOO Aug 14 06:54:38 please how can i get json path uri from asset folder Aug 14 06:55:10 How can i get json path that's reside in asset folder Aug 14 06:55:39 this is not working at all... Uri pathFile = Uri.parse("file://android_asset/samsoft.json"); Aug 14 06:56:33 you need to use assetmanager to access them and those uris don't really work i n most places because assets still reside in the zip archive Aug 14 06:58:08 Thanls Zharf: so i can i get that path using assetmanager Aug 14 06:58:40 no Aug 14 06:58:57 No? Aug 14 06:58:59 you can get an inputstream, iirc Aug 14 06:59:58 Oops, that's serious... Aug 14 07:00:15 So which means i can;t get the path... Aug 14 07:00:38 that'd be correct Aug 14 07:03:38 So how can i use json internally... Aug 14 07:04:41 whta do you mean? Aug 14 07:04:52 just read it from the inputstream? Aug 14 07:07:01 Well, i'm using volley json to get the uri... there's where the problem is Aug 14 07:12:23 why would you use volley for local files Aug 14 07:15:26 Can two or more orders have the SAME transaction id ? One customer has bought the same item at different points in time and the transaction is the SAME! Aug 14 07:16:16 problem with the database... make transaction_id column as unique Aug 14 07:16:27 nope Aug 14 07:16:53 Google is wrong Aug 14 07:17:01 Why are they using the same id ? Aug 14 07:17:04 ask google :) Aug 14 07:17:36 * Zharf has no idea about iap or selling crap on play Aug 14 07:18:12 I've implemented iap in a couple of apps but I've never actually used it :p Aug 14 07:18:20 huh? Aug 14 07:18:29 Use what? Aug 14 07:18:44 in app purchasing.. Aug 14 07:20:33 Did you ever test your code? Aug 14 07:20:44 *tested Aug 14 07:20:57 as well as google allows it to be tested, which totally sucks Aug 14 07:21:06 then you use it Aug 14 07:21:10 nope Aug 14 07:21:29 I don't have access to the dev console of the app Aug 14 07:21:51 having a nightmare with "managed" purchases myself Aug 14 07:22:17 gradle now makes it easier to test things though, with a debug release signed version being easy to generate Aug 14 07:22:46 but "managed" IAP don't seem to work and if you refund, they stay purchased forever Aug 14 07:25:42 bad developer Aug 14 07:25:54 The Android guy who implement IAP in the app Aug 14 07:25:55 I would rather not touch the IAP crap Aug 14 07:25:57 it's just crap Aug 14 07:26:12 *implemented Aug 14 07:26:26 Zharf: but what other options have we got ? Aug 14 07:26:31 Dammit, why I forget to add past tense to verbs? Aug 14 07:26:32 kinda limited there :) Aug 14 07:26:51 You have no choice! Aug 14 07:27:06 indeed Aug 14 07:27:07 :( Aug 14 07:28:16 Except maybe this: http://www.onepf.org/openiab Aug 14 07:28:30 If what they claim is true Aug 14 07:29:07 oooo looks interesting Aug 14 07:33:21 CodePulsar_: I think if you look/search for purchaseState:0 problems with google IAP's it's more on the play services caching side than the interface to or using the api Aug 14 07:33:33 help.... Aug 14 07:33:34 so not sure it could be fixed by anyone else Aug 14 07:33:38 could not write file: C:\Program\Files\Android\android-sdk\google\google_play_services\libproject\google-play-services_lib\.project Aug 14 07:34:02 trying to import google play service not working Aug 14 07:34:19 in ecplise, complainning of .project file Aug 14 07:35:25 permissions ? Aug 14 07:46:39 StingRay_, I don't monetize my apps :p Aug 14 07:46:50 yes... Aug 14 07:47:07 I write *my* apps for fun, for myself, and if someone else wants to use them, go ahead, but I don't really care :) Aug 14 07:47:11 whenever i want to add the file... it display file could not write file Aug 14 07:49:59 hackable: what are you using to add it ? eclipse ? Aug 14 07:51:32 run eclipse as Administrator Aug 14 07:51:44 my app randomly crashes don't know why. the logcat says this: http://pastebin.com/DFJVPEVb . google couldn't help me Aug 14 07:52:48 Zharf you must come from a very civilized society indeed ;p Aug 14 07:53:04 is it possible to have activities in other packages than hte one decleared on top of the manifest or a sub package? If so how do i reference them in the mainfest file? Aug 14 07:53:17 gdrc so,ewhere you have a NPE Aug 14 07:53:57 lasserix, it's my own society of solitude Aug 14 07:55:28 hi Aug 14 07:55:42 I'm trying to migrate an eclipse library project to android studio Aug 14 07:56:02 This does not seem possible without AS copying the code? Aug 14 07:56:38 If I import it, it will copy in it's dependencies as modules. Aug 14 07:59:06 lasserix: yes, where? Aug 14 08:03:17 Why there are so many apps? Aug 14 08:03:27 Mostly crappy ones Aug 14 08:03:52 people think it writing an app, even a crappy web app will get them a yacht :) Aug 14 08:04:14 and then what? Aug 14 08:04:27 yachting I guess ? :) Aug 14 08:05:00 I don't understand how can anyone type text longer than a sentance on a phone Aug 14 08:05:50 When I have to chat with someone I always turn off the phone and start using a real computer Aug 14 08:05:54 with a proper keyboard Aug 14 08:06:21 So I design my apps for users to type as little as possible Aug 14 08:06:32 nothing at all , ideally Aug 14 08:06:44 StingRay_ to be fair, some people have been able to, and the cost of entry is virtually zero Aug 14 08:07:05 Chainfire: I know some have Aug 14 08:07:07 CodePulsar_: chatting with a tablet is not that bad Aug 14 08:07:16 Chainfire bought millions of container ships with all his apps Aug 14 08:07:25 because yachting is too mainstream Aug 14 08:08:07 hah if only. but I do know people who've made millions on shittly little apps that took them a few days to make Aug 14 08:08:35 By using stupid Ads? Aug 14 08:08:42 for example, yes Aug 14 08:09:00 Ads work because people are stupid Aug 14 08:09:36 You can make a fortune with that Aug 14 08:09:37 you remember the South African World Cup? The very first free ad-supported Vuvuzela app made several million in a few days. According to the guy who wrote it, took him about 2 days to make. Aug 14 08:09:51 damn Aug 14 08:09:54 Met him at some conference a few years ago. Just one example, there are many more Aug 14 08:09:58 vuvuzela app? Aug 14 08:10:21 what does a vuvuzela app do Aug 14 08:10:23 Yeah, its literally a screen with a button and some ads that if you press it makes the vuvuzela noise Aug 14 08:10:28 :') Aug 14 08:10:34 and here we all are, slaving our lives away ... Aug 14 08:10:36 so why did it take him 2 days to make? Aug 14 08:10:36 Very intelligent Aug 14 08:10:38 -.- Aug 14 08:11:09 It'd take me two days to make on iOS :P Aug 14 08:11:16 fair enough Aug 14 08:11:33 Chainfire: you have IAP in superuser right ? Aug 14 08:11:41 nope Aug 14 08:11:44 oh Aug 14 08:11:47 separate pro package Aug 14 08:12:28 (its older than IAPs, there's *STILL* no way to transition from one to the other properly) Aug 14 08:12:29 dammit does nobody use IAP s ? I must have gotten sucked in by google IO hype about best ways to make money Aug 14 08:12:49 I must have been the only one too Aug 14 08:12:55 Google Play guys sitting on their asses getting fat from our 30% never improving shit :) Aug 14 08:13:04 I use IAPs in other apps though Aug 14 08:13:07 whats the problem? Aug 14 08:13:42 no matter what I do, purchaseState comes back as 0 = purchased …even after both sides wallets show refunded, even after 4 months Aug 14 08:13:54 managed IAP Aug 14 08:14:01 (also funny thing: now apps with IAPs are no longer considered free, but you can still do a free app that requires a separate pro package unlocker and be listed as a free app, hmm hmm) Aug 14 08:14:48 is this using real or test payments Aug 14 08:14:59 are you allowing caching if the purchase data? Aug 14 08:15:03 either or, tested on live debug signed release Aug 14 08:15:23 play purchase cache is always the case in IABv3 Aug 14 08:15:39 but 4 moths of cache… nice :) Aug 14 08:15:44 months* Aug 14 08:15:55 Refunds suck Aug 14 08:15:57 well I meant to ask was, do the servers still think its purchased, or is it just a cache issue Aug 14 08:15:59 oh but clearing data from play and play services dont work Aug 14 08:16:02 Amazon App Store doesn't have refunds! Yay! Aug 14 08:16:17 right, so the server is actually still reporting it as purchased ? Aug 14 08:16:17 Except in rare cases Aug 14 08:16:31 wallet on both sides = refunded, google play managed query = purchased Aug 14 08:16:46 Chainfire: so yes Aug 14 08:16:47 well then thats probably a Play issue you need to take up with Play support Aug 14 08:17:05 I don't think there's much you can do about it from your side ... aside from not worrying about refunds Aug 14 08:17:08 or you're doing it wrong Aug 14 08:17:27 CodePulsar_: there are no variations on how to do it Aug 14 08:17:47 only thing I could think is maybe there is some setting in the dev console somewhere I have a mode wrong Aug 14 08:17:49 but doubt it Aug 14 08:18:14 I know it stops reporting as purchased in a couple of my apps after a few weeks when I've used test purchases (those expire after 14 days or a month or something) Aug 14 08:18:22 frankly I don't understand how people can even dream of making apps that make money nowadays Aug 14 08:18:32 With gradle, can I change the location of a library project to not be inside my application project? Aug 14 08:18:46 if so, how? Aug 14 08:18:46 there's millions and millions of apps out there to choose from, what makes you think they'll pick your app? Aug 14 08:19:02 but honestly StingRay_ are refunds such an issue for you you need to deal with them? Aug 14 08:19:04 Zharf: cause it does soemthing different Aug 14 08:19:06 lol Aug 14 08:19:11 not too soon there will be more apps than people on earth Aug 14 08:19:38 Chainfire: na, only refunds from me have been me to my beta users cause I wanted to see the process, hence finding this Aug 14 08:20:06 are they then not just showing as purchased because they are in the beta group? :) Aug 14 08:20:34 no, you can add test users to licesne checks from beta but not with IAB Aug 14 08:20:47 so there is no real diff at all Aug 14 08:20:51 if you say so Aug 14 08:21:33 well it's a much talked issue too, but no clear answers or solution Aug 14 08:22:13 well there was one, if you can get the availabilty to change, then you can get the user to back out of the payment screen that says they already own it, it clears the status Aug 14 08:22:20 but thats a ticky long shot Aug 14 08:32:05 hi, i need to show a dialog for x seconds and the evaluate something. any idea where to put a timer or something else? Thread.sleep(x)? Aug 14 08:33:04 maybe show the dialog, then do a postDelayRunnable with milliseconds param Aug 14 08:33:23 obviously the runnable would dismiss the dialog :) Aug 14 08:33:54 StingRay_: thanx for the hint Aug 14 08:35:43 oh Chainfire, I managed to move my app back and forth (system <-> data) with only an automated soft-reset in between, with no observable ill side effects. yay for /system/xbin/daemonize! :) I figured if the api4 emulator has daemonize then most IRL devices should. I tested it on a couple and saw no problems, worked perfectly. Aug 14 08:36:50 well ok, there is still one moot point - apparently on some ROMs the system -> data transition wipes (or tries to wipe) data and also generates a new uid for me, so in that case I force wiped data before I make the transition Aug 14 08:38:37 someone knows a solution to my problem http://stackoverflow.com/questions/25290256/getting-android-studio-gradle-and-android-annotations-working-together . or should i just use butterknife (just that i would miss functionalities like @Background and @UiThread etc.. ) Aug 14 08:39:07 ravilov daemonize is not a standard Android command and will not be present on most devices Aug 14 08:39:21 oh? Aug 14 08:39:23 drats Aug 14 08:39:36 I thought whatever I get on a measly emulator is what I can count on Aug 14 08:39:48 nope Aug 14 08:39:50 what kind of dev environment is that if it's not true to real life?! Aug 14 08:40:01 probably anything from /system/xbin you shouldn't rely on Aug 14 08:40:07 :( Aug 14 08:40:31 oh well, I might attempt to make my own daemonize with nested shells or something :) Aug 14 08:40:40 busybox probably supplies it, but depending on users having busybox installed is absolutely the very worst thing you can do to root users ... too bad so many devs do it Aug 14 08:41:00 nothing messes up expected output of shell commands as busybox ... Aug 14 08:41:08 oh no, it was never my intention to depend on busybox, I know that is very nonstandard Aug 14 08:41:35 I was going to depend strictly on what I have in the emulator Aug 14 08:41:40 well, minus /system/xbin now Aug 14 08:46:47 Hi guys, I have a fragment that displays a menu item (a refresh button) in the action bar. All is well but when I put the app to the background and come back, the menu item is duplicated. This happens every time. It works fine when I leave the screen and come back.... Aug 14 08:47:54 check your onCreate method... does it create a new one? Aug 14 08:48:08 read up on the lifecycle of your app and which methods are called when =) Aug 14 08:49:11 yeah, im thinking its something im missing there alright. the only reference in on create is setHasOptionsMenu(true) Aug 14 08:50:39 the_fog: well, you adding it maybe in onResume ? Aug 14 08:51:00 actually this is actionbar stuff, not sure about any of it :) Aug 14 08:51:04 shmooz: yes.. i am using eclipse... thanks Aug 14 08:52:35 the_fog, paste some code maybe? Aug 14 08:53:04 no reference to it in onResume.... just fixed it by using menu.clear() in onCreateOptionsMenu() Aug 14 08:54:17 seems more like a workaround though... funny that onCreateOptionsMenu() is called everytime app is called from background Aug 14 09:07:06 the_fog: could it be that your fragment handling isnt quite right and that the actionbar adds another refresh button item when loading a fragment? Aug 14 09:07:10 I need a dev that can strongly customize an mtk6589 based tab firmware, anybody? Aug 14 09:08:05 paid job Aug 14 09:08:23 msergiu80: wrong channel Aug 14 09:08:36 got another one? Aug 14 09:08:51 the same we told you yesterdat Aug 14 09:08:57 y* Aug 14 09:08:59 root? Aug 14 09:09:03 yep Aug 14 09:09:07 I'm there too :)) Aug 14 09:09:11 same luck :)) Aug 14 09:09:45 yeah but thats the correct channel to ask. ;) Aug 14 09:10:10 ok man, thanks Aug 14 09:11:16 yeah daily spamming won't get you far :p Aug 14 09:13:44 defuex: it may well be. the app is large and the main activity is handling too many fragments, so it is quite possible that fragment handling isn't right. time and resources to investigate is not an option though.. working a deadline Aug 14 09:15:15 curses... in my main activity im calling an asynctask to load a few webviews in BG threads to (hopefully) save them to cache Aug 14 09:15:35 various buttons in the main activity lead to a new activity containing a webview that loads this url Aug 14 09:15:58 im passing the context,url, and webview object to the bg thread Aug 14 09:16:08 yet it does not appear to be working Aug 14 09:18:18 Jesperhead, that does indeed look like a bad kludge Aug 14 09:18:22 that approach* Aug 14 09:18:25 can i have a custom menu to the "Complete action using" thingy? Aug 14 09:18:29 or add an item to the menu. Aug 14 09:18:30 agreed Aug 14 09:18:36 never worked with webviews though so I don't have an alternative Aug 14 09:18:38 when i start an intent Aug 14 09:18:41 unfortunately its the best solution given the circumstances Aug 14 09:18:52 hardly Aug 14 09:18:53 erry, not easily Aug 14 09:18:54 anybody work with OpenCV online tongiht? I'm having some problems getting my c++ code to read in a file and I think it's a filesystem issue. Need somebody to bounce back ideas on Aug 14 09:19:10 hrmf Aug 14 09:19:15 me Zharf ? Aug 14 09:19:15 i'm sure i've seen apps with dcustom menus Aug 14 09:19:40 is there an intentr action that allows you to either choose an image from existing ones in gallery or take one with the camera then? Aug 14 09:20:10 what's your pb valder_ ? Aug 14 09:20:41 also it's not the night here :) Aug 14 09:20:51 * Jesperhead is the night.. Aug 14 09:21:09 is it in general common to not have a constructor in a class in Java ? Aug 14 09:21:42 I'm trying to open an mp4 file with VideoCapture and it's failing to open 100%. This code works on iOS and Ubuntu. I can't seem to figure out what's going on. I don't know where OpenCV logs the exceptions. I'm just blindly moving the file around to see if its a file permissions issue Aug 14 09:21:45 erry: Intent.ACTION_GET_CONTENT together with intent.setType("image/*) Aug 14 09:22:35 erry, you can maybe possibly build your own selection list from scratch, but it's difficult to extend the system-provided one Aug 14 09:23:28 valder_, tonight is a completely meaningless term in an international channel :p Aug 14 09:23:47 erry: like this: http://pastebin.com/mic5AAxy Aug 14 09:24:20 I read that on KitKat b/c of the Multi-User feature, all calls to get the filepath, now return an filepath that is "emulated" /storage/emulated/0/ This only works for code running on the Java side of things AFAIK. That same path is not available via any native code, Aug 14 09:25:16 hm, wouldn't the emulation be done via system provided stuff, like symlinks and bind mounts? Aug 14 09:25:35 it is very strange if the emulation is only ever present within the VM Aug 14 09:25:37 ravilov: GrecKo: I know "tonight" is not relevant. It's tonight for me right now.. :) Aug 14 09:26:20 ravilov: from within my Java code I am only given the emulated pathnames and all those work fine wiht file access. Aug 14 09:27:35 but do those pathnames exist when accessing via shell? Aug 14 09:28:45 ravilov: no they don't b/c of the multiuser environment. http://www.google.com/url?q=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F20734564%2Fwhere-is-my-sdcard-location-on-4-4-2&sa=D&sntz=1&usg=AFQjCNEz97NeOo_5zs2Uk4OnExXqayov-Q Aug 14 09:29:01 I dunno I open files from c++ but I get the path from c++ too, not from java Aug 14 09:29:06 oops sorry I meant : http://stackoverflow.com/questions/20734564/where-is-my-sdcard-location-on-4-4-2 Aug 14 09:29:49 GrecKo: you use /mnt/sdcard/ right? What's the file permissoin on the file ? What I see for the movie files is 770 Aug 14 09:31:02 valder_, well that link also provides an answer for you Aug 14 09:31:13 I tried it and it doesn't seem to work. Aug 14 09:31:25 you don't have your file in /mnt/shell/emulated/0 ? Aug 14 09:31:26 you mean targetting and older API right? Aug 14 09:31:40 no Aug 14 09:33:39 ravilov: I'm trying that now.. However if that works, then how Can I programatically get that path without having to do any string replacements? I suppose that's my real question. Aug 14 09:35:23 valder_: I get something like that on my n4 /storage/sdcard0/DCIM/IMG_00000063.jpg Aug 14 09:35:52 GrecKo, that's not emulated at all Aug 14 09:35:53 ravilov: that path works in the shell but still doesn't let me open a mp4 file in opencv. Aug 14 09:36:05 I never said it was Aug 14 09:36:12 GrecKo: what version of the OS are you on? Aug 14 09:36:18 4.4 Aug 14 09:36:29 not sure how to do it without doing string replacement. apparently every environment (shell, vm) has its own path pattern. Aug 14 09:36:47 but I'm developing using Qt Aug 14 09:37:44 GrecKo: how are you getting your pathname? are you calling getExternalStorage() Aug 14 09:38:07 no Aug 14 09:38:11 valder_, sorry, I don't now enough about the quirks of the newest androids, if it was me I'd just do string replacement :) Aug 14 09:38:11 O.o Aug 14 09:38:17 I don't do java in my app Aug 14 09:38:35 String replacement... on paths... Aug 14 09:38:36 hey folks Aug 14 09:38:41 * Mavrik slaps everyone. Aug 14 09:38:56 No wonder Play store is stock full of broken apps. Aug 14 09:38:59 Mavrik: the issue now is how do I know the right path to use? Aug 14 09:39:12 any framework that can be imported for a/v communication from within an app? Aug 14 09:39:20 Mavrik, well you're the genius, tell us mere mortals what is to be done :) Aug 14 09:39:21 Mavrik: apparently it's different for every environment. Aug 14 09:39:49 yes. Aug 14 09:39:57 That is WHY you get the API provided methods to query paths. Aug 14 09:40:01 Mavrik: There's no document saying: In native C++ code use this pathway to get access to the sdcard. :) Aug 14 09:40:03 So your app doesn't die on every second device. Aug 14 09:40:12 valder_, yes, because you're not supposed to. Aug 14 09:40:27 transfer data from Java environment. You're on a Dalvik based system, act like it ;) Aug 14 09:40:47 There's a reason you have those APIs there - because paths may change, may be different on every device, may be emulated Aug 14 09:40:54 they might not even be paths per se. Aug 14 09:41:11 Mavrik: I'm supplying the pathname to the C++ programe via the java API call. I'm trying not to hard code the path.. Aug 14 09:41:39 And as you have noticed, it doesn't work :P Aug 14 09:41:56 hm, will a native prog started from within the VM then have access to those emulated paths? Aug 14 09:41:58 Again, use Android APIs to read data and then transfer it to C++ code if you must. Aug 14 09:42:07 ravilov, there is no such thing as "native prog" in Android Aug 14 09:42:12 if you have it, you're doing something wrong. Aug 14 09:42:23 you have native libraries which augment Dalvik code. Aug 14 09:42:39 what are things in /system/{bin,xbin} then? Aug 14 09:42:50 busybox is a native prog Aug 14 09:43:26 Mavrik: So what you are saying is that I can't use the OpenCV method to open a file? I have to pass it data? OpenCV doesn't accept streams, at least the functions I'm using do not Aug 14 09:43:32 ravilov, existence of busybox is not guaranteed Aug 14 09:43:40 ravilov, existence of any Linux binary is not guaranteed Aug 14 09:43:48 existence of valid shell environment is not guaranteed Aug 14 09:43:50 er, I know that Aug 14 09:43:51 I meant Aug 14 09:44:09 if I happen to be the maintainer of busybox Aug 14 09:44:13 environment being sane, working, or have storage mounted in shell-accessed environment is not guaranteed Aug 14 09:44:15 do not do it. Aug 14 09:44:15 and wanted to make an android binary Aug 14 09:44:18 you shouldn't. Aug 14 09:44:23 ... Aug 14 09:44:42 Hi, I've a question Aug 14 09:44:43 so you advocate there be no system binaries at all? Aug 14 09:44:48 valder_, yes, especially if you're opening images from users storage, you should not expect to get a file Aug 14 09:44:58 valder_, since you can easily get a content provider URI and you'll be screwed Aug 14 09:45:09 open a stream using Android storage methods and transfer a byte array Aug 14 09:45:21 Mavrik, your vision of the android system seems quite bleak Aug 14 09:45:26 When you register a developer account for the google play store, you only have to pay the fee (25$) one time ? Aug 14 09:45:46 ravilov, "my vision" does not change realities and APIs of Android design Aug 14 09:45:59 ravilov, as an app developer you have no business messing around with underlying Linux environment Aug 14 09:46:09 because it's not standardised, it can change and was never meant to be used Aug 14 09:46:15 what if it's a "system" app? Aug 14 09:46:18 if you need Linux, use proper Linux Aug 14 09:46:34 ravilov, System apps are apks as well. Aug 14 09:46:41 Tuly-, yes. Aug 14 09:46:43 no... I meant Aug 14 09:46:52 an app that does "system-y" things Aug 14 09:47:19 like, say... use su, or reboot a system Aug 14 09:47:37 (normal non-system apps can't request a system reboot AFAIK) Aug 14 09:47:40 What about it? Aug 14 09:47:54 If you're a system builder, you've built the system and you can use whatever as long as you ensure CTS compliance. Aug 14 09:48:06 I don't think you're getting what I'm saying Aug 14 09:48:09 I'm not a system builder Aug 14 09:48:10 Mavrik: ok, I understand what you are trying to say. I suppose I have to rewrite the c++ end to accept a byte array somehow.. I could swear the OpenCV folks have an example of not doing it this way though.. Aug 14 09:48:17 ravilov, then don't touch system builder stuff. Aug 14 09:48:32 that is very limiting and very demotivating for an app developer Aug 14 09:48:43 valder_, I know it's annoying, but it will save you some grief later :) Aug 14 09:48:49 valder_, especially if you're loading users images Aug 14 09:48:55 valder_, we've all been there ;) Aug 14 09:49:25 ravilov, it's not limiting, you just keep forgetting it's Android you're working on Aug 14 09:49:25 ravilov, not a generic Linux distro. Aug 14 09:49:32 Mavrik: I'm manipulating them, most examples I've seen are for either pure Java or pure C++ Aug 14 09:49:41 and stop forcing models from your generic Linux distros on Android. Aug 14 09:49:50 not forcing anything Aug 14 09:50:06 valder_, if I see correctly you just throw byte array into a CvMat Aug 14 09:50:15 Mavrik, what if I wanted to have a go at making my own superuser app? Aug 14 09:50:29 Mavrik: I'm dealing with videos not images. Aug 14 09:50:33 ravilov, you should go use Ubuntu Touch. Aug 14 09:50:54 valder_, hrmpf, that complicates stuff immensley Aug 14 09:51:01 how would that help me in making a superuser app for android? Aug 14 09:51:05 Mavrik: so that is a very simplistic view of what needs to be done I think. I need to load a stream for the library to parse it correctly. Aug 14 09:51:23 so, any library that can be embedded in-app for audio/video conferencing? Aug 14 09:51:37 ravilov, it wouldn't. Because (if you haven't noticed) superuser access is disabled and is actively being prevented for a reason. Aug 14 09:51:47 ravilov, if you want superuser acces like a desktop distro, go use a desktop distro. Aug 14 09:51:59 I was hoping not to have to rewrite it like I did for iOS. I open the stream on the iOS side and pass in the frame to the C++ code. Aug 14 09:52:01 valder_: are you scanning the device for video files using MediaStore ? Aug 14 09:52:13 Mavrik, do you by any chance work for google? :p Aug 14 09:52:43 ravilov, no, but I do deal enough with shitty Android software built by Linux fans that keeps breaking Aug 14 09:52:50 shmooz: yes, but I do that on the Java side so I can display a custom Gallery to allow the user to select what image/video to process. Aug 14 09:53:03 all I want is to use the full potential of my device Aug 14 09:53:08 which keeps breaking because devs didn't bother to get how Android works and what its limitations are. Aug 14 09:53:09 or not even my device, just *a* device Aug 14 09:53:15 ravilov, cool Aug 14 09:53:21 Mavrik, just because I'm not above using shell code doesn't mean I depend on it Aug 14 09:53:21 ravilov, install desktop linux distro. Aug 14 09:53:29 no Aug 14 09:53:32 Android isn't what you want. Aug 14 09:53:40 it's worked for me so far Aug 14 09:53:58 valder_, the biggest issue you have is that you can easily get online Picassa albums or other stuff passed as your data Aug 14 09:54:00 Mavrik: ok more work ahead.. Just can't catch a break can I? Aug 14 09:54:04 which may not be files per se -_- Aug 14 09:54:23 valder_, sorry, noone said Android is going to be smooth sailig, easy, logical or good for your health :P Aug 14 09:54:34 Mavrik: no, it won't be since this is a specialized app. but you are right. Aug 14 09:54:55 valder_, if you're going to use the app on a single device with single Android version you can get away with much tho :) Aug 14 09:55:12 Mavrik, I feel with this attitude all you're going to do is drive a lot of people away from android, is that your intention? to make android community into this clique of elite devs and state-of-the-art strictly-rule-adhering apps? Aug 14 09:55:17 Mavrik: java normally has been in the past for me.. I thought moving over to Obj-C was a pain in the ass.. :) Aug 14 09:55:33 ravilov, yes. Aug 14 09:55:47 I have no respect for hacks and lazy people. Aug 14 09:55:47 Mavrik, ok, fair enough, we'll have to agree to disagree Aug 14 09:55:54 Do it right or go program Ruby. Aug 14 09:56:04 ravilov: "rule-adhering" apps? Would you rather have apps that fail all the time, these constraints or design paradigms are there for a reason. Aug 14 09:56:27 hello friend... Aug 14 09:56:31 please help... Aug 14 09:56:40 I'm just learnigng as I go unfortunately. :( Aug 14 09:56:43 unable to add google play service to my project Aug 14 09:56:46 could not write file: C:\Program\Files\Android\android-sdk\google\google_play_services\libproject\google-play-services_lib\.project Aug 14 09:57:00 hackable: did you run Eclipse as Administrator ? Aug 14 09:57:26 no.. Aug 14 09:57:42 is complaining about .project file Aug 14 09:57:52 i'm using eclipse Aug 14 09:58:08 valder_, I have nothing against rules, on the contrary, but I don't think you need to stick to them like they're godgiven; doing some "under-the-hood" stuff is IMO fully acceptable provided you *know* what you're doing Aug 14 09:58:45 hackable, Program\Files? pretty sure that doesn't exist in any version of windows Aug 14 09:58:55 hi, i am showing a progressdialog. when i switch orientation it disappears(is destroyed?). another handler tries do dismiss the "destroyed" dialog with dismiss() but that ends in an error. can i query the dialog if it is showing/not destroyed? Aug 14 09:58:57 right click on the .exe and select Properties -> Compatibility -> and check Run as Administrator Aug 14 09:59:23 you mean eclipse? Aug 14 09:59:41 yes find the eclipse exe in Program Files Aug 14 10:00:01 also, Mavrik, a hack definitely (anything outside the rigid rules of API is technically a hack), but lazy? just no Aug 14 10:00:22 okay... let me do that now Aug 14 10:00:44 hackable: of course close eclipse first Aug 14 10:01:52 I have added the default NavigationDrawer from the android-studio templates and I have the problem that the NavigationDrawer slies into view every time the app is started, how can I prevent that? Aug 14 10:02:23 ravilov: sorry, I understand your point, but Mavrik makes a good point too. Too many rules (ie iOS) can feel limiting and difficult to innovate within. Aug 14 10:02:24 personally I always *prefer* to do things through the API, by all means... but if there's just no way, and I know of another (possibly hackish) way, I will definitely consider it Aug 14 10:02:43 ravilov, for most of the stuff discussed here there was a proper way Aug 14 10:02:59 and the proposed solution was something that was totally wrong because it required slightly less work. Aug 14 10:03:19 Mavrik, by that I assume you mean simple and crude string replacement method Aug 14 10:03:34 I will agree it is not the best approach Aug 14 10:03:50 Mavrik: Looks like I will do what I did for iOS, feed the video frame by frame into the native code. Java is what I'm more comfortable in anyways so I guess it's not all that bad.. :) Aug 14 10:04:40 valder_, I understand Mavrik's point too, he's just overly frustrated by all the broken apps out there, but now that made him turn into this vigilante kind of person that would burninate everybody who doesn't adhere to the sacred API rules :) Aug 14 10:04:49 Mavrik: ravilov: In my case, the string replacement is now moot since I can't use the filepaths given to me in the Java API anyway in the native code Aug 14 10:05:51 now I need to restructure the app a little.. :) Aug 14 10:05:59 well to be fair, if you're building a normal app, you should at all times keep to the API. Just doing that you'll run into enough incompatibilities and shit down the line. Don't go beyond the API unless you need to, or are targeting users who are aware of the complications and building an app that is *supposed* to go beyond the API Aug 14 10:06:43 The price of going beyond the API is forever debugging your code Aug 14 10:07:42 ravilov, please stop with the personal attacks. Aug 14 10:08:00 I doubt our disagreement warrants you putting tags on me and words in my mind, no? Aug 14 10:08:33 Mavrik, I apologize, I didn't mean this to be attacking, but truth be told, you do seem very hostile towards certain coding patterns Aug 14 10:08:45 but like I said Aug 14 10:08:49 we'll have to agree to disagree Aug 14 10:09:25 Someone tell me, whats the important of using volley Aug 14 10:10:47 Chainfire, some time ago I made a little app that gets triggered by a certain system event (broadcast intent) and then executes a little piece of shell code. that was about 1.5 years ago, I haven't really touched it since. since then many versions and variants of many ROMs have come out, people have been using my app on many of them, and from what I hear it still works just like it always did. dun Aug 14 10:10:53 no, maybe I was just lucky... Aug 14 10:12:18 hackable https://developers.google.com/events/io/sessions/325304728 Aug 14 10:14:28 ravilov As you said, little app. the bigger the app and the more complicated things it does, the more chance it has breaking. Nothing outside of the API is guaranteed to work at all. It could have also broken with every Android revision. Moral of the story, take care when you go beyond the API Aug 14 10:15:27 Driving down the highway at 200mph a dozen times without having an accident doesn't make driving down the highway at 200mph a safe practise ... Aug 14 10:16:33 Chainfire, agreed, and in my case I knew exactly what I was doing, not to mention this was a targeted app for a specific device with a specific (fairly well known) system environment Aug 14 10:17:15 it turned out all (or most) ROMs for it just happened to have this piece that my app needed Aug 14 10:18:27 I guess my point is, it's kind of not fair preemptively striking out even the slightest idea of venturing outside the API Aug 14 10:23:29 Thanks.. i'm able to add it now... but there's a little problem Aug 14 10:23:44 admod layout is given error Aug 14 10:23:50 The following classes could not be found: Aug 14 10:23:52 - com.google.ads.AdView (Change to android.view.View, Fix Build Path, Edit XML, Create Class) Aug 14 10:24:24 How do i resolve this.. i've already add google play service to my project Aug 14 10:30:46 hackable: that's the wrong class Aug 14 10:31:45 hackable: you should read the complete migration guide, but AdView is now com.google.android.gms.ads.AdView Aug 14 10:31:57 https://developers.google.com/mobile-ads-sdk/docs/admob/play-migration#create-adview-xml Aug 14 10:34:59 Thanks Aug 14 10:44:36 did anyone managed to delete a contact with intent? is it possible? Aug 14 10:46:08 Hi, Aug 14 10:46:33 Does anyone know why setEmptyText(); is not recognised as a method? Aug 14 10:47:04 I've extended my class with the ListFragment superclass Aug 14 10:47:37 post your code to pastebin is generally a good idea with a Q like this. Aug 14 10:47:56 OKay, sorry Aug 14 10:48:06 import android.app.ListActivity; Aug 14 10:48:06 public class ReminderListFragment extends ListActivity { Aug 14 10:48:06 Aug 14 10:48:06 public void onActivityCreated(Bundle savedInstanceState){ Aug 14 10:48:06 super.onActivityCreated(savedInstanceState); Aug 14 10:48:06 setEmptyText(getResources().getString(R.string.no_reminders)); Aug 14 10:48:06 } Aug 14 10:48:07 } Aug 14 10:48:12 "to pastebin" Aug 14 10:48:14 not here... Aug 14 10:48:21 sorry sorry Aug 14 10:48:23 my fault Aug 14 10:49:06 Tuly-: setEmptyText is a method on the listview, not the listactivity iirc Aug 14 10:49:16 is a listactivity the same as listfragment? I dont think so. Aug 14 10:49:45 Tuly-: setEmptyText is only in ListFragment Aug 14 10:49:47 https://duckduckgo.com/?q=android+setempty Aug 14 10:49:54 ListActivity does not have that method. Aug 14 10:50:03 whoops. https://duckduckgo.com/?q=android+setemptytext Aug 14 10:50:15 Yeah, that was the wrong class Aug 14 10:50:27 a duck-user :) hello mate :) Aug 14 10:50:31 quack Aug 14 10:50:35 Tkank you all ! Aug 14 10:50:51 try google next time. I never used a listactivity and solved your problem in 3s. Aug 14 10:52:01 Okay Aug 14 10:52:13 Just to know, wht's the "pastebin" ? Aug 14 10:52:45 try googling. Aug 14 10:53:24 http://lmgtfy.com/?q=pastebin Aug 14 10:53:44 whenever i try t run eclipse in administrator mode, it complain of out of memory and request to close work bench Aug 14 10:54:30 whats administrator mode out of curiosity? Aug 14 10:55:25 also, find it difficult to load emulator Aug 14 10:55:42 Conversion to Dalvik format failed: Unable to execute dex: GC overhead limit exceeded Aug 14 10:56:05 Dex Loader] Unable to execute dex: GC overhead limit exceeded Aug 14 10:56:13 what can i do? Aug 14 10:56:32 i'm runing as administrator becuase of google play services Aug 14 10:56:49 Why does that need that what Aug 14 10:57:08 hackable: change your eclipse.ini and increse the virtual machine memory (Xmx). But running as admin makes no sense. Aug 14 10:57:18 *increase Aug 14 10:58:22 running as administrator but not knowing really why suggests to me you most certainly should not be running as administrator. Aug 14 10:59:02 maybe defer, i run it purpose because of google play... google play refuse to import because eclipse can't read a perticular file Aug 14 10:59:30 that's why i switch to administrator Aug 14 10:59:41 can anyone give me detailed information about the differences in handling views with butterknife in comparison to android annotations? i just wanted to ask the community here. Aug 14 11:00:17 hackable: you should adjust the permissions to those particular files and give your low-privilleged user read access Aug 14 11:01:36 hackable, so instead of adjusting permission for that one file, your solution is to give eclipse ALL the permissions to your system? hardly ever a good idea Aug 14 11:01:52 blah, slow typing Aug 14 11:01:58 defuex: no big difference.. Aug 14 11:02:24 defuex: it's mostly the same. There's not much to it, they generate code during compile time to assign views as annotated. Butterknife does that and only that, android annotations does that and a bunch of stuff more. Aug 14 11:02:46 where do i set the permission? please Aug 14 11:03:18 Also AndroidAnnotations create an inheritated class for every annotated class. MainActivity gets a MainActivity_.class etc, and you have to use that class then Aug 14 11:03:43 and in butterknife you have to call the inject method, that's the tradeoff. Aug 14 11:03:44 hackable, those are windows basics, hardly appropriate for this channel Aug 14 11:03:52 Butterknife creates an inject(activity) method Aug 14 11:03:59 yeah. Aug 14 11:04:04 hackable: if you really dont know how to set permissions you really need to ask why you need to in the first place. Aug 14 11:04:18 If you only want the ViewInection, Butterknife might be a better solution Aug 14 11:04:31 but androidannotations is a log mightier Aug 14 11:04:37 as ravilov said setting your eclipse to system wide access is pretty silly. Aug 14 11:04:47 best feature of it is @Background if you ask me :) Aug 14 11:04:54 ??? confused Aug 14 11:05:28 I messed with AA : not good for a real noob as I was then IMO : too much hidden away. Might go back to it as I get more and more familiar with Android. Aug 14 11:05:44 I don't really like the annotations that convey behavior, it hides too much. Aug 14 11:05:49 hackable, to rephrase - go to google an/or ask elsewhere Aug 14 11:05:56 rgr: yeah.. Its always a bad idea to use those features if you dont know how to do it without. Aug 14 11:06:02 (that's for your permissions issue) Aug 14 11:06:12 but once you know, its nice to not hae to write asynctasks for every stupid stuff etc Aug 14 11:06:48 seriously, dealing with filesystem permissions should never be "confusing" for a person aspiring to be a dev... Aug 14 11:07:14 *chown* Aug 14 11:07:23 give the guy a break, at some point you also knew less than he does now, people have to start somehow. Aug 14 11:08:10 defer, this channel is not a good place to "start" Aug 14 11:08:27 ravilov: I'm aware but not everyone can learn things in a structured, methodical way Aug 14 11:08:31 defer: he is being given a break. ie warned not to run as admin and to learn about permissions. Nothing rude or ignorant. Aug 14 11:09:00 GooglePlayServices not available due to error 2 -- anyone knows what causes this? Aug 14 11:09:11 ok Aug 14 11:23:33 what is the proper way to check if wifi is connected? Aug 14 11:24:03 so far I have (((WifiManager)context.getSystemService(Context.WIFI_SERVICE)).getConnectionInfo().getIpAddress() > 0) but I'm not sure if that's correct Aug 14 11:25:12 well hmm Aug 14 11:25:15 ravilov: getConnectionInfo might return null Aug 14 11:25:25 network connected and wifi on Aug 14 11:25:25 ah I see Aug 14 11:26:09 so ((WifiManager) getSystemService(Context.WIFI_SERVICE)).isWifiEnabled() and ConnectivityManager to check active network maybe ? Aug 14 11:26:15 you can get more granular information from WifiInfo using the supplicantstate Aug 14 11:26:27 yes sorry, I do also check if wifi is even enabled Aug 14 11:26:37 I meant how to check if it's enabled but not connected Aug 14 11:27:45 ravilov: if getConnectionInfo() is null or getConnectionInfo.getSupplicantState is anything other than ASSOCIATED Aug 14 11:27:59 hm, how is .isWifiEnabled() different from (.getWifiState() == WifiManager.WIFI_STATE_ENABLED) ? Aug 14 11:28:32 defer, is the supplicant used in any case, even with open/unprotected wifi hotspots? Aug 14 11:29:29 ravilov: it does. Aug 14 11:29:44 interesting Aug 14 11:30:08 but yeah, this API exists for managing the network and exposing it to the settings wifi part Aug 14 11:30:20 the connectivity manager is a bit better because you can subscribe to changes to wifi state Aug 14 11:30:25 instead of proactively checking Aug 14 11:30:29 yeah I know, my question is exactly what part of the api should I be using to check for this Aug 14 11:30:54 defer, I already do that, I just need to know if the wifi is connected or not at a certain specific moment Aug 14 11:32:11 ok, apparently .isWifiEnabled() is unreliable Aug 14 11:32:16 http://stackoverflow.com/questions/12560348/android-wifimanager-iswifienabled-returns-true-but-wifi-is-disabled Aug 14 11:32:24 good thing I'm already using .getWifiState() instead Aug 14 11:33:24 ravilov: another option is connectivity manager's getActiveNetworkInfo() Aug 14 11:33:35 you can call getType on the returning object Aug 14 11:33:50 and check if it is TYPE_WIFI Aug 14 11:34:21 defer, seems like an overkill if I already know I'm only ever intersted in wifi and wifi has its own nice api Aug 14 11:35:15 ravilov: yeah, there are intersections. The wifi manager just exposes way more stuff than what is usually needed unless developing a wifi-managing app Aug 14 11:35:56 ...which is actually what I'm doing ;) Aug 14 11:36:02 (making a wifi manager) Aug 14 11:37:11 the wifi state machine is actually complex, if you intend on dealing with that I suggest reading the code on the settings app Aug 14 11:38:23 I have, and my app is actually pretty much complete, this is just another feature I want to add Aug 14 11:42:57 hi guys. i have a php script that fetches and echo a string from my Mysql database using $_GET. What is the most simple way to use that string in my Android app ? Aug 14 11:45:34 by retrieving the value from the response. Aug 14 11:45:45 http://innovationonandroid.blogspot.de/2012/10/android-php-mysql.html Aug 14 11:50:25 i'm sure the info is present in that link. but unformatted cluddered Java code is not something i feel like scavenging through to find the one bit i need Aug 14 11:50:27 :) Aug 14 11:51:19 but i am guessing httppost Aug 14 11:52:28 or would that be for posting data Aug 14 11:52:32 hmm Aug 14 11:54:26 rgr, oh god Aug 14 11:54:35 SQL injection in first few lines of code Aug 14 11:54:39 do those guides still exist Aug 14 11:54:40 from the phrasing of your Q I would suggest you recap on what "post" and "get" are and not confuse them with the return value from your PHP server side script. Aug 14 11:55:14 Oh did Post the wrong link? I meant to do the one to show how to return a response from a server via url. Aug 14 11:56:38 he already has his GET/POST request to the server : no SQL involved and one assumes, better not to assume not, he has SQL escaped the token used to access the data on the server side. Aug 14 11:57:16 yeah I know, I was commenting on the quality of the article Aug 14 11:57:33 writing such PHP code (and trying to teach someone to write it) should be criminal offense Aug 14 12:00:33 PHP is perfectly fine. You're better than that. All languages allow fuck ups. PHP does a job and does it well. Aug 14 12:11:32 i really don't seem to be able to really phrase my questioning in google just right. i have a connect.php?id=32 that displays the string whos id is "32" with an echo statement when using the browser Aug 14 12:11:51 but i want to set that same string as the text in a TextView in Android Aug 14 12:12:53 all i can seem to find are guide and tutorials that reads txt files or create a login script or similar. and i can't seem to rewrite what i find into a useful solution to my problem. Aug 14 12:13:02 how are you connecting to the url? Aug 14 12:13:05 I don't understand the problem here. after you connect, run your GET and get the result, it should be trivial getting the response and setting a textview to it Aug 14 12:13:19 or is your problem connecting and running GET? Aug 14 12:13:27 connecting Aug 14 12:13:31 i think Aug 14 12:13:44 unless you mean GET in my android application Aug 14 12:13:44 pastebin some code Aug 14 12:14:03 connecting to a http server is by far the most common type of connection, there should be plenty tutorials out there Aug 14 12:21:06 omg jake and bake wharton is speaking at droidcon ny Aug 14 12:22:45 now? Aug 14 12:23:01 have link? Aug 14 12:24:13 from some reason, one one of my 2 phones - it doesn't enter the while loop (although there are many contacts on both phones) http://pastebin.com/WBrbV4TX Aug 14 12:24:30 it's in sept Aug 14 12:24:41 I think that it might be a permission problem - but I don't have any specific idea Aug 14 12:25:31 mikedg_: funny, gotta wish Jake luck :) Aug 14 12:29:41 Wondering if I cba to go to droidcon london this year Aug 14 12:30:11 anyone? Aug 14 12:30:51 meital: do you have the READ_CONTACTS permission? Aug 14 12:31:05 public static void deleteAllContacts(Context context) { Aug 14 12:31:08 this must be fun to test Aug 14 12:31:12 defer: yes, and again - it's working on one phone but not on the other Aug 14 12:31:32 lol, I have a special device for testing such things ;) Aug 14 12:31:34 Estel: go to droidcon Stockholm! Aug 14 12:31:45 I am one of the speakers Aug 14 12:33:14 meital: In Android 3.0 (API version 11) and later, the name of this column is Contacts.DISPLAY_NAME_PRIMARY; in versions previous to that, its name is Contacts.DISPLAY_NAME. Aug 14 12:33:30 could this be it? is one of they running < 3.0? Aug 14 12:33:33 *them Aug 14 12:33:44 nope, I have nexus 4 and nexus 5 Aug 14 12:33:49 heinrisch: Stockholm sounds more expensive than London Aug 14 12:34:08 and it doesn't enter the while loop at all Aug 14 12:34:18 so it doesn't get to this line anyway Aug 14 12:34:41 ah! sorry, misread that Aug 14 12:34:46 :) Aug 14 12:36:42 Estel: yes, but there are other benefits... Aug 14 12:37:02 Stockholm is nicer than London? :P Aug 14 12:37:11 Yeah. That's it :) Aug 14 12:37:12 Umm a weird question. Is it illegal to extract information from a public website and use in a paid-app? Aug 14 12:37:25 skulltower: depends. on lot of things. Aug 14 12:37:31 depends on specific Aug 14 12:37:35 *specifics Aug 14 12:37:45 for example, license of information on the public website Aug 14 12:38:24 whether the paid app is judged as charging for the information specific, too Aug 14 12:38:37 and as always, the correct answer to "is it illegal" is "ask a lawyer" or "it's up to the judge" Aug 14 12:39:29 The information is actually country's civil code, so I think it belongs to the country? xD However that website is the only one that keeps it up-to-date so I want to use it. The app doesn't change the info in any way just displays it. Aug 14 12:40:22 different countries have very different rules about that sort of thing Aug 14 12:43:37 skulltower: the civil code might be public domain, but the website might be not. Beware Aug 14 12:45:10 Do you guys use the Action and Data for Intents when starting new internal activities? I've been kinda lazy and just put everything as Extras :P Aug 14 12:48:20 I try to use intents as intended (pun intended) Aug 14 12:52:33 hi, i create a dialog(via fragment). how do i get a reference of a recreated dialog(fragment) (f. e. after orientation change)? Aug 14 12:53:22 ravilov: so what it the "proper" way of starting an internal activity? Let's say I have my own EditPhotoActivity. Should I pass the filepath as an Uri in Data and set ACTION_EDIT as Action on it but still use EditPhotoActivity.class in the intent constructor? Aug 14 12:53:45 ravilov: what happens if I set another ACTION_FOOBAR on it that it doesn't support, it gets started anyway no? Aug 14 12:55:15 snowpong, yes I would use the explicit class and I would set the URI, but I probably wouldn't bother with action Aug 14 12:55:25 OkHttp cache doesn't like me :( Aug 14 12:55:50 snowpong, there are two major types of intents - explicit and implicit; with explicit intents it pretty much doesn't matter what the action is Aug 14 12:55:58 you should read up on intents on d.android.com Aug 14 12:56:41 ravilov: yeah I'm reading - but I was also interested in how others used it (the official docs is one thing :D) Aug 14 12:56:58 well there you go, I just told you how I'd use it Aug 14 12:57:15 if you want more datapoints for your stats, wait for others :p Aug 14 12:58:14 ravilov: hehe thanks :D Aug 14 12:59:06 the length of phones cursor in line 2 is 0 (http://pastebin.com/WBrbV4TX) Aug 14 12:59:11 can I test iap with genymotion? I currently get a "can't find item" message. but I don't know if it's because I'm using an emulator or because I messed something in the process of registering items Aug 14 12:59:24 I really have no idea what can be the reason for that.. Aug 14 13:00:15 do you actually have any contacts on the device? Aug 14 13:00:24 yep Aug 14 13:00:48 unless for some reason they aren't save on the device itself? anyway, I see many contacts in the ui... Aug 14 13:01:32 that's why I was so specific Aug 14 13:01:35 on the device itself Aug 14 13:01:44 that's the only thing I can think of right now Aug 14 13:01:45 how can I check that? Aug 14 13:02:39 I could maybe possibly give you a low-level way, but I'm afraid the senior members here would yell at me if I do Aug 14 13:03:07 I'll find you a place to hide if they will ;) Aug 14 13:03:59 you can always use sqlite3 shell utility to check the contacts database itself Aug 14 13:04:17 for me it's at /data/data/com.android.providers.contacts/databases/contacts2.db Aug 14 13:05:01 It appears to me pushings files over to my phone using $adb push changes the permissions. Aug 14 13:05:06 although on the other hand, I guess the contacts api is supposed to retrieve any contacts, no matter if they're on the device or not... Aug 14 13:05:16 dotsdan, that would be correct Aug 14 13:05:20 is that surprising? Aug 14 13:05:23 Here is the file: -rw-rw---- root sdcard_r 3145728 2014-08-14 11:17 Knuckles Chaotix.bin Aug 14 13:07:06 mountSin: have you got google play services and google play store installed? Aug 14 13:07:17 does it makes sense that I don't have `sqlite3` command in adb shell? Aug 14 13:08:26 well, like some other members mentioned earlier, nothing shell-related can be reliable Aug 14 13:08:43 snowpong yes Aug 14 13:09:05 mountSin: OK, then I don't know what could be wrong :) Aug 14 13:09:16 the app need to be in alpha mode in order to test iap? that's might be the problem? Aug 14 13:10:44 What do y'all use to tranfer files to your phone, on linux, and keeping the same permissions? Aug 14 13:10:58 if youre using intellj/CE EAP the latest patch seems to cause major hanging issues. Keeps wanting to reimport my project and then just hangs. Aug 14 13:11:28 also what's the store sku string is? is it com.myCompany.myAppName.PRODUCT_ID? Aug 14 13:12:56 dotsdan, nothing, I just transfer the file and set the permissions/ownership manually Aug 14 13:13:04 either that or a small shell script Aug 14 13:14:11 ravilov: The user I am is shell, thus setting permissions/ownership is impossible. Thanks! Aug 14 13:18:52 mountSin the SKU is whatever you set it to be, can be anything, but no need for full path Aug 14 13:28:30 I extracted my game from a zip and the permissions are -rw-rw---- root sdcard_r 3145728 2014-08-14 11:17 Knuckles Chaotix.bin Aug 14 13:29:45 hi Aug 14 13:30:14 i have this code http://pastebin.com/LizMHh6e but when i click on my marker in info i have the same informations, what is my error? Aug 14 13:33:45 any? Aug 14 13:34:12 Then I try chmod and I get. Unable to chmod Knuckles Chaotix.bin: Operation not permitted Aug 14 13:34:45 dotsdan: need root ? Aug 14 13:36:44 I dont think so. adb keeps changing my file permissions, if the would stay 777 they would work.' Aug 14 13:38:01 adb can Aug 14 13:38:21 but will you not need root to do it on the phone / Aug 14 13:38:40 g00s: HAI Aug 14 13:40:25 Is there a way to get root, without rooting the device Aug 14 13:41:10 no Aug 14 13:42:47 Makes sense. Any tips on tranfering files with mtp then? Aug 14 13:43:52 how is this dev related Aug 14 13:44:45 sdcard is noexec anyway Aug 14 13:45:02 iirc Aug 14 13:45:52 it's no sex ec Aug 14 13:45:58 ravilov: I found the problem...apparently if you have a contact without a phone number then it doesn't count it... Aug 14 13:46:36 meital, hm, interesting Aug 14 13:47:00 Where on the filesystem is executable? Aug 14 13:47:05 ravilov: I wonder if it's a bug or is it the requirement Aug 14 13:47:13 Thank you for the info btw. Aug 14 13:47:14 you can try googling I guess Aug 14 13:47:50 dotsdan, none of this is dev related really, but... executable is wherever the mount allows for executable Aug 14 13:58:47 what's wrong with this code that it doesn't actually creates the contact?http://pastebin.com/yVUD8sRM Aug 14 13:58:59 run the mount command to see mount options Aug 14 14:02:28 hi, where can i hook into in my activity when i need to call a fragment after is has been created? lifecycle from fragment has onActivityCreated(). Is there something similar the other way round? Aug 14 14:02:46 m1hael: you can make a function in your activity and call it from your fragment Aug 14 14:02:54 m1hael: that's probably what I'd end up doing Aug 14 14:03:31 dragorn: ok. i'll give it a try Aug 14 14:06:19 Anytime after onResume is fine Aug 14 14:06:24 onPostResume Aug 14 14:06:26 :) Aug 14 14:06:45 otherwise you know when your fragment was created explicitly Aug 14 14:11:40 is there a tutorial on how to implement a navigation drawer like in the play store or play music app, where you can access it from detailactivities? Aug 14 14:13:28 theres a gread one in the google docs Aug 14 14:15:09 Flaiker, http://developer.android.com/training/implementing-navigation/nav-drawer.html Aug 14 14:15:57 how to calculate between dpi and pixels? Aug 14 14:15:59 thanks ill look through it, I only looked at the template of android studio so far Aug 14 14:16:41 Anyone done photo filters - maybe with Renderscript? Aug 14 14:16:52 askalski, do you mean dip? Aug 14 14:17:25 Flaiker: http://developer.android.com/training/implementing-navigation/nav-drawer.html Aug 14 14:17:33 dang Aug 14 14:17:36 :) Aug 14 14:17:38 like large screens are at least 640dp x 480dp Aug 14 14:17:42 :) Aug 14 14:18:00 what is dp? Aug 14 14:18:23 I need to know what is the biggest resolution I need to provide for xxxdpi devices Aug 14 14:18:31 density independent pixels Aug 14 14:18:32 like - fullscreen Aug 14 14:18:33 aha. problem found. intellij still cant cope with softlinks in files paths and ends up with two sets of everything - one via softlink and one via physical path. Aug 14 14:18:55 ahaa. OK. so I just use these pixels? Aug 14 14:19:08 yes Aug 14 14:19:29 askalski, no, there are multipliers Aug 14 14:19:34 I need to provide a good background image. So if I have for instance 640x480dp , I just upload a 640x480 pixels png? Aug 14 14:19:35 mdpi device = 1.0x multiplier Aug 14 14:19:40 ahaa Aug 14 14:19:46 hdpi = 1.5x, xhdpi=2.0, xxhdpi=3.0 Aug 14 14:20:15 so if you have a screen that's 640dp wide and it's xhdpi, that means that physically display is 1280px and you should provide 1280px image in xhdpi bucket Aug 14 14:20:16 thanks! Aug 14 14:20:39 +1 : great resource : https://www.youtube.com/watch?v=zhszwkcay2A Aug 14 14:20:42 or if you have imageview that is 100dp wide and 100dp high Aug 14 14:21:01 (scaling) Aug 14 14:21:01 you should provide 100x100(mdpi), 150x150(hdpi), 200x200(xhdpi)... images Aug 14 14:21:10 if you want sharp display and no scaling that is :) Aug 14 14:21:13 great. and do you possibly know the formula to see what is the height of text in canvas.drawText(... , paint)? Aug 14 14:21:26 hmm, not out of my head Aug 14 14:21:40 there's StaticText class or something that you can do to measure text Aug 14 14:21:43 the problem is I am drawing (via canvas) a rectangle, and I want to fill it with a text, but drawText accepts only lower-left corner Aug 14 14:22:02 yeah, but I just want to hardcode it and forget :D Aug 14 14:22:06 I'll google Aug 14 14:22:13 thanks for the dip answers Aug 14 14:27:58 drawText doesnt use a rect. it uses x & y. Aug 14 14:35:51 askalski: hey, you want to know about Canvas#DrawText? Aug 14 14:36:00 Napalm, yes Aug 14 14:36:10 you've constructed a TextPaint right? Aug 14 14:36:20 Napalm, no, just Paint yet Aug 14 14:36:29 thats your first issue Aug 14 14:36:37 DrawText should be called with a TextPaint Aug 14 14:37:34 Napalm, done Aug 14 14:38:07 If I'm writing native code with SDL/C++ can I overlay native GUI elements? Aug 14 14:38:09 Napalm, I need to be able to say "I want the letter to be 10% of height of display Aug 14 14:38:58 askalski: erm? you mean thats the string you want to draw? or you want the text to draw at 10% height of the parent view Aug 14 14:40:07 Napalm, I am drawing a casual game, everything with just canvas.drawSomething calls. and I need to adjust the HEIGHT of a font in a way, that - say - 5 options are exactly 1/2 of canvas height Aug 14 14:40:58 askalski: ok, well just do that, TextPaint.setTextSize(height / 2); Aug 14 14:41:17 askalski: setting the text size is not the problem here, its how you position the text Aug 14 14:41:30 askalski: give me an example of where you want to draw the text? Aug 14 14:41:37 Napalm, in a rectangle. Aug 14 14:42:14 Napalm, I feel I can do positioning Aug 14 14:42:28 Napalm, if setting height is as simple, it's a done thing now. Aug 14 14:42:41 oh really? Aug 14 14:42:47 Napalm, I was not aware that this setTextSize is actually in pixels, not the other weird stuff Aug 14 14:42:57 why do I have a feeling you've underestimated how you position the text Aug 14 14:43:16 askalski: all functions in android are in pixels Aug 14 14:43:17 lol Aug 14 14:43:23 Napalm, good to know Aug 14 14:43:37 they will explictly say if they take dp or sp Aug 14 14:44:21 askalski: http://i.stack.imgur.com/5Hrfa.gif that should help you Aug 14 14:45:02 see Origin.. that is the x, y coordinate that you specify to DrawText assuming your TextPaint has its TextAlign to set left Aug 14 14:45:39 Napalm, yes, you're right twice: 1) it's very helpful, 2) I underestimated the challenge :) Aug 14 14:46:23 askalski: ascent is always negative in this example Aug 14 14:47:04 askalski: http://www.catch22.net/img/editor10.gif this is a better image Aug 14 14:47:31 so the baseline is where your y coordinate is Aug 14 14:48:33 askalski: if you want to draw the text inside a box you would do: canvas.DrawText("Test", x, y - textPaint.ascent(), textPaint); Aug 14 14:49:39 Napalm, and setTextSize sets full Height? Aug 14 14:50:27 canvas.DrawText("Test", x, box.top - textPaint.ascent(), textPaint); Aug 14 14:50:37 should do, If I remember correctly Aug 14 14:51:14 Napalm, it seems so Aug 14 14:52:05 Napalm, that's for your help Aug 14 14:52:13 that's? Aug 14 14:52:15 oh thanks Aug 14 14:52:16 sure Aug 14 14:53:16 Napalm, yes, thanks, my typo :) Aug 14 14:53:47 Why Android picks values-XXHDPI instead of values when it is XXXHDPI? Aug 14 14:54:43 yoavst: it's probably trying to pick the closest option Aug 14 14:54:51 yoavst: for what? Aug 14 14:55:00 so I need to create a xxxhdpi one :( Aug 14 14:55:09 that would be the preferred method, yes Aug 14 14:55:15 Napalm: LG G3 specific app, that I'm porting for G2 Aug 14 14:55:32 for its Quick Circle case Aug 14 14:56:18 does anyone know how to change the mag_icon on the left of an empty search view. im able to change the plate, and the x, but that mag_icon doesn't want to change Aug 14 14:59:09 like everything is working from this answer except for that one. http://stackoverflow.com/a/21291156/1747491 Aug 14 14:59:16 mattblang: a search finds these http://novoda.com/blog/styling-actionbar-searchview http://www.jayway.com/2014/06/02/android-theming-the-actionbar/ Aug 14 15:02:35 Napalm according to that I would think android.support.v7.appcompat.R.id.search_mag_icon would be correct. my only guess is that it has to do with it not being expanded when I try to find it? Aug 14 15:03:28 sounds like its a possibility Aug 14 15:03:36 mattblang: why not look at the source and see how it works Aug 14 15:03:49 Napalm yeah, about to do that Aug 14 15:05:14 Napalm well, no, it can't be anything to do with it not being expanded. I am able to change the "X" Aug 14 15:07:26 Why are all the professional testers iOS users? :'( Aug 14 15:08:51 all the money is in the ios development Aug 14 15:09:01 android users are generally poor Aug 14 15:09:28 while ios users are rich hipster kids/rich hedonistic old peolpe Aug 14 15:09:46 it's way more equal than it used to be Aug 14 15:12:57 Android users are generally *everybody* nowadays Aug 14 15:13:42 If I'm writing native code with SDL/C++ can I overlay native GUI elements? Aug 14 15:16:52 ruler501: yeah, you can create a window on top of the natively-rendered surface Aug 14 15:17:03 that's how people display ads in games Aug 14 15:17:20 can you link to documentation describing how to do that? Aug 14 15:17:44 ruler501: http://developer.android.com/reference/android/widget/PopupWindow.html Aug 14 15:17:54 you can create one of these in a NativeActivity Aug 14 15:17:57 Is there any way I can force my adapter to lose all the convertView's so it would re-draw them? Aug 14 15:18:05 thank you Aug 14 15:18:17 ruler501: also, if you want examples google for admob and nativeactivity Aug 14 15:18:22 there are tons of them Aug 14 15:18:34 it's for displaying ads but you can inflate any view there, it's exactly the same use case. Aug 14 15:19:35 defer would this also let me show scrollable lists and things like that? Aug 14 15:19:48 yeah, any view will work Aug 14 15:20:35 thanks again Aug 14 15:21:10 np Aug 14 15:23:01 Any nice way to turn off network connection programatically for testing? Aug 14 15:28:47 platzhirsch: you can turn off wifi w/ appropriate permissions. You can't enter airplane mode. Aug 14 15:28:57 alright Aug 14 15:32:21 how come the shell on the device (bash in my case) seems to support any width and height (ie. number of cols and rows) when run in android terminal, but seems to be locked to 80x25 when run via adb shell? Aug 14 15:33:24 using what commandline? Windows/linux? Aug 14 15:35:28 canvs2321, adb shell on linux vs. android terminal on the device Aug 14 15:36:03 it's not even shell-specific, I've seen this behavior with all shells I've come across Aug 14 15:37:16 not sure then, the output shouldn't matter from adb, it's usually the terminal that follows certain dimensions Aug 14 15:37:49 yeah I would think so Aug 14 15:37:52 hi, i'm not able to keep running a service. this is my code: http://paste.ubuntu.com/8045648/ Could someone help me? thanks!!! Aug 14 15:38:42 i know with windows commandline you have to adjust sizes, by default it is a small width Aug 14 15:39:14 yeah adb shell in win is a major PITA Aug 14 15:39:21 not really Aug 14 15:39:27 I've been forced to use it for a while Aug 14 15:39:34 just had to adjust the Window width size in properties Aug 14 15:39:40 adb shell is a limited tool for limited use Aug 14 15:39:48 not just scrolling screen wider, had to set the Window Size for the commandline Aug 14 15:40:20 canvs2321, it was really annoying how I couldn't disable local echo Aug 14 15:40:32 echo off? Aug 14 15:40:35 every command I would type in, it would echo it back before it would run it Aug 14 15:40:44 ...in linux shell? Aug 14 15:40:48 no windows Aug 14 15:40:59 echo off, turns off echo Aug 14 15:41:06 yeah in batch files Aug 14 15:41:10 not in adb, as far as I know... Aug 14 15:41:24 ic Aug 14 15:41:47 ic? Aug 14 15:41:55 eye cee Aug 14 15:42:02 oh lol Aug 14 15:42:06 uc Aug 14 15:42:10 :) Aug 14 15:43:21 canvs2321, also windows command line does not support ansi colors by default, so if I had colorized ls in the shell (like I did), it would turn out... horrible, to put it mildly Aug 14 15:43:33 ansicon is a godgiven in that case Aug 14 15:45:01 yeah i've used that Aug 14 15:48:00 pah, why do state list drawables need to be in a particular order? D: Aug 14 15:49:40 Estel, because they are tried in that order, and the trial stops as soon as it finds first match Aug 14 15:49:51 actually I forget, could be that they are tried in reverse order... Aug 14 15:49:55 but either way, order matters Aug 14 15:50:32 Nah, in that order Aug 14 15:50:53 That's why the one with no states is last Aug 14 15:52:00 right, that's what I thought but wasn't sure Aug 14 15:52:24 for some reason my buttons are not display the message as they should :( and i get no errors at all: http://paste.ofcode.org/BJhtgShhWnBuF2xvEtXDa4 Aug 14 15:52:46 any help? Aug 14 15:53:49 What buttons, what message Aug 14 15:54:01 you didnt show any code implementing button listeners or xml Aug 14 15:54:36 And why are you calling super.onCreate in onCreateView Aug 14 15:54:40 you still need to assigg the this as the listener despite implementing onClickListner. Aug 14 15:56:32 hry Aug 14 15:56:40 Can I access methods of the parentactivity instance of an activity? I want my detailactivity to call its parent to switch the fragment from its navigationdrawer. But the way intents work I dont seem to be able to pass the instance of it anywhere. Aug 14 15:57:09 Hi i am looking for a tutorial on creating a simple app using material design, does anyone know of one? Aug 14 15:57:22 Flaiker, theoretically yes, the details depend on your exact implementation Aug 14 15:57:45 jubjub_, d.android.com should have everything you need Aug 14 15:59:05 ravilov, well how would I implement it? intent.putExtra doesnt have activity or object as parameters and I cannot access the constructor of an activity. Aug 14 15:59:43 um Aug 14 15:59:52 it seems you're talking about calling and called activity Aug 14 15:59:55 not parent and child Aug 14 16:00:07 quite different Aug 14 16:01:22 Is there a way on tabbed activity(on different fragments) create radio buttons(In radio group) and if one button is checked then in another fragment, it also checks ? Aug 14 16:01:27 Flaiker: I don't think inter-activity works the way you want it to. Typically one activity wouldn't tell another to change something in the UI - the backgrounded activity is no longer directly available. You may be able to accomplish something like what you want via fragments Aug 14 16:01:31 Flaiker, in that case, no I don't think that is possible Aug 14 16:01:36 not the way you want it anyway Aug 14 16:01:45 Leftas: you could notify via an eventbus or via sharedprefs alerts Aug 14 16:02:07 Okay, I will give a try. Aug 14 16:02:16 Leftas: you could search for other fragments via tags Aug 14 16:02:26 Leftas: and do inter-fragment calling, but I don't think I'd want to do that Aug 14 16:02:39 Leftas: I suggest sharedprefs, because your other fragment may or may not exist yet too Aug 14 16:02:42 is there a way of specifying what design to use depending on the API # the user's device is Aug 14 16:02:55 Leftas: so frag1 writes to shared prefs, frag2 has a prefs listener on it and reacts. Aug 14 16:03:01 since material design is only for API 21+ Aug 14 16:03:12 jubjub_, I know there is but I'm not sure exactly how Aug 14 16:03:22 values-v21 Aug 14 16:03:24 Okay. Aug 14 16:03:31 oh man Aug 14 16:03:34 didn't even think of that Aug 14 16:03:40 Does anybody know what the intent is to directly install a Play app is? Aug 14 16:03:46 and yet I used it not so long ago Aug 14 16:03:58 Bypassing the app's landing page Aug 14 16:04:01 Well, so this is my scenario. I have a MainActivity which has a NavigationDrawer. I created a base class so I can just derive from DrawerActivity. So I have MainActivity which does just that. It can switch between fragments just like any navigation drawer. But there is also a link to a DetailActivity which isnt a fragment. But it also has the navigation drawer. Now when I select an item in the Aug 14 16:04:01 DetailActivities' navigationdrawer I want it to close and the starting activity to handle that. Otherwise I have an infinite hierachy. Aug 14 16:04:03 keviv: shouldn't be possible Aug 14 16:04:12 keviv: if it IS possible, it should be patched as a security issue Aug 14 16:04:20 keviv, that would be quite a security flaw if it was possible Aug 14 16:04:25 dragorn: Drive did it Aug 14 16:04:30 To install Docs Aug 14 16:04:30 keviv: needs permissions and probably use packageManager Aug 14 16:04:32 dragorn, get out of my head Aug 14 16:04:35 Google Play music and Play sTore does just that I feel, not sure how though Aug 14 16:05:02 It's possible gapps can violate things - they shouldn't, but they're awful special in the ecosystem Aug 14 16:05:18 dragorn: It still shows the permissions page though Aug 14 16:05:20 Flaiker: startActivityForResult, pass a constant in the result intent that tells the activity what to do Aug 14 16:05:21 there is no way i know of to expose that to arbitrary apps, and there definitely shouldn't be Aug 14 16:05:33 Ok Aug 14 16:05:48 Just curious. Probably would never use it anyway Aug 14 16:06:18 gotta love crazy hypotheticals, lol Aug 14 16:06:43 an app can trgger the install of an APK it's downloaded, if third party apps are allowed Aug 14 16:06:52 Does anyone have any tips on setting the z order on fragment animations? Aug 14 16:06:52 but I don't think you can tell play to go download it for you Aug 14 16:07:15 Right but it did somehow. I was surprised. Aug 14 16:07:29 Possible that it only works with com.google packages Aug 14 16:07:58 keviv: google may have a sig-based permission doing it, i dunno Aug 14 16:08:35 On a similar note: Is it possible to log all intents , sort of like Intent Intercept, but with even activity-targeted intents, no just broadcasts? Aug 14 16:08:43 Needless to say, I have root Aug 14 16:08:44 btw. I also have question on bitmap, tried to google it but, didn't find anything good. How to do that picture moves by x and y ? for example if you have played "Watch_Dogs ctOS" where you do things on map and if player moves it would be on device center(Map/picture also moves). Or this also would be on google maps(I don't need real maps, I using game map) activity? Aug 14 16:09:18 keviv, logcat Aug 14 16:09:29 lookg for 'starting: intent' Aug 14 16:09:42 Really? That simple? Aug 14 16:09:44 Nice Aug 14 16:09:56 too many people simply forget logcat even exists Aug 14 16:11:02 So there's really no keeping your intents a secret, even from non-root devices huh? Aug 14 16:11:27 You can't view logs of other apps Aug 14 16:11:43 From an app Aug 14 16:11:52 adb can view all the things Aug 14 16:11:53 Oh true true Aug 14 16:11:58 Right okay Aug 14 16:12:02 Thanks guys! Aug 14 16:12:50 Intents don't expose anything that can't easily be figured out anyway Aug 14 16:13:42 yeah even logcat only ever says "has extras", not going into things deeper Aug 14 16:13:58 Well unless there's (slightly) sensitive info, like anti-cheating codes for games Aug 14 16:14:07 in intents? Aug 14 16:14:09 how exactly? Aug 14 16:14:09 Ohhhh so there's no way of getting the extras? Aug 14 16:14:26 keviv, how about you try stuff out instead of theorizing all the time? :p Aug 14 16:14:59 Well there's no use trying it out if it isn't the right solution Aug 14 16:15:25 I could add my own logging code to your app and get the extras if I cared Aug 14 16:15:44 And anti-cheating codes i ran like tiercel raw Aug 14 16:15:45 hm, you must be one of those that prefer to talk and discuss instead of real hands-on experience, keviv :p Aug 14 16:15:50 *modhashes Aug 14 16:16:13 Ravilov: in this particular case, testing it out wouldn't help me at all Aug 14 16:16:47 testing it out always helps... you always learn something :) Aug 14 16:18:14 How? I know that it won't give me any more info than category, action, and activity, when what I really need is extras Aug 14 16:18:37 keviv, in any particular case, testing it out would've at least given you all the same answers as discussing theories and hypothetic assumptions, plus you would probably unexpectedly learn a thing or two in the process Aug 14 16:18:45 * ravilov always prefers the hands-on approach Aug 14 16:18:55 True. Alright Aug 14 16:19:15 But besides, I do have 1 more question Aug 14 16:19:28 can it be easily answered by trying it out yourself? :p Aug 14 16:19:35 No Aug 14 16:19:38 I wish Aug 14 16:19:46 Is there any way to add R.string.xyz as Content Description of ImageView in Java? Aug 14 16:19:54 Is there any way to hook into the system intent handler? Aug 14 16:20:33 keviv: with what goal? Aug 14 16:20:37 there is no such thing as a "system intent handler" Aug 14 16:20:38 astroduck: why can't you do it in XML? Aug 14 16:20:46 do you mean system intent resolver? Aug 14 16:20:57 astroduck: setContentDescription on the view? Aug 14 16:21:17 astroduck, um yes? Aug 14 16:21:21 of course there is Aug 14 16:21:48 did you check the docs on the subject? Aug 14 16:21:52 alexfu: I am adding x number of ImageViews depending on usage Aug 14 16:22:00 ravilov: yea what do you mean there isn't? Something has to handle them. And that sounds like it could be the resolver you're talking about Aug 14 16:22:11 defer: to catch the extras Aug 14 16:22:17 defer: Doesn't setContentDescription take CharSequence? Aug 14 16:22:31 keviv, the system only ever resolves intents so as to figure out where to route them Aug 14 16:22:34 *apps* handle intents Aug 14 16:22:36 which is just a String, i think Aug 14 16:22:37 astroduck: Yes. Aug 14 16:22:48 astroduck: oh. ok. use https://developer.android.com/reference/android/content/Context.html#getString(int) and then use setContentDescription Aug 14 16:22:58 what alexfu said. Aug 14 16:23:12 lrn 2 use app resources :p Aug 14 16:23:33 ravilov: OK, but I mean whatever piece of the system that the calling app sends it too Aug 14 16:24:00 that's the resolver Aug 14 16:24:19 and no, there is no way (or point really) to intercept that Aug 14 16:24:34 Well, except to catch extras Aug 14 16:24:52 that's pretty much *exactly* why you are not allowed to do it Aug 14 16:25:04 keviv, if you want that functionality, your best bet is building your own ROM Aug 14 16:25:30 alexfu: Awesome! Its weird that setContentDescription is not overloaded to do that by itself. Aug 14 16:25:33 ravilov: I was hoping you wouldn't say that :D Aug 14 16:25:53 it's like asking, is there a nice way to intercept user passwords on windows (or wherever) Aug 14 16:26:04 that would be insane if it did exist Aug 14 16:26:10 nobody would use such a system Aug 14 16:26:19 When are passwords ever transmitted via intent? Aug 14 16:26:33 I said windows... Aug 14 16:26:40 as in ms windows Aug 14 16:26:48 Right but why is this so insecure? Aug 14 16:26:56 hm? Aug 14 16:27:01 And how does that compare? Aug 14 16:27:12 point is, you have no business poking around random intents Aug 14 16:27:19 just like you have no business poking around users entering passwords Aug 14 16:27:29 Why would I want that? Aug 14 16:27:34 ... Aug 14 16:27:38 yeah Aug 14 16:27:42 I'm going to give up now Aug 14 16:27:48 seems you just don't get it Aug 14 16:27:53 what's wrong with registering your app to receive the Intent you want? Aug 14 16:27:56 I'm black boxing, not stealing info? Aug 14 16:28:05 Sorry, no question mark Aug 14 16:28:31 if I overlay Fragment A on top of Fragment B, is there any way I can keep touch events from going to Fragment B? Aug 14 16:29:07 ravilov: this would only ever run on my device Aug 14 16:29:29 mattblang: that only really happens when Fragment A is blank. Aug 14 16:29:46 alexfu (or partially transparent) Aug 14 16:30:39 mattblang: either way, you can intercept touch events on a view group before they get sent to child views Aug 14 16:30:53 keviv, right, so like I said - either build your own ROM or modify the one you have Aug 14 16:30:59 mattblang: http://developer.android.com/reference/android/view/ViewGroup.html#onInterceptTouchEvent(android.view.MotionEvent) Aug 14 16:31:50 ravilov: I guess I'll have to in the end, but what I don't understand is how so many root apps can hook into system-level things, but this can't Aug 14 16:31:55 Why is that, Aug 14 16:31:58 ? Aug 14 16:32:11 because root level has nothing to do with VM internals Aug 14 16:32:55 keviv, no offense, but it seems to me there is a *lot* you don't understand about android Aug 14 16:33:06 What about BurntToast Aug 14 16:33:18 ravilov: yea no offense lol. I'm a noob Aug 14 16:35:09 Look that's alright. Don't worry about it, you have better things to do Aug 14 16:35:47 xposed might help you in achieving your (strangely weird) goal, but that's its job, to expose otherwise hidden internals Aug 14 16:35:55 now, be that a good thing or not, I don't know Aug 14 16:36:01 I for one am not using it Aug 14 16:36:44 Strangely weird? Do you find it strange that it's weird? Aug 14 16:36:52 Lol thanks anyway Aug 14 16:37:32 keviv, either way, this has decreasingly less to do with app development and increasingly more with hacking the system, ergo -> #android-root Aug 14 16:38:14 Oh I thought that was more for users, less for devs. Thanks Aug 14 16:39:35 astroduck: string is a charsequence Aug 14 16:39:57 no it's not, but it can be interconverted ;) Aug 14 16:40:08 Is there any way I can force an adapter to re-inflate all the ConvertViews? adapters notifyDataSetChanged, list's removeAllViewsInLayout, invalidateAll don't work :/ Aug 14 16:40:12 that's why there's .getText() and .getString(), two separate methods Aug 14 16:40:45 ravilov: Aug 14 16:40:46 java.lang.String Aug 14 16:40:46 All Implemented Interfaces: Aug 14 16:40:46 Serializable, CharSequence Aug 14 16:40:48 hi all, how come an app like LocalCast can have a material Design app without me having the android L preview Aug 14 16:40:50 string is a charsequence Aug 14 16:40:55 charsequence is not necessarily a string Aug 14 16:40:56 oh fine Aug 14 16:40:59 you're right Aug 14 16:41:03 missed that Aug 14 16:42:12 Materialistic: cause material design is a metaphor and not something physical or tech… it's pastel colors and dropshadows thats it really Aug 14 16:42:21 defer: Nice to know that! I thought CharSequence was just a fancy way of writing String :P Aug 14 16:42:30 Materialistic: and that app seems to be missing the dropshadow part Aug 14 16:42:41 but easy to add really Aug 14 16:42:55 StingRay_: but how do they have all the animations Aug 14 16:43:05 cause animations are not new in android Aug 14 16:43:07 :) Aug 14 16:43:54 ok then how do they do the Floating action button Aug 14 16:44:17 erm, it's a view ? Aug 14 16:44:23 astroduck: Strings are arrays of utf-16 chars. Sometimes it is interesting to use other representations for trading off space/memory through compression Aug 14 16:44:24 with a drawable Aug 14 16:44:29 hence apis taking charsequences Aug 14 16:45:02 you can't really overload or extend string functionality because it's final but you can create your own charsequences however you want Aug 14 16:45:05 Materialistic: when writing an app for pretty much any modern system, you aren't constrained to that system's design paradigm. You can pretty much make anything look any way you want it Aug 14 16:45:13 Materialistic: just looks like a view with a shapeDrawable… nothing Aug 14 16:45:52 Sorry for the dumb questions, i just want my first app to stand out Aug 14 16:46:06 then dont make it a copy of everything else :) Aug 14 16:46:16 go one step further :) Aug 14 16:46:39 for some reason my onClick is not working and i get no errors at all: http://paste.ofcode.org/BJhtgShhWnBuF2xvEtXDa4 can anyone help me? Aug 14 16:46:47 Any renderscript people here? I'm trying to implement a saturation and a white-balance filter using ScriptIntrinsicXXX but clearly I don't know what I'm doing and need some pointers :) Aug 14 16:46:49 oh and from a user, that cast app, there are a few really bad things with it and how it attempts to copy android l basics Aug 14 16:46:57 Material isn't in the support lib yet right? Aug 14 16:47:29 keviv: material is erm… nothing Aug 14 16:47:30 lol Aug 14 16:47:42 but if you mean the activity view transition stuff and the like then no Aug 14 16:47:54 Sorry, yea I mean that Aug 14 16:48:05 The templates I guess Aug 14 16:48:08 Well not really Aug 14 16:48:11 I dont get this, you can have dropshadows, cirlcles and a pastel pallet now Aug 14 16:48:43 material design is something google pushes to try and take the "design" away from programmers Aug 14 16:48:57 cause before they did such things, erm, things didn't look great Aug 14 16:49:11 they'll still manage to make it look shitty Aug 14 16:49:11 as far as I'm concerned, whatever design android comes with is good enough for me :p Aug 14 16:49:18 :) Aug 14 16:49:21 problem now is most apps all jump and act and look the same most of the time, even though the context is way different Aug 14 16:49:31 as a user I dont like that Aug 14 16:49:52 StingRay_, that's ironic because that was exactly one of their goals - consistency :) Aug 14 16:49:58 I think material will make that worse StingRay_ Aug 14 16:50:28 there is no app icon in the actionbar and there is a fixed set of colors Aug 14 16:50:28 I think the main goals were less consistency, more quality , as in adding design to it Aug 14 16:50:54 dunno, app guidelines put emphasis on consistency Aug 14 16:50:55 but if all cars were consistant in design and function, whats the point ? Aug 14 16:50:59 app design guidelines* Aug 14 16:51:16 StingRay_, all middle-class society! :D Aug 14 16:51:17 all games maybe ? ok all applications on PC/Mac ? Aug 14 16:51:36 StingRay_: i wouldn't mind it if all cars were ferarris Aug 14 16:51:47 yeah, but most of the apps will not go that extra mile of adding good animations, nice view transitions, etc, they'll stick to one of the fixed schemas and look the same as they do with holo, but with no actionbar icon Aug 14 16:52:12 I know retrofit can load a self signed certificate. Is there any way to just have it not check at all? Just needing to test something on a local dev server. Aug 14 16:52:22 that has nothing to do with retrofit Aug 14 16:52:33 StingRay_: Difference between all cars being the same and all cars having a steering wheel, pedals for gas and brake, similar windshield wiper operations, etc. Aug 14 16:52:48 JakeWharton sorry, okhttp. I always put them together in my mind Aug 14 16:53:01 jessie: look and feel I mean Aug 14 16:53:08 mattblang: onboardingEditorBackground Aug 14 16:53:09 Ferraris are very different from minivans, but most people could at least use the Ferrari. Aug 14 16:53:09 oops Aug 14 16:53:18 mattblang: afaik all it takes is to setup SSL Context in certain way, i think it was a singleton Aug 14 16:53:22 you expect a different look and feel based on context and use Aug 14 16:53:22 Question. When creating a list view what is the benefit of making a list view vs a fragment list view Aug 14 16:53:30 mattblang: https://github.com/JakeWharton/u2020/blob/3dc8859746134184265ae9657c21870a809a0263/src/debug/java/com/jakewharton/u2020/data/DebugDataModule.java#L107-L129 Aug 14 16:53:31 or at least the default context is singleton-ed Aug 14 16:53:45 ferraris are overpriced poorly made cars that require a ton of expensive maintenance Aug 14 16:53:48 StingRay_: Fair enough. I am not a fan of ever app having the Action Bar and such. Aug 14 16:53:53 How can I access the default font from a jni app? Aug 14 16:54:19 access in what way? Aug 14 16:54:35 load so I can render it Aug 14 16:54:37 If I reference a List within an instantiated class, but lose all the references to the class, is the class eligible for GC? Here's an example: http://pastebin.com/4QnUPtFM Aug 14 16:54:45 hm Aug 14 16:54:53 no idea, never did a jni "app" Aug 14 16:55:11 thought those can only ever be supporting libraries that mostly have nothing to do with the UI Aug 14 16:55:30 Using SDL, you can supposedly write your whole program in C/C++ Aug 14 16:55:38 you can make your own UI :/ Aug 14 16:56:00 (actually common for games..) Aug 14 16:56:27 skulltower: yes. Aug 14 16:56:55 I'd prefer to try to stick to the system settings if possilbe Aug 14 16:57:23 http://www.cocos2d-x.org is probably a better choice now unless you want to write an engine Aug 14 16:57:32 then SDL2 I mean Aug 14 16:57:38 ruler501: most games will bundle fonts Aug 14 16:58:03 as it supposed GUI controls and all kind of fun things out of the box now. Aug 14 16:58:32 I'll see if cocos2d-x will work for what I need Aug 14 17:00:13 * ravilov likes it best when games use standard system views and controls Aug 14 17:00:30 * ravilov doesn't play much on the phone though Aug 14 17:01:36 Can someone explain how CheckBoxPreference extends TwoStatePreference, but CheckBoxPreference was added in API 1, while TwoStatePreference was added in API 14? Aug 14 17:01:41 Materialistic: a ListView is a View while a ListFragment is a Fragment with a ListView in it - the benefit of the ListFragment vs Fragment is that there are some convenience functions regarding adapters and listviews in ListFragment Aug 14 17:02:00 I'm seeing crash reports for utilizing CheckBoxPreference because there is no TwoStatePrefence class defined for gingerbread Aug 14 17:02:01 :| Aug 14 17:03:26 Pyuruku, maybe CheckBoxPreference extends TwoStatePreference in >=14 but not in earlier apis Aug 14 17:03:51 So then how do I account for that... or rather why is gingerbread trying to use TwoStatePreference Aug 14 17:03:52 :| Aug 14 17:04:03 whats the benefit of using a list view vs a fragment list view Aug 14 17:04:37 Materialistic, I'm going to guess you use one or the other based on whether you use fragments or not? Aug 14 17:04:44 i dont know why, but a year or so ago I vowed never to use fragmentListView ever again Aug 14 17:04:49 Pyuruku, not sure, shouldn't happen really Aug 14 17:04:57 and I just used a fragment with a listView and was very happy Aug 14 17:04:59 :) Aug 14 17:06:24 Pyuruku, any way to compile your app against <14 sdk? Aug 14 17:06:35 StingRay_: but communication between fragments is difficult, no? Aug 14 17:06:37 I thought setting the min sdk took care of that?... Aug 14 17:06:48 Materialistic: erm no Aug 14 17:07:22 handlers, eventbus, interface … the fact you can tag and get instance and call directly Aug 14 17:07:37 and I'm a 3D vfx person, not a programmer! Aug 14 17:07:38 :) Aug 14 17:07:53 Pyuruku, it should, yes; this would be just for testing Aug 14 17:08:29 so then youre implying gradle is broken Aug 14 17:08:33 (which is probably correct) Aug 14 17:08:59 not implying anything, I wouldn't know about gradle as I've never used it Aug 14 17:09:06 just trying to come up with ideas Aug 14 17:10:46 Gradle itself is unlikely to be broken. Your gradle config more so. Aug 14 17:11:33 lol Aug 14 17:12:03 not sure how hard it is to specify a min sdk version Aug 14 17:14:01 minSdkVersion X Aug 14 17:14:24 i was being sarcastic Aug 14 17:14:54 Ah yes. Obviously :) Aug 14 17:15:39 gradle is pretty terrible right now Aug 14 17:16:06 it always amazes me that the changelogs state "performance improvements" but im still here with 5 minute build times Aug 14 17:16:14 my highest record is 6.5 minutes Aug 14 17:16:29 im afraid that im starting to miss eclipse / ant Aug 14 17:17:23 Test Aug 14 17:17:25 Woo nice Aug 14 17:20:38 Pyuruku: no you don't :P Aug 14 17:20:40 Pyuruku: five minutes? What is it doing? Are you using the daemon? Aug 14 17:20:58 yes daemon is on Aug 14 17:21:11 im also specifying 20 parallel threads, if that does anything Aug 14 17:21:20 Well thats pretty silly for a start. Aug 14 17:21:34 You think so? Aug 14 17:21:37 more threads <> better efficiency in many cases. Aug 14 17:21:40 I think its silly that it takes 5 minutes Aug 14 17:21:51 well it doesnt seem to help or hurt Aug 14 17:22:09 So do I . My admittedly small app takes about 5 seconds to rebuild from the command line. Aug 14 17:22:23 the app I work on is not small by any means Aug 14 17:22:30 but ant would be able to build it in under a minute Aug 14 17:22:38 nonetheless the most time would normally be gradle startup. Aug 14 17:22:46 and proguard Aug 14 17:23:06 ah well. gradle's great regardless of time IMO. Aug 14 17:24:45 How can I add an animation listener to a custom animation on the fragment transaction? Aug 14 17:29:02 Pyuruku: run gradle in verbose mode and find out what's taking time Aug 14 17:29:26 its the setup and proguard that takes the most time Aug 14 17:31:38 proguard is slow Aug 14 17:31:53 Yes, I've noticed Aug 14 17:31:59 gradle's setup is also slow Aug 14 17:32:44 there is next to no setup if you use the daemon I thought? Have you checked the daemon is functioning as it should because I can see why this amount of build time would frustrate you. Aug 14 17:35:44 <_AleX_> hi all ! i'm using a master/detail template. I'm trying to add a footer to list at left, with addFooterView, but it dont show. activity_menu_list.xml contains a fragment, should i replace its with a listview ? if yes, one-pane and two-pane mode will continue to work ? Aug 14 17:36:38 are there any tools for testing/diagnosing the accelerometer? all the sudden my phone doesn't rotate anymore Aug 14 17:36:42 Someone know how the best way to implement Multiple Choice Selection in the new widget, RecyclerView ? Aug 14 17:38:18 ironrock: typically that logic is tied to either the adapter or the activity and the only bridge to the view is the tracking of the finger click Aug 14 17:38:25 it's exactly the same for listview and recyclerview Aug 14 17:39:10 hey guys, any ideas on how I might be able to draw a line on specific coordinates in an imageview that's contained in a horizontal scrollview while keeping the line at those specific coordinates even through scrolling? Aug 14 17:39:49 Where do the rs/ directory go in a modern Android Studio project (Renderscripts)? Aug 14 17:42:22 rgr its enabled in GRADLE_OPTS Aug 14 17:42:32 defer: Listview we have listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL) and listView.setMultiChoiceModeListener(...); , in RecyclerView we don't have these methods Aug 14 17:44:05 ironrock: ah, I thought you were implementing it manually. You'll have to in recycler view afaik. Aug 14 17:45:47 defer: So I have to implement my own Multiple Choice Adapter... Thanks Guy! Aug 14 17:53:02 Jack3k3: I would probably edit the drawable directly rather than placing a line inside the view. Aug 14 18:07:55 how can I programatically get view desired size i.e. actual width or height like if attributes were set to "wrap_content"? Aug 14 18:10:56 mrpyo: view.getWidth() or view.getHeight(). only catch is that you need to wait until the view has been laid out Aug 14 18:11:22 thanks Aug 14 18:18:52 Compiling with api 20 is okay for general purpose projects? Aug 14 18:22:20 yes Aug 14 18:22:26 all projects should be Aug 14 18:22:35 alexfu what I ended up doing earlier was setting the viewgroup container of the fragment on top to clickable=true, and that seems to fix it as well Aug 14 18:30:57 Is there a reason why you wouldn’t want to compile against the latest version? Aug 14 18:31:32 Error:Execution failed for task ':app:processDebugManifest'. Aug 14 18:31:32 > Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1 Aug 14 18:31:56 m new to Android Studio. whats wrong with it ? Aug 14 18:34:57 minSdkVersion missmatch you're using the android l support lib Aug 14 18:36:54 i don't understand why one would compile with 20 when its still preview (unless its a wearable and you're using 20W) maybe i'm still confused about the whole numbering scheme which to me makes no sense Aug 14 18:37:14 heh g00s that's why i was asking Aug 14 18:37:35 i also thought they said don't submit api 20 apps to Play Aug 14 18:39:41 its all because of support library. v4 added to gradle as dependencies: compile 'com.android.support:support-v4:+' Aug 14 18:40:07 looks like this dont suooport API 8 !!! Aug 14 18:40:12 uh Aug 14 18:40:20 support-v4 supports API 4+ Aug 14 18:40:30 that's why it's named... support-v4. Aug 14 18:40:39 t2mkn use 20.0.0 Aug 14 18:40:55 or 20.0.+ whatever the latest is Aug 14 18:41:05 buildToolsVersion "20.0.0" Aug 14 18:41:14 on the support dependency Aug 14 18:41:27 g00s: 20 is not a preview. 20 is 4.4W. Aug 14 18:41:52 holy crap i'm confused. i thought 20 4.4W was missing some things Aug 14 18:42:08 because it was only the wearable apis Aug 14 18:42:20 API 20 has 2 different SDKs :P Aug 14 18:42:32 L is preview Aug 14 18:42:45 whats the best way to define onClick listeners inside my fragment? Aug 14 18:42:50 when i look at iosched 2014, the app is 19 and the wearable part is 20 Aug 14 18:42:51 i have both installed, dont know how to target which one Aug 14 18:47:43 I'm getting an error from the JOBB utility while packaging a folder that is only ~60KB. Anyone ever see that happen? Like a "java.io.IOException: FAT Full" error. Aug 14 18:50:31 how do i concat strings in java? :P Aug 14 18:50:52 + Aug 14 18:51:06 Depends on how frequently you are doing it Aug 14 18:51:13 or .concat() Aug 14 18:51:19 which is a string method Aug 14 18:53:09 if you do it frequently far better to us stringbuilder Aug 14 18:56:44 lasserix: no need to use stringbuilder in most cases by hand Aug 14 18:56:58 again depends on frequency Aug 14 18:57:00 because the compiler replaces "asd" + "asd" + "Ads" with a stringbuilder anyways Aug 14 18:57:09 if you look at compiled code Aug 14 18:57:19 oh yeah Aug 14 18:57:33 at least for for/while loops he does it Aug 14 19:00:04 I was using a ViewPager from the support library but decided to stick to API 15+. But I can't find a ViewPager for API 15+? What is it called instead? Aug 14 19:00:07 danijoo, if you know (at least roughly) what length your final string will be, it is generally advised to use StringBuilder explicitly Aug 14 19:00:21 and pass the expected length of course Aug 14 19:00:22 "advised" ? :) Aug 14 19:01:25 smitzer: ViewPager is only available in the support library Aug 14 19:01:43 danijoo, yeah I don't know the specifics and I'm not too familiar with what compilers do with the code, but I've seen a few guides that recommend it Aug 14 19:01:57 oh ok Aug 14 19:03:21 SimonVT, what do you use in the non support package? Aug 14 19:03:44 smitzer: theres no alternative Aug 14 19:03:46 Nothing Aug 14 19:04:24 really. Aug 14 19:04:31 Do I have to use support fragments too? Aug 14 19:05:12 No, there's a FragmentPagerAdapter for native fragments in support-v13 Aug 14 19:05:17 it seems then I have to use support for everything!? Aug 14 19:05:31 what is support-v13? Aug 14 19:05:45 A support library that contains PagerAdapters for native fragments Aug 14 19:22:07 and it has some accessibility crap, iirc Aug 14 19:41:11 I know this is controversial but this app is for personal use only. Is there anyway to read camera data from a background service? (not attached to any activity class?) I've seen a lot online saying "yes" and "no" and I've tried a few things but I can't get it working. Aug 14 19:46:28 Hi there. I have a tiny problem with action bar and "settings". I'm trying to use settings in from action bar in sdk10 and above but no luck so far: http://i.imgur.com/3mONOou.png?1 I extended ActionBarActivity, I added android:theme="@style/Theme.AppCompat.Light" for activity in AndroidManfest. I've added compile 'com.android.support:appcompat-v7:20.0.0' in build.gradle. Any ideas? Aug 14 19:48:30 deadmund, theoretically yes as I've seen some apps that can do that, but personally I wouldn't know how Aug 14 19:49:06 ravilov: I can't figure out how either! It seems it _must_ be tied to something that displays a surfaceview / surfaceholder. Aug 14 19:49:16 is there a way to remove the gap below the edit text in my dialog? http://images.rymate.co.uk/images/trVQwU3.png Aug 14 19:50:13 rymate1234: Change the padding on the EditText ? Aug 14 19:50:30 rymate1234, yes there is, just give me a few minutes with photoshop... Aug 14 19:50:41 (or else provide some code like you're supposed to) Aug 14 19:50:53 i was just getting to that.... Aug 14 19:50:56 the UI is https://gist.github.com/rymate1234/f5d9da18be6934a5fc07 Aug 14 19:51:04 lol Aug 14 19:51:07 you do that FIRST ;) Aug 14 19:51:31 hm, is that the inner view for an alertdialog? Aug 14 19:51:39 inner layout* Aug 14 19:51:52 and this is the creation of said dialog https://gist.github.com/rymate1234/fa1bc6babc8e45cf92cf Aug 14 19:52:08 rymate1234: you have a margin and you didn't change the padding. Are you even trying to change how it looks? Aug 14 19:52:28 ....whoops Aug 14 19:57:06 Napalm, what is your name again? Aug 14 19:57:14 simon lightfoot ah yes Aug 14 19:58:05 smitzer: I'm wondering why you want to know?! Aug 14 19:58:29 Napalm, looking for this thread Aug 14 19:58:30 http://stackoverflow.com/questions/24089136/why-my-android-actionbar-doesnt-update-when-it-is-explictily-changed Aug 14 19:59:09 i posted more code but you never answered (which is fine ofc i appreciate the help and understand you have better things to do but I still havent solved the problem) Aug 14 20:00:41 This is manifest file: http://sprunge.us/Lgaa and this is snipper from build.gradle http://sprunge.us/SecD and I don't see "settings" icon in action bar in sdk 10. ANy ideas? Aug 14 20:02:48 My actionbar text is getting changed like this: "Choose level" to "Choose l..." for some reason since I added a ViewPager. The problem is with the fragments in the viewpager Aug 14 20:04:26 Napalm, what is your home address again? Aug 14 20:04:26 :p Aug 14 20:04:31 lol Aug 14 20:11:01 err, how do I get my "watch" window back in Intellij? Its vanished! Aug 14 20:11:48 JakeWharton sweetness! You had linked me to your badsslsocketfatory earlier. also had to set hostname verifier to this (http://stackoverflow.com/a/15252178/1747491). that was of course after I had to get all the routes stuff handled with our IT department because im actually VPN to our internal network. lol Aug 14 20:12:34 rgr: I don't recall the specifics, but I believe there is a "revert to defaults" somewhere in the debugging tool thingy Aug 14 20:12:43 some drop down option or something like that Aug 14 20:12:55 (just going by very vague recollection here.. sorry :) Aug 14 20:13:28 yeah found it. Aug 14 20:13:30 thanks Aug 14 20:13:52 if anybody needs inspiration to implement their own RS filters - go here https://android.googlesource.com/platform/frameworks/rs/+/android-4.4.3_r1/java/tests/ImageProcessing2/src/com/android/rs/image Aug 14 20:13:55 (restore layout in the left hand vertical toolbar of the debug pane) Aug 14 20:14:33 hi guys I want token or user session variables of one running app in my app. I tried AccountManager but I did not see the account that app is using. Is there any other way for this? Aug 14 20:25:08 I have a ProfileActivity that is showing a ProfileFragment in the entire view, I want a button on the ProfileFragment to open a FollowingFragment (a list of who that person is following) that slides in over everything. Historically I've been sliding on a new activity. Isn't there a better way? Aug 14 20:26:09 My actionbar text is getting changed like this: "Choose level" to "Choose l..." for some reason since I added a ViewPager. The problem is with the fragments in the viewpager Aug 14 20:30:02 wait, i can just animate a new fragment in, and add that shit to the backstrack Aug 14 20:30:04 ez pz Aug 14 20:35:50 * ravilov has tried arch linux - wow, so totally not impressed at all Aug 14 20:45:48 Okay, can't find documentation on it -- how do you remove the effects of a ViewPropertyAnimator (say, to reset to what it was before without animating back)? Aug 14 20:47:05 what properties are you animating Aug 14 20:47:13 Just x Aug 14 20:47:55 animate translationX instead and then just call setTranslationX(0) Aug 14 20:49:12 A bit hackish -- and requires a lot of computation in case the animation is reversed mid-way through. Aug 14 20:52:11 then stop using VPA Aug 14 20:52:15 use a proper ObjectAnimator Aug 14 20:53:09 it's much more powerful and lets you just do things like call .reverse() Aug 14 21:02:54 Actually, you were right on the translationX -- I misinterpreted as 'translationByX' Aug 14 21:07:01 why creating a SharedPreferences crashes my app??? http://paste.ofcode.org/LnRqppJPVFbm5KabLHEEuJ Aug 14 21:10:12 How do you debug JNI apps on windows? I'm getting a strange crash Aug 14 21:15:53 why creating a SharedPreferences crashes my app??? http://paste.ofcode.org/LnRqppJPVFbm5KabLHEEuJ Aug 14 21:17:01 luist: did you step there with your debugger and verify exactly where it crashed or maybe checked the stack trace? Aug 14 21:17:43 rgr: uncaught exception Aug 14 21:18:10 rgr: it crashes because of the line 3 in the code i pasted :( Aug 14 21:18:43 so debug it and see what the crash trace says. Aug 14 21:19:38 break that statement down and examine the returns from the component calls. Aug 14 21:24:14 rgr: it seems you know what the problem is and don’t want to tell me ¬¬ Aug 14 21:25:29 luist: the problem is you are using that out of a method Aug 14 21:25:41 danijoo: thank you… Aug 14 21:25:44 move those calls in a method like OnCreate.. Aug 14 21:26:02 danijoo: just moved inside of onCreate Aug 14 21:26:17 There is no ApplicationContext before onCreate. that is the reason Aug 14 21:26:42 danijoo: is there a context inside of a Fragment? Aug 14 21:26:58 in a fragment you can do getActivity() Aug 14 21:27:02 and activity is a context Aug 14 21:27:17 okay thanks Aug 14 21:27:34 but classes have to be instanciated first. no context in static environment Aug 14 21:31:53 when I .replace fragments, can i have the old fragment save its state? is that where i make use of "savedInstanceState" ? Aug 14 21:35:13 explodes, I would say yes Aug 14 21:35:23 hence the request to break the statement down and actually see where it fell over. null context. Aug 14 21:36:06 Does anyone wants a commonsware license? Aug 14 21:37:33 Foxandxss, you should probably wait for some noob to ask for book recommendations :) Aug 14 21:37:54 maybe, I was talking with Mark and I remembered I have some codes to spare Aug 14 21:39:48 Foxandxss, very nice of you to offer. I would take some except I realized I generally don't have much use for books, that's not the way I learn Aug 14 21:40:11 yeah, not everyone learns the same way Aug 14 21:49:15 sometimes it's good to read the book ;) Aug 14 22:04:41 didn't books get deprecated Aug 14 22:04:49 explodes: not all of them Aug 14 22:05:41 explodes only to people who have no concentration Aug 14 22:08:17 Sorry, does anyone know hot create a new AndroidManifest.xml, 'cause I acidentally deleted it Aug 14 22:08:18 ... Aug 14 22:09:35 Maybe there was a bug and the Eclipse was showing me two AndroidManifest, so I deleted one. I shut down my computer, and when I opened Eclipse back, there was no more any AndroidManifest Aug 14 22:09:42 Ologn just picked up 'the lean startup' Aug 14 22:10:08 g00s, cool Aug 14 22:10:29 minimal viable product Aug 14 22:10:58 i keep having to remind myself of that Aug 14 22:11:04 add ALL THE THINGS Aug 14 22:11:17 wouldn't it be cool if ... Aug 14 22:11:48 hi Aug 14 22:12:27 Tuly-: git - use it Aug 14 22:12:28 I need to start UpdateService each time a change in database has been made. Is it a good idea to start IntentService from ContentProvider's insert? Aug 14 22:13:33 Tuly-: I suggest that you use git, and make frequent commits, you can add a git repository to your project folder. It has saved me from foolish mistakes several times! Aug 14 22:13:53 Mavrik: (or anybody who is listening :)) If I want to execute two independant operations simultaneously what is the recommended Android way? Say I'm already on a background thread (ie via an Intent) I have two operations that I need to run and sync up but don't want to do them serially. Should I use a standard Java thread or something like an AsyncTask? Aug 14 22:14:32 valder if it happens over and over again (that scenario) you can try rxjava Aug 14 22:14:48 valder, use whatever makes sense for you in that context, most stuff translates back to threads Aug 14 22:14:56 CombineLatest is like fork/join Aug 14 22:15:10 valder, if you have small tasks you wan to do parallel, ThreadPoolExecutor is your thing Aug 14 22:15:21 if you have a short-lived thing use a Handler or a Thread Aug 14 22:15:33 if you have something that has to do something on Main thread after, use AsyncTask Aug 14 22:15:40 or RxJava too :) Aug 14 22:15:45 * bankai_au gives g00s his commission Aug 14 22:15:48 RxJava? Aug 14 22:15:59 bankai_au thanks :) Aug 14 22:17:27 Mavrik: ah found RxJava.. Interesting.. but thanks.. I'll look into ThreadPoolExecutor... Isn't there a sublclass that uses/is a ThreadPoolExecutor? Aug 14 22:18:43 I don't have to interact with the UI directly. I intend to use a Notification of some sort to do that. Aug 14 22:19:07 Vaanir, Executors.newCachedThreadPool Aug 14 22:19:14 executor.schedule Aug 14 22:19:32 Executors are meant to be running for a longer time and processing tasks Aug 14 22:22:42 so what is this rxjava everyone keeps talking about? Aug 14 22:25:39 he explains better than I ever would be able to: https://www.youtube.com/watch?v=_t06LRX0DV0 Aug 14 22:29:14 I have implemented an ImageViewFactory, created an instance in the PageBody fragment and invoked it successfully. However, I now want to refactor and used nested fragments. So what is the simplest (&/or best) way to convey the instance to the nested fragments? Aug 14 22:29:52 PageBody is a class I crreated Aug 14 22:29:58 oh dear, 50 mins? will have to watch that some other time Aug 14 22:30:04 but thanks Aug 14 22:30:07 created, even (or odd) Aug 14 23:17:09 anyone see / read this http://www.amazon.com/Billion-Dollar-Apps-Implement-Strategy-ebook/dp/B00L9G8HJU ? Aug 14 23:17:23 i was going to write it off as some cheap get rich book, but looks pretty decent Aug 14 23:18:40 i think the focus is introducing a mobile strategy to enterprise, not putting out an app that makes $1bn Aug 14 23:22:35 hey dragorn see this http://www.wired.com/2014/08/gyroscope-listening-hack/ ? Aug 14 23:23:50 "And unlike the actual mics built into phones, there’s no way for users of the Android phones they tested to deny an app or website access to those sensors’ data." orly? i don't have any apps using gyro, i thought there would be a permission Aug 14 23:52:07 I changed the name of the main Application in my Android Studio project, but it won't stop building and deploying a package with the name of the original package. Aug 14 23:52:22 I've grepped through the entire project for the original package name, and it appears nowhere. Aug 14 23:52:39 AndroidManifest? Aug 14 23:52:44 build.gradle ? Aug 14 23:54:13 Yeah, neither of those. Aug 14 23:54:22 So, if I launch the application manually, it works. Aug 14 23:54:43 It's the pm install -r, and then the am start -n "" stuff that is messed up. Aug 14 23:55:03 I checked in Run/Debug configurations and it's checked as launching the 'Default Activity' Aug 14 23:57:29 Strangely I just fixed it by reimporting the project. Aug 15 00:06:31 under what circumstances is the result RESULT_CANCELED? In other words, what user input leads to that? http://hastebin.com/orijabevoy.coffee Aug 15 00:09:13 g00s: had a thought the other day of an IJ plugin, so i went through the doco and it says checkout the IJ code. few hours later i have 2.3g of idea code. going to take forever to index lol Aug 15 00:09:16 when you use setResult(RESULT_CANCELED). Or possibly automatically if the user presses back (not positive about that) Aug 15 00:11:10 JesusFreke: it doesnt set that anywhere except that one line, so I assume they intend it to handle back? Aug 15 00:15:54 JesusFreke:? Aug 15 00:16:21 TheDracle: i think you might be fucked, unless you can change it back. think you are supposed to open up module settings to change packagename Aug 15 00:31:11 bankai_au what do you think you'll do for the IJ plugin ? Aug 15 00:31:23 one guess Aug 15 00:31:34 something with robovm :P Aug 15 00:31:36 ;) Aug 15 00:31:40 \o/ Aug 15 00:41:00 hm, "30 US Companies Said To Be Violating EU Data Transfer Deal" .. the filing lists three main “patterns of deception” : firstly that the companies are misstating their actual purposes and practices of data collection and use Aug 15 00:41:42 good article in the atlantic today about advertising == spying http://www.theatlantic.com/technology/archive/2014/08/advertising-is-the-internets-original-sin/376041/ Aug 15 00:41:59 well tracking for targeted advertising Aug 15 00:49:38 I need help. It's about spinner Aug 15 00:50:30 I've followed about 10 different tutorials on how to get spinner2's items to be updated after some item on spinner1 is selected. Aug 15 00:50:42 anybody home? Aug 15 00:50:56 alexa a spinner just takes an adapter Aug 15 00:51:08 just call .notifydatasetChanged on the 2nd spinner when the 1st changes Aug 15 00:51:29 but to answer the other Q : the lights are on but ... nobody is home Aug 15 00:52:43 g00s, http://paste.ubuntu.com/8049642/ Aug 15 00:52:50 it's short code Aug 15 00:52:58 no errors Aug 15 00:53:20 but when tested on my device, no items appear at spinner2 Aug 15 00:53:53 i have to say though, the spinners APIs are obtuse as hell Aug 15 00:53:54 don't know why :( Aug 15 00:55:52 i'm not sure Aug 15 00:56:01 Kind of off topic, but I don't know where to ask. I used /system/bin/screenrecord and I pulled the mp4 files to my desktop. I opened the files in Movie Studio Platinum 13.0 on Windows and the video just appears green. Google searching just gives me a bunch of results on how to make green screens work with Sony Movie Studio. Can anyone here point me in the right direction? Aug 15 00:56:02 sprinkle it with log statements Aug 15 00:56:53 g00s, how to do that? Aug 15 00:57:12 make sure your listeners are firing for one ... Aug 15 00:58:22 g00s ? I don't understand it Aug 15 00:58:52 log.v() maybe? Aug 15 00:58:58 sure Aug 15 01:02:06 g00s, am I too dumb? "Log" cannot be resolved Aug 15 01:02:18 and it's underlined in code Aug 15 01:02:42 You need to import it at the top of your class Aug 15 01:02:45 import android.util.Log; Aug 15 01:05:56 g00s, SilentByte, log shows that listener "fires" (runs, is called) Aug 15 01:06:18 however, it doesn't do what is supposed to Aug 15 01:06:53 lines 45-55 --> http://paste.ubuntu.com/8049642/ Aug 15 01:07:20 it should check something and then it should SET items for spinner2 Aug 15 01:10:08 it looks like it sets it upon start Aug 15 01:10:10 :( Aug 15 01:12:15 can you paste your layout file? Aug 15 01:13:30 sure Aug 15 01:13:35 second Aug 15 01:14:28 SilentByte, here it is --> http://paste.ubuntu.com/8049747/ Aug 15 01:16:10 and strings --> http://paste.ubuntu.com/8049764/ Aug 15 01:20:58 SilentByte, anything found yet? Aug 15 01:21:47 looking at it now, I'll letcha know in a few Aug 15 01:22:31 thanks :-) Aug 15 01:48:26 SilentByte, any clue? Aug 15 01:49:01 Yes Aug 15 01:49:07 just one more sec, sorry Aug 15 01:52:36 ok Aug 15 01:53:27 ok Aug 15 01:53:32 sorry for the delay Aug 15 01:53:33 http://paste.ubuntu.com/8049928/ Aug 15 01:53:37 That should work Aug 15 01:54:34 You were setting a new ArrayAdapter on the secondAdapter when you should have been calling ArrayAdapter.createFromResource like you did for the first adapter Aug 15 01:56:12 Also, the onItemSelected method gets fired upon setting the adapter, so I added a check in there to see if it's the first layout... If it is, don't set the adapters on spinner2 Aug 15 01:59:19 SilentByte, thank you! Aug 15 01:59:30 I have no words enough to thank you! Aug 15 01:59:43 heh, no prob, happy to help =] Aug 15 02:00:53 It works perfectly Aug 15 02:01:18 Glad to hear it Aug 15 02:02:54 Hi, any recommended local document DB's that any of you like? couchbase-lite seems to be the most popular one. Any others? Aug 15 02:03:20 All the best! Aug 15 02:23:35 hello all Aug 15 02:24:46 anyone know of tutorials that show how to properly do a transparent overlay on the screen. I'm trying to build a utility that allows a switch on/off to allow / disable on-screen gestures. **** ENDING LOGGING AT Fri Aug 15 03:00:00 2014