**** BEGIN LOGGING AT Fri Feb 17 03:00:01 2017 Feb 17 03:41:14 "For a while, it seemed the Windows Phone/Mobile downward spiral was abating somewhat, judging from research from various sources, but after clocking in at 1.1 percent in Q4 2105" ... Feb 17 03:41:25 sad! almost 100 years from now, still struggling Feb 17 03:45:22 Well yea if they are still using 2017 technology Feb 17 03:49:40 we all still remember that a few years ago gartner said windows mobile would be at 20% in 2017, in front of iOS, right? Feb 17 03:57:12 I thought it would be Feb 17 03:57:26 In 2011 I was hoping Android would get 33% share Feb 17 04:09:05 blucher! Feb 17 04:11:34 Leeds if they had 20% i think android and iOS would have improved more, the duopoly is pretty stagnant Feb 17 04:11:55 better than a monopoly Feb 17 04:11:57 amirite Intel Feb 17 04:11:59 AMIRITE Feb 17 04:12:40 I hope to god Ryzen is good Feb 17 04:13:01 but i think companies and startups are struggling to fund apps for even 2 platforms now ... a 3rd would be a huge burden Feb 17 04:13:01 because if it isn't that blows away another year of Intel making anything but "more efficient" versions of the same CPU that they have been shovelling out this decade so far lol. Feb 17 04:13:36 g00s: well that's where things like react native and cordova come in Feb 17 04:13:51 strangely enough, flutter too Feb 17 04:14:18 yup! Feb 17 04:14:27 knowing that apps still come to iOS first, i wonder if google is saying "use flutter, and be first to both!" Feb 17 06:38:40 hey there, i'm having issues with the android USB stuff Feb 17 06:38:45 when i connect a USB device it shows a permission dialog Feb 17 06:38:54 but if i hit 'ok' it doesn't trigger an intent or anything as far as i can tell Feb 17 06:39:02 what do i need to register to get that? Feb 17 06:43:09 enable debugging in developer options Feb 17 06:44:13 sorry Feb 17 06:44:16 i was unclear Feb 17 06:44:26 i mean i'm connecting a USB device, like a flash drive, to the android Feb 17 06:44:45 and using Feb 17 06:44:45 filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED); Feb 17 06:44:55 the issue is that when i use this Feb 17 06:44:59 android automatically asks for permission Feb 17 06:45:10 i want to have a callback which detects the permission Feb 17 06:45:24 i can easily request permission on my own with usbManager.requestPermission(usbDevice, mPermissionIntent); Feb 17 06:45:33 and get a callback for THAT Feb 17 06:45:43 but the default system permission request i don't know how to monitor Feb 17 07:04:25 Dammit, the Spectrum TV app won't do background sound onPause() Feb 17 07:05:19 * capella looks for where to file the bug... Feb 17 07:15:56 is there anything special about deploying a normal simple android app to fire os like fire stick? Feb 17 07:16:40 in studio i connect to it in adb and use adbtowifi extenstion, build completes sucessfully Feb 17 07:17:55 yet dont see anything on the fire tv / stick device Feb 17 07:18:25 so i built the apk and did adb install myapp.apk Feb 17 07:18:47 im not worried about amazon sdk or anything to do with this. this is a simple app for me. Feb 17 07:19:52 yet i still cant find it anywhere there. says its in /data/tmp/myapp.apk .... ive sideloaded other apks and adb install *.apk always installs it correctly where you can see it. Feb 17 07:20:58 very frusterating the app is literally a faq on how to use the device i modded. its just a view of text. and i cant deploy it :( Feb 17 07:21:54 could this have someting to do with allow mock locatoins? Feb 17 07:23:02 im not too familliar with mock locatoins, my impression is that is how i can easily deploy to android with that selected, and myabe fire os doesnt have that compatibility, idk. Feb 17 07:25:28 logcat? how do you hack a fire? Feb 17 07:27:47 hack? Feb 17 07:28:16 i guess i could run locat as the gradle is running... im very new to android dev Feb 17 07:28:38 its just i can deploy to a phone easily every time. Feb 17 07:29:29 i check mock locations. when i connect the ide to the ip of the fire device the gradle completes with no errors yet nothin appears and it just sits there in /data/tmp/app.apk Feb 17 07:30:00 after i type adb install app.apk with fire device connected Feb 17 07:33:22 logcat from the fire /target android device before /after your adb install command... not sure what grade Feb 17 07:33:38 er, grade d Feb 17 08:09:03 What is the recommended method of connecting googleApiClient in onStart-onStop OR onResume-onPause of activity lifecycle? Feb 17 08:09:46 onstart Feb 17 08:12:23 tx raoul11, also, in which lifecycle method should we request for fused location? Feb 17 08:13:33 well depends Feb 17 08:14:06 for example i got it on a fragment, so i usually ask for it on setUserVisibleHint Feb 17 08:14:38 but make sure you're connected first to the api, and also dont forget runtime permissions Feb 17 08:25:24 ok..i am requesting user for his device location at a periodic interval until found, if I do it in onStart, and my activity gets in onPause before extracting the location, would the location requests keep draining device battery life? Feb 17 08:26:08 You need to unregister from the location updates. Feb 17 08:34:28 Annoying problem with that 52 bit error. JDK 8. Whats the best solution? Is there a command to list all my dependecies and see which one is compiled with jdk 8? Feb 17 08:35:10 52bit error? O.o Feb 17 08:35:42 Mavrik, unsupported class file version 52.0 Feb 17 08:36:24 in the preview tab? Feb 17 08:36:58 ahh Feb 17 08:37:11 raoul11, Preview tab? Feb 17 08:37:15 Using Java 8 compiled JARs does that yeah. Feb 17 08:38:00 Mavrik, same libs only new android sdk and android studio Feb 17 08:38:21 where are you seeing this error maxflax ? Feb 17 08:38:33 in AS itself? Feb 17 08:38:35 Mavrik, So first im looking for identifying which dep is the culprint and after that do something about it Feb 17 08:38:59 raoul11, when trying to run my app. Compiling works Feb 17 08:40:44 raoul11, So I suspect one of my jars is compiled with jdk 8 instead of 7 Feb 17 08:41:48 So when I've located the faulty one I need to do something about it. not sure what thou yet.. try force it act as a jdk 7 or something Feb 17 08:41:59 javap -verbose | grep "major" Feb 17 08:42:18 You can loop through all the classes via bash/whatever Feb 17 08:43:05 Wintereise, did that but showed that all was compiled with 7 Feb 17 08:43:17 `-` Feb 17 08:51:42 Did it the long a hard way. created a new project. added all my dependencies to that and then started to eliminate them one by one and found the one. Says major jkd 7 on that jar but yet it's the one. How can I force it to work with jdk 7 Feb 17 08:52:29 Are you sure you're not getting an error because you're trying to run the IDE (Android Studio) with Java 7? Feb 17 08:52:30 tried adding "targetCompatibility = '1.7' Feb 17 08:52:30 sourceCompatibility = '1.7'" but to no avail Feb 17 08:52:56 The jars don't get rebuilt Feb 17 08:53:00 Mavrik, using embedded JDK Feb 17 08:53:18 in android studio, so it's jdk 8 Feb 17 08:53:19 You're using whatever the original dev built it using. If it's open source, rebuild it yourself Feb 17 08:53:24 Double check and double check JDK path in project configuration. Feb 17 08:53:43 Mavrik, it's openjdk 8 Feb 17 09:07:23 hello, im relatively new to testing. i have an app, with no tests yet, which uses firebase. how would i go about testing my activities/fragments in isolation? Feb 17 09:08:24 atm i receive the following error when running a robolectric test on my main activity, "java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process null." Feb 17 09:09:12 I wonder, why if run fails will android studio not point out which file failed. In what world is that not of interest for a dev? Feb 17 09:38:13 files don't fail, pgms do... Feb 17 09:38:41 you expect as to Debug your runtime issues? Feb 17 09:38:47 confused Feb 17 09:40:02 Say I have a button with certain styles that I've customized using the XML editor. But now I want to dynamically create this button in code. What's the best way to save the "styles"/attributes of this button to be created for later? Feb 17 09:40:16 Instead of say, having to manually input the attributes in code Feb 17 09:40:51 Or do people just do it manually? As in: Button button = new Button(); button.layout_gravity = "center" ... etc. ? Feb 17 09:41:49 inflate it? Feb 17 09:42:45 inflate the xml with layoutinflater Feb 17 09:42:50 that is put it in an xml on it's own so that you can it and it still works... then you can just inflate it as many times as you want in code or in xml Feb 17 10:06:25 hi? Feb 17 10:06:45 I need to find a way to store refresh tokens between installs of my app Feb 17 10:06:49 any ideas? Feb 17 10:12:02 gmg85, consider sharedprefs Feb 17 10:50:32 Hey all.. I'm struggling with running gradle. It doesn't seem to ever end. Feb 17 10:51:29 I get gradle build running and running.. I'm at 23 minutes now. Feb 17 10:52:31 if you're running something that you're confident that it shouldn't happen, try canceling and running it again Feb 17 11:00:48 indiancomet shared prefs do not get cleared out everytime you install an app?Especially if you clear data..? Feb 17 11:01:46 i had that issue once. Feb 17 11:03:05 Syzygy how did you sort it out? Feb 17 11:03:39 https://developer.android.com/guide/topics/data/autobackup.html that's the cause Feb 17 11:06:33 Syzygy this will work for android 6 and above...what about android < 6? Feb 17 11:07:40 no idea and something just came up so I'm a bit busy now Feb 17 11:08:46 gmg85, you need a third party solution (or your own server with accounts and such) if you want to save stuff across installs Feb 17 11:09:30 Syzygy no worries...thanks anyway Feb 17 11:10:12 Zharf ok...will continue doing that...just wanted to know if there was a pure android approach.. Feb 17 11:10:44 Oh, I thought you had a problem where your data wasn't cleared Feb 17 11:10:58 Syzygy the data is cleared... Feb 17 11:11:07 In any case, try firebase by google, that has some account stuff Feb 17 11:11:43 that's probably the closest you can get to pure android approach. Feb 17 11:11:46 has anyone worked with accountManager.setAuthToken/.setPassword? Feb 17 11:11:53 also login via google+/facebook Feb 17 11:12:49 hey guise Feb 17 11:12:51 Syzygy already using google sign in Feb 17 11:13:10 Its the refresh token that i need to store for later... Feb 17 11:13:55 how can I execute a fragment's code ONLY when that fragment gets focus? Feb 17 11:14:11 because my case is that there are two fragments in a viewpager, and well, both get loaded at startup Feb 17 11:15:17 Odaym, put a focus changed listener on a root layout of the fragment? Feb 17 11:15:33 hm Feb 17 11:15:44 Odaym, http://stackoverflow.com/a/24485845/857853 Feb 17 11:15:47 I was thinking of placing the code in ocreateView to be in another method from the lifecycle Feb 17 11:16:13 ahhhh right right Feb 17 11:16:15 i know that method Feb 17 11:16:47 thanks Feb 17 11:40:21 Hi all, how can you use the echo shell command in code? the result of Runtime.getRuntime().exec("echo $?") isn't what I expected Feb 17 11:51:04 FrancescoV: what's the result? Feb 17 11:52:45 gdrc: http://pastebin.com/3C3AR6Fi Feb 17 11:55:03 Uhh. Feb 17 11:55:06 No, you can't. Feb 17 11:55:23 Since you don't have a bash environment available. Feb 17 11:55:34 And `echo $?` does something very sh shell specific. Feb 17 11:55:50 Just check the actual return code of the ping with Java code. Feb 17 11:57:59 Mavrik, I've done this, and I want to read the transmitted / received packages. But Is the result format always 'X packets transmitted, X received' ? Feb 17 11:58:05 1 packets transmitted, 1 received, 0% packet loss, time 0ms Feb 17 11:58:05 Okay I'm confused. Why would I use when I want to have the element be added through code? Feb 17 11:58:17 I'm using a Pattern & Matcher for to read those values Feb 17 11:59:27 Let's say I've designed an item of a list a certain way in XML. But now I want to put that item that contains all those elements I used in a separate XML file to be "included" dynamically in code. How would I go about doing this? I'm confused what you mean to inflate it? Feb 17 11:59:45 And also, getting an ID handle to the newly added item so I can change things on it like the text that gets displayed on it for instance Feb 17 12:00:35 Mavrik, do you think this is ok to parse a ping result? http://pastebin.com/732jRrQu Feb 17 12:02:03 hey, I tried googling but couldn't quite get the difference between android:backgroundTint vs app:backgroundTint? Feb 17 12:02:03 Typically through the menu inflater? getMenuInflarer().inflate(R.menu., ) Feb 17 12:02:07 Usually done in onCreateOptionsMenu Feb 17 12:03:38 Menu Inflater? Feb 17 12:04:00 ya Feb 17 12:04:00 Wait I'm confused...this is on the main part of the app. I just want to dynamically add my elements Feb 17 12:04:07 This isn't on the menu/actionbar Feb 17 12:04:34 Here maybe I should make an example.. Feb 17 12:04:57 You can dynamically add without any xml, works fine Feb 17 12:05:42 Get an instance of Menu, and call add (...) on it. Reference here - https://developer.android.com/reference/android/view/Menu.html#add(int, int, int, java.lang.CharSequence) Feb 17 12:08:43 This is what I'm trying to do: http://pastebin.com/WSkt4fwb Feb 17 12:09:04 I want to use custom_text.xml as basically like a template for how I want the text to look each time I add a new one. Feb 17 12:09:20 But I'm still not sure how to do the code to add it properly using that XML template: custom_text.xml Feb 17 12:09:28 FrancescoV, why are you even running a command-line tool from your app Feb 17 12:09:31 and to also customize the actual text Feb 17 12:09:35 It'll break on so many devices if they don't ship it. Feb 17 12:10:11 InetAdresss.isReachable() isn't good enough for you? Feb 17 12:12:31 someFucktionToUseTemplateAbove Feb 17 12:12:32 haha Feb 17 12:12:35 Function* Feb 17 12:12:55 Mavrik, good point, I'll check it out Feb 17 12:14:08 Odaym, yes that's the point of making an example. I'm assuming you know how to do it via code? Feb 17 12:14:26 Odayn, what's the way to make an element/view dynamically from an XML template? Feb 17 12:14:46 your problem is similar to this guy's? http://stackoverflow.com/questions/35009950/android-add-menu-item-programmatically-with-xml-template Feb 17 12:16:11 maybe you need styling http://stackoverflow.com/questions/6072226/how-to-style-the-menu-items-on-an-android-action-bar Feb 17 12:17:29 Syzygy: the code that I'm trying to build is a google provided sample. Feb 17 12:17:49 Too Many tpots Feb 17 12:18:13 then try what i said, stop execution and try again Feb 17 12:18:19 Odaym: http://pastebin.com/WSkt4fwb Feb 17 12:18:25 seems like gradle got stuck in a loop somewhere or something Feb 17 12:18:59 I rebooted my system and restarted AS. Feb 17 12:19:27 and it's been running gradle for about 15 min now. Feb 17 12:20:06 Can't get much more "stop execution" than rebooting :) Feb 17 12:20:32 Okay so basically inflater.inflate() will give me back what I want via the template Feb 17 12:20:33 did you change anything from that sample? Feb 17 12:20:42 Nope. Feb 17 12:21:00 So.. RelativeLayout rl = (RelativeLayout)inflater.inflate(R.layout.custom_layout); Feb 17 12:21:31 try seomthing like gradle assembleDebugSampleProject --verbose Feb 17 12:21:34 or --stacktrace Feb 17 12:21:38 and check the logoutput Feb 17 12:22:08 That would be in CLI right? Feb 17 12:22:15 yes Feb 17 12:22:30 you can maybe us gradlew instead of gradle if that doesn't work Feb 17 12:22:36 Okay.. I'll shut down AS.. Feb 17 12:30:58 I installed QPython 3 on my Android device Feb 17 12:31:31 How do I install additional libraries. I'd like to use NLTK on my smartphone Feb 17 12:31:40 . -> ? Feb 17 12:35:12 gmg85, why do you wan to clear the sharedprefs on install? Feb 17 12:35:52 wouldn’t you want the token to persist across installs? Feb 17 12:36:09 indiancomet i do not want to...if the user uninstalls the app and clears data...the refresh token is lost Feb 17 12:36:30 indiancomet was wondering how i persist the refresh token between installs.. Feb 17 12:37:11 like others mentioned, you need your own server side solution or a 3rd party sol Feb 17 12:37:48 If the user's phone is new enough it shouldn't be a problem because the default sharedprefs file gets backed up Feb 17 12:38:26 but if the user has uninstalled the app, then they would go through the auth flow again and you can get the token then Feb 17 12:52:42 How do I find out which name to import for a certain function? For example, getSystemService(). I looked on the docs and I can't figure out what I have to import to be able to use it Feb 17 12:53:45 its from Context Feb 17 12:54:37 so strange, my RV keeps readding the same item i am deleting Feb 17 12:55:52 Hi, raoul11 Feb 17 12:55:57 hi mela Feb 17 12:56:05 how is it re-adding it? Feb 17 12:56:16 did you notify it was removed? Feb 17 12:58:00 adding it on the bottom Feb 17 12:58:02 yes Feb 17 12:58:54 nothing is happening in the adapter? Feb 17 12:59:03 code? Feb 17 13:03:58 the array is acting up Feb 17 13:08:51 Ashiren, how do I import it? android.context doesn't exist D: Feb 17 13:12:53 android.content.Context, ClydeSlims Feb 17 13:14:58 ah thanks Feb 17 13:15:28 Is RecyclerView only provided by the support library? Feb 17 13:16:11 Wintereise, huh that's weird. I did import android.content.Context.*; but it's like greyed out in Android Studio. And also getSystemService() still can't resolve Feb 17 13:16:26 Greyed out means unused Feb 17 13:18:01 Definitions according to Android Studio - https://puu.sh/u7gzd/f346de0c62.png Feb 17 13:20:19 ClydeSlims: you need some context, i.e. Activity to use. i.e. activity.getSystemService() Feb 17 13:20:31 you cant use it everywhere Feb 17 13:20:44 Oh I see Feb 17 13:23:29 h1, h2, h3, ... for formatting text like headers should go in the character formatting palette or in the paragraph formatting palette? Feb 17 13:28:29 In google docs it's among the character formatting options Feb 17 13:28:50 well, there are no h1, h2, ... but there are title, subtitle, etc. Feb 17 13:34:27 http://stackoverflow.com/documentation/android/topics spoon feeder improving Feb 17 13:51:13 raoul11: HAI Feb 17 13:51:23 what have I missed Feb 17 13:51:25 ? Feb 17 13:52:07 wtf Feb 17 13:52:16 ?! Feb 17 13:52:16 go attend lilpoosh! Feb 17 13:52:23 he's in the hospital Feb 17 13:52:29 I'm with the pooshettes Feb 17 13:52:40 mrs kicked u out? Feb 17 13:52:53 nah, she's with my mom for the weekend Feb 17 13:52:58 I'm with the kids Feb 17 13:53:26 nice Feb 17 13:53:43 when are you choppin him off? Feb 17 14:33:41 hi, i'm running android JNI example: https://github.com/googlesamples/android-ndk/tree/master/hello-jni which works file Feb 17 14:33:47 fine** Feb 17 14:35:26 but moving the public native String stringFromJNI(); declaration to another java class and calling that results in error: ndk java.lang.UnsatisfiedLinkError: No implementation found for... Feb 17 14:38:38 btw that's runtime exception. compiles without errors. Feb 17 14:49:26 solved. don't know why current code works. but solved. Feb 17 15:04:50 bytefire, learn how jni works maybe? :) Feb 17 15:05:13 the methods must match exactly on the native and java side Feb 17 15:30:34 Zharf: you're right. but method names matched correctly. problem was with JNICALL in front of method name in native implementation. and the fact that extern "C" was attached to method signatures (as in the sample i linked above), instead of method definition Feb 17 15:31:05 oh you're writing in c++ too, that's even worse Feb 17 15:31:13 but you're right, i should learn how jni works. Feb 17 15:32:14 Zharf: yeah. but the thing is it should be intuitive. i found it a bit arbitrary. still i should read how jni works :) Feb 17 15:32:18 I like to use RegisterNatives instead of naming my functions like that in native Feb 17 15:32:25 it's clearner imo Feb 17 15:32:36 Zharf: that sounds like a better approach Feb 17 15:33:09 http://eclipser.xmms2.org/git/xmms2-android.git/tree/jni/service.c#n51 http://eclipser.xmms2.org/git/xmms2-android.git/tree/jni/service.c#n304 like this Feb 17 15:35:03 the worst thing I ever encountered with jni was using C types instead of JNI types (int vs jint, etc) Feb 17 15:35:21 that just messes up everything in a glorious way Feb 17 15:35:37 and there's pretty much no useful info anywhere when it happens Feb 17 15:39:39 having to register natives leads to 2 places where you can be wrong and not just 1... Feb 17 15:41:06 sure but it's way cleaner Feb 17 15:42:16 guys Feb 17 15:42:41 my app has 22MB of cache files and I don't know why Feb 17 15:43:13 all it has is less than 1MB of 2 png imagens and a 11 KB .mp3 file Feb 17 15:46:47 Look what's in your apps cache directory Feb 17 15:50:58 do the new ART binaries count as app cache? Feb 17 15:52:26 hi, i have an oneplus 3 with android 7.0 (h2os 3.0), i want to edit some values in framework-res.apk, but after i put the file back and set the permission bits, the system still doesn't think it's valid. any hints? Feb 17 15:52:35 exact message: asset   : Asset path /system/framework/framework-res.apk is neither a directory nor file (type=0). Feb 17 15:52:44 there are also two avc denied messages like: main    : type=1400 audit(0.0:116): avc: denied { getattr } for path="/system/framework/framework-res.apk" dev="dm-0" ino=4773 scontext=u:r:zygote:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file permissive=0 Feb 17 15:52:55 (the last permissive=0 part should be due to my "setenforce 0" command, as i thought that was the problem) Feb 17 15:53:01 hello, im new to testing. im using firebase for my app (have listener callbacks in my mainactivity). is it possible to test my app without firebase? it seems this would be much easier if i followed MVP Feb 17 15:53:37 felixonmars: try #android-root or something, this channel is just for app dev Feb 17 15:54:20 SimonVT: hmm, thanks. sorry for the mess Feb 17 15:55:16 SimonVT: found the cache dir Feb 17 15:55:32 it has loots of file named slice-*-classes.dex Feb 17 15:56:26 many are from support libs, others from firebase Feb 17 15:57:16 there is no way to shrink the size they occupy without removing these libs? Feb 17 15:57:18 Probably some instant run stuff, or art as dragorn suggested. Nothing you need to worry about Feb 17 15:58:27 Could try disabling instant run to see if they disappear, or just build from the command line Feb 17 15:58:59 the same things happens when I build a signed apk and uploads to play store Feb 17 16:00:05 I am worrying about that because my app is very simple. It does only play an audiofile and share the same audio file Feb 17 16:00:24 the apk occupies less than 2MB Feb 17 16:00:37 I did everything to occupy the smallest size possible Feb 17 16:00:47 guess I have to cut some libs then. Feb 17 16:01:26 Such a shame the admob and firebase libs would leave so much digital footprint like this Feb 17 16:02:53 You can proguard to cut down on methonds Feb 17 16:04:11 already did, I'm afraid Feb 17 16:04:13 minifyEnabled true Feb 17 16:04:13 shrinkResources true Feb 17 16:04:14 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' Feb 17 16:04:30 here are the options I use in my grade.build file Feb 17 16:08:31 Hi! Feb 17 16:09:32 A friend of mine is encountering this error, but the solution in it isn't working for him: http://stackoverflow.com/questions/27698976/how-to-fix-section-mismatch-errors-during-cross-compile-of-android Feb 17 16:10:06 linux_unix-10, unfortunately we're much more app-centric here, you could try #android-root, or more likely the xda web forums are the best place to ask Feb 17 16:10:19 Oh. Feb 17 16:10:26 My bad! Feb 17 16:10:48 Thanks, anyways! Feb 17 16:17:24 dear all , i have a question , i asked it in #android but thay told me , dev may help Feb 17 16:17:43 i got a new android device :) smasung C7 , i have a small problem , when i have no WIFI , a small E icon appear inested of WIFI icon , i know this related to Mobile Data , but i did disable mobile data , then this E icon hase to be disappear ! correct ? Feb 17 16:17:53 http://imgur.com/rbCxm1T Feb 17 16:18:00 i did disable the mobile data Feb 17 16:18:08 http://imgur.com/ZGsDHLT Feb 17 16:18:19 but still have this E icon Feb 17 16:18:32 any advice , i iwll be thank full Feb 17 16:24:33 beshoo: Well, off topic for this channel. Try #android later, maybe someone who can help joined then Feb 17 16:24:51 beshoo: #android may help Feb 17 16:25:50 Thank you very much , as i side i asked there , you ahre here more advanced and pro users , so that is why i deside to go a head and ask Feb 17 16:42:38 hi Feb 17 16:42:38 Zharf: thanks that helpful Feb 17 16:43:51 when i am using scrollview the layout inside the scrollview is performing wrap_content behaviour while its height is set to match_parent ,so what to do now? Feb 17 16:49:44 ?? Feb 17 16:54:47 when i am using scrollview the layout inside the scrollview is performing wrap_content behaviour while its height is set to match_parent ,so what to do now? Feb 17 16:55:17 What to do now? Don't repeat your questions Feb 17 16:55:26 Second, it's height should be set to wrap content Feb 17 16:58:44 whose height? Feb 17 17:00:20 pikachu, the inner view should be wrap contnet Feb 17 17:01:01 i tried but its not working Feb 17 17:09:09 truckcrash i am taking the scrollview inside one relativelayout Feb 17 18:05:58 when i am using scrollview the layout inside the scrollview is performing wrap_content behaviour while its height is set to match_parent ,so what to do now? Feb 17 18:10:21 If the content of the scrollview is the same size as the scrollview (as it would be with match_parent), there'd be nothing to scroll Feb 17 18:10:47 no Feb 17 18:10:54 yes Feb 17 18:11:19 the problem is with the button inside the relativelayout which is inside the scrollview Feb 17 18:12:07 this button i want to align at the bottom of my screen but with scrollview its not appearing at the bottom Feb 17 18:12:33 means the alignparentbottom is not working Feb 17 18:12:52 Maybe looking for https://developer.android.com/reference/android/widget/ScrollView.html#attr_android:fillViewport ? Feb 17 18:14:35 But if you mean that you don't want the button to scroll at all, then it shouldn't be in the scrollview Feb 17 18:16:46 no i want to scroll it Feb 17 18:18:12 SimonVT thankyou mate Feb 17 18:22:56 im new to testing and im using firebase in my app. is it possible to isolate firebase and use dummy data (in my main activity)? i have all firebase listeners in my mainactivity Feb 17 18:23:29 yes, this is possible Feb 17 18:23:52 first off, you’d move those listeners outside of your activities Feb 17 18:24:28 yes, that was my first thought. i was thinking of rewriting my app using the mvp pattern Feb 17 18:24:38 you’re gonna want to make some kind of DataRepository object, which is responsible for fetching the data Feb 17 18:24:59 hello Feb 17 18:25:13 from there, you can create a mock repository which would feed dummy data to your activity Feb 17 18:25:36 I've made some changes to my appwidgetprovider class and I've tried to build but I get some errors not so much clear to me Feb 17 18:26:20 error: strings in switch are not supported in -source 1.5 (use -source 7 or higher to enable strings in switch) Feb 17 18:26:26 s73v3r, thank you, do you have any examples which show that? Feb 17 18:26:43 i’m working on some, but they’re long ways off Feb 17 18:26:59 atm it seems impossible to write a robolectirc test for my main activity cause of all the firebase dependencies Feb 17 18:27:00 I don't know how to solve it Feb 17 18:27:05 Any ideas? Feb 17 18:27:07 cristian_c: in your build grade, set your source to java 7 Feb 17 18:28:02 compileOptions { Feb 17 18:28:02 sourceCompatibility JavaVersion.VERSION_1_7 Feb 17 18:28:03 targetCompatibility JavaVersion.VERSION_1_7 Feb 17 18:28:04 } Feb 17 18:28:26 s73v3r: ok, so is java version used by android sdk different than java version used by the OS? Feb 17 18:28:30 yes Feb 17 18:29:09 KukOrkan: basically, you want to not have any hard dependencies like Firebase in your activity Feb 17 18:29:27 s73v3r: ok, but I need to locate the gradle file. Is a file belonging to the app project or sdk build tools? Feb 17 18:29:36 (platform tools / tools) Feb 17 18:29:38 your build.gradle file Feb 17 18:29:43 its’ yours Feb 17 18:30:16 I remember I used gradle much time ago by compiling libsuperuser Feb 17 18:30:36 I try to locste the file Feb 17 18:30:43 thanks Feb 17 18:32:12 s73v3r, yeah im realising how bad of a design that is now when writing my tests Feb 17 18:32:51 think ill just rework my app to follow mvp as it modularizes everything Feb 17 18:34:03 yeah, the problem is that all the sample code for everything out there tends to do it that way Feb 17 18:34:12 so people start thinking they should do it that way Feb 17 18:34:20 yes exactly Feb 17 18:34:29 happened with me :) Feb 17 18:39:15 s73v3r: I've found 'compilation options' in android-sdk-linux/tools/ant/build.xml Feb 17 18:39:23 no Feb 17 18:39:42 the block i pasted goes in the android{} section in your build.gradle Feb 17 18:39:56 Feb 17 18:40:03 same for java.source Feb 17 18:40:20 I'm trying to locate build.gradle Feb 17 18:40:34 it’s in your project Feb 17 18:40:41 look in the project folder Feb 17 18:41:57 s73v3r: ok, but it's not internal to my project, I've found it in libsuperuser/build.gradle Feb 17 18:42:06 yes, it is internal to your project Feb 17 18:42:12 your project has a build.gradle Feb 17 18:42:24 btw, it's the first time I get that error message Feb 17 18:42:54 probably because it’s the first time you used Java 7 features without saying your project should use Java 7 Feb 17 18:43:24 I've compiled this app many times (not libsuperuser but my app thzt uses libsuperuser as library) and I never got that error Feb 17 18:43:32 don’t care Feb 17 18:43:35 ah, ok , sorry Feb 17 18:43:44 that’s what your error syas Feb 17 18:43:45 now, I understand Feb 17 18:44:34 yeah, it's the first time I use switch case syntax in my java code (not first time I use String objectsmin the app project) Feb 17 18:46:00 ok,compiloptions block is not existent in build.gradle, so I supoose I've tovadd it Feb 17 18:46:32 (I've got only repositories, dependencies blocks in buildscript Feb 17 18:47:25 you should have an android block Feb 17 18:48:29 unfortunately, not Feb 17 18:48:40 if you want, I can pastebin Feb 17 18:48:43 no Feb 17 18:48:50 you’re looking at the wrong build.gradle, then Feb 17 18:49:01 :O Feb 17 18:49:08 in that same directory, there should be a folder for your project. go in there Feb 17 18:49:19 or, better yet, look in the sidebar of Android Studio Feb 17 18:49:22 yeah, now I've seen Feb 17 18:49:49 ok, I've found the second build.gradle in libsuperuser/libsuperuser Feb 17 18:49:57 that should have the android block Feb 17 18:50:09 ok, found the android block Feb 17 18:51:28 compilesdkversion 17, buildtoolsversion "21.1.1" defaultconfig is minsdkversion 4 targetsdkversion 17 Feb 17 18:51:34 no. Feb 17 18:51:39 just add the thing I pasted Feb 17 18:51:53 ok, so I0ve to add that, I know now Feb 17 18:52:12 the compileoptions block into android block Feb 17 18:52:17 yes Feb 17 19:01:03 hmm, wish there were a way to detect new screenshots without keeping a service persistent in the background... Feb 17 19:04:27 s73v3r: I'm afraid I've to recompile libsupersuser library Feb 17 19:04:45 after the change to build.gradle Feb 17 19:05:03 did you change their build script? Feb 17 19:05:05 or yours? Feb 17 19:05:22 it's strange because I've used switvh case in my app code, it's not related to libsuperuser Feb 17 19:05:48 s73v3r: I've got sources from github, much time ago Feb 17 19:05:55 i didn’t ask that Feb 17 19:06:06 i asked if you changed their build script, or yours Feb 17 19:07:09 I believe I've used the libsuperuser script, too much time has spent Feb 17 19:07:12 are you using this one? https://github.com/Chainfire/libsuperuser Feb 17 19:07:25 yes Feb 17 19:07:30 why are you editing their scripts if you’re not modifying their code? Feb 17 19:07:54 I0ve always included libsuperuser library in my app Feb 17 19:08:18 because it requires superuser permission to execute a command Feb 17 19:08:36 again, that’s not what I asked Feb 17 19:08:51 but it's the first time I encountered an issue with that library Feb 17 19:09:17 no it’s not, because your issue has absolutely nothing to do with that library Feb 17 19:09:17 I've change the build.gradle now because I was suggested here Feb 17 19:09:18 none Feb 17 19:09:39 yeah, it has nothing to do with thatnlibrary Feb 17 19:09:40 your build.gradle, or the superuser build.gradle? Feb 17 19:09:55 but it's the only build.gradle I own Feb 17 19:10:09 no, it’s not Feb 17 19:10:23 hey all Feb 17 19:10:24 build.gradle is only located in libsuperuser sources directory Feb 17 19:10:45 that’s the build script for that library Feb 17 19:10:50 (I've tried a locate build.gradle from command line, before) Feb 17 19:10:50 your app also has a build script Feb 17 19:10:56 you don’t need to do that Feb 17 19:11:00 just go into the app directory Feb 17 19:11:19 ok, I revert the changes in libsuperuser build.gradle Feb 17 19:11:47 yeah, my app has build.xml as I said at first Feb 17 19:12:04 then you have some weird build setup Feb 17 19:12:11 :O Feb 17 19:12:47 I guess I could write a light-weight service that uses a FileObserver Feb 17 19:12:47 and that build.xml you pointed to earlier sounded like it was in the sdk directory, not in your app’s directory Feb 17 19:12:55 but yuck... Feb 17 19:13:03 yes, sorry, in the sdk directory Feb 17 19:13:16 you don’t want to modify the stuff in the sdk directory Feb 17 19:13:21 set it up to run on-boot... Feb 17 19:13:44 my local.properties points to sdk.dir = ... android-sdk-linux directory btw) Feb 17 19:14:05 that’s where it’s supposed to be, and that’s completely unrelated to the subject at hand Feb 17 19:14:06 ah, ok, I don0t change anything in sdk directory Feb 17 19:15:37 my app directoey contains only androidmanifest, ant.properties, build.xml, local.properties, proguard-project.txt and project.properties Feb 17 19:15:49 plus bin, gen, libs, res and src directoris Feb 17 19:15:54 *directories Feb 17 19:16:13 you’re probably going to want to look at the build.xml there Feb 17 19:17:09 build.xml, who still uses that.... Feb 17 19:19:40 there are some import lines, between them there is also so, I suppose it inherits stuff by sdk build.xml Feb 17 19:24:06 hey misterli Feb 17 19:26:22 s73v3r: ok, I've removed one of three errors, changing 1.5 to 1.7 in compilation option properties (java.target and java.source) in android-sdk-linux/tools/ant/build.xml Feb 17 19:27:12 so, switch case issue is solved Feb 17 19:27:19 s73v3r: thanks Feb 17 19:28:03 I get a error: cannot assign a value to final variable yet, but that's another story... Feb 17 20:04:48 Is there a way to move where android studio stores its config files etc to a partition outside home Feb 17 20:05:17 I have expanded my linux system with another partition as my home is full Feb 17 20:05:29 on this parition I keep android studio install and the sdk Feb 17 20:05:55 but android studio still keeps its config in ~/.AndroidStudio2.2 Feb 17 20:05:59 can I move that too Feb 17 20:10:11 symlink? Feb 17 20:10:40 s73v3r: I think avd did not install successfully as a result Feb 17 20:10:50 Is avd stored in the .android folder ? Feb 17 20:10:56 probaably can symlink Feb 17 20:11:10 copy the folder to the other partition and create a symlink of than in homwe Feb 17 20:11:12 home Feb 17 20:11:28 I created a 200GB partition and mounted it in /mnt Feb 17 20:11:54 why not mount that partition as /home? Feb 17 20:11:58 so it was outside home wanted everything to be in there I thought android studio would automatically store its config in whichever folder root it was run from Feb 17 20:12:05 err, as your home dir Feb 17 20:12:11 s73v3r: because /home is already in another partition Feb 17 20:12:51 even if I mount it as /home/200gbpartiton ~/.Androidstudio will be in the outer /home which is the smaller full partition Feb 17 20:12:52 to answer your earlier question, avds are stored in the .android dir Feb 17 20:13:39 hmm so I need to move the '.android' folder as well as the '.AndroidStudio2.2' folder Feb 17 20:14:07 you may not need to move the .AndroidStudio folder Feb 17 20:14:44 s73v3r: but that partition has no space Feb 17 20:15:01 hmm I could just move .android too Feb 17 20:15:15 i think my AVD install is broken as a result of space Feb 17 20:15:29 can I delete .android Feb 17 20:15:54 then symlink the ~/.android to a ~/200gbpartition/.android Feb 17 20:15:59 and then reinstall avd ? Feb 17 20:16:22 try it Feb 17 20:16:30 or wherever the 200gb partition is located currently its outside home Feb 17 20:20:07 really cool https://aiexperiments.withgoogle.com/ai-duet Feb 17 20:30:04 s73v3r: hmm android studio really is deeply rooted in using /home on linux (: Feb 17 20:30:36 hmm actually wait Feb 17 20:32:32 s73v3r: How do you optimise AVD performance on linux ? Feb 17 20:32:38 you don’t. you use a device Feb 17 20:32:48 Got it Feb 17 22:28:28 Hello, Feb 17 22:28:40 I'm building an application that talks to a bluetooth device. Feb 17 22:28:52 However the device cannot handle the messages fast enough Feb 17 22:29:14 (I think it's because of a too small baud rate, but not sure) Feb 17 22:29:59 Is there a way to check when I send a bluetooth message (I'm using serial communication) that the channel stack is empty before sending a new thing ? Feb 17 22:44:01 do your own rate control Feb 17 22:44:17 there should be tons of general purpose IO libraries that help with this as well Feb 17 22:50:20 2:42:42 PM I want to mirror my phone into my computer, and use the computer keyboard and trackpad to control the phone. 5.1.1 android. USA. I expect this uses a USB cable. Feb 17 22:51:10 I would like to know if there is a better android IRC client than ANDCHAT. Feb 17 22:51:41 * tripelb looks up if andchat is open source Feb 17 22:55:16 http://alternativeto.net/software/andchat/ no but... Found this. Feb 17 23:04:23 hi. i have a project with a library that has some jni stuff i want to attach gdb to, and then an app that uses the library. is there a guide for this configuration? Feb 17 23:04:35 ive tried the --attach flag to ndk-gdb but i just get ERROR: Could not find application's data directory. Are you sure that the application is installed and debuggable? Feb 17 23:11:39 brian____: I think the most up to date "doc" for that tool is `-h`, unfortunately Feb 17 23:11:45 Are you using an up to date NDK? Feb 17 23:11:58 I don't work on it myself, but iirc we added support for something like that recently Feb 17 23:12:11 r12b Feb 17 23:12:30 i got this working once before but for whatever reason the magical incantation isn't in my bash history Feb 17 23:12:36 so i can't remember how i did it Feb 17 23:13:17 https://github.com/android-ndk/ndk/issues/13 Feb 17 23:13:48 So supposedly --attach should have done it Feb 17 23:14:10 i guess im not sure what my working directory is supposed to be and/or how i tell it about the library versus how i tell it about the app Feb 17 23:14:46 If you stick around in IRC I'll ask the maintainer of ndk-gdb when he gets back from wherever he went off too Feb 17 23:14:58 im not going anywhere :D Feb 17 23:15:07 ill keep poking at different permutations to see if i can get it to take Feb 17 23:15:25 You might try grabbing r13b for good measure Feb 17 23:15:52 idr if we had fixed any ndk-gdb bugs in that release or not Feb 17 23:16:41 heh, i may have to. im slightly afraid of it breaking my build chain though Feb 17 23:18:43 tripelb: try asking #android? Feb 17 23:19:11 I did. Feb 17 23:19:41 Google, so far has given me 2015 results Feb 17 23:21:33 https://www.youtube.com/watch?time_continue=1&v=x8F4ErrrbcI Feb 17 23:21:33 neat Feb 17 23:22:02 https://www.irccloud.com/pastebin/dx3SICFd/android+mirror+comment+tripelb Feb 17 23:22:23 That was a suggestion in the comments. Feb 17 23:23:27 I had my phone rooted with KingRoot but some undisclosed part of android 5.1.1 kicked it. Before it didn't would complain about KingRoot daily. Feb 17 23:25:00 But that paste in was 2013 Feb 17 23:27:35 oh huh, the name that's in /data/app on the device doesnt match whats in AndroidManifest.xml Feb 17 23:27:38 I bet that'll mess it up Feb 17 23:30:56 OK then this -> http://www.upubuntu.com/2015/09/screencastingmirroring-android-device.html?m=1 <-- is the one I will try. Feb 17 23:31:07 When not raining out. Feb 17 23:31:47 I need to make a phone e call which will cut my connection. L8r Feb 17 23:34:47 * gltn is now playing: Concentration Programming Music Feb 17 23:52:18 i am getting this when try to add a AVD Unable to detect adb version, adb output: /home/ramdom/Android/Sdk/platform-tools/adb: 3: /home/ramdom/Android/Sdk/platform-tools/adb: Syntax error: Unterminated quoted string Feb 17 23:56:03 explain "try to add a AVD" Feb 17 23:57:23 well, before run application, i have to select one AVD, then it request to create one, after this process nothing is created Feb 17 23:59:54 is adb running Feb 18 00:03:31 Bah, Samsung dude is going to jail :/ Feb 18 00:03:43 cool Feb 18 00:04:02 S. Korea is mad @them srsly Feb 18 00:04:16 they kinda were in bed with a super corrupt governmnet Feb 18 00:04:42 So continues the WSJ reporting I'm seeing also Feb 18 00:05:25 Bad enough Apple wants to yell @Qualcomm ;p Feb 18 00:51:41 treeman4: yes AVD is running Feb 18 01:01:19 danalbert: i think ive given up at trying to figure it out for now, im debugging by just staring at my source instead :( Feb 18 01:23:19 Hey, don't want to spam up this chat, but I have a java.lang.OutOfMemoryError error with my app. If you're able to help me please open up a dialog box and PM me. Thanks. Feb 18 01:24:09 er, the channel isn't exactly busy, and your question would seem to be on-topic - so ask here :) Feb 18 01:26:40 Sweet. Feb 18 01:27:59 i am getting this error Unable to detect adb version, adb output: /home/ramdom/Android/Sdk/platform-tools/adb: 3: /home/ramdom/Android/Sdk/platform-tools/adb: Syntax error: Unterminated quoted string Feb 18 01:30:25 So I posted my app to the app store 2 days ago and whenever someone tries to download it with a phone it seems it won't open but instead give an error saying "Unfortunately Twiddle has stopped working" before the app could even launch on the device. The error report is here: http://pastebin.com/T40udf04 The phone that I am installed and tried running it on has over 20 GB of storage so I don't think that's the problem. I'm fairly new to android Feb 18 01:30:26 program so I hope this is an essay fix. Here is the link to my application in case you're curious: https://play.google.com/store/apps/details?id=com.safariagaming.twidle Feb 18 01:38:11 If anyone could help me that'd be splendid! :) Feb 18 01:38:54 er... do you know the difference between RAM and flash storage? :) Feb 18 01:39:47 RAM is like processing power and flash storage is like space left on the device? Feb 18 01:40:22 no Feb 18 01:40:47 anyway, you need to do some reading at https://developer.android.com/topic/performance/graphics/index.html Feb 18 01:41:33 But in short the problem is that it is using too much memory? Feb 18 01:42:22 would that seem like another way of saying you've run out of memory? Feb 18 01:42:30 Yes. Feb 18 01:42:43 But how is that possible before the app even has started? Feb 18 01:42:55 read the stack trace... Feb 18 01:52:18 tassilo_tazz: while your app is loading, it opens images to display - it's using too much memory and dying before it's finished loading the images, so you need to use less memory there Feb 18 01:52:56 Ok, thank you. I'm reading through the link. I'll let you know how it works out. Thanks again! Feb 18 01:55:09 the obvious first thing to look at is how big are the images you're loading? Feb 18 02:04:37 What the fuck... that's so much work... I'll have to do that with all my layout small, med, large, xlarge, folders?! Feb 18 02:11:32 sure, you don't have to fix it if you're happy with your app crashing Feb 18 02:17:36 is there anything special i need to do to use log.redirect-stdio true? my sim goes into a bootloop once i set it Feb 18 02:40:34 is anyone familiar with reverse tethering via usb?? does it work with a non-rooted android? Feb 18 02:41:26 i have a usb ethernet rndis device, i want to connect it to my phone via usb otg, and access it as a network device Feb 18 02:41:59 when i connect it, it shows up as usb0, but there is no way to configure it since ifconfig doesn't work Feb 18 02:42:46 i see conflicting info wether this should work or not without root. Feb 18 02:45:36 the phone is a nexus 6p **** ENDING LOGGING AT Sat Feb 18 03:00:01 2017