**** BEGIN LOGGING AT Fri Dec 16 03:00:00 2016 Dec 16 03:14:38 https://developer.android.com/things/index.html :0 Dec 16 03:31:03 hoping someone can help out with a GCM issue that has been plagueing me for hours.. I’ve been using restricted_package_name on sending a GCM Dec 16 03:31:14 and it still sends messages to all apps on the device Dec 16 03:31:50 is there no other way to limit pushes to specific apps with the same sender ID? without changing clients.. Dec 16 03:32:10 hello Dec 16 03:32:37 do I need a service to listen to incoming notifications ? Dec 16 03:42:44 Android Studio 2.3 Beta 1 Dec 16 04:09:53 so the design support lib is changing teams Dec 16 04:14:12 "GitHub lost $66M in nine months of 2016" doh Dec 16 04:40:22 Smotion Dec 16 04:40:34 I'm using samsung smotion sdk Dec 16 04:40:55 however the pedometer only registers a change only once every 10 feet Dec 16 04:40:58 and then fires Dec 16 04:41:05 does anyone use a promise library on android? Any recommendations for something that's maintained and reliable? Dec 16 04:41:07 is this a battery saving feature Dec 16 04:44:31 grekkos dunno, i think guava has some ListenableFuture or something. rxjava should cover these scenarios though, right ? Dec 16 04:46:25 don't know I've never used rxjava Dec 16 04:57:00 grekkos time to learn :) oreilly has rxjava book, its 1.x tho Dec 16 04:57:35 plenty of tutorials out there by now too, maybe too many Dec 16 04:59:06 what is it I don't even know Dec 16 04:59:07 haha Dec 16 05:04:01 I guess it looks kind of similar Dec 16 05:04:14 but not exactly the same Dec 16 05:10:02 hey Dec 16 05:16:27 Can I scale a vector drawable without changing it's XML definition, for example when I put it inside an ImageButton? Dec 16 05:19:16 Sure Dec 16 05:34:21 "Google May Prevent Samsung From Adding Viv AI Assistant To Galaxy S8" hehe, reminds me of skyhook Dec 16 05:34:32 samsung ... just has to go with tizen or something Dec 16 05:53:41 Dagmar: thanks Dec 16 05:56:46 I don't want to learn another framework Dec 16 06:10:38 how do I hide the controller of SimpleExoPlayerView? Dec 16 06:13:49 setUseController(false); Dec 16 06:16:32 I guess I should make my custom player view Dec 16 07:16:20 https://www.google.com/webdesigner/ Dec 16 07:54:00 i have a drawableLeft and a text inside a button: i want the text to be aligned right to the left of the drawable (text is dynamic). the only solution i found was to put a paddingRight attr, but that still dont make the text properly align to the right of the drawable on diff text inputs Dec 16 07:54:09 any wokawound? Dec 16 08:05:20 Is there any updates on Android instant apps yet? (eagerly waiting for it for a number of months now) Dec 16 08:06:20 napster: wrong channel Dec 16 08:06:32 less likely Dec 16 08:08:57 recently all development discussion was moved to #android and all general discussion was redirected here. New policy Dec 16 08:09:04 oh! Dec 16 08:09:27 that sounds really weird given the name of the channel is android-dev Dec 16 08:10:16 yeah, I know. But lots of things in Android are strange, after all Dec 16 08:10:27 can't agree more. Dec 16 08:11:55 I can see developer interest in instant apps - you need to structure/build your app in a particular way to support it, right? Dec 16 08:12:18 FAQs say no Dec 16 08:12:35 you only need to make two different artifacts Dec 16 08:13:01 https://developer.android.com/topic/instant-apps/faqs.html Dec 16 09:17:46 Hi all, just one question: how do I send udp packet to wifi device on a Wi-Fi network without internet when there is a cellular connection available? Already tried with bindProcessToNetword/setProcessDefaultNetwork/bindSocket/etc... Dec 16 09:19:41 anyone here? Dec 16 09:38:03 hey fellas Dec 16 09:41:38 hi Dec 16 09:42:22 hi Dec 16 09:42:27 Oday Dec 16 09:45:30 I'm trying to implement this https://futurestud.io/tutorials/retrofit-2-manage-request-headers-in-okhttp-interceptor Dec 16 09:45:56 and to do that I need a prefs object inside my RestClient, so that I can grab the value from it and use it as the access token for each header Dec 16 09:46:42 I try to inject the object of sharedpreferences into that class but I am never able to grab a working instance of the Application class so I could use it to inject into that class Dec 16 09:50:04 complucated Dec 16 09:52:45 ok solved Dec 16 09:52:52 also complucated Dec 16 09:54:20 Anyone know how to map this json response { "isOnline" : true } to a Retrofit2 interface method that simply returns the boolean: @GET(ENDPOINT+"/{userId}/OnlineStatus") Call isOnline(@Path("userId") String userId); Dec 16 10:06:57 hello Dec 16 10:10:37 anybody here? Dec 16 10:14:44 a few id imagine Dec 16 10:17:10 TimCastelijns: Was that answer satisfying? Or did you really mean to ask something else? =) Dec 16 10:22:49 I released this yesterday https://www.youtube.com/watch?v=j8Axa404ems Dec 16 10:22:54 let me know what you thonk :D Dec 16 10:23:00 it's probably misinformation Dec 16 10:23:48 Haha yeah I have a real question Dec 16 10:24:44 Does anybody know what the recent improvements to ble scanning are in v10.0.1 of the play-services-location? Dec 16 10:24:59 It is mentioned that they have improved it, but not what or how Dec 16 10:43:04 https://www.reddit.com/r/androiddev/comments/5hwaes/weekly_questions_thread_december_12_2016/db9jyi0/ Dec 16 10:43:17 good night all Dec 16 11:01:55 In firebase notification message, my default_notification_icon is tinted white, how to i remove this tint? Dec 16 11:07:05 Hey guys, I'm using LibGDX and following the Spotify SDK tutorial. They're both "Start Activities". So I can only run one or the other as my app. If I run the Spotify activity, onCreate() will run and play music from Spotify. If I select the AndroidLauncher start activity my LibGDX game will start. How can I run both activities? If that makes sense. Dec 16 11:12:48 I tried using an interface to access the Spotify class (Or activity) (So the Spotify class implements x and I have an interface x in the core project folder) but then none of the callbacks work Dec 16 11:14:50 Hi all, I'm having problems implementing DELETE in retrofit. I have the following URL to delete a product from shopping cart. https://testshoppingcart.com/cart/cartId It just returns Response 204 How do I implement this in retrofit? Is it something like this: Call deleteItemFromCart(@Path("id") int cartId); Dec 16 11:22:40 Sanic: Are you using startActivities(Intent[] intents) ? Dec 16 11:23:15 I tried, I got app crashes and null stuff. I couldn't get that to work :( Dec 16 11:23:36 At the moment I'm running my AndroidLauncher (LibGDX) Activity on run Dec 16 11:23:51 And I have the interface set up to access the spotify class Dec 16 11:24:26 But the spotify class has a bunch of auto run stuff (For lack of better words) that make it only work when it's ran as a launch activity. But I'm kinda new so... Dec 16 11:24:52 callback stuff like onCreate that never get called Dec 16 11:28:00 Are you using https://developer.spotify.com/technologies/spotify-android-sdk/tutorial/ ? Dec 16 11:28:46 Yeo Dec 16 11:28:48 Yep Dec 16 11:29:52 Hmm Dec 16 11:30:04 It works great... on it's own. I'd prefer to have a spotify object in my LibGDX code and have functions from that Dec 16 11:30:05 :( Dec 16 11:30:21 Ok Dec 16 11:30:40 Hi again, someone can help me with 'bindProcessToNetwork? Dec 16 11:32:15 Sanic: I don't think you need to implement the Spotify interfaces on an activity, you should be able to create another SpotifyPlayer-class that implements them Dec 16 11:32:34 Haven't used Spotify api myself though Dec 16 11:33:09 I need to connect to an IoT device acting as an AP, but I cannot talk to this device cause the phone doesn't detect internet connection over wifi... Dec 16 11:34:18 lohnn but what happens when I run the spotify class as an activity that doesn't happen when I try and run it alone? Like if I go and call onCreate() myself I'll get crashes/null exceptions. I don't understand what running it as an activity does differently Dec 16 11:35:41 I was thinking that you would just leave the thought of running Spotify as an activity and create a spotify object (implementing these spotify interfaces) and using it in your LibGDX code Dec 16 11:37:08 Seems like it should be possible from reading this: https://developer.spotify.com/technologies/spotify-android-sdk/tutorial/#interacting-with-the-spotify-android-player Dec 16 11:37:22 My LibGDX AndroidLauncher is kinda similar. It needs to be started as an activity. Not sure why, I'm kinda of new to Java and app dev. Dec 16 11:38:26 Here's some documentation on activities, on what it is and how it's used https://developer.android.com/guide/components/activities.html Dec 16 11:40:52 hi. I'm trying to call restartLoader on my AsyncTaskLoader, but the loadInBackground is not called. Why? Do you any ideas? Dec 16 11:41:41 My best analogy just on top of my head is that activities are more or less the same as a web page, it has code that can be run and describes what the screen shows. These activities can be started with intents, kind of like web page links (or posts) Dec 16 11:43:24 hmm Dec 16 11:44:05 And that is why you need an activity ;) Dec 16 11:44:45 Still confused. lohnn what I was doing before was: initialize(new MyGame(new SpotifyClass(this)), config); Dec 16 11:45:24 I'm going on lunch now, I'll ping you when I'm back Dec 16 11:45:27 MyGame's constructor took in a SpotifyClass. But that was a public interface SpotifyClass Dec 16 11:45:33 Ah no worries :) Dec 16 11:46:09 Hi all what up? Dec 16 11:46:29 Sleepy :p you Dec 16 11:47:27 Hmm... can someone explain this to me: I heve a Parcellable class named BTDevice. I hold them in a BTDevice[] array. Why I can't just cast BTDevice[] to Parcellable[] (it throws runtime exception saying I can't cast this way)? Dec 16 11:48:30 doesn't Java use a single "pointer" (or object handle, dunno) internally as an interface to all "facets" of a object? Dec 16 11:49:19 Does anyone use photoshop cc for makeing icons and UI can i do this without plugins? Dec 16 11:50:52 perlsyntax, http://romannurik.github.io/AndroidAssetStudio/ or use icon generator in android studio Dec 16 11:51:14 there is also an old plugin for gimp Dec 16 11:52:44 hi zap Dec 16 11:53:35 adq,I see that but all the photoshop plugin cost money the good one.I was thinking of looking at sketch to. Dec 16 11:54:06 not my problem Dec 16 11:54:29 ? Dec 16 11:55:06 i never said it was your prob. Dec 16 11:56:18 how rude! Dec 16 11:58:48 Hello everybody! Is there a retrofit irc channel or can I ask my retrofit related questions here? Dec 16 12:01:12 you can ask here Dec 16 12:01:23 plenty of retrofitters here Dec 16 12:03:45 my problem is about passing new data to the loader in a second moment. I first create it and use its data. The second time i need to call it again but this time passing a Bundle. How can i do that? Dec 16 12:04:35 I've tried with restartLoader, but the loadInBackground is not called Dec 16 12:07:59 Okay, nice! I want Retrofit (1) to run a bit of code for every call of any of my interface's methods automatically. Is there any way to do this for asynchronous and synchronous calls? This piece of code needs to have access to the response headers. Dec 16 12:10:36 I want to make something like a RequestInterceptor but for responses. Dec 16 12:11:27 LameName123: http://stackoverflow.com/questions/31986834/using-response-interceptors-with-retrofit Dec 16 12:14:48 Melatonina: Thank you for the link, I check it out! Dec 16 12:16:57 LameName123: 10€ Dec 16 12:25:20 Melatonina: Nah, sorry. But yea, I think this solves my problem. Thank you very much :) Dec 16 12:26:00 LameName123: following the link you accepted the contract Dec 16 12:26:17 D: Dec 16 12:26:33 it's in the fine print Dec 16 12:27:08 O noes... Please don't hurt me senpai! :( Dec 16 12:28:02 :) Dec 16 12:30:30 Sanic: I'm back from lunch Dec 16 12:30:40 :D Dec 16 12:32:39 About what you wrote about the interface SpotifyClass, it does sound like you might want to extend SpotifyClass then Dec 16 12:45:40 Hey, have anyone tried android things? https://developer.android.com/things/sdk/index.html Dec 16 12:50:43 lohnn: no, I don't have a "thing" currently Dec 16 12:51:54 lohnn: what "thing" do you have? Dec 16 12:52:33 Trying to get my Raspberry Pi 3 to be a "thing", but the download link is corrupted for me Dec 16 12:54:08 lohnn: what will your thing do? Dec 16 12:55:25 Melatonina: Haven't decided yet, want to start by playing around with it. Dec 16 12:55:27 senpai Dec 16 12:55:50 you wanna know what my thing does, Melatonina ? Dec 16 12:55:59 Yes, please Dec 16 12:56:08 I..didn't think further than that Dec 16 12:56:16 damn it Dec 16 12:56:29 why is the Android SDK trying to execute code from under /tmp/swtlib-64/libswt-gtk-3550.so? Dec 16 12:56:40 its a world-writable directory Dec 16 12:56:45 that is incredibly dumb Dec 16 12:57:08 and it doesn't even value the TMPDIR environment variable Dec 16 13:04:01 so what is a shared lib doing under /tmp? Dec 16 13:07:11 it's being loaded Dec 16 13:07:28 shared lib don't do anything but that Dec 16 13:07:41 well you don't load it from under world-writable /tmp Dec 16 13:07:58 unless you want troubles Dec 16 13:08:13 or are stupid Dec 16 13:08:13 because security trouble is what you get Dec 16 13:08:27 who's device is that? yours? Dec 16 13:08:59 ./android-sdk-linux/tools/android Dec 16 13:09:33 i just upgraded to the latest version as well Dec 16 13:10:20 you should report a bug and save the world Dec 16 13:10:33 a security issues, more exactly Dec 16 13:10:35 be a hero Dec 16 13:11:49 where is the bug reporting system? Dec 16 13:12:04 I don't know Dec 16 13:12:11 oh i just found it Dec 16 13:12:19 it doesn't work... Dec 16 13:12:29 you press the "File a bug"-button and nothing happens Dec 16 13:12:53 neither does the "Documentation" or "Send feedback" buttons Dec 16 13:13:56 developers probably: "great, nobody is reporting bugs!" Dec 16 13:14:24 JyZyXEL: Or "we don't need these buttons, we don't produce bugs" ;) Dec 16 13:14:27 that's why Android has so many bugs Dec 16 13:14:41 nobody ever reported a bug in so many years! Dec 16 13:14:44 yeah, no wonder it's buggy when even the report bug feature is broken Dec 16 13:15:15 JyZyXEL: you should cold call Google and tell them that the Android bug report system is broken Dec 16 13:15:42 JyZyXEL: ask for a job, too Dec 16 13:20:42 JyZyXEL: do know the Google's phone number? Dec 16 13:20:46 you Dec 16 13:21:00 8.8.8.8 and 8.8.4.4 Dec 16 13:22:03 You really think like a ZyXEL router Dec 16 13:23:13 JyZyXEL, https://code.google.com/p/android/issues/entry Dec 16 13:24:08 usually, submit feedback from help menu in android studio just spawn your browser Dec 16 13:24:53 ah Dec 16 13:25:01 failed silently on my machine Dec 16 13:25:40 i have no idea why they put some .so in /tmp to be honnest Dec 16 13:28:13 hmm they do it on windows too Dec 16 13:28:33 claiming it's to avoid locking tool dir in case of update.... Dec 16 13:29:00 JyZyXEL, check inside your "sdk_folder"/tools, some scripts there will have lot of references to your temp folder Dec 16 13:29:50 this is seriously dangerous lol Dec 16 13:30:16 yes. Dec 16 13:31:22 can we make a virus and make money out of this thing? Dec 16 13:31:38 hijack all smartphones of the world Dec 16 13:31:46 except iphones Dec 16 13:31:53 can we do that? Dec 16 13:33:22 i think the attack vector would be more like hijacking the developers environment in a multi-user system? Dec 16 13:35:27 can I have more than one SurfaceView per Activity? Dec 16 13:36:19 technically yes, but it's not recommended, don't do it Dec 16 13:36:42 Ok Dec 16 13:36:53 you will have multiple bugs/glitch between the n-surfaceviews Dec 16 13:37:12 currently all videos are showing in the first surfaceview that is created Dec 16 13:37:16 you likely don't need the SurfaceView either unless you're making a game Dec 16 13:37:34 I have a list of video thumbnails Dec 16 13:38:03 maybe I'm wrong here then Dec 16 13:38:10 when I single-tap on the play button I'm adding a fragment containing a SurfaceView connected to exoplayer Dec 16 13:38:41 what currently happens is that all videos are played over the first thumbnail Dec 16 13:38:59 if you don't animate the content of your surfaceview, you probably don't need one Dec 16 13:39:21 what should I use then? Dec 16 13:39:37 VideoView I would think Dec 16 13:39:47 what if I keep track of the created surface views and destroy them before I create a new one? Dec 16 13:39:55 I just need only one item playing at time Dec 16 13:40:16 I'm not strictly interested in multiple videos playing at the same time Dec 16 13:40:24 why not control a list of VideoViews instead Dec 16 13:40:27 under what template should this bug be filed against? Dec 16 13:40:43 "Toold bug report" or "Android Studio bug" or something else? Dec 16 13:40:44 or just use one VideoView and change its URL Dec 16 13:41:05 or just "User bug report" Dec 16 13:41:18 nb-ben: I'll try a VideoView now. Dec 16 13:41:45 ah, VideoView is a SurfaceView Dec 16 13:41:46 nb-ben: single tap should play a little video over the thumbnail, double taps opens a full screen video Dec 16 13:41:50 "Toold bug report" or "Android Studio bug" or something else? < yeah something like that Dec 16 13:41:56 don't use "user bug report" Dec 16 13:42:15 ah, thats the /dev/null ;) Dec 16 13:42:15 Melatonina: sounds like you want a grid of images, and then create/destroy VideoViews on top of them Dec 16 13:42:20 still, it won't change a damn thing, sadly i believe Dec 16 13:42:41 nb-ben: yeah, that's what I said before. Thanks, I'll do that then! Dec 16 14:15:44 JakeWharton, Dec 16 14:15:51 "Serious question: if people need performance on Android, why don't they simply use a POJO factory object, which basically the same features and ease of use as a "DI framework", except... zero overhead?" Dec 16 14:16:21 why DO we use Dagger? Dec 16 14:18:30 ah I see you've answered some guy about this question here https://www.reddit.com/r/androiddev/comments/2vwmym/what_advantages_does_dagger_provide/ Dec 16 14:25:11 hey guys, how can I view the system partiation of a running emulated android Dec 16 14:25:27 I am in android device monitor in the tab file explorer but nothing shows up Dec 16 15:20:39 hi. I'm trying to call restartLoader on my AsyncTaskLoader, but the loadInBackground is not called. Why? Do you any ideas? Do i maybe need to recreate the loader? Dec 16 15:24:37 LucaS05: do you re-type the message or use an auto-repeat plug-in for your IRC client? Dec 16 15:27:38 harsh Melatonina Dec 16 15:28:00 why harsh? it was just a question Dec 16 15:28:16 mhm Dec 16 15:28:39 people here have little sense of humor Dec 16 15:29:03 Melatonina: i've pressed UP and i've got the old messages :D I'm sorry, but i've seen to many "X has joined/left IRC" so i've written the message again Dec 16 15:29:09 not really Melatonina Dec 16 15:29:30 considering most try to make a living from deving android apps Dec 16 15:30:08 Android makes people bitter and humorless Dec 16 15:30:24 tru words Dec 16 15:30:44 LucaS05: I never used AsyncTaskLoader Dec 16 15:31:21 people here have little sense of humor << not our fault if you're not funny at all and it's not really the place for that Dec 16 15:31:33 Melatonina: Do i need to maybe switch to Volley? Dec 16 15:31:49 adq: Boom! Dec 16 15:32:07 * raoul11 gets popcorn Dec 16 15:32:17 hey guys that message was not bad for me :D Dec 16 15:32:22 * adq gets /ignore Dec 16 15:32:57 boo adq. thought we're in for a proper irc banter Dec 16 15:32:59 LucaS05: I really don't know what's the role of AsyncTaskLoader. Volley and Retrofit are used to invoke web APIs and serialize/deserialize parameters and return values Dec 16 15:33:50 LucaS05: does AsyncTaskLoader have a similar role? Dec 16 15:34:34 Melatonina: I've used a Loader because the docs say that it's synced with the activity lifecycle and it is useful for async operations Dec 16 15:34:57 LucaS05: what are you using it for, exactly? Dec 16 15:35:19 Melatonina: calling a webservice with ksoap2 Dec 16 15:35:39 i need to use ksoap2 because the server is a SOAP web service Dec 16 15:36:54 LucaS05: ok. Apparently Volley and Retrofit can do SOAP request. I have no experience in that area. Sorry Dec 16 15:37:28 LucaS05: so you *can* use Volley or Retrofit. I don't know if you *should* Dec 16 15:38:05 You should Dec 16 15:38:30 That second one Dec 16 15:39:22 JakeWharton: and the request is handled in an async way? Dec 16 15:39:44 Yes Dec 16 15:41:20 JakeWharton: there are any difference between Retrofit and VolleY? Dec 16 15:47:10 Lots Dec 16 15:47:32 Retrofit is much more declarative Dec 16 15:47:51 It operates at a higher level of abstraction Dec 16 15:51:10 JakeWharton: ok good. And which is the best place to add the retrofit request? Dec 16 15:52:59 I don't know what that question is asking Dec 16 15:54:25 JakeWharton: Now i've the code making the request inside the loader. The loader is called in my activity. If i use retrofit is the activity the right place to add the retrofit's request? Dec 16 15:55:20 Or do i need to use a special component for adding the retrofit request code? Dec 16 16:10:11 I presume our app can act on multiple different URL schemes? I just need to define each intent-filter in the androidmanifest? Dec 16 16:10:39 yes sdousley Dec 16 16:11:24 sdousley: to do this you probably want one with multiple elements Dec 16 16:11:40 (unless you want the different schemes to go to different activities/services/etc Dec 16 16:11:41 )\ Dec 16 16:12:42 LucaS05: you can execute the Retrofit requests on an AsyncTask or you can use RxJava Dec 16 16:12:51 LucaS05: https://guides.codepath.com/android/Consuming-APIs-with-Retrofit Dec 16 16:14:01 LucaS05: http://geekcalledk.blogspot.it/2014/08/use-simple-xml-with-retrofit-for-making.html Dec 16 16:15:04 Melatonina: thanks! I've found codepath always useful :) Dec 16 16:15:36 LucaS05: the second link is about soap Dec 16 16:16:23 LucaS05: this is still another way to run requests: http://www.androidhive.info/2016/05/android-working-with-retrofit-http-library/ Dec 16 16:16:44 Melatonina: i've also found: http://stackoverflow.com/questions/37825990/post-soap-xml-request-with-retrofit Dec 16 16:16:44 LucaS05: with enqueue() Dec 16 16:18:56 Melatonina: with this i think that i don't even need the ksoap2 library Dec 16 16:19:15 Is creating a SurfaceView for each item in a RecyclerView too heavy? I still plan to use only one of them at time Dec 16 16:21:50 ludocode: OK cool Dec 16 16:22:01 I'm not looking to do it yet, but wanted to check viability :) Dec 16 17:21:30 Evening all.. I've got a list of locations locally in my app which is working well for my testing. However when the app is released I need to get the list from an external place because they will change as locations are added or removed Dec 16 17:21:46 what's the best/most secure way to do this? Dec 16 18:01:13 lol https://medium.com/the-mission/rocket-ai-2016s-most-notorious-ai-launch-and-the-problem-with-ai-hype-d7908013f8c9#.h3kg9giec Dec 16 18:32:21 http://www.theregister.co.uk/2016/12/16/oracle_targets_java_users_non_compliance/ Dec 16 18:33:53 i’m not entirely sure who they’re going after Dec 16 18:33:58 people who write java software? Dec 16 18:34:11 or people who put java on their devices? Dec 16 18:37:55 Java SE is free for what Oracle defines as “general purpose computing” – devices that in the words of its licence cover desktops, notebooks, smartphones and tablets. Dec 16 18:38:05 they left out servers, whats the status there ? Dec 16 18:38:42 i think its still free Dec 16 18:38:44 it sounds like it’s still free if you’re only using the SE bits Dec 16 18:39:00 but if you start using EE stuff, or the SE Advanced stuff, then you’ve got to pay Dec 16 18:39:37 is JMS in EE or SE Dec 16 18:39:52 i couldn’t tell you. Dec 16 18:40:04 I only know enough Java to do Android stuff, and to ask where the bathroom is :p Dec 16 18:40:31 Bathroom.getInstance(...).getFactory().whereAreyou(!) Dec 16 18:42:00 lol Dec 16 18:47:08 s73v3r wonder if oracle would try something like 'this JDK is only licensed to produce code to run on the bundled JRE' (or something like that) Dec 16 18:47:30 * g00s wonders how jack / jill are coming Dec 16 18:47:41 they might. i’d hope they don’t, cause that would just mean even more android java stagnation Dec 16 19:04:52 I've noticed some weird behaviour in Android Studio Dec 16 19:05:07 When using app:srcCompat and tools:src, app:srcCompat takes precedence in the preview Dec 16 19:05:21 The correct behaviour is exhibited when using android:src and tools:src (tools:src takes precedence) Dec 16 19:05:32 i don't know any other kind of behaviour in Android Studio than weird Dec 16 19:07:06 spudowiar, probably because tools:src is a replacement for android:src Dec 16 19:07:23 adq: But it should take precedence over app:srcCompat as well Dec 16 19:07:36 they’re not the same Dec 16 19:07:39 i previously searched how to use tools with specific name space like app:anything instead of android:anything Dec 16 19:07:39 Since app:srcCompat is supposed to replace android:src when using vector graphics Dec 16 19:07:43 have you tried tools:srcCompat? Dec 16 19:07:44 and i came to the conclusion it's not supported Dec 16 19:07:50 s73v3r: Yes, doesn't do anything Dec 16 19:07:55 that’s your bug Dec 16 19:08:00 s73v3r: Nope Dec 16 19:08:11 not as in it’s your fault Dec 16 19:08:16 as in, that’s the bug you should report Dec 16 19:08:17 s73v3r: app:srcCompat is for supporting vector images on older devices Dec 16 19:08:27 s73v3r: It *is* functionally the same as android:src Dec 16 19:08:35 also for tint, app:srcCompat is favoured Dec 16 19:08:36 s73v3r: In fact, it *is* exactly the same on API > 21 Dec 16 19:08:36 yes, and I would not expect tools:src to override srcCompat Dec 16 19:08:41 s73v3r: I would Dec 16 19:08:46 :P Dec 16 19:08:57 It makes sense that it should Dec 16 19:09:03 not really Dec 16 19:09:08 they’re different attributes Dec 16 19:09:18 You don't need tools:srcCompat Dec 16 19:09:21 It makes no sense Dec 16 19:09:23 it's just a gigantic mess Dec 16 19:09:26 ^^ Dec 16 19:09:30 i'm wondering how it does not fall apart Dec 16 19:09:33 ^^ Dec 16 19:09:35 if tools:srcCompat doesn’t override app:srcCompat, then I would complain Dec 16 19:09:52 it does not s73v3r, because tools has no idea of app: but only android: Dec 16 19:10:05 and that I would report as a bug Dec 16 19:10:28 i gave up on that too after so many bug reports Dec 16 19:10:50 adq: It shows the app:srcCompat image though Dec 16 19:11:25 spudowiar, you aware that tools is just for previewing in the layout editor right? Dec 16 19:11:29 Yes Dec 16 19:11:31 ok Dec 16 19:11:43 tools:src should show instead of app:srcCompat though Dec 16 19:11:53 i disagree Dec 16 19:11:54 tools:src DOES show instead of android:src Dec 16 19:12:03 try to use both android:src and app:srcCompat Dec 16 19:12:04 you should use tools:srcCompat if you want that Dec 16 19:12:05 s73v3r: app:srcCompat is just a hack for supported vector graphics Dec 16 19:12:06 and see how takes precedence Dec 16 19:12:11 so what? Dec 16 19:12:19 and then you will find something logical about tools: showing one and not the other Dec 16 19:12:24 and see who* Dec 16 19:12:47 adq: app:srcCompat -> tools:src -> android:src is the order of precedence in the preview Dec 16 19:13:01 It should be tools:src -> IDGAF what happens next :P Dec 16 19:13:08 yup but if app:srcCompat -> android:src Dec 16 19:13:12 then it's logical Dec 16 19:13:16 if not, bug Dec 16 19:13:42 Yeah, it's app:srcCompat -> android:src Dec 16 19:13:57 app:srcCompat -> tools:src -> android:src is the full order Dec 16 19:13:58 then you can understand why tools:src should show instead of app:srcCompat though Dec 16 19:14:02 even if this is not desired Dec 16 19:27:13 adq: But tools:srcCompat would be redundant Dec 16 19:28:57 well, you have no solution Dec 16 19:29:47 either you use tools:src to replace in the preview mode android:src and do not use app:srcCompat (you can load vectordrawable if you set your layout editor API >= 21) Dec 16 19:30:13 or you don't use tools:src since it will do nothing if you use app:srcCompat because this last one takes precedence Dec 16 19:30:56 or you can use a sandbox xml file you will remove later on, crappy but convenient sometimes Dec 16 19:33:57 hello, I am wondering what are prerequisites for android development? Dec 16 19:34:06 I just want to build basic apps Dec 16 19:34:08 simpel Dec 16 19:34:55 some basic java, a device to test on, android studio Dec 16 19:35:34 Coffee, a rubber duck, etc.. Dec 16 19:35:38 hehe Dec 16 19:36:50 jennie, https://developer.android.com/training/index.html start here Dec 16 19:43:12 how can i find out if consumePurchase() is successful? i can't find any documentation to that function... only thing i found is "Get a response code from Google Play indicating if the consumption completed successfully." but it doesn't say how i get that response code Dec 16 19:50:28 abax, you should have a listener callback telling you the consume finished with success or not, you can also query the sku inventory and verify the item is not owned anymore too Dec 16 19:53:28 adq: actually i remembered also that consumePurchase() is a blocking function. so i guess i could just wait what it returns Dec 16 19:53:46 if it's zero i guess then the consuming succeeded Dec 16 19:53:51 if you're not on the UI thread only then Dec 16 19:53:58 yes Dec 16 19:55:53 abax, you have few error codes here: https://developer.android.com/google/play/billing/billing_reference.html also a few additional more inside the trivia sample Dec 16 20:00:11 adq: So there is a website which returns a query when you put your device serial number on it, I want to make an app so that i can do it from cellphone Dec 16 20:04:02 ok Dec 16 20:04:08 ok Dec 16 20:04:24 how hard is it, what should I look up Dec 16 20:32:35 jennie: it's extremely hard. You will probably die in the attempt Dec 16 20:35:36 lolol Dec 16 20:35:49 program android or die trying Dec 16 20:36:08 Live fast, die young, leave a beautiful app. Dec 16 20:36:27 hehe Dec 16 20:37:22 is it possible to write an app that will pick up a call in the background, do some pbx type stuff and then send the call through to be picked up by the user? Dec 16 20:37:44 pbx? Dec 16 20:37:50 pjsip Dec 16 20:38:27 yeah like press 1 for such and such Dec 16 20:38:52 yes look at the library pjsip or another voip framework Dec 16 20:39:20 I'm looking to do this with calls coming from my cell provider Dec 16 20:40:25 google android incoming call intent Dec 16 20:40:27 would that still fall under sip / voip? Dec 16 20:41:02 im not sure how u could bridge the to calls since one is out of your network Dec 16 20:41:23 but u should be able to intercept the incoming call and test what u could work up Dec 16 20:41:43 maybe forward the incoming call to ur own server and answer that over voip Dec 16 20:41:55 sounds like some illegal shit is about to go down Dec 16 20:42:07 illegal? Dec 16 20:42:31 lol just thinking of the purpose you would use this for Dec 16 20:42:38 all I'm trying to do is throw a captcha in the mix Dec 16 20:42:45 so this was talked about earlier ...http://www.theregister.co.uk/2016/12/16/oracle_targets_java_users_non_compliance/ Dec 16 20:43:03 oh shit dar10s Dec 16 20:43:13 and i think I've seen people make android apps in Koltin and Scala Dec 16 20:43:49 one of my apps is scala Dec 16 20:43:52 are we really stuck to java, I mean we can't build apps using Java8 and Java was behind C# imo of features Dec 16 20:44:19 do you think the scala app is missing something ( being not Java ?) Dec 16 20:45:04 I guess personally I never cared for Java after Oracle bought it and slowed down progress Dec 16 20:45:35 other than it being open source and not knowing scala made troubleshooting difficult, but the app was awesome Dec 16 20:46:05 dar10s: Isn't it the Java platform rather than the Java language? Dec 16 20:46:19 fxmulder: im not sure you can maybe answer put the call on hold while they do captcha on your sip connection then take the off hold? Dec 16 20:46:26 I don't see what's so special about the language. And, as you say, it can easily be replaced by another JVM-targeting language. Dec 16 20:46:59 ive not come across someone trying this yet Dec 16 20:47:12 @TacticalJoke good point Dec 16 20:54:54 jennie: it's not hard. You will probably use retrofit. Create and run a basic project in Android Studio and read a Retrofit tutorial Dec 16 20:55:48 Melatonina: thank you very much, I am just going through that basic android studio official guide Dec 16 22:19:17 This should be really simple... How do I dynamically set an adapter on a spinner without overriding a custom theme set on the spinner? If I do: ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, items); mySpinner.setAdapter(adapter), it overrides the theme both on the drop down and the spinner itself Dec 16 22:21:10 hmm... If I do "adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)", that fixes the drop down, but the foreground of the spinner no longer has my custom theme Dec 16 22:23:43 SilentByte: Use `spinner.getContext()` rather than `this`. Dec 16 22:24:02 `this` is an Activity which doesn't have the Spinner's theme. Dec 16 22:24:30 What is the recommended method to doing database JUnit tests? Use mockito? @Runwith AndroidJunit4? Cannot seem to figure out which is the best option for testing, so I can do tests that involve deleting the database, yet leave data in my emulator for manual tests. Any tips? Dec 16 22:24:53 Trying to use Mokito has been a fail thus far Dec 16 22:24:57 *mockito Dec 16 22:24:59 That did it, thanks TacticalJoke! Dec 16 22:27:06 Dec 16 22:27:15 No prob. Dec 16 22:36:19 Well, as usuall. I struggle on something for hours... post a question somewhere. Then figure it out accidently. I replace Mockito with @RunWith(AndroidJUnit4.class) got a context using InstrumentationRegistry.getTargetContext() and now all my tests run and pass that were build for DB testing. Dec 16 22:37:05 So is Mockito an older library? And recommended use is the AndroidJunit4 lib? Dec 16 22:37:32 Mockito is a common Java mocking library Dec 16 22:39:05 I could not get it to provide a context for database test that would not throw null pointers at me. Dec 16 22:40:07 Is would a mockito context be used or recommended over the InstrumentationRegistry context? Dec 16 22:40:49 all mockito provides is a mock. the objects it produces cannot really be used as a substitute for the full object Dec 16 22:40:59 are you trying to test the database, or a class that uses the database? Dec 16 22:41:27 A class that uses the database. Dec 16 22:41:34 then you want to mock the database Dec 16 22:41:45 I did not realize mockito did not build a functional object Dec 16 22:42:07 no. the whole point of mocks is to give you something that you can then instruct how to respond Dec 16 22:42:30 so in your case, you will give your class an instance of the MockDatabase, and then you can tell that MockDatabase what to return Dec 16 22:42:31 Ok, so mocking the context, was my bad. As I asked the context for a useable database Dec 16 22:42:47 Which it cannot provide Dec 16 22:43:01 Ok, starting to make more sense Dec 16 22:43:18 what are the lines of code where you’re asking for the database? Dec 16 22:43:50 you could have your mock context, and tell it to provide your mock database when asked for a database Dec 16 22:43:57 mContext.deleteDatabase(LWSDbHelper.DATABASE_NAME); Dec 16 22:43:57 SQLiteDatabase db = new LWSDbHelper(mContext).getWritableDatabase(); Dec 16 22:44:34 When I try to get that db using the mock context it was always fail on me with a null pointer Dec 16 22:44:42 which makes sense Dec 16 22:45:02 Have to figure out, how to get the mock context to provide a mock database Dec 16 22:45:53 instead of new-ing your LWSDbHelper, you’d probably want to pass it into your class Dec 16 22:45:56 Hello. I am new to app dev. Familiar with C, C++, Python and bit of web dev stuff. I want to try to code an app. Is there a library which will help me use the same code on web as well as mobile? Is react the thing I am looking for? Dec 16 22:47:29 Not sure I follow, instead of creating a new LWSDbHelper.. I want to pass it into which class? Dec 16 22:47:38 the one that’s using it Dec 16 22:47:43 The test suite Dec 16 22:47:52 no, the class that’s being tested Dec 16 22:48:19 LWSDbHelper is the one being tested Dec 16 22:49:26 ok Dec 16 22:49:37 and now you’re testing to see whether it can give you a db? Dec 16 22:50:34 in that case, you probably need a real context, and you won’t be able to use Mockito to provide one. Dec 16 22:50:58 Testing to see that its creating the database, the tables, and inserts Dec 16 22:51:44 yeah, if you need a context to create the database, then you’ll have to use a real one Dec 16 22:51:53 I have a feeling I misunderstood the abilities of the mockito library Dec 16 22:52:33 Guess that explains why when I used InstrumentationRegistry.getTargetContext(); My tests worked Dec 16 22:52:42 yup Dec 16 22:52:44 for a context vs a mock context Dec 16 22:53:23 elosz: ReactNative will let you write near native apps in JavaScript. I don’t know if you’ll be able to use 100% of the same code, but at least the same ideas Dec 16 22:53:29 s73v3r, Thanks, at least I can stop trying to get Mockito to work on those tests. It was never going to happen in a resonable manner. Dec 16 23:32:14 s73v3r: okay. I was looking into this : https://github.com/este/este Dec 16 23:33:15 i’m not very knowledgable on using web tech for app dev Dec 16 23:36:57 okay np Dec 16 23:45:42 anyone available? have a few questions. Just starting out Dec 16 23:48:00 please don’t ask to ask. Just go ahead and ask. If someone can help, they will Dec 16 23:49:55 What advice do you have for somebody just starting out as a freelance developer? The marketing/networking I'm not as good with, I'm a technical guy. Dec 16 23:54:53 learn to market and network Dec 16 23:58:13 Where would one start...i've tried freelance upwork fiverr, everyone on there is never serious about projects. What are the best platforms for finding freelance work? Dec 16 23:59:24 don’t do fiverr Dec 16 23:59:28 you could try Gigster Dec 17 00:00:14 gigster i tried when it first came out, same result. Dec 17 00:00:29 Im either doing something wrong or i don't know haha. Dec 17 00:01:19 I've been developing/designing off and on since I was 10. I'm done swinging a hammer for a living, it's actually not going to be an option much longer. I need to figure out a better method to market my skills. Independently Dec 17 00:01:58 i’m not a freelance guy, but from talking to a few, it’s not necessarily about technical skills, but sales skills Dec 17 00:02:48 Yeah i'm learning that. I had a decent web design business when I was younger but I was always attracting lower end clients. Mom and pops wanting a $100 5 page website, it's all about marketing what you can do for their business, not just building a website. Dec 17 00:03:23 one thing you could try is setting your per-hour rate pretty high. that seems to change the kinds of clients you attract Dec 17 00:03:27 I have a better grasp on how it needs to happen. I just figure I could learn from somebody experienced in freelancing instead of repeating mistakes. Dec 17 00:04:38 I would have to find the clients to begin with. I've spent countless hours on people kicking tires and flaking. I had a gig with Holiday Inn express (locally) and everything went great up until it was time for me to get paid. So I did all the work, just never got paid. So they never got their website. Dec 17 00:05:06 But it was a huge time sink between meetings and adjustments. Dec 17 00:06:14 "did all the work and never got paid" is time for either a) lawyers or b) social media shaming Dec 17 00:06:18 I know now anything local you get 50% down before you start, and I happen to live in the Seattle area. So i know I can find local business, but I don't want to restrict myself to local gigs. I eventually want to be able to work as I travel, starting in 6 months actually. Dec 17 00:07:25 seriously, Holiday Inn can afford to pay Dec 17 00:07:51 I dealt with it accordingly :) regardless, I'm trying to avoid flakely low end clients. And don't even know where to start. Ever freelance platform i've tried using is full of a bunch of phony clients or projects. Dec 17 00:08:34 yeah, the answer is absolutely not freelance platforms where you're competing with a guy fronting for a team of cheap cheap guys somewhere in Asia Dec 17 00:08:50 exactly what the problem is haha Dec 17 00:08:51 it's local networking, getting your name out there, pressing the flesh Dec 17 00:09:21 So I want to brand myself locally, and more remote work will come later? Dec 17 00:09:46 you want to find work and get paid for it Dec 17 00:10:03 grow your skills, grow your value/price, grow your opportunities Dec 17 00:10:24 seriously, Seattle and you can't find work? Dec 17 00:10:27 meh :) Dec 17 00:10:42 lmao not any quality work, it's terrible I know. Dec 17 00:11:15 I have a questionable past so places like Amazon/Microsoft/Oracle etc are out of the question, unless contracted. I'm not looking to be an employee anyway. Dec 17 00:12:25 I don't possess the know to acquire those contracts. Dec 17 00:12:51 Is it worth just doing what projects I can, to have some recent work to my portfolia and network through linkedln? Dec 17 00:12:56 folio* Dec 17 00:13:24 platform-tools 25.0.3 Dec 17 00:13:40 linkedin could be good... I'd say don't do crappy commercial work just for the sake of it, unless you need the money - better do open source or charity stuff Dec 17 00:15:25 Should I find a niche or just be an average all around developer? Learning on my own I've always just taught myself what I need to know. Dec 17 00:15:36 "BlackBerry stops making phones, licenses the BlackBerry name to TCL for Android phones" lolz Dec 17 00:16:12 i remember teh crowds advice to drop BB10 for Android, guess that didn't work out (duh) Dec 17 00:16:31 depends on what you want to do - be an expert who has to work harder but gets more advanced and well-paid work, or jack-of-all-trades with more work, but probably less value Dec 17 00:16:49 g00s: they should have done it much much earlier... say, before BB10 was released Dec 17 00:17:04 they would have just wound up like htc Dec 17 00:17:11 market keeps consolidating Dec 17 00:17:14 I genuinely think they had a chance to be *the* secure Android platform, but they wanted to do their own thing Dec 17 00:17:37 I gave up after I sold my web design company. Made a little profit but not much. And started swinging a hammer, the other thing I'm really good at. I'm hanging up my bags and honestly a bit rusty. I figure android development is the best place to jump in. I have basic knowledge and planned on learning some unity and doing some android game development to further my skillset. Sound like a Dec 17 00:17:37 good plan or could you steer me in the right direction? Dec 17 00:17:40 HTC, to be honest, have nothing left as a phone brand except some nice industrial design Dec 17 00:18:16 BB had a *massive* amount of goodwill as an enterprise platform Dec 17 00:18:53 Jaren be realistic, getting into the mobile game now - its not like 2009 Dec 17 00:19:09 was just reading the trends for mobile app dev, some magazine Dec 17 00:19:15 same forces at work : outsourcing Dec 17 00:19:17 Jaren: I'm not sure I'd recommend game dev, unless you have a particular reason to go in that direction - it's a *very* hard market to break into as an indie, and I don't think it's an industry which does smaller contracting gigs Dec 17 00:19:35 yeah indie game dev, would be a bad move too Dec 17 00:19:52 my onSaveInstanceState is definitely being called, but in onCreate() my savedInstanceState bundle is *always* null Dec 17 00:19:56 why might that be Dec 17 00:20:06 What should I focus on then? This is exactly why I wanted to come ask someone more experienced btw, I appreciate it. xD Dec 17 00:20:08 if you're looking to get hired, sure it's one route, although it's still hard Dec 17 00:20:39 Jaren there is a cs-career advice sub on reddit Dec 17 00:20:54 I'm more interested in being contracted, rather than hired. But if I can work remotely I could be ok with being hired Dec 17 00:21:17 g00s; link in pm please? Dec 17 00:21:33 Jaren but ... realistically, mobile app dev is hard enough any non-trivial app needs multiple people, so its not so realistic to be contracted out to write an app Dec 17 00:21:48 its also too risky going with indies, for many companies Dec 17 00:21:53 i've checked out a few subs that had some decent advice. But i've always had the best results with IIRC. Dec 17 00:21:58 they would rather deal with a mobile development shop Dec 17 00:22:04 unless you're good, and got a rep, a lot of companies aren't likely to want to add a random remote dev to a team Dec 17 00:22:11 yeah Dec 17 00:23:41 So what do y'all suggest? Make a bunch of example projects and network through linkedln? I feel like linkedln is like facebook, all spam no results. Dec 17 00:24:07 my feeling is that working remotely is much more sensible in the sort of situation where you're living in a 'less-developed' part of the world, targeting a 'more-developed' area Dec 17 00:24:17 working remotely in Seattle... not so much Dec 17 00:24:48 The issue is traffic. I waste over 50% of my free time commuting. Dec 17 00:25:05 Jaren: get out there and network in person... I don't live in a place with a massively active developer community, but there are multiple events per week in my city where I can meet other devs, make contacts, meet possible gigs Dec 17 00:25:07 Seattle is great, but it has the worst traffic in the world, and it's a waste of fucking life. That is where the desire to work remotely comes from. Dec 17 00:25:27 I'm terrible at following up on it, but I get at least a couple of "hey, give me a call, we might need you" sort of comments a month without even trying Dec 17 00:25:39 just being sociable and knowledgeable Dec 17 00:25:54 so networking conferences? I just assumed they are some cheesy dead end or low end work Dec 17 00:26:12 dev/tech events, both social/networking and contentful Dec 17 00:26:21 I'm being very careful about branding myself this time around. Even my construction company, I had cheap ass clients, and I provided high quality work. Dec 17 00:26:30 I know now that I did it too myself, word of mouth. Dec 17 00:26:56 That old lady I gave a great deal because I was just started out, is connected to 70% of your business and they are just as cheap. Dec 17 00:27:41 I did see one simple piece of advice on that sort of thing... put your rates up for every new project, even if it's only a few %age points... always ask for a little more Dec 17 00:28:23 and if you cut your price make sure they see the full price and the discount % on there. and stress they are getting a great deal. Dec 17 00:28:24 but most of all, get out there, meet people, network... if you're good, you'll find work Dec 17 00:28:38 * Leeds needs to find work Dec 17 00:29:04 Leeds staying in HK ? Dec 17 00:29:16 What is a good market to dive into you think? still android development or what do you suggest? Dec 17 00:29:30 g00s: for the foreseeable, yes... will be in Vancouver next month for holidays though, which should be nice Dec 17 00:29:39 oh yeah Dec 17 00:29:49 family? gf family? Dec 17 00:29:51 * needs to 'improve' his back/neck pains Dec 17 00:30:01 ^ me Dec 17 00:30:02 nah, just friendly Canadians and snow Dec 17 00:30:19 never been to Canadia before, looking forward to it Dec 17 00:30:20 Leeds you don't want to visit Trump country ??? Dec 17 00:30:52 g00s: I thought about it - the gf can't cross the border without going through a full visa application, US$160ish application fee, etc. - so I'm probably not going to bother Dec 17 00:31:44 Jaren: the flip side of being in a place where there should be a fair amount of work available is that there's also a fair amount of competition - what would make you stand out against other mobile devs? or to put it another way, what are you good at? Dec 17 00:33:35 How can I force my intent to only allow opening local files? Dec 17 00:33:52 I want to call a file picker but I don't want to allow using DocumentProviders like Google Drive Dec 17 00:37:18 Found Intent.EXTRA_LOCAL_ONLY, let's see if it works :) Dec 17 00:58:14 Leeds; to be honest I'm just trying to decide what language to begin with that has the best chance of landing a software dev job. My past experience is mainly java, html, css, some php. But I'm open to anything Dec 17 02:24:41 Jaren http://spectrum.ieee.org/static/interactive-the-top-programming-languages-2016 **** ENDING LOGGING AT Sat Dec 17 03:00:00 2016