**** BEGIN LOGGING AT Wed Nov 23 03:00:00 2016 Nov 23 03:35:21 bye my friends Nov 23 03:58:33 was it a "bye my friends" like "Goodbye, my friends, I'm going to commit suicide" or more like "See you later"? Nov 23 04:44:44 Hello Nov 23 04:45:07 Is it possible creating irc bot on android? Nov 23 04:46:39 yes Nov 23 04:47:03 How bankai_ Nov 23 04:47:09 learn java Nov 23 04:47:13 If you dont mind can you help me Nov 23 04:47:17 Yeah i know Nov 23 04:47:23 I already Nov 23 04:47:31 Created pirc bot Nov 23 04:47:35 nominated: What's the question? Nov 23 04:47:44 10:15:06 AM Is it possible creating irc bot on android? Nov 23 04:47:50 Sure it is Nov 23 04:48:02 How? Nov 23 04:48:25 Are you wanting someone to do it for you, or are you genuinely curious of how you can do it yourself? Nov 23 04:48:39 Yup Nov 23 04:50:07 Lvl4Sword: i know scripting languages such as python java mirc etc Nov 23 04:51:46 Lvl4Sword Nov 23 04:53:30 nominated: learn to use this code and you'll be able to do whatever evil you want with your legion of IRC bots: https://github.com/pocmo/Yaaic Nov 23 04:53:41 nominated: just don't use to spam here Nov 23 04:53:45 them Nov 23 04:57:00 nominated: you are welcome Nov 23 04:57:29 Thnx Nov 23 04:58:49 Is there a maximum size for drawables? I have an image with 5900x5900 pixels that results in an xml inflate exception (with no additional details) when I try to set it as a background image. Nov 23 05:01:40 Syzygy: http://stackoverflow.com/a/15316453 Nov 23 05:02:41 Syzygy: https://developer.android.com/training/displaying-bitmaps/load-bitmap.html Nov 23 05:02:53 thank you Nov 23 05:04:55 np Nov 23 05:47:29 https://gist.github.com/Syzygy2048/db442fa9508fc9560738828a04b6e4e0 Can someone figure out what's going on here? Nov 23 05:47:46 Basically I want to insert a new fragment into my viewPager at position 1 Nov 23 05:47:53 and then scroll to it Nov 23 05:48:05 this insert is always from position 0 Nov 23 05:49:40 this leads to the exception when I do it twice Nov 23 05:53:44 Does anyone prefer to use regular views for a viewpager over fragments? Nov 23 06:23:39 hi Nov 23 06:24:45 i want to add something to my app that will check a remote server every, say, 5 minutes. it should do this even if the user has not opened the app in a long time and it should not wake up the device if the user is not using it. Nov 23 06:25:02 what's the correct way to do it? i'm looking around and seeing a lot of different ways to run tasks in Android Nov 23 06:25:10 and i want to make sure i do it the rightest way Nov 23 06:30:00 Hello everyone. I want to find out if it’s appropriate to add projectName/build/ to gitIgnore. I notice it contains Mockable-android-21.jar . I have added /build to gitIgnore which I believe it’s where generated APKs go to Nov 23 06:33:11 how to get android offline docs? Nov 23 06:33:24 i have android studio already installed Nov 23 06:33:31 spykins> if you delete it, is it re-generated when you build your project? if so (IMHO) it doesn't belong in git Nov 23 06:34:35 Thanks Chainfire So do I shouls add it to git.ignore file Nov 23 06:34:52 ?? Nov 23 06:35:17 I mean do I add it to the gitIgnore file. git status keep showing it as unTracked file Nov 23 06:35:29 guess so Nov 23 06:35:48 Thanks Nov 23 06:36:24 andhdhdh the docs are in the (surprise!) 'docs' folder inside your sdk download Nov 23 06:36:43 where to search for Nov 23 06:37:02 i have android studio Nov 23 06:37:28 not sdk separately installed Nov 23 06:37:51 then its probably somewhere below the Android Studio install directory Nov 23 07:12:04 i know .NET, C# and javascript. i dislike java. what is my best environment for android app development? Nov 23 07:13:18 i also dislike iOS and WinMo, but i do like VS. Nov 23 07:13:55 react native is probably your path Nov 23 07:14:16 ahoo, android studio is probably the best android IDE out there Nov 23 07:16:26 by environment i don't mean IDE exclusively, it includes frameworks Nov 23 07:16:59 ahoo: Xamarin Nov 23 07:17:41 ahoo: with Visual Studio Nov 23 07:27:48 thx everybody Nov 23 07:35:38 * thepoosh flips his hat towards raoul11 Nov 23 07:36:55 ohi Nov 23 07:37:07 thepoosh: what shit weather Nov 23 07:37:52 raining missiles? Nov 23 07:38:06 Sorry. Dark humor. Nov 23 07:38:11 i wish Nov 23 07:38:20 dust storms Nov 23 07:38:29 and its cold as f Nov 23 07:39:18 indeed Nov 23 07:39:27 Melatonina: not yet... Nov 23 07:39:32 raoul11: you're in TLV? Nov 23 07:39:41 just think what happens in JLM Nov 23 07:40:12 i try not to, coz thats a horrible city Nov 23 07:40:31 hehe Nov 23 07:42:59 || Oymyakon, Russia | Light Snow | -34°C (-28°F) | Humidity: 73% | 4 KPH (2 MPH) from the NE || Nov 23 07:43:02 aww t-shirt weather Nov 23 07:43:18 Ashiren: you're russian? Nov 23 07:43:23 no Nov 23 07:43:36 we have a guy in Petersburg now Nov 23 07:44:15 cool Nov 23 09:06:53 hey fellas Nov 23 09:06:57 how you fellin Nov 23 09:10:44 I'm trying to find a way to keep the pending intents that I've used to register a couple of alarms Nov 23 09:10:51 so that I can use those intents to cancel those alarms Nov 23 09:10:54 how can I do this? Nov 23 09:11:16 afair you only need their ids (and type(?)) Nov 23 09:11:27 so keep them in sharedPreferences Nov 23 09:11:41 yea seems right Nov 23 09:13:09 so if I treat all alarms received the same, do I even need an ID at the alarm receiver? Nov 23 09:13:24 do I even need a unique alarm ID Nov 23 09:13:34 notificationManager.notify(notificationID, mNotifyBuilder.build()); Nov 23 09:13:36 at that line Nov 23 09:14:49 where is this ID is being used anyways? here? PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); Nov 23 09:14:53 as "requestCode"? Nov 23 09:22:50 Anyone have experience with beacons? Nov 23 09:35:51 Realm documentation suggests to initialize the Realm database in an Application subclass, but if i don't subclass Application in my project should i init Realm in the onCreate() of the initial activity subclass instead? Nov 23 09:41:01 get an application subclass Nov 23 09:41:03 it's useful Nov 23 09:41:15 you can initialise Parse, FacebookSdk, all sorts of stuff Nov 23 09:41:17 and it's just 4 lines Nov 23 09:43:00 well alright then Nov 23 09:44:46 hi all Nov 23 09:45:00 i am trying to start developing on mac os x but i can't install android studio Nov 23 09:45:30 i made a post on stackoverflow if anyone has time to take a look http://stackoverflow.com/questions/40703064/mac-osx-android-studio-quit-unexpectedly-on-first-time-startup Nov 23 09:46:18 OSX 10.7 sounds super old Nov 23 09:46:47 I'm on 10.11 and already behind Nov 23 09:47:19 It is Lion. It is super old Nov 23 09:47:22 so i should start with updating the os? Nov 23 09:47:23 Update your OS if possible. If not, update your machine Nov 23 09:47:54 hi Nov 23 09:47:57 AS needs OS X 10.8.5 or newer Nov 23 09:48:15 What he said. 10.8.5 or higher Nov 23 09:48:18 thanks Mavrik Nov 23 09:49:00 First rule of Apple development: upgrade everything to the latest version or get left behind Nov 23 09:51:30 i tried to do a software update but it says "Your software is up to date" - "Software Update doesn't have any new software for your computer at this time" Nov 23 09:51:48 sorry if these are stupid questions, i haven't used a mac before (familiar with android though) Nov 23 09:53:13 which year computer? Nov 23 09:53:21 pduin: do you prefer MS approach of back support everything for 10 years to allow all software to be shitty? Nov 23 09:53:26 2011 squ Nov 23 09:53:33 macbook? Nov 23 09:53:33 I prefer the MS approach Nov 23 09:53:47 yeah squ Nov 23 09:53:51 macbook pro Nov 23 09:53:55 As a developer I am forced to extend Apple's upgrade policy to my customers Nov 23 09:54:09 you are iOS as well? Nov 23 09:54:10 It's pretty hard to support older versions of your app on OSX/iOS Nov 23 09:54:10 jimmycarr2, you need to go to AppStore and download new version of OS from there. Nov 23 09:54:37 jimmycarr2: 2011 macbook pro doesn't sound old Nov 23 09:54:49 There is no App Store on Lion I think Nov 23 09:55:11 I think lion had it as well Nov 23 09:55:27 http://www.macworld.com/article/2985812/operating-systems/get-you-mac-ready-for-os-x-10-11-el-capitan.html Nov 23 09:55:30 Of course it is. Nov 23 09:56:29 you're still on Capitan? Nov 23 09:56:34 jimmycarr2: http://www.apple.com/macos/how-to-upgrade/ Nov 23 09:57:04 Mavrik, you know your way around Android, how do I save a reference to a pending intent so that I can recreate it and get the same one? Nov 23 09:57:25 Odaym: use FLAG_UPDATE_CURRENT Nov 23 09:57:31 is the requestCode param in the PendingIntent.getBroadcast() function considered the ID? Nov 23 09:57:34 when creating the pending intent Nov 23 09:57:41 I already do that Nov 23 09:57:46 jimmycarr2: http://i.imgur.com/oZqy6tL.png Nov 23 09:57:49 ah thanks guys Nov 23 09:57:50 they're created, but then later I want to cancel them Nov 23 09:57:55 jimmycarr2: 2012 Nov 23 09:57:57 i had no idea i couldn't use an older version Nov 23 09:57:58 it uses both the request code and the Intent.filterEquals Nov 23 09:58:04 Odaym: ^ Nov 23 09:58:07 i will download sierra at the weekend Nov 23 09:58:16 hi Nov 23 09:58:45 jimmycarr2: you can start download now Nov 23 09:58:52 ha Nov 23 09:58:55 it will ask when to install Nov 23 09:58:57 cristian_c: hi Nov 23 09:59:02 hm Nov 23 09:59:06 I mean it doesn't restart when not asked to Nov 23 09:59:08 ok let met check Nov 23 09:59:14 jimmycarr2: Nov 23 09:59:24 Odaym, what do you mean by reference? Nov 23 09:59:46 I mean I want to grab that same intent I used to set the alarm, in another place, and cancel that alarm Nov 23 10:00:02 so it's identified by the requestCode Nov 23 10:00:49 ahh. Nov 23 10:00:55 I've got some display issues with my test widget for the app I'm developing. I've placed a file called test_widget.xml into res/layout directory. This file has a relative layout parent. I'm trying to figure out why the widget is bad displayed. This is test_widget.xml: http://pastebin.com/vcRvQZjZ and this is the screen with my widget: http://imgur.com/a/WUKcm Nov 23 10:00:57 Hmm, I don't remember the exact rules anymore Nov 23 10:01:11 But I think it has to be the same action, same data and same package I think Nov 23 10:01:18 the textview is contained into a relativelayout, inside the widget, I've tried to reduce the size but it's not working. How could I fix the xml in order to get the test widget with the same size (height and width) than the left widget? Nov 23 10:01:19 I think this is it http://stackoverflow.com/questions/7496603/how-to-create-different-pendingintent-so-filterequals-return-false Nov 23 10:01:32 Any ideas? Nov 23 10:01:38 thepoosh: hi Nov 23 10:02:57 Odaym: Nov 23 10:02:58 https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/content/Intent.java#8242 Nov 23 10:04:03 I see Nov 23 10:04:13 but this is a member function Nov 23 10:04:26 so I have to create one and filterEquals over it, what do I pass in the other? Nov 23 10:05:17 it's useless if I have to create both of them, the one I use to call filterEquals on, and the one I am comparing with Nov 23 10:07:59 thepoosh: http://i.imgur.com/cWkuCJT.mp4 Nov 23 10:13:54 Anyone know why the 6.0.1 image is not available for AVD or Genymotion? Nov 23 10:14:05 Has it ever been? Nov 23 10:18:58 the_fog, there's not that much of a difference between 6.0 and 6.0.1 (just a security patch if I'm not wrong). Regarding Genymotion it's been decided to skip it. Nov 23 10:19:38 Okay great, thanks radixx- Nov 23 10:22:00 6.0 has a bug regarding permissions though Nov 23 10:27:24 I am looking for betatesters for https://play.google.com/apps/testing/org.de.jmg.jmgphotouploader also in exchange Nov 23 10:32:19 betatesticles Nov 23 11:09:15 you ever used JodaTime? Nov 23 11:09:44 I have an hour and a minute from a betterpickers picker, I want to construct a date from them and pass it to the jodatime formatter to get back only something like 12:49 AM Nov 23 11:10:34 and? Nov 23 11:10:58 how would you construct a date out of an hour and a minute Nov 23 11:11:11 this seems to work http://pastie.org/10968225 Nov 23 11:11:32 LocalTime, not date Nov 23 11:12:03 it's that damn "a" that's problematic, the one that allows me to get the PM/AM Nov 23 11:12:13 when I have it in their in the formatter, i get that the passed date was too short Nov 23 11:12:50 I don't know since when are they signing their binaries on window, but it's good: http://imgur.com/a/kWBLp Nov 23 11:13:29 trying canary again YOLO Nov 23 11:52:39 does anyone have good android studio samples or examples of swipe views? preferable for Gingerbread Nov 23 11:53:15 do you have a *really* good reason for targeting gingerbread? Nov 23 11:54:46 yes its my only development device Nov 23 11:54:58 atm Nov 23 11:55:12 https://developer.android.com/training/implementing-navigation/lateral.html Nov 23 11:55:36 use the emulator then Nov 23 11:56:12 i will try that Nov 23 11:56:31 i tried that sample on my device, but it just crashed Nov 23 11:56:42 anyhow i will try the emulator Nov 23 12:10:14 Which takes preference? Build types of flavors? I have a resource in debug/release and alpha flavor. Which one would be used? Is it configurable? Nov 23 12:16:09 Hallo :) Nov 23 12:18:07 guys a question regarding interaction of activities. If I have a main activity (lets say a map), and I want at the same time to send some stats to a server. Should I implement it in a way, 2 activities with intent, or 1 activity and a class with functions for sending stats? Nov 23 12:18:16 astroduck, https://developer.android.com/studio/build/build-variants.html Nov 23 12:18:50 show toast on listview pulldown? SwipeToRefresh shows a progressbar which I do not want. Nov 23 12:20:00 tychestudios, https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html Nov 23 12:20:08 it's written how if you read Nov 23 12:23:21 I'm loading google maps in an alertdialogfragment. the alertdialog darkens the background, but in addition, it also darkens the map that it contains. only the google logo and the my location button are not darkend. Any idea how I could fix that? Nov 23 12:23:46 (the map is loaded in a card view within the aleartdialog fragment Nov 23 12:29:54 adq: Oh so its flavorBuildvarient > buildVarient > flavor > main Nov 23 12:30:07 makes sense Nov 23 12:31:04 astroduck, basically you will use buildtype debug while developing and debugging your project, and release only when you generate a signed apk or if you plan to test/debug release Nov 23 12:31:27 astroduck, and for the flavor, it can be anything you wish like free versus paid, or alpha versus beta versus rc, etc.. Nov 23 12:32:03 and you combine them in a variant Nov 23 12:32:15 like alphaDebug or paidRelease Nov 23 12:38:30 adq, mSwipeRefreshLayout.setRefreshing(false) does dismiss the progressbar, but I do not want it to show up at the first place. Nov 23 12:43:33 tychestudios, then maybe you can look at the source of SwipeRefreshLayout (public class SwipeRefreshLayout extends ViewGroup implements NestedScrollingParent ...) and make one without a progressbar Nov 23 12:43:55 making a custom class from it won't work because almost everything is private in it, sadly Nov 23 12:47:13 Yup, looks like that the way then. Thanks adq. Nov 23 13:02:53 some of my RealmObjects implement AutoIncrementable interface for increasing the primary key by each persisted object. i wrote the increment logic to each RealmObject subclass like so: https://dpaste.de/e65O but was wondering if i could/should do it in the transaction call to keep my code DRY Nov 23 13:07:43 adq: I know but I was working with Firebase and wanted different project for alpha live / live app / all debug builds Nov 23 13:08:12 So now I'll put one config file in alpha one in prod and one in debug to override it Nov 23 13:08:30 So any debug mode stuff doesn't go in live apps Nov 23 13:30:36 Im logging a bunch of lines in order to debug a thing. However I have however find a little 'bug'. Logcat (terminal, either reading in the terminal or sending it to a file) doesn't seem to show everything i have logged. sometimes some lines seem to get skipped and not logged. My google-fu only found when people dont see anything. So I have already tested to kill and start adb server. Nov 23 14:27:31 BETA Test! Please help me! https://play.google.com/apps/testing/org.de.jmg.jmgphotouploader Android program for sharing pictures to facebook, twitter, instagram, pinterest and other services which are installed on the device. Including an SQLite Database, which keeps record of all uploads. You just have to check the desired service and long press on it then the picture is send to the selected app. If you press on the picture you Nov 23 14:27:31 can view it or send it to another app (for example E-Mail). I would be glad if you send me a feedback after installation. If I shall test your program in exchange you are welcome! Nov 23 14:29:45 no advertising Nov 23 14:36:52 I have a viewpager and a fragmentviewpageradapter. I want to insert a fragment in between other fragments (at position 1), however this leads to an illegal state exception because: "can't change fragment tag" Nov 23 14:38:11 is there a way to debug the content provider? I mean, I'm trying to open a pdf but adobe says the file is not available, the uri is from the content provider. how do I know how can I fix this? Nov 23 14:38:17 the fragment tag is managed by the adapter and corresponds to the position within. Is there a way I can refresh the tag? notifyDatasetChanged doesn't cut it. Nov 23 14:43:22 Yay, my google-fu works. (For reference: http://stackoverflow.com/a/33302160/824914 ) Nov 23 14:44:29 fffuuuuu Nov 23 14:56:06 hi Nov 23 14:56:27 hihi Nov 23 14:56:32 can i get some help on marshamallow midi feature ? Nov 23 14:56:45 can you? Nov 23 14:57:08 i have some 6.0 devices returning true and some others returning false to : getPackageManager().hasSystemFeature(PackageManager.FEATURE_MIDI) Nov 23 14:57:41 yeah, so? Nov 23 14:57:56 so it's a big problem for me, i need midi on 6.0 devices Nov 23 14:58:10 why isn't midi available on all 6.0 devices ? Nov 23 14:58:31 or is there something to add in my manifest ? Nov 23 14:59:28 "Beginning with the Android 6.0 (Marshmallow) release, device makers can enable optional MIDI support in the platform." Nov 23 14:59:44 key words are "can" and "optional", maybe Nov 23 14:59:57 yes i read that, so what are my options now ? Nov 23 15:00:15 the question is why do you consider it a problem Nov 23 15:00:23 because i need midi Nov 23 15:00:23 what makes you say you 'need' midi Nov 23 15:00:31 i need a million dollars Nov 23 15:00:31 because my software works with midi Nov 23 15:00:41 ask people to buy a device that support MIDI if they want to use your software Nov 23 15:00:43 then you 'need' to accept not all devices have midi Nov 23 15:00:44 ok i don't want a rethorical debate here, i just need help ;=) Nov 23 15:01:04 ok so what about midi on <6.0 devices ? i saw some apps were supporting that, how to do it ? Nov 23 15:01:30 i'm guessing you will need to go lowlevel Nov 23 15:01:43 aka make it yourself Nov 23 15:01:58 i know nothing about midi other than that it exists Nov 23 15:02:30 but such is the life of the android dev. tons of devices all with different capabilities Nov 23 15:02:31 i'm new to android dev so i guess it's too hard for me. I saw this : https://github.com/kshoji/USB-MIDI-Driver Nov 23 15:02:42 AlGrenadine: https://github.com/kshoji/USB-MIDI-Driver Nov 23 15:02:57 But i really don't understand how to use this "driver" in my own app Nov 23 15:03:20 AlGrenadine: there is a sample project MIDIDriverSample Nov 23 15:03:24 is importing its package name enough to link against it ? Nov 23 15:03:34 https://github.com/kshoji/USB-MIDI-Driver/wiki Nov 23 15:03:37 yes but ias i said i'm new to android dev and i don't understand the example Nov 23 15:03:42 AlGrenadine: you just need to be patient and find your way in your source code Nov 23 15:04:32 AlGrenadine: then gain some experience and get back to this problem when you are more accustomed to the Android platform. It could take less than you need Nov 23 15:04:41 Start compiling and running that projects Nov 23 15:04:54 Don't give up Nov 23 15:05:03 the problem is i don't use android studio, i use QtCreator and dev in C++, with just a small amount of java native code Nov 23 15:05:25 Java native code is an oxymoron Nov 23 15:05:45 in a c++ point of view and multiplatform it's my view ;) Nov 23 15:05:57 AlGrenadine: you can just set the play store to only show your app to people who have it Nov 23 15:06:22 missingo : i've set it up for android 6+ but some android 6 don't have midi :( Nov 23 15:06:36 you can set it by hardware Nov 23 15:07:04 AlGrenadine: it's just that this project takes more effort that what you are willing to spend right now Nov 23 15:07:28 Melatonina : no i'm ready to spend efforts, i just need to understand things ;) Nov 23 15:07:54 AlGrenadine: learn Java, learn Android Studio, learn to run and re-use that MIDI driver and you'll be alright Nov 23 15:08:13 i don't need android studio, qtcreator is enough for that ;) Nov 23 15:08:36 what they call mdii driver is not a driver if i understand correctly, it's just a base activity class no ? Nov 23 15:11:02 so if i package this driver along my own app and import its package i can access the AbstractSingleMidiActivity ? Nov 23 15:11:14 yes Nov 23 15:11:25 ok so it's not a driver it's just a libray Nov 23 15:11:28 *library Nov 23 15:11:51 so is there a specific place to put libraries in my app ? Nov 23 15:12:18 I don't know QT Creator build system Nov 23 15:12:24 I use Android Studio Nov 23 15:12:30 it uses gradle i think Nov 23 15:12:56 I have no idea, sorry Nov 23 15:17:02 Thanks anyway ;) Nov 23 15:17:10 That already cleared few things in my mind Nov 23 15:17:33 is it possible to have my main activity override 2 different base activites ? Nov 23 15:17:43 Try compiling the project. At least you should be able to reuse that code by including the files in your project Nov 23 15:17:57 AlGrenadine: no multiple inheritance in Java Nov 23 15:18:26 ok, thanks then i have another problem, as my activity already derives from another activity Nov 23 15:18:44 you have the source code. You can copy what you need Nov 23 15:18:58 ok Nov 23 15:48:35 I'm trying to have a listener on expanding an action view for my toolbar, but the expansion listener is never triggered. here's my code https://gist.github.com/Syzygy2048/3a2fb09070a4c7807efc3d443b78be95 Nov 23 15:49:42 Is it possible that I'm misunderstanding what an expand event is? item.setActionView(R.layout.action_view_set_title); my current assumption is that this always triggers an expansion event Nov 23 16:07:07 I am looking for Betatesters for my app (sharing pictures with database). Exchange testing is welcome! Nov 23 16:11:37 mhh Nov 23 16:13:37 almost forgot how to ban :> Nov 23 16:14:05 I have an android studio project that builds and runs fine. I would like to add a new build option to build all its source files into a library for use in other Android Studio project. How would I go about this? Nov 23 16:58:09 I'm trying to open the keyboard and put focus on an EditText within an action view within my Toolbar. editText.performClick() doesn't work, not even when executed with postDelayed(..., 1000). Any idea how I could focus the edittext? Nov 23 17:00:02 Call requestFocus Nov 23 17:01:11 that doesn't open the keyboard. I guess opening it manually would work, but it's ugly. I would rather have it opened automatically Nov 23 17:01:28 Yep, do that afterwards Nov 23 17:03:06 Shouldn't performClick() work? Nov 23 17:03:21 (currently working on your solution btw. thanks) Nov 23 17:03:40 I wouldn't think so, EditTexts don't work with simple clicks Nov 23 17:03:46 Could be moving the cursor Nov 23 17:04:30 They work well enough with a simple click from my finger :/ Nov 23 17:05:07 performClick is usually just what calls the click listener, the default onTouchEvent calls through to it when it has decided it's a click Nov 23 17:06:05 Guess I'll have to live with it. It works, thanks. Nov 23 17:10:36 https://gist.github.com/Syzygy2048/b8f5e007747d7da49a3f41daa7613644 Any idea why my selectable drawable might not work with the following code? Nov 23 17:10:52 they should basically change size when clicked Nov 23 17:11:01 *when selected Nov 23 17:11:08 from 20 to 10 and back Nov 23 17:11:24 dp Nov 23 17:14:03 try with another icon so you know the selector works or not, and if it works you just deduced the size is not changing (could be imposed by the item layout) Nov 23 17:14:45 because the problem if selector works can be different than the problem if the size changes Nov 23 17:15:05 typically xy-problem Nov 23 17:16:12 I'm also using another icon and have the same issue (although in both cases it works sporadically). layout h and w are both wrap content for all elements with margin 5dp for left and right. Nov 23 17:17:15 I'll gist it again Nov 23 17:17:46 does your selector works at least? Nov 23 17:18:16 i'm not sure changing an icon would request the view to be measured again and invalidated Nov 23 17:18:38 good point, maybe I'll need to invalidate the views. trying that. Nov 23 17:20:50 you can always gist/paste your item layout in case someone wants to look at it Nov 23 17:22:05 neither invalidate nor invalidateDrawable seems to work. I'll continue gisting Nov 23 17:23:39 I have a question on RxJava, if I need to run an operation on a background thread to get data is fromEmiter() the best method for it since we’re not supposed to use create()? Nov 23 17:24:11 Syzygy, http://stackoverflow.com/questions/38179431/android-selector-changes-color-but-not-size i lmgtfy Nov 23 17:24:17 first link.. Nov 23 17:26:17 ok that works. sorry for not finding it myself. Nov 23 17:26:32 hopping to much between issues right now :/ Nov 23 17:26:41 Or should I use defer? Nov 23 17:27:20 Observable.defer( () -> Observable.just(runIntensiveOperationToGetData())) Nov 23 17:30:42 regarding proguard: never used it b4, wondering if i should try it for the current rls: i understand that one of the common pitfalls is reflection, so i have to rule-out classes that has reflection'ish behavior. are there any other familiar pitfalls? Nov 23 17:35:46 raoul11, common pitfall is expecting first compilations (if you're new to it) will be successful ;) Nov 23 17:36:18 another pitfall is not backuping/versionning mapping.txt if you enabled obfuscation Nov 23 17:36:25 i did enable it for about a min' on a previous app, got scarred and disabled it Nov 23 17:36:42 i'm a bit sad they coupled shrinking process with proguard :' Nov 23 17:37:19 this entire thing looks like voodoo Nov 23 17:38:10 it is Nov 23 17:38:12 also, do you know how to search for usages of a 3rd party lib (guava) in the src files? forgot where i actually used it Nov 23 17:38:33 right-click "find usages" Nov 23 17:38:35 i could remove it from gradle and let the fail tlel me Nov 23 17:38:40 or use global search Nov 23 17:40:30 i see Nov 23 17:43:06 fantastic Nov 23 17:43:13 doesnt seem like i do need guava Nov 23 17:43:40 that should get rid of that silly dex limit Nov 23 18:27:43 Anyone around? Nov 23 18:28:14 I have a question about commitAllowingStateLoss. It’s 100% safe for me to use that if I don’t care if the fragment gets lost, right? Nov 23 18:28:45 konk3r: why do you ask? Nov 23 18:29:44 My use case is showing a slightly delayed welcome pop up dialog when the user enters a screen. We’ve tried checking if onSaveInstanceState has already been called before allowing the dialog to display but it’s still not catching every instance of that crash. Nov 23 18:30:12 At this point we’d rather just have the dialog not display for those users than have the app crash Nov 23 18:30:47 Yep. It just means the fragment wont be restored if committed after onSaveInstanceState Nov 23 18:31:34 (in case of configuration change or process death) Nov 23 18:31:52 Yeah, it’s not THAT important of a screen Nov 23 18:33:03 Then my only concern here would be that I’d have to create my own show() method for the dialogFragment, I’d plan on just copying from the Android source but I’m always hesitant since they could optimize the actual method in the future Nov 23 18:35:10 I think you'll be fine Nov 23 18:35:54 Thanks for the confirmation. I was pretty sure that’s how allowingStateLoss worked but I wanted to be sure Nov 23 18:38:45 Would be nice if DialogFragment just had a showAllowingStateLoss method tho Nov 23 18:39:28 No kidding Nov 23 18:39:39 Tho, if you delay showing a Dialog, I assume you use a Handler.. Just removeCallbacks? Nov 23 18:40:55 I think there’s some race condition in onSaveInstanceState, we’re already cancelling it after onSaveInstanceState is called but we’re still seeing crashes on devices. I just moved to cancelling it before super.onSaveInstanceState is called and hope that works. Nov 23 18:41:07 Is there a better lifecycle method to removel it from? Nov 23 18:42:01 onSaveInstanceState should be fine, that is the problem after all Nov 23 18:42:46 Exactly, and it’s not like it has a dedicated position in the lifecycle where it’s called. I think the issue is that with over a million users you’re just going to see random ****ing crashes no matter what you do Nov 23 18:43:29 Maybe onPause instead Nov 23 18:43:32 Oh well, whatever works Nov 23 18:43:48 Yeah, this should be good enough. Thanks Nov 23 19:31:28 Getting build failed with this exception: Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. Nov 23 19:31:48 Anyone have a clue what that could mean? Nov 23 19:32:37 Here's the whole error code: http://pastebin.com/6Ay9iQkG Nov 23 19:36:14 When I have a custom view (which extends View and not Viewgroup) is it possible to inflate xml layout in custom view class ? Nov 23 19:37:06 No, extend ViewGroup if you need child views Nov 23 19:37:13 IamNewb: Google the exception Nov 23 19:40:05 Yea I did Simon, the only thing I came across was excluding the files that are apparently duplicates in gradle, but that won't sync Nov 23 19:40:54 Works fine for me Nov 23 19:41:52 what’s the error you get if you try to sync after excluding the files? Nov 23 19:42:25 Can't find method packagingOptions() Nov 23 19:42:35 working on trying to install the API Nov 23 19:43:17 Double check you put it the right place Nov 23 19:43:47 Idk exactly where to put it, the only thing I've seen said is put it in gradle Nov 23 19:43:57 Doesn't even say which gradle Nov 23 19:44:17 nvm found it :D Nov 23 19:44:35 apparently app:gradle and within android Nov 23 19:45:23 Hmm, well it's still giving me duplicate file error Nov 23 19:45:37 Even though I excluded them in gradle Nov 23 19:49:33 :o I think it's working Nov 23 19:49:47 One more step to figuring this whole FireBase thing out Nov 23 19:52:36 So my app crashed on the device even though it built successfully, is there a way to figure out why? Nov 23 19:52:58 read the stack trace in the log Nov 23 19:53:07 remember, building and running are two different things Nov 23 19:53:38 Hello everyone.. Does anyone here develop with android studio on Linux? If so, what distro did you pick? I liked Elementary but it is too hard to upgrade and was looking for something else. Thinking of just mainstream Ubuntu since it is likely the most stable. Nov 23 19:53:48 it honestly doesn’t matter Nov 23 19:57:58 Mint or Fedora is probably your best bet Nov 23 20:00:23 Dagmar, I used to use Mint Mate and found it a bit glitchy, the menu would crash all the time. Mostly what I am looking for in an OS is to not have to deal with that crap all the time. Nov 23 20:00:36 o.O Nov 23 20:00:37 I'm aware Cinnamonn is the main WM.. perhaps I should try that Nov 23 20:00:49 There's nothing fancy going on in Mint Nov 23 20:00:57 your best bet would be to get something that a company is behind Nov 23 20:01:05 Which would be Ubuntu Nov 23 20:01:06 so buying one of the Dell Ubuntu laptops Nov 23 20:01:15 Linux isn't that damn hard Nov 23 20:01:36 I have to use a Macbook and run linux in a VM, no choice Nov 23 20:01:45 no, but it is dealth by 1000 cuts Nov 23 20:01:51 why not just use the Mac? Nov 23 20:01:59 You could always do the sensible thing and install AS under OSX Nov 23 20:02:07 what is AS? Nov 23 20:02:16 Running Linux in an underpowered and questionable VM is probably the majority of the problem Nov 23 20:02:16 Android Studio Nov 23 20:02:26 the IDE you’re running for Android development Nov 23 20:02:32 Oh.. Yeah, I was thinking I would try it that way. Nov 23 20:02:55 I'm not a huge fan of OSX Nov 23 20:02:59 Then do it that way. Don't overcomplicate things by trying to run it in a VM Nov 23 20:03:23 OS X is fine. the command line is pretty much the same Nov 23 20:04:47 With OSX you have to get accustomed to using the touchpad. Nov 23 20:05:03 no more than anything else Nov 23 20:05:03 And I'm not there yet. Nov 23 20:05:05 ...or you can just plug in a mouse. Nov 23 20:05:12 or use the keyboard Nov 23 20:05:25 I'm used to a Thinkpad with touchpoint. It keeps my hands on the keyboard. Nov 23 20:05:39 ugh. I hate that thing Nov 23 20:05:51 Anyway I don't want to start a user interface war. Nov 23 20:05:52 Meh. beats a fumblepad Nov 23 20:06:02 I find touchpads very inaccurate Nov 23 20:06:15 For things like selecting a character in a small font Nov 23 20:07:32 Also, I get frustrated because I can never remember how to do things like select to end of line Nov 23 20:07:41 shift-ctrl-end on windows Nov 23 20:08:08 anyway, my company bought me this laptop I'm willing to give it another go Nov 23 20:08:39 I have a question about Retrofit2 if I use this as rest api http://www.androidhive.info/2014/01/how-to-create-rest-api-for-android-app-using-php-slim-and-mysql-day-23/ what should I do to post the email and password with retrofit2?, I tried with @Body and @Field, but I get 404, and it works with my REST APP windows app called Insomnia Nov 23 20:16:09 Jonathan-, 404 means not found. Are you connecting to the correct URL? Nov 23 20:16:34 yes i do :) Nov 23 20:18:54 carcrash: I also have a post about it here, where it worked with my old loginactivity here: http://stackoverflow.com/questions/40748866/retrofit2-login?answertab=active#tab-top Nov 23 20:21:13 malibu: if you do anything with emacs, it’s the same shortcuts Nov 23 20:23:23 I've used emacs and stopped using it and went back to vi because I couldn't get used to the short cuts. :-) Anyway, yes I know ctrl-e goes to end of line, but shift-ctrl-e does not select to end of line. Apparently it does in some places but not where I have tried. Nov 23 20:28:38 hi, is it possible to create a library in aar format with ant? Nov 23 20:33:56 as usual, and after almost two hours trying to match gradle wrapper with android gradle wrapper, I tried to build a dummy library just to know how aar files are made, but then all that gradle spits out is Nov 23 20:34:16 in debug mode, is the usual camel-case crap that takes you nowhere Nov 23 20:35:56 You could create an AAR file with zip if you wanted to. Nov 23 20:40:01 so if I just tar up classes and assets together with classes that will be compatible?, or is it needed to have empty jni, aidl, and other unused folders? Nov 23 20:40:19 I mean, res and assets together with classes Nov 23 20:41:04 besides two manifests that I see, and the R.txt file Nov 23 20:41:31 I'll inspect the aar output more in depth tomorrow, just too late now Nov 23 20:48:29 I see a call to aapt, and to javac with -XDuseUnsharedTable=true, within gradle's log, at least Nov 23 20:48:45 the rest is done internally and silently Nov 23 20:49:55 Can I get someone to run my app with their software and emulator? I think my computer/emulator might be causing my issue. Nov 23 21:02:26 :o I got FireBase working! :D Nov 23 21:02:44 I have an app that people can actually log into now =3 Nov 23 21:05:08 wow, more invigilation for you Nov 23 21:10:09 I mean it's not a lot, but I'm happy I did it. With a decent amount of help from chat. Nov 23 21:20:11 hi all I dont understand why my textview is not being updated by my service. hi can someone please help me with my question here: http://stackoverflow.com/questions/40774188/textview-value-not-being-updated-by-the-service-android-gps Nov 23 21:35:13 is there a reason when executing camera intent, appear camera app, take a picture, and then tap in "ok" doesn't continue with flow? got stuck in tapping "ok" button, do nothing, I can cancel or retake pictura, but won't continue Nov 23 21:35:17 android emultaro Nov 23 21:35:21 *emulator Nov 23 21:40:47 I've written my first HandlerThread. I'm consuming the message in my handleMessage(Message msg), I take out the "obj" and store it in another value, I then msg.recycle(), and get: java.lang.IllegalStateException: This message cannot be recycled because it is still in use. Nov 23 21:40:50 Why? Nov 23 21:46:55 Hi all. I just bought a Moto X 2nd gen off ebay and it's rooted w/ stock android 6.1 installed via TWRP. Is it feasible for the rom to be fake/phishing for my gmail account info or am I being paranoid? Nov 23 21:48:00 wrong channel mz_, but it is Nov 23 21:49:28 Developers are more active :p Nov 23 21:49:56 Think it's worth reinstalling the stockrom myself? Ugh I probably just will otherwise I'll be weird about it forever Nov 23 21:52:52 If it is rooted & has TWRP than it is trivial to flash a new ROM Nov 23 21:53:41 Yeah I just have to pick one Nov 23 21:55:48 Is there anybody who would like to test my app or join developement Nov 23 21:56:49 Ah... "When in doubt, don't call Message.recycle()", https://groups.google.com/forum/?fromgroups#!topic/android-developers/9pHuc7lGunY Nov 23 22:11:23 test Nov 23 22:14:33 jmg, weren't you in here earlier asking the same thing and god banned for it? Nov 23 22:15:06 got* Nov 23 22:15:14 stop breaking the rules Nov 23 22:20:55 my Activity#onCreate() has PreferenceManager.setDefaultValues(this, R.xml.preferences, false) ... followed immediately by PreferenceManager.getDefaultSharedPreferences(context).getString(a pref with default value); ... and i get back null. anyone seen this before ? Nov 23 22:24:41 carcrash: I thought i was banned because of advertising this is no advertising! Nov 23 22:25:20 g00s, i cannot imagine Sharedpref would be broken so i would ask: have you cat your shared pref in /data/data/yourpackagname/shared_prefs/ Nov 23 22:25:31 i doubt you can save a null string though Nov 23 22:26:20 adq i only see this for 1 pref, that is accessed in Application#onCreate() ... the rest are OK, being read sometime later Nov 23 22:26:30 i'll try to cat it Nov 23 22:28:07 in my current project, i'm using a PreferenceFragment in a regular activity, i alter the default shared pref inside on create with: getPreferenceManager().setSharedPreferencesName... and just after add: addPreferencesFromResource(R.xml.preferences); Nov 23 22:28:18 but then it's in oncreateview or later on in the lifecycle that i query the sharedpref Nov 23 22:29:00 if you move your PreferenceManager.getDefaultSharedPreferences(context).getString(a pref with default value); to oncreateview and it does not return null Nov 23 22:29:12 then they must be doing something hackish with oncreate Nov 23 22:29:53 i remember how painful it was with appcompatactivity or not, native preference screen or support preference screen, etc and so many corner cases, styling issue, etc Nov 23 22:30:10 so i would not be surprised if you do it right and you get something wrong in return ;) Nov 23 22:30:26 yeah this is to set night mode in AppCompat Nov 23 22:30:50 i ran into infinite loop with recreate and night theme, if recreate not placed where it should lo Nov 23 22:31:11 lol i'm just trying to read out the preference, haven't gotten that far :P Nov 23 22:31:38 beware, lolcycles ahead Nov 23 22:32:23 infinite loop of light / dark theme switching, maybe i'll just have a seizure and die .. ok with me Nov 23 22:33:22 nope, infinite loop of activity being recreated Nov 23 22:34:30 also the behavior is different on N and on L :') Nov 23 22:35:43 also i dislike they test if savedInstanceState null to known if it was recreated or not Nov 23 22:35:45 i really hate that Nov 23 22:36:23 https://medium.com/@chrisbanes/appcompat-v23-2-daynight-d10f90c83e94#.oywkpc6p2 < this is what i followed, originally Nov 23 22:37:53 trying to add a RealmChangeListener to a RealmObject like so https://dpaste.de/dZLi but i get an error saying my activity class doesn't override abstract method onChange(Object). i'm trying to follow Realm's documentation but can't see what i am doing wrong. Nov 23 23:00:37 g00s: A note on SharedPrefs, dunno if this may be of any help: I had some trouble with the a few days ago, because deleted shared prefs kept magically reappearing after uninstalling my app and and reinstalling it (running debug from IDE). It turned out that since Android L or M Android automatically backs up app data (shared pref!) and automatically restores these when app is reinstalled. This tricked me. Nov 23 23:00:56 I have a work-around if you're interested Nov 23 23:01:40 Zta woa ... yeah would like to see the gist, that seems unexpected. if i uninstall the app, i want it all gone Nov 23 23:02:41 or link to bug report, or more info thx Nov 23 23:02:57 It's not a bug. And uninstall really does uninstall and remove all. Nov 23 23:03:43 It's upon reinstall things get a bit tricky, and perhaps even annoying during development. Nov 23 23:03:50 with FCM, I am able to send notifications, but if the app is not in foreground, the notifications arrive in the device's notifications drop down, and if many of them come, it can flood the notifications drop down, which I don't want. Nov 23 23:03:59 Zta, that's true and it's known to be problematic when storing stuff from keystore output like a key encrypted Nov 23 23:04:08 is there an ability to decide when notifications should show or not show in the notifications dropdown of the device? Nov 23 23:04:13 hence: android:allowBackup="true" Nov 23 23:04:27 needs to be switch to false in those specific crypto-use-cases Nov 23 23:05:02 does anybody know how to get an i386 emulator running on ubuntu 14.04 Nov 23 23:06:35 jmgphotouploader, you need to be more specific concerning your problem, and read all (and sublinks) of https://developer.android.com/studio/run/emulator.html Nov 23 23:06:42 android:allowBackup="true" is default. Which is fine. But I added this into app/src/debug/AndroidManifest.xml: http://pastebin.com/534Em0Sz whic hthen gets merged into my default app/src/main/AndoridManifest.xml Nov 23 23:06:47 Zta, g00s, https://doridori.github.io/android-security-the-forgetful-keystore/#sthash.gwkBhenV.kticKQB2.dpbs Nov 23 23:06:57 This disables backup for debug builds Nov 23 23:07:19 i can run only an arm emulator i386 gets stuck Nov 23 23:07:36 jmgphotouploader, you need to be more specific concerning your problem, like what's the error line Nov 23 23:08:33 If you serialize json into shared prefs and your data format changes during development (which seems fair) then you may run into trouble as well, albeit not as complex as those described in adq's link. I'll read that another day =) Nov 23 23:16:49 adq is 6gb ram enough Nov 23 23:16:53 Anyone else who think Loopers and Handlers are mystic and tend to prefer the safe road of AsyncTask? Then I can recommend reading this excellent to-part article which made me more confident with the first two: https://blog.nikitaog.me/2014/10/11/android-looper-handler-handlerthread-i/ Nov 23 23:17:31 adq, give 1gb or 2gb to the emulator, it's more than enough Nov 23 23:17:37 oops Nov 23 23:17:43 ^ jmgphotouploader Nov 23 23:35:54 in fcm notifications, how can I turn off sound? Nov 24 00:04:07 Renting a computer is strange. I never did before Nov 24 00:06:37 can add blank zone after scrollview? Nov 24 00:06:45 in scrollview Nov 24 00:08:06 blank zone? Nov 24 00:08:07 padding? Nov 24 00:14:57 Melatonina: look please https://jsfiddle.net/xb9sb6xe/ it demonstrate my problem Nov 24 00:15:54 I think there is a parameter responsible for stretching scrollview. i want increase it Nov 24 00:15:54 odigem: why am I looking at HTML/CSS? Nov 24 00:16:11 Melatonina: because its fast Nov 24 00:17:34 You are developing an Android app in HTML/CSS? Nov 24 00:18:10 Melatonina: no Nov 24 00:18:25 its only for you understand what i want Nov 24 00:18:38 I would understand better if you show the layout file Nov 24 00:18:46 I and everybody else Nov 24 00:22:27 Melatonina: i can't but stucture layout very simple layout with scrollview after it layout with AD (over layout with scrollview) Nov 24 00:22:47 odigem: sorry, I can't help you Nov 24 01:07:03 Hi! Does a fragment destroy its views before its parent activity calls onPause? Nov 24 01:07:31 I'm making a call to a textview on the fragment at onPause. Nov 24 01:07:39 But the textview is null Nov 24 01:09:31 Joozey: No, it doesn't. But your TextView reference being null has nothing to do with views being destroyed. Nov 24 01:11:33 I think you are right Nov 24 01:14:00 I was retrieving the current fragment from the fragmentpager by getItem(), but that would create a new instance rather than the old one Nov 24 01:19:30 If you use the operator .onErrorResumeNext() and emit an Observable.empty() (which invokes onCompleted), but then in your subscribe you only have something like subscribe(new Action1<>()) what happens to the onCompleted call? Nov 24 01:32:53 How okay is this solution to grab the current fragment in a FragmentStatePagerAdapter? http://stackoverflow.com/a/21104114/4537699 Nov 24 01:33:07 Seems to do the job nicely on first glance Nov 24 01:49:56 Joozey: I'm not sure it'll work after an Activity is recreated (e.g., after a configuration change). Nov 24 01:50:35 I can switch between portrait and landscape now and all data is retained Nov 24 01:51:02 Are you using `android:configChanges="orientation|screenSize"`? Nov 24 01:53:28 Try this test: Open your app on some device, press Home on the device, press the red X in Android Studio (near LogCat), open your app again on the device. Nov 24 01:53:50 I'm guessing in this case the reference to the Fragment will be null (I haven't tried). Nov 24 01:55:22 Loads correctly Nov 24 01:55:42 Joozey: In the last step, did you open the app via the launcher icon or recent tasks? Nov 24 01:55:49 recent tasks Nov 24 01:57:46 I enabled destroy activities when user leaves it in debug options, no crashes anymore **** ENDING LOGGING AT Thu Nov 24 03:00:00 2016