**** BEGIN LOGGING AT Fri Jan 27 03:00:02 2017 Jan 27 03:00:44 error running android studio Jan 27 03:00:45 http://pastebin.ca/3760759 Jan 27 03:00:54 i try all Jan 27 03:02:55 cannot help you with that Jan 27 03:03:45 you should try to use gradle in command line and build a simple project with gradlew, looking at what you said earlier Jan 27 03:04:01 and then, maybe, try to properly run AS Jan 27 03:04:21 if you have an underpowerered computer, this will not be smoth Jan 27 03:04:23 smooth* Jan 27 03:16:49 FIXED Jan 27 03:20:30 http://tools.android.com/recent/androidstudio23beta3isnowavailable Jan 27 03:21:27 AS is eating all my ram, i have 4GB Jan 27 03:21:53 you need more, much more Jan 27 03:23:37 Hi, what's the best way to implement the navigation drawer? The Android docs and most guides seem to recommend using fragments, and swapping between them for each drawer item. But the Google I/O app swaps between activities. Jan 27 03:23:41 I've asked a friend that works as an Android developer and he suggested to implement it using the Google I/O way as well. What are the advantages/disadvantages of the two implementations? Jan 27 03:23:43 Thanks Jan 27 03:25:31 i'd do it w fragments Jan 27 03:26:07 hey, im trying to launch a "video gallery pick intent" and im trying to find the definiton for REQUEST_TAKE_GALLERY_VIDEO any ideas? Jan 27 03:26:13 i cant find it in google Jan 27 03:26:21 what should i import for supportin this constant Jan 27 03:28:47 anyone? Jan 27 03:31:45 bubbely: http://stackoverflow.com/a/31047555 Jan 27 03:32:45 Melatonina: that doesn't show the def =/ Jan 27 03:33:17 Melatonina: it uses REQUEST_TAKE_GALLERY_VIDEO but doesn't include its declaration.. im looking for the declaration Jan 27 03:33:28 it's a constant that you define yourself Jan 27 03:33:44 ..oh Jan 27 03:33:44 =p Jan 27 03:33:51 bubbely: private int REQUEST_TAKE_GALLERY_VIDEO = 666; Jan 27 03:34:08 bubbely: private static final int REQUEST_TAKE_GALLERY_VIDEO = 666; Jan 27 03:34:21 your the man melatonina Jan 27 03:34:43 you can see similar examples here: https://developer.android.com/guide/components/intents-common.html Jan 27 03:35:18 bubbely: use that number, otherwise it won't work Jan 27 03:35:23 ok Jan 27 03:35:26 haha Jan 27 04:12:17 anyone know a quick way to get some videos on the android emulator ? Jan 27 04:12:34 i need to test gallery stuff Jan 27 04:13:33 Ologn http://www.informit.com/store/3d-user-interfaces-theory-and-practice-9780134034485 Jan 27 04:16:57 i am trying to use gradle.properties in users\myuser\.gradle but is like AS don“t use for global Jan 27 04:17:25 gradle.properties has org.gradle.jvmargs=-Xms256m -Xmx1024m Jan 27 04:17:43 then for all projects i will have that Jan 27 04:17:52 that speed up AS Jan 27 04:20:44 is like AS is not using that gradle.properties in home Jan 27 04:23:05 g00s, I have to try Daydream...the local Verizon store is supposed to have it, but it wasn't set up last time I went in Jan 27 04:24:09 g00s, Ologn, https://www.androidexperiments.com/experiment/android-3d-mouse Jan 27 04:26:53 does not look like very ergonomic to me lol Jan 27 04:27:36 adq, cool Jan 27 05:01:23 pixel 2 is even more expensive O.o Jan 27 05:01:36 oh a budget pixel also Jan 27 05:13:41 anyone here? Jan 27 05:15:33 no Jan 27 05:21:15 Haha. I have a quick question. Does anyone know what to do when the dropdown for a spinner updates weirdly after scrolling up and down? Here is my adapter code: http://pastebin.com/raw/FtaHEDLk. When i click the spinner and it drops down, the correct items are highlighted green but when i scroll all the way down, and then back up, additonal items are also highlighted green. This is very odd behavior, does anyone know what is Jan 27 05:21:15 causing the issue? Jan 27 05:22:39 It is quite puzzling Jan 27 05:23:29 huh google developed their own chipset Jan 27 05:23:54 yaa Jan 27 05:24:30 For tensor processing Jan 27 06:10:43 hi Jan 27 06:10:49 what happens if button and text size is fixed and we are applying padding? Jan 27 06:39:34 what is the mechanism to invoke main class and how they are called by DVM automatically? Jan 27 06:40:14 can sombody point me to a chanel about android rooting? Jan 27 06:46:30 cerealkill see topic Jan 27 07:09:46 hey guys. im trying to call exported JNI functions from C Jan 27 07:09:51 or C++ Jan 27 07:09:53 not from Java Jan 27 07:09:56 is that possible Jan 27 07:10:10 and if so, how do i do that. Do i need to use JNI to call JNI functions? Jan 27 07:12:25 im guessing i need to init the JNIEnv and jobject for the function im calling Jan 27 07:12:33 cause the JVM would usually do that right? Jan 27 07:13:22 umm Jan 27 07:14:02 normally in java code there is native function(...) which calls the C(++) code Jan 27 07:14:12 works kind of like proxy between C and java Jan 27 07:14:46 http://www.inonit.com/cygwin/jni/invocationApi/c.html Jan 27 07:14:47 so essentially its calling from java ~ Jan 27 07:14:56 i guess i need to do something like this Jan 27 07:15:17 im just not sure what *class* im calling from. Jan 27 07:16:05 oh it looks like other way around - youre calling / creating jvm from c program *_* Jan 27 07:16:44 yeah. but in this case, i dont actually have java code im calling, its a JNI compiled .so file Jan 27 07:19:11 i thought it should be executable that runs java program, no? Jan 27 07:54:55 Hi Jan 27 07:55:04 where i can find R.java file? Jan 27 07:55:49 you shouldnt. it generated Jan 27 07:55:56 on google i did search a lot but they are saying for some app>build>generated>....etc Jan 27 07:59:05 build/generated/source/r/debug/app.package.../R.java Jan 27 07:59:25 but it contains mostly generate id ints Jan 27 07:59:40 ya but where is this build folder located? Jan 27 08:00:04 in app root folder Jan 27 08:00:24 or its module Jan 27 08:00:44 in app root folder there are only three ,manifests,java and res Jan 27 08:00:45 perhpas you need to build or run itfirst Jan 27 08:00:56 ya i already ran it Jan 27 08:01:12 its higher Jan 27 08:01:31 its parent of src folder Jan 27 08:01:43 at the same level where build.gradle is Jan 27 08:02:38 ok let me have a look Jan 27 08:04:02 got it Jan 27 08:04:04 thanks Jan 27 08:18:11 why toast is independent of activity? Jan 27 08:30:46 hello, i would like develop somethign for personal use. i want to play music when screen is off or even after home button press. what is my best option? using an Service or i can do it other way? Jan 27 08:51:39 Bored: Service Jan 27 08:53:08 Ashiren and if i am playing on videoview so i need to dispatchKeyEvent and listen to home button, and then i just start the service? because i am not sure how continue play a videoview after home button is pressed Jan 27 09:01:12 videoview? Jan 27 09:01:33 oh i would think of something like MediaPlayer in Service, play/pause button would dispatch events to the service Jan 27 09:01:47 so everything about playing music would be done in service Jan 27 09:01:57 and gui would be needed just to control Jan 27 09:03:49 Ashiren my biggest plan is to play videos on the app and when the screen is off or home button is pressed keep playing only audio Jan 27 09:05:10 which is why i thought to create Service that will continue play the audio exactly from the same spot where it stopped when home button was clicked Jan 27 09:06:21 havent played with videoview much. does it contain internal MediaPlayer? Jan 27 09:07:37 yes Jan 27 09:07:42 it's a crap view though Jan 27 09:08:06 use exoplayer for your video playing needs Jan 27 09:09:00 well my bigger plan is to play video and keep playing audio even after home button is pressed Jan 27 09:09:15 use exoplayer Jan 27 09:09:21 you'll need a service though Jan 27 09:09:30 Service for the audio right? Jan 27 09:09:35 yep Jan 27 09:09:39 ok thanks :) Jan 27 09:10:03 hi. I'm trying to get Android Auto messaging to work with an XMPP client. Reading aloud works, tap-responding with "I'm driving" works, but when I try to "answer" with voice command, AA says ""chat app either not installed or needs to be updated"" - what can be done about this? Jan 27 09:32:03 Ge0rG, I'd take a look at Telegram app source Jan 27 09:32:12 I think you need to define a voice hook for "send message" Jan 27 09:32:19 which isn't AA specific, but works for whole phone Jan 27 09:34:33 i tried to get the screen from a device and emulator both are on level 19 into pixel perfect without success, no output in console, windows remain black, someone has a suggestion? Jan 27 09:37:32 "get the screen"? Jan 27 09:40:34 Mavrik, a screenshot Jan 27 09:41:45 i googled for pixel perfect issues but no information, hierachy viewer works Jan 27 09:42:59 I have no idea what you're talking about. Jan 27 09:43:05 Is pixel perfect an app? Jan 27 09:44:57 pixel perfect is part of the monitor, in studio Tools -> Android -> Android Device Monitor Jan 27 09:47:05 Hi all, is it possible to restart your app when the user kills it (swipe it away)? Jan 27 09:52:01 FrancescoV, did you tried to restart it via a service which is STICKY? Jan 27 09:52:08 That could be maybe a solution. Jan 27 09:53:13 drindt, I haven't tried that yet, I'll test it out Jan 27 09:53:56 FrancescoV, and the service you can start at BOOT_COMPLETED. Jan 27 09:54:40 FrancescoV, no, the user kinda told you they don't want you to run. Jan 27 09:54:48 sticky services will restart eventually though, yes Jan 27 09:56:06 I'm trying to inject a rest client via android annotations into my BaseApp class. However the restClient object is still null when it gets called in BaseApps onCreate method. Jan 27 09:56:35 FrancescoV, there's also Service#onTaskRemoved() Jan 27 09:57:00 Mavrik, thanks for your input Jan 27 09:57:14 However from what I understand the BaseApp_ which is generated by AA is called first and then calls super.onCreate(); thus restClient should already be initialized. here's the generated code: https://gist.github.com/Syzygy2048/21030cf5bd19c4ed26f4f25fe33b126e Jan 27 09:57:23 Mavrik: good idea, thanks. I've been following the AA howto and looked into the example messenger, but it looks like I've done something wrong in my code :> Jan 27 09:57:26 I need to restart my app at: boot - crash - killed. Boot & crash already works Jan 27 09:57:48 Ge0rG, afaik the part that handles voice messaging isn't AA specific, but it's general Google Now thing Jan 27 09:57:55 I can't find the actual handling code though. Jan 27 09:58:13 Mavrik: yeah, it is generic, also for Wear etc. Jan 27 09:58:29 this is my last attempt: https://github.com/ge0rg/yaxim/commit/4fc73c4c2f81b896697a0d6ee68b49ccd03f3408 Jan 27 09:59:00 I'm using the same receiver with different actions for heard/reply, but the intent isn't fired at all by AA, when trying to respond Jan 27 09:59:21 it works for the "I'm driving" button though, and I kind of hoped it would use the same logic and same intent. Jan 27 09:59:35 maybe it's only AA that's botched on my CM13 device Jan 27 09:59:59 why isnt this fragment cover the entire layout (leaves the activity's bottom button visible) Jan 27 10:00:05 matchparent allover Jan 27 10:01:44 Ge0rG, does it work if you try it with Google Now outside of AA? Jan 27 10:02:13 i tried to capture the screen from a device and emulator both are on level 19 with pixel perfect without success, no output in console, windows remain black, someone has a suggestion? Jan 27 10:03:33 Mavrik: I never used Google Now :( and I have no clue how to tell it to respond to a notification Jan 27 10:03:46 But that's what you're using here. Jan 27 10:03:54 AA voice commands ARE Google Now. Jan 27 10:05:22 Mavrik: AA has a special "reply" command that doesn't work the same in Now Jan 27 10:06:41 It looks exactly the same as the Now/Wear thing to me. Jan 27 10:07:18 probably I'm doing it wrong, in some insanely stupid way. Jan 27 10:09:19 The error sounds like a manifest or something issue. Jan 27 10:10:22 Mavrik: probably yes, googling it only turned up a bunch of confused whatsapp users; also nothing interesting in logcat when the error happens :( Jan 27 10:15:23 Marvik, this works great. http://pastebin.com/U6ZxLCHa any remarks on thins? Jan 27 10:15:46 Google Now has the "voice actions" API, I'm not sure it is really a prerequisite for AA Jan 27 10:17:35 FrancescoV, I would murder you in a sleep if you'd do that in any of apps on my phone. Jan 27 10:17:39 Wtf? Jan 27 10:17:51 User WANTS to close your app and you just relaunch it in his face? Jan 27 10:17:55 it's not for an app in the play store... Jan 27 10:18:01 Then use Kiosk mode APIs. Jan 27 10:18:14 for a specific business device Jan 27 10:19:03 it's for a poc, an app that needs to run always on a pax a920 Jan 27 10:20:00 maybe I should create a Service like this to restart myself in case you kill me.. :p Jan 27 10:49:53 Someone use Pixel Perfect? Jan 27 10:50:20 no Jan 27 11:10:49 * thepoosh raoul11s raoul11 Jan 27 12:05:48 Someone use Pixel Perfect? Jan 27 12:29:07 I need some help. I'm making a Manager that has addListener(L), removeListener(L) and notifyListeners(M). They're really simple methods that add, remove and loop over a list. The problem is that sometimes the last listener has been removed when notify gets called, and then no one ever gets the message. So I want messages to queue up and be delivered to the first listener that registers. How to do that? I was thinking HandlerThread because everything here i Jan 27 12:30:13 But is it possible to queue messages into a MessageQueue without a Handler? And then have MQ flood the first added HandlerCallback? Jan 27 12:49:18 Zta77, can you check if your removeListener(L) got called between the entering the notifyListeners(M) and exiting the notifyListeners(M)? Jan 27 12:52:08 Drat. It's cool how any GradientDrawable.Orientation which isn't aligned with 90 degrees just becomes whatever ordinal direction it feels like. TL_BR shouldn't be this hard. Jan 27 12:57:41 I'm trying to do method based injection with android annotations, however I get the following error: method annotated with org.androidannotations.annotations.Bean can only have the following parameter: [ any type ] Jan 27 12:57:48 https://gist.github.com/Syzygy2048/0b7519baeadf5bdc7e8fcc7ea8d70d44 here's my code. Jan 27 12:58:40 FrancescoV: I think I'll just check if my listeners are empty and add the message to a queue. When I add a listener, I'll check if this was the first listener added, and then flush the queue to it. Jan 27 12:59:25 and here's the documentation. As far as I can see the only difference is that i'm injecting together with a non injected variable and that I'm injecting into a method within a bean rather than an activity. https://github.com/androidannotations/androidannotations/wiki/Enhance-custom-classes Jan 27 14:18:41 why wouldnt a fragment added dynamically to an activity via a FragmentTransaction (with the container being the id of the activity' root element), take up the entire height of that activity? Jan 27 14:21:34 because the contained doesnt take up entire height? Jan 27 14:22:26 the activity? Jan 27 14:23:06 does it have match_parent Jan 27 14:23:10 yes Jan 27 14:23:16 both the activity and the fragment Jan 27 14:23:20 or hmm.. this is only element of the activity? Jan 27 14:23:27 nope Jan 27 14:23:37 Use hierarchy viewer, will tell you where the issue is Jan 27 14:23:42 it has lots of stuff, but the fragment is added way later on Jan 27 14:28:03 not really sure how it will tell me SimonVT Jan 27 14:28:54 It will tell you what view is not being laid out as you're expecting Jan 27 14:29:06 Then you can inspect view and layout parameters to find out why that is Jan 27 14:29:19 And then you can go fix your layout resources Jan 27 14:40:23 does anyone know what the effect of "Application Mode" menu in Android Auto dev settings is? "Release" and "Developer" kind of make sense, but the others are getting crazy, especially "X-Ray" Jan 27 14:44:55 SimonVT, strangly enuf, this behavior is only on the emulator. on a device running 4.3 the fragment is indeed fullscreen Jan 27 14:51:06 Hello all Jan 27 14:52:16 Anyone have experience with FireDAC? Jan 27 14:53:39 Good tutorial for fragments Jan 27 14:53:43 Sorry Echo6 i don't Jan 27 14:53:55 Thank you Jan 27 14:54:57 Is there anybody else than me around who experience a Read timed out issue using sdk manager ? Jan 27 14:55:08 How do i drove segmentation fault in fragments??? Jan 27 14:55:26 Solve* Jan 27 14:56:49 ok, so this button with alignParentBottom is somehow manages to be visible when i launch the fragment. if i remove that, it does not transition itself into the fragment Jan 27 15:00:13 ok, nesting all the activities components inside a nested relativelayout sorted this Jan 27 15:03:23 Mavrik: I've compared my code to that of telegram, and the only difference seems to be that they are using two different receives, whereas I'm using a single one for both types of intents. Jan 27 15:04:13 I can't imagine that plays a role, but I'm almost desperate enough to test it Jan 27 15:06:10 Android doesn't support iOS-like app icon badges for unread counts and stuff. How do some phones do it? I see the FB app on a samsung phone with the counter. Does the FB app do this or is that some samsung magic that does it automatically? Jan 27 15:07:37 eghdk: Samsung phones are actually iphones running an android emulator with extended capabilities. Jan 27 15:10:24 lol Jan 27 15:11:07 But for real. My product team is telling me to implement it. And I'm like its not part of the SDK, and then he shows me fb and whatsapp on his samsung with badges. Jan 27 15:11:23 but I can't find any good info for who supports it. or if it's magic or what. Jan 27 15:11:36 eghdk, some launchers support it Jan 27 15:11:50 Is there an api? Jan 27 15:11:58 of course not Jan 27 15:12:07 because it's each proprietary launcher byitself :P Jan 27 15:12:12 eghdk, this might help tho: https://github.com/leolin310148/ShortcutBadger Jan 27 15:14:59 I saw that. But "ABOUT Google Play Developer Term Violation" was a bit scary. Jan 27 15:15:08 well Jan 27 15:15:12 you were ordered to use it Jan 27 15:15:16 why do you care? :) Jan 27 15:22:04 Mavrik: cool link Jan 27 15:31:32 Hi Jan 27 15:31:49 about this violation issue https://github.com/leolin310148/ShortcutBadger/issues/22 Jan 27 15:32:11 moral of the story, don't use blindly any lib Jan 27 15:32:13 (what most ppl do) Jan 27 15:32:29 Did anyone else experience strange outputs when debugging a JNI c code in android studio? Jan 27 15:32:45 ... bitch bitch bitch... pdf as a content distribution method should see its mobile adherents fried with s as usage Jan 27 15:40:48 Mavrik: Not really ordered to use it. More like... make it work on my samsung. So I've been just trying to see if I can find some kind of samsung docs about it... but nothing =( Jan 27 15:43:05 Hi! Jan 27 15:44:14 How exactly are retained fragment re-used is a ViewPager? Jan 27 15:44:45 I think I have a bug in my code that is related to it but I don't understand how it works Jan 27 15:45:45 hello is anybody here who knows anything about hfpclient bluetooth profile support in (any version of) android Jan 27 15:46:05 ? Jan 27 15:47:05 My activity has a ViewPager with 2 fragments and subscribes to an observable from each of them. When I rotate the screen, the callbacks are not invoked anymore. The fragments are being reused because the RecyclerViews in them maintain their scroll position Jan 27 15:49:29 hello, having some troubles getting the current phone number of the device Jan 27 15:50:14 this is the error java.lang.SecurityException: getLine1NumberForDisplay: Neither user 10051 nor current process has android.permission.READ_PHONE_STATE or android.permission.READ_SMS. (i have both of those permissions defined in my manifest) Jan 27 15:50:28 this is how i'm trying to get the number ((TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE)).getLine1Number() Jan 27 15:51:37 context is the Activity instance Jan 27 15:52:10 Consider just having the user inputting it, you can't be sure it's available anyway Jan 27 15:56:06 aspire, are you targetting API 23 or above? Jan 27 15:56:31 if yes, you just need to request permissions Jan 27 15:56:48 i would still hate an application retrieving my phone number without my explicit consent Jan 27 15:57:14 yeah i am Jan 27 15:57:30 ah, i guess i will just have an input box for the phone number Jan 27 16:01:41 hi guys Jan 27 16:02:20 guys, I wonder if ndk platform is backward compatible or not. Jan 27 16:03:11 for example if I create my dll with platform 24, should it work on android 4.4.2 or not. Jan 27 16:04:00 I read somewhere that if I want to support android 4.0.3+, I shoudl use platform 19. Jan 27 16:05:56 Are there conflicts between using retained fragments and FragmentPagerAdapter? Jan 27 16:08:56 Do you ever step through a debug, when all of a sudden your current instruction is actually a comment, and you get some message from AS telling you "I'm lost", while happily continuing stepping through comments as if they were instructions? Jan 27 16:09:24 #fml Jan 27 16:10:00 it only happened stepping inside some framework classes Jan 27 16:10:02 once Jan 27 16:10:36 Why it do dat? Jan 27 16:11:25 Actually, it get's worse. trying to debug a c++ code is very nearly useless. Jan 27 16:11:26 http://i.imgur.com/mm1bvUC.png my favorite part, profiling and making (non breaking) changes Jan 27 16:12:02 it's slower because tracebased profiling + an enormous amount of logs, but inflating layout is still the craziest bottleneck Jan 27 16:13:49 I have some function, I pass it an argument, debug from first instruction, that argument shows in the debugger as a completely different number (different each time), when it actually gets to reading that value, it changes to 2 (which isn't the number i passed but at least it's consistent). the only way i found to debug these situations is by logging. Jan 27 16:20:48 Is there a better way to debug c++ in AStudio? Jan 27 16:45:40 Hey guys. I'm trying to find all m4b files doing a query on MediaStore.Audio.Media.EXTERNAL_CONTENT_URI but only the mp3 files are listed Jan 27 16:49:11 Well, I fixed my bug. Jan 27 16:57:00 Melatonina, what was it and how did you fix it? :P Jan 27 16:59:11 It was caused by a FragmentPagerAdapter implemented in the wrong way. There is only a good way to do it but you are not forced use that way. So most people just end with a strange bug and then learn how to write it on StackOverflow. Jan 27 17:00:25 As a typical moron who doesn't know his way around Android, I did the same mistake. Jan 27 17:00:45 oO Jan 27 17:01:01 i can imagine there are many wrong ways, but also few good ways Jan 27 17:01:20 but you hadn't stated your issue anyway Jan 27 17:02:07 nor how you fixed it lol Jan 27 17:03:24 My original issue was subscribing to the observables of new fragments while the old ones (from which I unsubscribed in onDestroy) where displayed. The user interface didn't react anymore to taps Jan 27 17:03:46 Fix is, create fragments lazily in the getItem method of the adapter Jan 27 17:04:18 no need to handle unsubscription either Jan 27 17:05:09 subscription happen on fragment creation, in getItem too Jan 27 17:05:18 this is so strange Jan 27 17:05:34 i'm trying to read the contacts, i have both permissions, READ_CONTACTS and WRITE_CONTACTS yet i still get a permission denied Jan 27 17:06:21 i already told you if you target api 23+, you need ot request permission Jan 27 17:06:52 what do you mean by request permission Jan 27 17:07:02 like, at runtime? Jan 27 17:07:14 yes Jan 27 17:07:22 https://developer.android.com/training/permissions/requesting.html Jan 27 17:08:21 they even use read_contact in their snippet example Jan 27 17:08:28 yeah, looking at that right now haha Jan 27 17:08:47 no worry Jan 27 17:08:53 my min sdk version is 21 and my max sdk version is 25, but i'm compiling with 25 Jan 27 17:08:54 thanks Jan 27 17:09:15 i just hope you're not making a tictactoe game requestion contacts Jan 27 17:09:18 requesting* Jan 27 17:09:22 adq do i still need to declare these permissions in the manifest? Jan 27 17:09:34 yes aspire, but more importantly you need to read the documentation Jan 27 17:09:59 it's just few minutes which can save you from hours and ppl answering your questions ;) Jan 27 17:10:38 ohhh ok haha thanks :) Jan 27 17:28:26 Hello! I have a weird problem with a JSON library Moshi, it throws NoSuchMethodError when deserializing. I think it may have something to do with multidex, but the problem occurs way after loading and it also occurs on Android 6.0.1, which shouldn't have this kind of problems with multidex Jan 27 17:37:03 Im having issues getting my project to build on one of my machines: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/os/BuildCompat.class Jan 27 17:37:05 any thoughts? Jan 27 17:37:45 i google and looks like I need to check my dependency tree, but not sure what I'm looking for Jan 27 17:38:24 nownot: It looks like you may have different versions of support libraries in your build.gradle Jan 27 17:38:54 loredan13: https://gist.github.com/anonymous/8ac88e58c4931485dc4cc20854e6062f Jan 27 17:41:31 nownot: looks okay Jan 27 17:41:42 been fighting this for over an hours :/ Jan 27 17:42:34 works on one machine but not the other, same gradle versions, same java versions Jan 27 17:44:07 nownot: now that's weird Jan 27 17:44:25 nownot: have you tried rebuild? Jan 27 17:44:30 so many times Jan 27 17:44:35 along with gradlew clean Jan 27 17:45:16 rebuild works, its just compiling for debug Jan 27 17:47:12 nownot: sdk tools and platform-tools versions? Jan 27 17:48:37 loredan13: http://imgur.com/a/HBnD6 Jan 27 17:49:03 and every sdk from 5.0.1 and up Jan 27 17:52:45 How can I convert content://com.android.providers.media.documents/document/video%3A5104 to a valid URI to acess the video?? Jan 27 17:55:16 nownot, there have been issues recently with lib promotion when different lib mismatch due to dependencies Jan 27 17:55:23 nownot, try to run something like gradlew app:dependencies Jan 27 17:55:26 and track them down Jan 27 17:55:34 (you might need to change app to something else) Jan 27 17:55:36 good luck Jan 27 17:56:01 adq: did not and have the output, but not sure what im looking for Jan 27 17:56:16 you're looking at two different support compat lib versions Jan 27 17:57:10 you've got so many libs, i'm not surprise it clashes with this recent promote issue Jan 27 17:59:36 https://research.csiro.au/ng/wp-content/uploads/sites/106/2016/08/paper-1.pdf Jan 27 18:04:07 anyone? Jan 27 18:05:56 oh... getPath() Jan 27 18:08:20 bubbely, that's a valid URI pretty much Jan 27 18:12:17 Does anybodi know why I get this error? java.lang.NoSuchMethodError: No interface method select(Lokio/Options;)I in class Lokio/BufferedSource; or its super classes Jan 27 18:12:40 It occurs when deserializing JSON using Moshi library Jan 27 18:20:22 you don't have the interface method select(okio.Options) in okio.BufferedSource Jan 27 18:20:36 and for that matter, why are you trying to json an okio object? Jan 27 18:21:51 I have both /document/video:5312 and content://com.android.providers.media.documents/document/video%3A5313 as URI/string format and neither is accessable via new File(selectedFilePath); ... i get the msg sourcefile doesnt exist Jan 27 18:21:53 any ideas? Jan 27 18:22:58 https://hastebin.com/ohavusefuc.java here is where i get the URI or String Jan 27 18:23:02 the gallery.. Jan 27 18:30:48 Hi all! In MVP architecture, would the view or the presenter handle sharedpreferences? From my interpretation the view should be dumb and not do any kinda logic, it should pass everything off to a presenter. Should I load/save simple values from sharedprefs using the activities onCreate() and onPause()? Or should I have the activity pass that off to the presenter? But then the presenter is aware of configuration changes(phone rotation, app being Jan 27 18:30:48 killed, etc etc) which I also read is frowned upon. Jan 27 18:31:00 Anyone care to weigh in? :) Jan 27 18:31:03 pfn: I'm not, as far as I know, that method is being called by the library Jan 27 18:31:45 stacktrace or it didn't happen Jan 27 18:32:52 HaSH: Ideally, you would have some kind of Interactor that the Presenter would call which would handle SharedPrefs Jan 27 18:33:49 this way, you can reuse that Interactor wherever you need SharedPrefs, and if you change away from SharedPrefs to something else, you can change the Interactor and everything should pick it up automagically Jan 27 18:35:36 http://stackoverflow.com/questions/41900707/file-not-found-selecting-a-video-from-gallery Jan 27 18:38:22 s73v3r, I'm in the middle of learning android dev and MVP so please bear with me :) I'm using a helper class that I inject into my presenter(s). I was just unsure of how to best handle config changes. For instance, if doing something like this is good/bad idea: Activity's onPause would look like onPause(){ mPresenter.onPause()} and onCreate(){ mPresenter.onCreatre()} Jan 27 18:38:40 unfortunately there isnā€™t just one way to do it Jan 27 18:38:50 Then I would handle all the preferences stuff in the presenter. But this approach couples the lifecycle to the presenter Jan 27 18:38:50 that seems fine Jan 27 18:39:02 ahh. Then donā€™t do that Jan 27 18:39:54 pfn: http://pastebin.com/2sEkpTm8 Jan 27 18:40:13 Which seems to be frowned upon. Or I could add *some* logic to the view such as: the view would load the sharedpreferences, check if we have data in it, then pass the data off to the presenter. But then I would have to have the view keep track of some values which is also frowned upon haha Jan 27 18:40:51 Damned if I do, damned if I don't! :) Jan 27 18:41:20 loredan13, sounds like you're mixing versions of moshi vs okio Jan 27 18:43:26 pfn: thanks, i'll look into it Jan 27 18:57:17 Android Studio on my work system is Windows 8 and security installed stuff to make it unbearable to type :( somedays to use something like sonar will just hault my typing for about 40 second it is like the C drive has no access to edit files :( Jan 27 18:57:54 anyone else deals with issues like this or just code it all on my notebook and merge like i've been doing Jan 27 18:58:21 i know not droid specific but you never know what tips people have for ide's Jan 27 18:59:20 donā€™t work for companies that impose a bunch of additional shit on their machines that slow stuff down Jan 27 18:59:43 conevrsely, work for a group that letā€™s you use a Mac, because most of that shit isnā€™t available for Mac, so IT canā€™t force it on you :D Jan 27 19:00:13 Not entirely helpful, I know. So Iā€™d say continue what youā€™re doing, but be careful about it Jan 27 19:00:22 in some companies, that can be a firable offense Jan 27 19:01:29 my buddie from IL says i should join her company before the ipo, Jan 27 19:02:12 but yeah I kill_all extra processes on my box and got emails from security teams Jan 27 19:03:52 most shops force some amount of AV and backups on macs now Jan 27 19:04:05 * pfn has mcafee installed on the mac he is using... Jan 27 19:04:55 Is there an easy way to apply a scale animation to all items in a recycler view? For context I have a horizontal recycler view with big boxes and a snaphelper, I want to be able to create a zoom out effect so you can temporarily see more items, pick one and zoom back in. Jan 27 19:05:26 Hey guys. I'm using react native but thought you guys can help me. Whenever I run the app, on device or emulator, I get the crashing error "Unforunately, appName has stopped". I have no idea, reseted to the commit from yesterday that worked but can't get anything to work :S What's my next step? Jan 27 19:05:36 logcat Jan 27 19:05:42 and stop using react Jan 27 19:06:02 bob1234, you need a custom layout manager Jan 27 19:06:18 I have another problem, I have a device with integrated barcode scanner. By default it puts the symbols from scanned barcode into focused EditText and then presses Enter. After some digging, it turned out that symbols are being sent via another KeyEvent, with ACTION_MULTIPLE and KEYCODE_UNKNOWN. At some point that code completely stopped working and I don't know why, symbols are still being entered int Jan 27 19:06:21 EditText, but dispatchKeyEvent in Activity just doesn't receive a KeyEvent with those symbols Jan 27 19:06:46 ha i had an meetup this week about xamarin ,,... My team reamed me so bad Jan 27 19:07:17 well, except xamarin isn't completely terrible Jan 27 19:07:36 it should not since it maps almost everything bijectively Jan 27 19:07:43 but i never tried it, nor plan to play with it Jan 27 19:08:28 @pfn What should I look for in logcat? Jan 27 19:08:38 stacktrace Jan 27 19:09:38 Hi! Jan 27 19:09:58 I have a doubt about AWS, can I ask it here? I haven't get help inside #aws Jan 27 19:15:33 So what logcat command should I use to get a nice stacktrace? "adb logcat" just rambles on and "adb logcat -s" says nothing Jan 27 19:16:38 Nevermind Jan 27 19:16:53 What is the consensus on the "Webby Awards" Jan 27 19:23:55 adb logcat -s AndroidRuntime Jan 27 19:25:36 -s is for specifically selecting a device Jan 27 19:25:49 (mandatory when you have multiple devices) Jan 27 19:37:23 oops nevermind, -s before logcat, not after :3 Jan 27 20:05:24 if im testing on a real device... do i need to do anything special for READ/WRITE permissoins Jan 27 20:28:18 http://stackoverflow.com/questions/41902212/eacess-error-writing-to-file-android Jan 27 20:31:52 Hey Guys :) Jan 27 20:31:53 I've been crawling the web looking for an answer to a simple question. Jan 27 20:31:53 I have to develop an android app that must -at the same time- connect with a printer device via the wifi interface (ie. maintain a tcp socket open and working on the wifi interface) AND connect to the internet via the 3g (another socket must be kept open and working on the 3g interface). I read about many tricks but none of them enable the app to use both network interface at the same time. I was expecting the feature to be available Jan 27 20:31:53 on Android 7.0 Nougat but my hope crumble. Is there something I'm missing ? Does anybody has an idea. Is there an elephant in the room ? I'm in advance gratefull for any comment that may or not help me in this crysis. Jan 27 21:38:18 hi all. I have a question regarding obfuscation. I would like to replace Proguard in my build.gradle with another software. I have searched at length and I can't seem to find a way how to call the external jar rather than Proguard Jan 27 21:38:46 if someone could help that would be great Jan 27 21:40:19 also does anyone know, how the Proguard jar gets resolved, where does it get picked up from? Is there some place where the location is specified in gradle or elsewhere? Jan 27 21:48:55 anyone deal with an eaces error trying to write a file Jan 27 21:48:56 ? Jan 27 21:49:07 eaces? Jan 27 21:50:07 EACCESS Jan 27 21:50:09 permission denied Jan 27 21:50:19 open failed Jan 27 21:50:48 If it's a simple question, why don't you know the answer? Jan 27 21:51:01 no.. Jan 27 21:51:05 jpf_: ^ Jan 27 21:51:20 ayor, proguard is the only officially supported Jan 27 21:51:29 ayor, the obfuscation software maker can help you Jan 27 21:51:32 e.g. dexguard Jan 27 21:52:21 bubbely Thats not the whole error Jan 27 21:52:29 pfn, thanks for the reply, the problem is I need to obfuscate in one pass a java server app and some common java libs also used in the android lib Jan 27 21:52:43 just use proguard Jan 27 21:52:48 I subscribe to an observable with this code: https://gist.github.com/anonymous/2a0b77a109f34bcbeed2c920bc7362b7 Jan 27 21:53:05 and I guess this exception: https://gist.github.com/mel4tonin4/9da29dea5f5c264a67643d8ae99dd63e Jan 27 21:53:29 pfn, it doesn't have great obfuscation to be fair Jan 27 21:53:34 is the .onBackpressureBuffer() call placed in the right place? Jan 27 21:53:54 ayor, nothing offers great obfuscation Jan 27 21:54:28 orbyt_: FileNotFound exception /storage/emulated/0/test.mp4 open failed EACESS permission denied Jan 27 21:55:32 bubbely: why are you getting "file not found"? Jan 27 21:56:47 why am I getting "Caused by: rx.exceptions.MissingBackpressureException: PublishSubject: could not emit value due to lack of requests" even if I called onBackpressurBuffer() ? Jan 27 21:59:13 does this look right? https://hastebin.com/iceletapon.java in writing an InputStream to a FileInputStream Jan 27 22:00:04 Does it work right? Then it's about right Jan 27 22:00:47 no.. im receiving 0 as a avialable for my buffer Jan 27 22:01:14 Then it doesn't look right Jan 27 22:01:55 bubbely: could you help me with my question? Jan 27 22:02:16 sorry i can't =[ Jan 27 22:02:40 is there a channel related to specific technical discussions regarding Android operating system (targeting ROM specialists?) Jan 27 22:03:29 murder: #android-root? Jan 27 22:03:54 murder: they always talk about that kind of android kinky stuff Jan 27 22:05:22 yes, I thought the same, unfortunately most people joining there are more related to asking for cracking, root exploits, etc - I wanted to know if theres some place like here, targeting devs but at operating system level Jan 27 22:06:36 murder: never heard anything like that mentioned in this channel in the previous 5 months Jan 27 22:08:21 murder: do you know about RxJava backpressure? Jan 27 22:08:37 no one is interested in developing roms here Jan 27 22:09:26 bubbely, inputstream available is... not really something you should rely on Jan 27 22:09:39 bubbely, just read and see how many bytes were read Jan 27 22:11:23 i need to declare a buffer with maximium bytes first though ? Jan 27 22:12:00 nah Jan 27 22:12:05 just read to a temporary buffer Jan 27 22:12:10 bubbely, http://stackoverflow.com/a/1264737/857853 like so Jan 27 22:12:11 murder, try xda forums Jan 27 22:12:55 byte[] data = new byte[16384]; <- Jan 27 22:13:24 it's a temporary buffer, it reads at most that many bytes at a time and then writes them into the output buffer Jan 27 22:13:33 oh Jan 27 22:13:56 Zharf: did u see my hastebin paste Jan 27 22:13:59 yes Jan 27 22:14:06 adq thanks, I do this a lot, I'll keep here to see if I can also learn a bit of application dev tho Jan 27 22:14:43 Zharf: File targetFile = new File(Environment.getExternalStorageDirectory().getAbsoluteFile(), "/test.mp4"); there is my problem Jan 27 22:14:49 Zharf: what's wrong with that ? Jan 27 22:15:55 nothing, as long as you've the right permissions Jan 27 22:30:20 Well, I fixed my other bug of today Jan 27 22:44:46 Hello everybody. I'm looking for help. Tried to develop an android app that needs to use both wifi and 3g interfaces at the same time. I tried to open a socket on the wifi interface to communicate with a device using tcp protocol, and at the same time tried to open a socket with the 3g interface to interact with a web server. I did a lot of digging and this seems impossible on any version of android (up to 7.0). Does anybody have a Jan 27 22:44:46 clue, a hint ? ty Jan 27 22:46:20 itā€™s just not possible Jan 27 22:49:52 How can i implement authentication into my app? Jan 27 22:50:56 jpf_, maybe with root access and executing linux commands, but that's really not safe Jan 27 22:51:08 k Jan 27 22:53:29 ReScO: https://www.simplifiedcoding.net/firebase-user-authentication-tutorial/ Jan 27 22:53:42 Melatonina, on my own server? Jan 27 22:54:03 then just implement it Jan 27 22:54:18 Any tutorials on how to do it properly? Jan 27 22:54:32 collect the credential, send them as dictated by your server API Jan 27 22:54:38 do it properly Jan 27 22:58:16 ReScO: what kind of question was that? Jan 27 22:58:44 Well, there must be a way that is the "right" way to do it? Jan 27 23:02:17 The right way is to not do it Jan 27 23:02:19 Use oauth Jan 27 23:04:57 ReScO: How many different ways are there to collect a credential and submit it? Jan 27 23:06:02 Not the credential exchange but securely storing the token, and how do i go through the whole authentication flow while staying in my app and preventing logged out users to still use the app Jan 27 23:07:14 Most of the times, when people ask about the "best way", they are just saying "please think for me because I'm too lazy. And think for me in the best way!" Jan 27 23:07:51 on Quora there is plenty of question "What's the best way to do X?" Jan 27 23:08:25 They don't even ask: "What's the best way to do X: A, B or C?" Jan 27 23:09:00 ReScO, where is the token comes from? Jan 27 23:09:05 It's a way to appeal to the ego of a possible responder, who has an opportunity to show that they know the best way Jan 27 23:09:14 adq, oauth2 server Jan 27 23:10:47 then you could store it encrypted with a key you generated from and with with the local keystore, stored encrypted in sharedpref, and if you use newest feature, you can even strenghten it up a bit with forcing user to have a schema, which prevents any extraction from the keystore when the device is locked Jan 27 23:11:44 you need to read online about how to use keystore to generate a key and use the generated key to cipher/decipher + all those newest features of the keystore (starting api 21 or 23 iirc) Jan 27 23:12:29 if your goal is to protect a token you get from outside, this should be ok, if the token is embedded in your apk this has nothing to do and will be useless and prove you failed to explained your problem Jan 27 23:13:09 also you have to deal with communicating securely between outside and the device to retreive the token to store, but i believe oauth2 cover that Jan 27 23:28:49 window double on triple on name dcti Jan 27 23:42:50 adq, and securing the app itself? Jan 27 23:43:09 forget about that Jan 27 23:52:19 So for instance, how does facebook do it? Jan 27 23:58:10 there's no such thing as securing the app Jan 27 23:58:27 you can do some best effort things, like using the keystore to store a crypto key to encrypt/decrypt secrets Jan 27 23:59:10 but if someone has access to your auth token, they can effectively impersonate you Jan 27 23:59:13 that's the case of all apps Jan 28 00:00:00 huh Jan 28 00:00:09 ReScO, most apps just store the OAuth2 token in the AccountManager Jan 28 00:00:18 that's what it's there for :) Jan 28 00:00:23 A bit rustic, but it works. Jan 28 00:00:47 I thought apps only ever bothered with AccountManager if they installed a sync service Jan 28 00:01:14 Nah, it's nice to give user a central location to manage accounts. Jan 28 00:01:29 It'll do token refresh as well. Jan 28 00:26:41 anyone use retrofit2 ? Jan 28 00:37:12 Melatonina: you are half right. best way to do remote api calls for now is retrofit. can't see how this can be opinion-based, there is not much choice after all Jan 28 00:37:41 bubbely: No idea; but you gotta just ask. Jan 28 00:37:45 and someone asking can have no idea about posibility to stick it in "A B or C" Jan 28 00:38:10 ServiceGenerator.createService is referenced in retrofit examples but i cant find its implementation... anyone? Jan 28 00:40:27 That API is not referenced on the website or examples. Jan 28 00:41:15 JakeWharton: https://futurestud.io/tutorials/retrofit-2-how-to-upload-files-to-server the line just below uploadFile Jan 28 00:41:53 nm found it Jan 28 00:45:12 new to retrofit... https://hastebin.com/gizelumopu.swift what do i do under RequestBody to make the call Jan 28 00:45:48 read the website and the samples? Jan 28 00:47:36 bubbely: you had to ask "What's the best thing to do under RequestBody to make the call?" Jan 28 00:47:58 ya Jan 28 00:49:21 it's literally the first thing on the website and there are single-file samples in the Retrofit repo Jan 28 00:49:44 link to the repo pls Jan 28 00:49:54 the BEST link Jan 28 00:50:05 http://google.com Jan 28 00:50:17 ^ best Jan 28 00:50:34 https://github.com/square/retrofit/tree/master/samples/src/main/java/com/example/retrofit i dont see a single file sample Jan 28 00:51:29 that doesn't surprise me. you have clearly demonstrated your complete inability to use any intuition or reasoning whatsoever. Jan 28 00:51:55 no i haven't... Jan 28 00:52:43 is that where you said i'd find the sample? Jan 28 00:53:22 yes. and i count 11 of them. Jan 28 00:53:26 the BEST sample, that's what he means Jan 28 00:57:18 oh heh ā˜ŗļø Jan 28 01:49:15 Android Studio 2.3 beta 3 is coming! Yay! Jan 28 01:49:33 old Jan 28 01:49:53 You are always ahead, adq Jan 28 01:50:05 Or maybe I'm always late Jan 28 01:50:19 well it's old because link has already been pasted here, they fixed some bugs, and introduce new bugs Jan 28 01:50:59 playing with canvas.drawVertices atm Jan 28 01:51:03 it's not efficient :( Jan 28 01:51:08 http://imgur.com/a/EqTln Jan 28 01:51:25 i might do the same thing with a path and get more frame i think Jan 28 01:53:32 Are you into game development? Jan 28 01:53:48 i wish i had more time for game dev Jan 28 01:53:54 but no, i did some little games in the past tho Jan 28 01:54:01 nothing serious enough Jan 28 01:56:53 What are the applications of yours that you like the most? Jan 28 01:57:36 something i cannot disclose Jan 28 02:00:06 ah, that's ok. :) Jan 28 02:00:48 That means that they are not only subjectively important but also commercially important, probably Jan 28 02:03:35 https://hastebin.com/emofacoxum.swift 'retrofit2.Response' is not a valid response body type. Did you mean ResponseBody? for method upload.send any ideas? Jan 28 02:06:07 You are so sloppy that you past java files as swift files... Jan 28 02:07:02 Sorry, I never made that kind of Retrofit requests Jan 28 02:07:03 ?? Jan 28 02:09:00 The only thing I can tell you (which is not related to your problem) is that I started using synchronous requests (execute()) inside AsyncTasks but then I ended up with asyncronous requests (with enqueue()). Jan 28 02:09:28 But that's something you can take care of after you fixed your current problem Jan 28 02:14:44 hi Jan 28 02:14:45 ho Jan 28 02:15:12 is possible to block user so he can“t turn of GPS ? Jan 28 02:16:23 I don't think it's possible of a consumer smartphone Jan 28 02:16:48 I think you can make your own Android device Jan 28 02:17:54 Akuw, is the user using your device or their own device? Jan 28 02:18:22 https://www.codeproject.com/Questions/887140/Prevent-user-to-disable-GPS Jan 28 02:18:24 we will have some users using our phones to make some inventory Jan 28 02:18:36 Akuw: ^ Jan 28 02:18:50 Akuw: http://androidforums.com/threads/prevent-gps-from-turning-off.482384/ Jan 28 02:18:56 ok Jan 28 02:19:02 let me check Jan 28 02:19:15 what about to block user to exit from one app ? Jan 28 02:21:45 Akuw, if it's a device you have control over you can install an "app locker" to restrict users from turning off GPS on the device. Jan 28 02:22:19 but i can do it programming Jan 28 02:23:40 I don't believe so. Jan 28 02:24:00 That would be a privacy/security issue. Jan 28 02:26:29 are my phones Jan 28 02:26:39 the crew will be working for me Jan 28 02:26:56 Then hire a developer to make a customized home screen Jan 28 02:27:38 There's no _simple_ way to rip most of the bullet pointed functionality out of hte interface of a normal phone Jan 28 02:28:14 It's not something that's even reasonable to think a normal person would be able to sit down and do Jan 28 02:29:44 Akuw, if they're your phones then use an app locker to restrict functionality. Jan 28 02:30:06 well Jan 28 02:39:45 once my user logs in, how should I store the users information (username, email and other details) so they can be accessed from multiple activities later on? Jan 28 02:46:26 SharedPreferences should work Jan 28 02:46:29 wreed: Database, flat file, or SharedPreferences (a wrapper around a flat file). Depends on what makes most sense in your case. Jan 28 02:48:13 duh sharedprefs should do the trick thanks Jan 28 02:48:56 right now from my app I am connecting to my webservice with http basic auth but from my understanding its not the most secure, and suggestions for bumping things up a bit? **** ENDING LOGGING AT Sat Jan 28 03:00:02 2017