**** BEGIN LOGGING AT Fri Oct 21 02:59:58 2016 Oct 21 03:59:41 Install Solver for ConstraintLayout 1.0.0-beta1" failed. Oct 21 03:59:44 lolwut Oct 21 04:11:00 seems like it installed OK - but that doesn't instill confidence ;) Oct 21 05:15:15 Hi all, can anyone help me with this error: http://pasteboard.co/hv55KpoSZ.png Oct 21 05:15:30 the code is here: https://codeshare.io/vHrd8 Oct 21 05:15:58 i'm trying to call the base class from the child class and specify the required parameters for Jackson Oct 21 06:45:56 I'm trying to create a launcher icon using the image asset tool. Oct 21 06:46:29 It doesn't seem to accept .svg files.. doesn't that mean that any .png used will just be pixelated when the new files are generated? Oct 21 06:47:15 depends on the image resolution you supply.. Oct 21 06:47:24 use 712x712 Oct 21 06:47:45 Oh, hmm, I'll see how that goes Oct 21 06:52:22 Hmm, how do I make it transparent Oct 21 06:55:09 Oh got it Oct 21 07:13:31 hey guys, What should I look for if my listview populates when I open a second activity for the first time, but if I hit back button, and open a second time it won't populate, my log shows its getting info (just words) but it doesn't show up in the listview. Oct 21 07:13:42 where do I find the code that is responsible for launching the captive portal popup on android? 5.0.1 launches the browser application / 5.1.1 launches a webkit window Oct 21 07:14:34 Demon_Jester: notifyDataSetChanged()? Oct 21 07:16:28 Ashiren: yeah I have it in the code, essentially Im just writing a remote directory app for busted android phone I have, so when I advance farther in the directory it updates LV, just when I press back buttong to close the second activity, it doesn't repopulate when I open it again. Oct 21 07:17:53 oh Oct 21 07:19:40 Ashiren, I am not sure if I am closing/terminating second activity correctly or what. Oct 21 07:20:25 whatever happened to canadianCow g00s? Didn't he used to be somebody? Oct 21 07:20:27 you didnt overrideen onBackPressed? Oct 21 07:21:14 Ashiren, what do you mean overridden? I have it sent a command to my busted phone, but other than that, thats all. I left super.onBackPressed(); in there Oct 21 07:21:40 ah ok Oct 21 07:21:51 so this one seems fine Oct 21 07:21:55 capellasBrain, he always got irritated with people when they asked a question. I am glad he isn't here. Oct 21 07:23:55 Ashiren, I am using an intent to open second activity, is it possible that I am creating another activity windows, while the first one is still active? If that makes sense? Oct 21 07:26:29 well, if you destroy the previous activity, then you create a new one Oct 21 07:26:48 and I am guessing im destroying it with onbackpressed correct? Oct 21 07:27:02 eeyup Oct 21 07:27:27 I would show the code, but I don't want my hand ot be held, I am sure I will find the problem. Oct 21 07:27:36 actually by default launching activity with intent it creates comeplety new activity Oct 21 07:29:50 ok so far I am not creating multiple windows then.. Oct 21 07:33:55 thanks re: irritated... I caught a bit of that unexpectedly... didn't know him real well Oct 21 07:47:37 Do you know in Android 6 and above, if you make a Translucent activity, and want to custom draw anything on SurfaceView / View added to the activity, makes the whole activity become dark. canvas.drawARGB(0, 0,0,0); don't let it translucent any more? Oct 21 07:47:54 now we do Oct 21 07:48:24 lol Oct 21 07:51:16 Why doesn't shift+F6 (rename) work anymore in Android Studio? Oct 21 07:59:45 Hi all, I I would need help with transitioning a paid app to a freemium payment model (free+in-app payments). Anybody having experience doing this? Oct 21 08:01:57 Hi all, I would need help with transitioning a paid app to a freemium payment model (free+in-app payments). Anybody having experience doing this? Oct 21 08:03:33 m1co: better if you just ask an actual specific question Oct 21 08:03:38 m1co: hi Oct 21 08:05:52 Ok, my question: how can I change a paid app to free and remember all my paid customers which already paid before the update? Oct 21 08:06:44 m1co I guess not possible in easy way Oct 21 08:06:47 I found some approaches, but none which would be robust enough to survive a app install or device change Oct 21 08:06:50 Package name matters Oct 21 08:07:08 your free app package and paid app package are different Oct 21 08:07:31 I have two versions now, but would rather prefer to transition to one only Oct 21 08:08:10 So the paid app would be perfect if I could set it to free and remember all users which paid until then (all other have to use the in-app payments) Oct 21 08:08:29 Ashiren, I found the problem, I have it list the dataoutputstream on dialog, and listview, and those are showing two different things, so its a problem in another part of my code. Oct 21 08:10:07 m1co I prefer to make patch apk available as paid. Means paid app is no more an app, rather a patch on free apk. Pro people download the free again, but now they can just download the patch on it. Oct 21 08:10:21 Other users get free and then they purchase paid Oct 21 08:10:40 paid the patch using Oct 21 08:10:44 t2mkn, I read your canvas statement, was there a bypass on making it translucent, and people could screenshot the android phone without it being root? AFAIK under Android 6 it still made Surfaceview/view black.. Oct 21 08:13:18 Demon_Jester I have not done any experiment yet. But this seems to be a bug. If it happens, you can say there is no meaning of Translucent anymore rather just fire an activity for starting a background service or put a notification. Oct 21 08:13:23 So the pro users would have the pro app so to say as a key? Oct 21 08:14:11 Yes m1co Oct 21 08:14:19 But in this scenario I couldn't remove the paid app from the store... Oct 21 08:14:51 And I would rather see not to disturb the workflow of my pro users Oct 21 08:15:07 m1co yes you should not remove. Oct 21 08:17:30 Is there any other possibility? I checked for package first install time, updating app and setting a SharedPref flag and then update again, Licensing Services (LVL), Google Backups of SharedPrefs (not guaranteed to be implemented by vendors), ... Oct 21 08:17:47 None is robust and seems like an unprofessional hack Oct 21 08:18:59 m1co: There is no way to properly grandfather your paid users to a freemium, at least none that I have found Oct 21 08:18:59 m1co I feel enabling pro features using in-app purchase is not much secured. apps get hacked easily. Paid app as a different app, or as a patch to free app is more secure. Oct 21 08:19:38 But still hackers can hack. LVL must be deep inside your app for better protection. Oct 21 08:19:51 On iOS, you can check which version of the app the user initially bought, there is no way to check this on Android Oct 21 08:20:44 pduin: yes, I know that it IS possible on ios... I can't beleive that there is no option for Android though... Oct 21 08:21:36 t2mkn: I am aware of that, but LVL seems to stop working when the app is published as free... according to docs Oct 21 08:22:47 m1co yes that will stop, as it don't find the app as the same one as before. Oct 21 08:23:27 Thats why I am saying. Making paid app a patch to free app, rather to delete it. Oct 21 08:24:46 people Oct 21 08:24:56 t2mkn: it is the same package, but LVL sees it as free and sets every user automatically as licensed (as of the nature of a free app ... it's licensed for every user) Oct 21 08:24:56 what do you use to create material design launcher icons? Oct 21 08:25:00 what software.. Oct 21 08:25:04 photoshop? Oct 21 08:26:29 t2mkn: i appreciate the possibility, but I think that staying with 2 apps is not a long term option. Oct 21 08:29:13 Areeb: use vectors Oct 21 08:29:44 gordon_: vectors? Oct 21 08:29:48 for launcher icons? Oct 21 08:30:15 m1co don't know, but I feel having 2 apps as free and pro or pro patch is better as per addressing users issue and maintenance is concerned. Oct 21 08:30:55 yes Oct 21 08:31:38 Areeb you can use any as you like, just follow the material guideline. Once done use http://romannurik.github.io/AndroidAssetStudio/index.html to make your life easy. Oct 21 08:32:21 t2mkn: I get that, but are there any specific softwares you use that makes this easier? Oct 21 08:32:40 I'm new to android programming and trying to create an icon for my first app Oct 21 08:33:00 Do you use any photoshop templates or anything? Oct 21 08:34:15 t2mkn: the end result we are aming at is to make the current pro users pro forever and new users would have a one year subscription in-app payment. So we could not leave the pro version inside the store (as it would be still a paid app) Oct 21 08:34:25 Areeb it depends on your personal software experience, I prefer Sketch over Photoshop. Sketch is vector based. I don't use templates, rather make an icon in 512x512 rectangle. Oct 21 08:34:47 I know that some apps just detect if they're sideloaded Oct 21 08:34:51 aha I see Oct 21 08:34:55 thanks t2mkn Oct 21 08:35:07 Then ask you to sign in to Play Store to activate full features Oct 21 08:35:09 Areeb welcome Oct 21 08:35:30 Same exact installer Oct 21 08:36:06 A few actually reinstall over, though. :/ Oct 21 08:36:19 Bad if someone wants the old version Oct 21 08:37:44 m1co I think your situation is something similar to transferring or selling an app to some other vendor. You should contact with Google for options. They can do it, may take $25 or more for that. Oct 21 08:42:49 t2mkn: didn't understand fully what you suggest. Could you explain? Oct 21 08:43:34 t2mkn: how / where could I contact google about that? Oct 21 08:46:30 m1co say you want to sell your app to me. I just don't need the package name, rather I may also need the ratings and review transferred to my developer account. For this google has to help you and me. App will get removed from your base account and added to mine. https://support.google.com/googleplay/android-developer/answer/6230247?hl=en Oct 21 08:46:52 There's no way of doing what you want at the moment (and play store is pretty slow at implementing features for developers).. Oct 21 08:47:37 Quite similar issue, but you want to have the app in your developer account, but want all pro users be identified separately. So contacting Google is the only option. Oct 21 08:48:57 m1co there is a Contact Us section on the link I gave, you can use that. Oct 21 08:53:16 Contacting google wont let you convert paid users to an IAP either Oct 21 08:55:15 t2mkn: thanks for the advice. p.s. interesting: "Our team can't transfer apps that offer subscription products." Oct 21 08:57:17 I must say that Google makes it pretty hard on the business strategy level as there is almost no flexibility at all for changes. Oct 21 09:00:24 m1co I was thinking of doing so for my app. But haven't done yet. Do publish the steeps somewhere if you do it. Oct 21 09:12:23 t2mkn: the business model of an one in a lifetime app buy / user is somehow contra productive, so subscriptions make more sense in the long term. Oct 21 09:15:55 hello Oct 21 09:16:04 I need help with basic java code Oct 21 09:16:09 can I use pastebin? Oct 21 09:16:43 is there a way in the code to check where the code access to the filesystem in order to implement the new runtime permission system? Oct 21 09:16:52 *is android studio Oct 21 09:17:55 I have two activities, MainActivity and HashtableGetRandom. I want to call class HashtableGetRandom from MainActivity and make Toast Oct 21 09:18:43 but Toast.makeText(MainActivity.this gives error MainActivity is not an enclosing class Oct 21 09:30:38 Why do you wanna do that? Oct 21 09:31:05 MainActivity.this in HashtableGetRandom doesn't make sense Oct 21 09:31:18 anyway the toast needs the context not the activity Oct 21 09:31:23 getApplicationContext() Oct 21 09:33:08 see http://pastebin.com/BCPtybsZ Oct 21 09:33:25 I am calling HashtableGetRandom.main(); from MainActivity Oct 21 09:34:15 Basic java. getApplicationContext is a method on the Context class. You need a reference to a Context to call it Oct 21 09:34:44 public static void main() { wtf is this Oct 21 09:35:08 yup I have problem with static context Oct 21 09:35:48 I am working with tutorial and in the example is public static void main(String[] args) { Oct 21 09:36:10 That's the entry points in java apps, not android apps Oct 21 09:36:32 ohh I see Oct 21 09:37:14 In Android you start an application component (e.g. Activity) and use the appropriate lifecycle callbacks Oct 21 09:50:16 guys Oct 21 09:50:30 are we allowed to used the android (andy) logo in our apps? Oct 21 09:50:40 as in, in the launcher icon Oct 21 09:52:02 android robot* Oct 21 10:01:18 hi, need help with PdfDocument ... adding and positioning text and images Oct 21 10:01:31 somebody ? Oct 21 10:06:19 Having praised apple for making ausable Simulator when I started this app, it's gone the opposite, Android is usable, iOS takes forever to boot. Oct 21 10:30:22 hi all, anyone with PdfDocument experince ? Oct 21 10:30:36 bah, why doesn't iOS have radio buttons :( Oct 21 10:30:44 sorry, not me andronoob Oct 21 10:30:55 any1? Oct 21 10:31:01 somebody ? Oct 21 10:33:27 andronoob: If noone answers, try again later. Please don't start spamming Oct 21 10:34:16 10nx SimonVT, understud Oct 21 10:34:30 And PdfDocument doesn't sound like something most users would have experience with, so it can be tough getting help for here. Stackoverflow might be a better choice Oct 21 10:34:59 there is nothing about positioning elemnts on canvas...i tried Oct 21 10:35:45 will try later Oct 21 10:43:08 wohoo it's working :) Oct 21 10:43:38 but everything is in a MainActivity Oct 21 11:07:56 Hi Oct 21 11:08:00 hi Oct 21 11:08:02 What are the best ways to transfer sessions if one is using JaxRS and rest api calls? just use httpServletRequest like in this or anything else? http://stackoverflow.com/questions/22377903/how-to-create-manage-associate-a-session-in-rest-jersey-web-application I heard there are many other ways. Some people even encrypt things in addition to https layer Oct 21 11:36:26 Hello all! I've recently installed "Android Studio" in my linux pc, After starting it asks me to download SDK and API. Due to slow download, I aborted it and manually downloaded the zip files (the links I found from more info shown while download). Now I cannot figure out where to extract them. The files are `google_m2repository_r36.zip`, `platform-25_r01.zip`, `tools_r25.2.2-linux.zip`. I have `Android` directory in my home. It has subdirect Oct 21 11:36:26 ory `Sdk`. Please help me extract the zip files. Oct 21 11:37:21 well, where is your android-sdk path Oct 21 11:38:04 hmm maybe you dont have one.. Oct 21 11:38:23 so just download the sdk, uncheck all or check just the neccessary thing Oct 21 11:38:53 @Ashiren the installed the linux bundle in `/opt/android-sdk` Oct 21 11:39:26 @Ashiren Sorry, the installed the linux bundle in `/opt/android-studio` Oct 21 11:40:07 can you find if you have dir called platform-tools, it is placed in the sdk Oct 21 11:40:26 also im not sure if manually extracting zip files is good idea Oct 21 11:41:22 @Ashiren In my home I have `~/Android/Sdk/platforms/` Oct 21 11:42:18 whats the fastest way of getting a file out of android emulator? Oct 21 11:44:22 @Ashiren After extracting the 3 zip files I get following folders: `m2repository`, `android-7.1.1`, `tools`. Oct 21 11:45:39 nlern: thats how my android-sdk path looks like http://pastebin.com/raw/XdvFbxC3 Oct 21 11:47:50 sorreh but i havent manually messed up with sdk so i dont know how to help you Oct 21 11:51:15 Hello Oct 21 11:51:27 hello Oct 21 11:51:38 Anyone have any idea how this app work? https://play.google.com/store/apps/details?id=mobi.omegacentauri.SpeakerBoost&hl=en Oct 21 11:51:58 @Ashiren Thanks for the list. I have `tools` directory listing same as yours. I am thinking of downloading from the app. Oct 21 12:04:57 Hey, guys! Good morning! Oct 21 12:06:26 Hey, does anyone has a good example of a started service that runs even when the app is killed? I need to do a service that get the user location and send it to a server every certain time even when the user closes the app. Is that ok? or I should use a bound service? Oct 21 12:14:00 need help Oct 21 12:15:24 I have myMethod() that puts values to Hashtable and select two random values. but if it selected two exact values, i have this condition: if (key.equals(key2)) {myMethod();} but it will still show two same strings Oct 21 12:15:58 how can I refresh this selection so I will have only random strings? Oct 21 12:21:44 how do i bypass the volume limit on a android device Oct 21 12:22:12 without restarting the device Oct 21 12:23:08 or should I use goto? Oct 21 12:25:29 lounge5678: try to express yourself more clearly maybe using some code Oct 21 12:27:31 Melatonina: http://pastebin.com/GcftNLD4 Oct 21 12:28:42 I need two different keys from hashtable, but sometimes they are equal Oct 21 12:29:13 lounge5678: this is a silly way to implement that. Try to devise a better algorithm Oct 21 12:30:10 lounge5678: your problem has nothing to do with Android Oct 21 12:46:42 anyone know my solution? Oct 21 12:47:06 i simply want to be able to up the volume limits set on the os by default Oct 21 12:47:36 how do i connect to the ADB of the emulator? Oct 21 12:47:57 adb connect Oct 21 12:47:58 it doesn't show up in the "adb devices" Oct 21 12:48:03 Daron313: from a program? Oct 21 12:48:15 turn on adb debugging Oct 21 12:48:17 on the device Oct 21 12:48:19 whats the default port for it? Oct 21 12:48:25 where do you turn that on? Oct 21 12:48:27 5555 Oct 21 12:48:29 developer options? Oct 21 12:48:34 yea Oct 21 12:48:44 USB debugging? Oct 21 12:48:51 yes Oct 21 12:48:55 do you see it Oct 21 12:49:21 the first time you connect you have to accept the connection on the device Oct 21 12:49:38 ocalhost:5555 offline Oct 21 12:49:47 its not localhost Oct 21 12:49:53 its the ip of the device Oct 21 12:50:06 adb connect [ip of device] Oct 21 12:50:14 you dont have to put 5555 its default Oct 21 12:50:22 how do i see it's ip-address though? Oct 21 12:50:28 i assume it uses NAT in between anyways Oct 21 12:50:33 settings about phone Oct 21 12:50:45 status Oct 21 12:51:33 i want to bypass the volume of a device in a program or build it into the os is my ultimate goal Oct 21 12:51:43 but without restarting the device to make changes Oct 21 12:51:47 % adb connect localhost Oct 21 12:51:48 already connected to localhost:5555 Oct 21 12:52:03 then its connected bro Oct 21 12:52:17 the emulator window says android7:5554 Oct 21 12:52:22 anyone seen cap lately? Oct 21 12:52:43 thats probably the Qemu terminal address Oct 21 12:53:04 % adb shell :( Oct 21 12:53:05 error: device offline Oct 21 12:53:22 i see apps like this one to do what i want but i cant figure out how its done https://play.google.com/store/apps/details?id=mobi.omegacentauri.SpeakerBoost&hl=en Oct 21 12:53:47 adb kill-server Oct 21 12:54:02 connect again Oct 21 12:54:28 still the same thing Oct 21 12:54:39 let me try... Oct 21 12:54:46 error: device not found Oct 21 12:56:50 jesus christ, is there really no file manager or terminal on android that i could use to send this file to my computer?? Oct 21 12:57:07 is api 25 official or what? Oct 21 12:57:15 rediculous having to waste so much time on just getting access to a file Oct 21 13:00:18 damn mine connected soon as i launched the emulator Oct 21 13:00:24 i wish i could help Oct 21 13:00:33 maybe restart monitor Oct 21 13:02:15 ill try using the adb executable from the sdk Oct 21 13:02:47 maybe it is connected to android studio or something? Oct 21 13:02:49 yeah, that works, Debians adb must be too old to work Oct 21 13:04:01 oh yes i got to sdk folder inside platform-tools and open console Oct 21 13:04:36 everything i think will be easy turn into a night long journey smh Oct 21 13:45:55 a client bought a rebranded tablet without bluetooth in the spec, but available in the OS Oct 21 14:23:30 rxjava 2 rc5 Oct 21 14:25:14 i just read https://commonsware.com/blog/2016/10/20/random-musings-7p1-developer-preview-1.html Oct 21 14:25:26 lol about round icons, already problems Oct 21 14:27:47 yeah, that sounds stupid. Oct 21 14:28:06 i already have a round icon :P Oct 21 14:32:04 I have a bckground service that run even if the app is killed, how do I detect if the app is alive or not? Oct 21 14:38:20 j4f-shredder, via communication between your app and your service Oct 21 14:38:34 that's already working Oct 21 14:38:37 with a broadcast Oct 21 14:38:56 but @Override public void onLocationChanged(Location location) { //To transfer the data to the main activity I use broadcast receiver in the main activity, using an intent filter location_update Intent intentSendLocationMainActivity = new Intent("location_update"); Log.d("Location-update",location.getLongitude()+" "+location.getLongitude()); Oct 21 14:39:01 I have that Oct 21 14:39:13 Just tell your app to tell your service that your app is running Oct 21 14:39:16 or not Oct 21 14:39:26 maybe you don't want a background service, most users don't Oct 21 14:39:31 https://codeshare.io/ApogJ Oct 21 14:39:37 and you could just run the stuff your service runs when your app is in foreground Oct 21 14:39:43 look Oct 21 14:39:46 the oncreate method Oct 21 14:39:49 I need an if Oct 21 14:39:50 there Oct 21 14:39:58 //I need to differentiate here if the app is killed or not to send the location to main activity or to a server sendBroadcast(intentSendLocationMainActivity); Oct 21 14:40:01 on that line Oct 21 14:40:10 how is that condition? Oct 21 14:40:14 that's what I don't know Oct 21 14:40:17 the service is already working Oct 21 14:40:20 perfectly Oct 21 14:40:31 i cannot help you sorry Oct 21 14:40:52 why? Oct 21 14:41:10 because i don't know the answer of your last question Oct 21 14:41:16 me neither Oct 21 14:41:20 thank you anyway Oct 21 14:41:24 it's a hard topic Oct 21 14:41:28 I'm an android noob Oct 21 14:41:33 and this is way over my head Oct 21 14:41:38 but i made it work at least Oct 21 14:41:45 keep learning & digging Oct 21 14:41:45 this is the last obstacle Oct 21 14:41:58 usually you cannot really know that your app is killed Oct 21 14:42:39 but if your communicating with something, and then you're not able to communicate with it, it might indicate it has been killed Oct 21 14:42:45 j4f-shredder 'enter' is not punctuation ;) Oct 21 14:42:56 especially if you watch lifecycle and see a missing step like ondestroy never been called (aka you got killed) Oct 21 14:42:58 I'm sorry g00s Oct 21 14:43:15 do you know how to do that? Oct 21 14:43:26 tell if the app is killed or not from a service? Oct 21 14:43:46 your bg by definition isn't running if the app is killed Oct 21 14:43:46 my image launcher icon is a .png with a transparent background. but on my phone the background isnt transparent. anyone had this problem? Oct 21 14:44:27 g00s, yes, the service is still alive cause it's a sticky service.....I tried and it still gets the gps updates even after the app is killed Oct 21 14:44:40 O.o Oct 21 14:44:49 * g00s looks over at adq Oct 21 14:45:07 I just need a condition to say "hey service, if the app is killed send this data to a server and if it's not then send it to the main activity Oct 21 14:45:25 j4f-shredder is the service in another process ? Oct 21 14:45:42 * adq stares at g00s Oct 21 14:45:53 I think most services have their own process by default unless you specify the contrary Oct 21 14:45:56 I'm not sure about that Oct 21 14:46:09 no, not unless you say ":remote" or something Oct 21 14:46:19 now i'm starting to doubt myself Oct 21 14:46:29 * g00s facing great confusion Oct 21 14:46:31 adq help ! Oct 21 14:46:34 I I will check Oct 21 14:46:38 the android device monitor Oct 21 14:46:43 wut Oct 21 14:46:53 i already said what i think about how he can solve his problem, but since he is a bit new to android dev it might not really make much sense for him Oct 21 14:47:27 adq Oct 21 14:47:32 you just said "via communication between your app and your service" Oct 21 14:47:36 that's not specific at all Oct 21 14:47:44 i said few other things, but let's not copy paste them please :) Oct 21 14:47:56 i cannot hand over you 2 lines of code for what you want to solve Oct 21 14:48:20 you clearly explained your problem, no worry (except about jargon/semantic but not a big deal), you want your service to detect if the app is killed or not Oct 21 14:48:30 j4f-shredder you need android:process=":remote" otherwise its in process by default Oct 21 14:48:46 yeah, that's what I think Oct 21 14:49:06 cause in the android monitor it seems that it's a process Oct 21 14:49:16 so your UI could be in the background, but the same process is still living Oct 21 14:49:55 adq, I think there must be a really easy way to check that Oct 21 14:50:08 j4f-shredder read this http://www.developerphil.com/no-you-can-not-override-the-home-button-but-you-dont-have-to/ Oct 21 14:51:51 adq, now that I'm thinking, if I make a method on MainActivity mockMethod{return this;} then I could call that from the service and check if it crash the call with a try catch..if it crash is because the main activity doesn't exist Oct 21 14:52:29 lol Oct 21 14:52:39 j4f-shredder step back from the keyboard Oct 21 14:52:48 ? Oct 21 14:52:49 i doubt this will work j4f-shredder, i understand you want a solution Oct 21 14:53:01 but you cannot really run until you have walked first Oct 21 14:53:14 it might take more time than you expect for a simple thing like that Oct 21 14:53:32 why wouldn't it?..I can even get the instance of the MainActivity and check if it's null Oct 21 14:53:36 I0ve done that before Oct 21 14:53:42 just out of curiosity Oct 21 14:53:45 I'm not trying to defy you Oct 21 14:54:44 I'm building an app and I need straight solutions, I have 30 more days Oct 21 14:54:48 lol Oct 21 14:55:03 that's why I don't care that much about learning...I just want to get this done...I'm a javascript dev Oct 21 14:55:22 * g00s sighs Oct 21 14:55:25 I do care about learning but i don't want to be stucked Oct 21 14:55:35 well don't be stucked ! Oct 21 14:55:54 I would appreciate if you could tell me what your ideal solution is Oct 21 14:55:55 adq i can't unstuck him Oct 21 14:55:55 Just tell your app to tell your service that your app is running Oct 21 14:55:55 or not Oct 21 14:55:59 with a little more detail Oct 21 14:56:06 you didn't tell me anything specific Oct 21 14:56:10 you will try to handle the case when the app is killed later on Oct 21 14:56:19 adq i'll get one arm, you get the other, and we pull on the count of 3. ready ? Oct 21 14:56:19 so you won't get stuck on everything about it Oct 21 14:56:28 yeah, I thought about that Oct 21 14:56:30 it makes sense Oct 21 14:56:41 handle the base cases first Oct 21 14:56:51 usually, saying "app is killed" on android == the system killed your app to reclaim the memory Oct 21 14:57:08 i'm not even sure you mean killed by that, or simply user pressing back to quit Oct 21 14:57:27 let's say "if the app is not alive on the process list" Oct 21 14:57:41 idk what that mean Oct 21 14:58:04 anyway, if someone else knows and wants, you will get more input Oct 21 14:58:21 can't I put a boolean on the onDestroyed method in mainActivity and then send that boolean to the process to notify the app has been killed? Oct 21 14:59:04 yes, but you can do it simply via directly sending the state/status in onDestroy, you don't have to store anything Oct 21 14:59:04 and then on the onStart() of the main activity you put a alive=true; Oct 21 14:59:14 just notify your service that your app is being destroyed Oct 21 14:59:35 and same with oncreat.. to notify the app started Oct 21 14:59:50 you could favor onResume and onStop instead of onCrea... & onDestroy Oct 21 15:00:02 because those things you might not know related to android lifecycle Oct 21 15:00:05 a respawnable service can cause errors? Oct 21 15:00:07 and you should read about, you have 30 days Oct 21 15:00:49 I mean, if you open the app again and the service was already started Oct 21 15:01:09 j4f-shredder you'll have to read the component lifecycle docs Oct 21 15:01:12 will it cause an error if I call the start service on the onCreate() of MainActivity Oct 21 15:01:12 https://github.com/xxv/android-lifecycle j4f-shredder Oct 21 15:01:13 ? Oct 21 15:01:18 keep reading them until you understand Oct 21 15:01:18 i let you search service lifecycle as an exercise Oct 21 15:01:18 I already did Oct 21 15:01:23 read it again Oct 21 15:01:34 look, I know how it works...this is a different question Oct 21 15:01:42 i don't think so ha Oct 21 15:01:53 I just want to know if you start a service Oct 21 15:01:57 you kill the app Oct 21 15:02:06 the process is still alive Oct 21 15:02:17 your mixing up thing and this is not helping you Oct 21 15:02:22 and then you open the app again, if the onStart method is called will it cause an error? Oct 21 15:02:39 an application is running under a process Oct 21 15:02:53 an application can contain services, activities, etc Oct 21 15:03:13 in some specific cases, you can separate them into different processes but you're not interested in that and we should not talk about it Oct 21 15:03:34 so when something is killed, everything is gone, but your service will restart if it's configured to do so Oct 21 15:03:55 look, if I kill my app the process is still alive....straight question...if I open my app agian and call the start service method on onCreate() in the main activity...will it crash? Oct 21 15:04:05 I'm just looking for a yes or no Oct 21 15:04:30 it depends. Oct 21 15:04:38 on what? Oct 21 15:04:44 on how you do it Oct 21 15:05:06 show us some code with crash + stacktrace and we might help you Oct 21 15:05:08 otherwise, try it Oct 21 15:05:42 you're drifting from your original goal which was to know if the app is running or not from your service side Oct 21 15:05:55 with all thy respect...I don't think you give straight answers...you make everything more complicated than it should be.... Oct 21 15:05:59 don't get offended Oct 21 15:06:07 it's just a type of developer I come across all the time Oct 21 15:06:23 and then you find the solution was 3 lines of code Oct 21 15:06:25 i'm not offended, you expected a plate with a meal and i cannot give you nor i can eat instead of you, no worry man, most ppl here are seeking or providing help Oct 21 15:06:54 hey, really, I'm just saying that to make you improve on that when you explain something, be more specific Oct 21 15:06:57 I don't want the solution Oct 21 15:07:02 I just asked for a specific question Oct 21 15:07:14 I gfave you specific ccode Oct 21 15:07:21 https://codeshare.io/ApogJ Oct 21 15:07:41 will that crash if the app restarts and call that service again? Oct 21 15:07:53 cause it didn't when I tried Oct 21 15:07:59 but maybe on some case it can Oct 21 15:09:16 I just find, and will all the respect again, that java developers are much more egomaniacs and "protect their sacred realm" by making answers more complicated and they are never straight answers...when I look for a solution later on I see that it's much simpler than what the guy said...it happens all the time Oct 21 15:10:17 Are there release notes for adb anywhere? Oct 21 15:10:25 I wonder what has changed since adb 1.0.32 Oct 21 15:11:08 barq, https://github.com/android/platform_system_core/tree/master/adb enjoy Oct 21 15:11:32 thanks Oct 21 15:12:32 So none for releases such as 1.0.36? Oct 21 15:13:12 barq there were some adb fixes for Sierra Oct 21 15:13:48 I have problems with adb on ubuntu Oct 21 15:14:04 i've had problems with adb for the past 5 years :P Oct 21 15:14:21 wifi was working best for me until the last update Oct 21 15:14:36 For me the connection hangs at some point when pushing Oct 21 15:14:44 hello where can i get a folder path for file downloads of my app that can also be sent via email intend? Oct 21 15:24:09 where can i save files that have been downloaded? Oct 21 15:24:30 is thre a "best practice" to find a good path? i always end up with permission denied errors Oct 21 15:27:08 hm Error inflating class android.support.v7.widget.Space Oct 21 15:27:17 i think they removed that ... Oct 21 15:27:18 pila: https://developer.android.com/training/basics/data-storage/files.html Oct 21 15:27:45 pila, https://developer.android.com/guide/topics/data/data-storage.html#filesInternal Oct 21 15:27:47 oops Oct 21 15:34:26 adq: yeah i used internal file storage and it works fine, but when i want to attach a file to an send email intend i get this error "messenger failed to load attachment" Oct 21 15:35:01 pila this is file 101 what docs have you read ? Oct 21 15:35:29 btw my pila battery charger was great Oct 21 15:36:54 ah alright Oct 21 15:36:58 it needs to be a public location Oct 21 15:37:10 it needs to be readable Oct 21 15:37:21 it can be private, you just need a file provider maybe Oct 21 15:37:54 https://developer.android.com/reference/android/support/v4/content/FileProvider.html Oct 21 15:38:10 ^ Oct 21 15:38:37 g00s, looks what i found in a very old project: Oct 21 15:38:38 Runtime.getRuntime().exec("chmod 755 " + path); // FIXME evil chmod... should be a content provider Oct 21 15:38:49 lol Oct 21 15:39:01 i would not recommand this approach anymore ;) Oct 21 15:40:06 so i changed my path to : new FileOutputStream(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + "/"+ "robot.jpg") and get this error: java.io.FileNotFoundException: /storage/emulated/0/Documents/robot.jpg (No such file or directory) Oct 21 15:44:07 pila, getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) probably does not exist, mkdir to the rescue Oct 21 15:44:30 in the links we gave you above, you can see: Oct 21 15:44:46 File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), albumName); Oct 21 15:44:46 if (!file.mkdirs()) { Oct 21 15:44:50 please read it Oct 21 15:46:28 yeah i know, i would not ask if i haven't read it :D i included mkdirs() but it still fails Oct 21 15:51:29 mkdir is for creating directory, don't append your file to it, another example: https://developer.android.com/reference/android/os/Environment.html#getExternalStoragePublicDirectory(java.lang.String) Oct 21 15:56:16 i dont get it Oct 21 15:56:23 why is it so fucking hard to store files and send them via email? Oct 21 15:56:40 do i need a physical debug device for that maybe? Oct 21 16:09:24 hi guys I'm new to android development and I'm trying to install ndk on my windows 10 using new bash but it is not working and I'm unable to find any good article or instruction to do that on internet Oct 21 16:09:28 please help me Oct 21 16:09:50 basically I'm trying to build tess two using ndk Oct 21 16:15:33 using new bash? why Oct 21 16:15:48 new bash = ubuntu on windows; java doesn't work, etc. Oct 21 16:19:57 * bitkiller__ returned from lunch and found the web has been turned off Oct 21 16:21:07 it's the end of the world Oct 21 16:25:35 hey guys i just want to build tess two for my ocr app pfn Oct 21 16:25:48 so don't do it in bashonwindows Oct 21 16:26:20 i can build tess two on my linux means ubuntu then use that on my android studio in windows ?pfn? Oct 21 16:26:28 yes Oct 21 16:27:18 it will work perfectly means building on windows and using on windows android studio cause i have graphic issues on linux can't run android studio on linux :) Oct 21 16:27:30 otherwise thanks for your time and help :) Oct 21 16:28:12 pfn, bro ? Oct 21 16:28:17 you didn't ask a question Oct 21 16:29:00 adq: i found the problem, it works on my physical device but not in emulator... Oct 21 16:29:26 there will be no issues means building on linux and using on windows? please excuse my english it is not my mother language Oct 21 16:29:52 yes, that was your answer already Oct 21 16:30:07 ok thanks for your time bye bro :) Oct 21 16:32:13 Hello, there is something like this: http://stackoverflow.com/questions/26517855/using-the-recyclerview-with-a-database as a well supported library ? Oct 21 16:32:19 no Oct 21 16:33:13 thanks Oct 21 16:34:26 pmercado look at the google sample for AsyncListUtil Oct 21 16:35:02 API is a little strange, but the sample should clear things up Oct 21 16:36:40 well, I really need an horizontal listview Oct 21 16:37:08 to show an image carousel Oct 21 16:37:19 recyclerview can be made horizontal Oct 21 16:37:43 yes, but with data from database, simple as using listview with simplecursoradapter Oct 21 16:38:06 writing a recyclerview.adapter to use a cursor is simple Oct 21 16:38:08 what’s wrong with just writing an adapter Oct 21 16:38:50 well, with the link I find in so, seems is not so standard or easy Oct 21 16:38:57 have you tried it? Oct 21 16:39:54 yes, got stuck implementing RecyclerView.Adapter Oct 21 16:40:14 stuck where? Oct 21 16:40:18 pmercado https://android.googlesource.com/platform/development/+/master/samples/Support7Demos/src/com/example/android/supportv7/widget/AsyncListUtilActivity.java Oct 21 16:40:27 because, how there is no cursoradapter made before Oct 21 16:40:30 and have you written a recyclerview adapter before? Oct 21 16:40:42 do you know how to use the cursor api? Oct 21 16:40:53 not much actually Oct 21 16:41:05 that’s going to be your first step Oct 21 16:41:06 the problem is not understanding java... Oct 21 16:41:21 no, I mean, not rewrite the wheel Oct 21 16:41:48 there is no wheel that exists Oct 21 16:42:00 yeah, that's what I see now Oct 21 16:42:33 so work on it Oct 21 16:42:37 create that wheel Oct 21 16:43:53 ok... thanks to s73v3r, pfn, g00s :) Oct 21 17:14:13 they needed to do this for cross device tracking https://www.propublica.org/article/google-has-quietly-dropped-ban-on-personally-identifiable-web-tracking Oct 21 17:32:54 ok, im running debian 8 and I have the latest android studio installed. I'm trying to compile the example project HelloJNI. When I load it into android studio and go to build, gradle sits there forever saying its building it but is doing nothing. Oct 21 17:33:45 is this the one with application.mk? Oct 21 17:34:10 i dont see an application.mk Oct 21 17:34:18 ah ok Oct 21 17:34:35 where did you get the example project Oct 21 17:37:00 ugh, i dont remember. i was up late last night trying to do this. isnt there an examples folder for NDI in the download? Oct 21 17:37:03 maybe there Oct 21 17:38:08 elisax2e2: There's a console tab atthe bottom which might have an error message in it. Oct 21 17:38:08 well there are still JNI/NDK sample projects that are outdated and even still for eclipse Oct 21 17:38:19 hellojni doesn't have a gradle build script Oct 21 17:38:21 i thought maybe this was the case Oct 21 17:38:38 oh. it was from a github, but it was all done through android studio Oct 21 17:38:41 pfn: this one does Oct 21 17:38:54 then build it with gradle first Oct 21 17:39:05 pfn: thhats my problem Oct 21 17:39:18 pfn: gradle says its building but doesnt do anything Oct 21 17:39:22 never completes Oct 21 17:39:24 build it using gradle, not android studio Oct 21 17:39:30 since android studio 2.2 you can create project with c++, this will have hello world example Oct 21 17:39:34 always diagnose build issues by using the tool directly Oct 21 17:39:44 use —debug and —stacktrace Oct 21 17:41:41 lol github down again Oct 21 17:41:49 whole webs getting ddos Oct 21 17:41:55 whole internet’s being attacked Oct 21 17:41:57 naa Oct 21 17:42:00 just some dns (dyn) Oct 21 17:42:17 use openDNS Oct 21 17:43:14 perfect for a friday Oct 21 17:49:34 how does one attack the internet? Oct 21 17:50:21 wyrdtrtle: by sending large aounts of requests that the servers struggle to process Oct 21 17:50:48 so it seems gradle failed to build because of an unsupported classversion error Oct 21 17:50:55 wyrdtrtle: by calling its parentage into question Oct 21 17:51:03 lol Oct 21 17:51:24 didnt al gore invent it? Oct 21 17:52:46 It was an immaculate conception. Oct 21 17:52:50 :) Oct 21 17:57:46 elisax2e2, that's an easy fix, update java Oct 21 18:07:14 pfn,, i thinks its a build tools version error Oct 21 18:07:21 it's not Oct 21 18:07:36 you need to use jdk8 to compile with current build tools Oct 21 18:07:43 (and should just use jdk8 in general) Oct 21 18:08:28 android dev feels alot more complicated than it was back in 4.0.0 droid days Oct 21 18:08:33 * pfn shrugs Oct 21 18:08:36 (unrelated) Oct 21 18:08:37 complexity hasn't really changed Oct 21 18:10:58 o/ Oct 21 18:19:03 a proguard question: I'm trying to develop an android module for Appcelerator Titanium (App Development Framework) that will use play-service-vision (the barcode functions). Since I can't use the aar in my module (not supported) I need to use the included classes.jar. Which is normally not a problem with other aar's but this one has a proguard file Oct 21 18:19:46 I haven't used proguard before and tried to use it like this: https://gist.github.com/m1ga/847cf7f47fdf358d2fb8de5a08004167 (command in the first line). But I end up with "there were 7 references to unknown classes" Oct 21 18:21:26 which classes Oct 21 18:21:30 this is the whole error log: https://gist.github.com/m1ga/a282e5a09cfab8a9e91dbf8c13aa67bb I think I need to add some more libraryjars but I don't know which ones. Can someone help with that? Oct 21 18:21:30 what is the stacktrace Oct 21 18:23:17 Ashiren: I want to include play-services-vision-9.6.1 (extras/google/m2repository/com/google/android/gms/play-services-vision/9.6.1/) Oct 21 18:23:21 generally i just copy pase the cant find reference line into google and find relevant rule Oct 21 18:23:39 can you build it normally in debug, without proguard? Oct 21 18:24:23 i.e. try this http://stackoverflow.com/questions/18646899/proguard-cant-find-referenced-class-com-google-android-gms-r Oct 21 18:27:09 yes it builds fine but when I run it on the device I'll get `java.lang.NoClassDefFoundError: com.google.android.gms.vision.barcode.internal.client.BarcodeDetectorOptions` where I found that I need to run proguard the get rid of the "internal" class defs Oct 21 18:29:22 just trying the stack article, one sec Oct 21 18:29:46 because its stripping the classes he thinks you dont need Oct 21 18:29:53 while youll probably need them runtime Oct 21 18:30:55 not even slack is working Oct 21 18:30:57 cmon Oct 21 18:31:22 slack? Oct 21 18:31:34 yes Oct 21 18:33:46 Actually speaking of, does anyone use the desktop app for slack? Im building a desktop app that has slack like features with code stuff, and am thinking if i should stay desktop or go web... Oct 21 18:34:22 i do Oct 21 18:34:33 you use desktop over browser? Oct 21 18:34:58 yeah Oct 21 18:35:19 is there a particular reason why? Oct 21 18:35:28 it’s easier Oct 21 18:35:54 i can keep the the slack window open, and it doesn’t get moved around with tabs Oct 21 18:36:08 Do you usually code on a laptop vs large desktop? Oct 21 18:36:10 same reason I use an IRC client instead of the web one Oct 21 18:36:13 both Oct 21 18:36:22 I find i like browser based on laptops due to the smaller screen Oct 21 18:36:25 but I’m on os x, so there are virtual desktops Oct 21 18:36:33 right Oct 21 18:36:33 i like it even less there Oct 21 18:37:00 on osx? Oct 21 18:37:06 with my setup, the screen with IRC and Slack and email is a Ctrl-left or Ctrl-right away Oct 21 18:37:31 if I were to use browsers with tabs, I’d have to go hunt for the tab, and maybe lose what I was looking at in the browser if I need both Oct 21 18:38:08 mhm Oct 21 18:38:17 maybe i will stay desktop based then Oct 21 18:38:53 i guess i like the fact that web browser is available virtually everywhere, where with a desktop app you have that barrier to entry of having to DL the app Oct 21 18:40:37 you can have both. you just asked for why someone would use desktop, and that’s why I would Oct 21 18:40:56 And I use the web browser for everything Oct 21 18:41:02 Can't satisfy everyone Oct 21 18:41:42 i do know that the slack desktop app is just an Electron app Oct 21 18:44:31 Yea im using Electron as well. I'm just trying to shorten my development time for a mvp, so would start with one or the other. Oct 21 18:44:46 for an MVP, choose one or the other Oct 21 18:44:54 probably web Oct 21 18:45:08 unless it really makes sense as a desktop app Oct 21 18:45:41 Well its like a mix between irc/slack and stackoverflow Oct 21 18:45:53 so it works well both ways Oct 21 18:46:10 then i guess whichever one would be faster to get running Oct 21 18:49:41 * azv4 can't figure out which activity he is looking at Oct 21 18:49:59 is there somewhere in Console that tells me which activity I just opened? Oct 21 18:50:45 onResume() log.d(tag, "hi") Oct 21 18:53:07 that sends 'hi' to the debug screen? Oct 21 18:53:17 put it in every activity ehh? I suppose that will work Oct 21 18:54:17 Well how do you not know what activity you opened if you have the code Oct 21 18:54:32 still learning environment, this isn't a simple activity Oct 21 18:54:45 here is what I did, look at the layout xml, found the ID of the activity Oct 21 18:55:07 the ID of the button! not the activiity Oct 21 18:55:25 so then I search that ID, and I find code where the activity is called Oct 21 18:55:26 activitymanager usually logs which activity is starting Oct 21 18:55:38 * azv4 needs to find the activity manager Oct 21 18:55:44 just filter for it Oct 21 18:55:55 but, you can’t have logcat showing only your application’s stuff Oct 21 18:56:27 you lost me Oct 21 18:56:29 Im reading though Oct 21 18:56:59 you know where it says show only selected application? Oct 21 18:57:12 in the logcat window, there’s a dropdown that either says No Filters or Show Only Selected Application. You want No Filters Oct 21 18:57:20 set that to no filters, then filter for activitymanger Oct 21 18:57:53 hithere Oct 21 19:02:11 orbyt_, make it web-browser based, and eventually port it to electron Oct 21 19:02:19 orbyt_, easy staged approach Oct 21 19:02:23 I dont seem to have any dropdown for No Filter/Show Only Selected Appliction Oct 21 19:03:06 for those who remember my troubles with popplers (saving serialized data), here is test code http://pastebin.com/PZR2B3bg, example of saved/read Object http://pastebin.com/tQ6NFFqZ, and some speed results. As you can see winner is Object -> gson to Json (String) -> OutputStream.writeObject/InputStream.readObject(). I have two questions - why is saveJson() 8times slover than method mentioned method? Here is some comparison for Items Oct 21 19:03:06 https://snag.gy/trK3Y7.jpg Oct 21 19:03:10 pfn: Right now its a React app running in electron with some real time plugins Oct 21 19:03:17 Other collected data - http://bolovanos.atspace.cc/savingDataStructuresTest.html Oct 21 19:03:28 So I feel it should be rather straightforward porting to either Oct 21 19:03:38 And second question - is that wining method save to use or not? Oct 21 19:07:35 arg - for that graph (blue write, red read) Oct 21 19:07:51 and why is half the internet down right now -.- Oct 21 19:09:10 orbyt_, not half, mainly the things i'm not using: twitter, github, etc :D Oct 21 19:09:27 (check the news, it's because of a(nother) big dns attack) Oct 21 19:10:17 Noob; Android Studio; I'm trying to create a simple tile-based match game which will be laid out something like this: https://www.androidcentral.com/sites/androidcentral.com/files/styles/larger/public/article_images/2016/05/wordament-best-android-screens-02.jpg?itok=HMq7cFrb . I need the tiles to autosize and space themselves. Should I be using a gridlayout for this? Will Toggle buttons be sufficient (and styleable)? Oct 21 19:10:33 netflix, slack, pinterest, dribbble, imgur, reddit... Oct 21 19:10:37 like really Oct 21 19:11:05 Captain_Haddock, gridview or gridlayout would work, and if you just need to flip, then yes, a toggle button works fine and is styleable Oct 21 19:11:12 orbyt_, attacks... Oct 21 19:14:34 pfn: Thanks. I will be swapping tiles between positions in the grid. I'm guessing that gridlayout would be the way to go then? Oct 21 19:14:47 sure Oct 21 19:17:16 I dont get the activity name when filtering logcat by 'activitymanager' Oct 21 19:19:19 This might not seem like a problem, but if you are flipping your phone clockwise, the nav bar essentially jumps from one side of the phone to the other. Oct 21 19:19:19 Now on Android 7.1, this behavior has been fixed. Rotating the device clockwise moves the nav bar to the left, and counter-clockwise to the right (versus always moving to the right). Oct 21 19:19:22 ugh, this is annoying Oct 21 19:19:30 I wrote a shitton of code to assume it's always on the right... Oct 21 19:20:06 now have to detect whether it's on the left or right and calculate accordingly; and I'm sure a shitton of apps will have to deal with this, too (video players) Oct 21 19:31:53 shitton! Oct 21 19:31:57 :D Oct 21 19:37:52 Log.d(this.getClass().getName(), "ScheduleSearchForm onCreate"); <---this worked, seems like there should be an easier way Oct 21 19:38:09 every activity in my project that has a layout now has that code, very helpful, thx Oct 21 19:38:12 why? Oct 21 19:40:19 dotsItem.setSelectedDot((dotsItem.getSelectedDot() + 1) % dotsItem.getNumDots()); Oct 21 19:40:23 what is the % in that line? Oct 21 19:40:48 ahh division Oct 21 19:41:22 modulo Oct 21 19:41:46 oh even better Oct 21 19:41:54 no idea why he used it there though... Oct 21 19:48:23 hmm, dot indicator works going down, flips from last to first at eol Oct 21 19:48:26 azv4, he used modulo to be sure to not overflow the selected dot Oct 21 19:48:34 but doesn't work that way when going up Oct 21 19:48:34 after incrementing it by one Oct 21 19:48:37 it will auto-wrap Oct 21 19:48:57 interesting Oct 21 19:48:59 but there are some dangerous pitfall (like cannot divide by 0 if getnumdots is empty) Oct 21 19:49:20 not a good way to handle dots then? Oct 21 19:49:33 nothing wrong since any program is deterministic ;) Oct 21 19:49:34 Hello, I made this location provider(started service) to get the location of the user, the problem is that I don't know the best way to get the lastKnownLocation the first timethe service is started https://codeshare.io/azmOQ Oct 21 19:49:43 if he is sure he will never got 0 from getnumdots, it's all ok Oct 21 19:50:06 it's a classic way to move an index position Oct 21 19:50:09 does his approach only work when going from top down, it doesn't work going bottom up Oct 21 19:50:18 it is new to me Oct 21 19:50:24 it would work negatively too Oct 21 19:50:28 I still am not sure I understand how this works Oct 21 19:50:40 but there are other pitfalls lol Oct 21 19:50:54 you would get a negative remainder iirc Oct 21 19:50:55 this implementation must have problems Oct 21 19:51:02 because it only works one way Oct 21 19:51:08 meaning you would have to use abs() against it maybe Oct 21 19:51:48 dotsItem.setSelectedDot((dotsItem.getSelectedDot() + dotsItem.getNumDots() - 1) % dotsItem.getNumDots()); Oct 21 19:52:26 that doesnt look elegant, if it does the job Oct 21 19:52:29 not even sure it does the job Oct 21 19:52:37 it doesnt work Oct 21 19:52:41 I might have just fixed it Oct 21 19:53:08 in terms of perf, a simple condition can be more efficient than a modulo (which involves a division) Oct 21 19:53:28 ill have to look at some examples on how people handle dots in general Oct 21 19:54:29 hmm, so now it goes back up, but stops at the top and doesn't go back to the bottom, wrap around Oct 21 19:54:30 so you could just add a "selectedDot++; if (selectedDot > max) { selecteddot = 0)" to make it wrap like with modulo (depending on what you use for max it could be >=) Oct 21 19:54:33 I think I need a little math there Oct 21 19:54:38 and an if statement Oct 21 19:54:43 same for negative, just don't bother much with those things because it's too trivial Oct 21 19:54:54 trivial to you perhaps Oct 21 19:54:57 Im pretty green Oct 21 19:55:07 no worry, we all are or were Oct 21 19:56:14 for the other way: "selecteddot--; if (selecteddot < 0) { selecteddot = max }" Oct 21 19:56:28 you will have something which works, no risk of dividing by 0 Oct 21 19:57:05 of course, you can always play with the same thing and doing it with modulo Oct 21 19:57:38 how do I get max? Oct 21 19:57:54 max is your dotsItem.getNumDots()); or "dotsItem.getNumDots()) - 1" Oct 21 19:58:08 ok, thanks Oct 21 19:58:20 i wrote some pseudo code just to illustrate Oct 21 19:58:23 I appreciate you breaking this all down for me, very helpful indeed Oct 21 19:58:27 I can follow it, thx Oct 21 19:58:43 just be careful with your condition (strict or not) and your max (respectively with -1 or without) Oct 21 20:08:03 well I've got this borked heh Oct 21 20:20:07 orbyt_ slack is electron Oct 21 20:20:24 so its practically web anyhow Oct 21 20:21:02 yeah, most anything where the web ui looks like desktop ui => electron Oct 21 20:21:55 easy to recognise Oct 21 20:22:10 Run the app and battery life drops for a few hour => electron Oct 21 20:22:25 Check mem usage, more than 500MB for a simple window? => electron Oct 21 20:22:28 etc :P Oct 21 20:22:57 sounds like java Mavrik :P Oct 21 20:23:14 Java never sucked that much :P Oct 21 20:23:25 java far more optimized than js/electron Oct 21 20:24:11 amg I made it work Oct 21 20:24:14 Something's missing https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/widget/RemoteViews.java#2700 Oct 21 20:24:16 my work here is done today Oct 21 20:24:38 SimonVT, heh, broken merge Oct 21 20:24:51 Does anyone know if there's a quick way to get thelast known location without using thelistener?.....I need for the first time my service runs https://codeshare.io/azmOQ Oct 21 20:24:53 that is the code Oct 21 20:25:06 there's a last-known-location method Oct 21 20:25:07 use it Oct 21 20:25:16 II'm only being able to get the location on onLocationChanged Oct 21 20:25:27 I tried the one with Criteria Oct 21 20:25:32 but it doesn't bring anything Oct 21 20:25:36 j4f-shredder doesnt like reading docs Oct 21 20:25:38 do you have nay quick example? Oct 21 20:25:45 the docs are quick examples Oct 21 20:26:00 I did, but there it says you have to set a criteria and then assign it to the location manager and tget the lastKnown location Oct 21 20:26:04 but that doesn't work Oct 21 20:26:41 I just want to get the location for one time only dfor the first time...the following times the listener will do it Oct 21 20:26:41 pfn, the author probably messed up a rebase or something: https://android.googlesource.com/platform/frameworks/base/+/35ae9ca5bf4b99bc341afe43d501a2d166f5df43%5E%21/#F1 Oct 21 20:26:59 android update sdk --accept-license still isnt there? Oct 21 20:27:14 echo y | /android stuff works, if you have 1 license. Oct 21 20:27:48 explodes, yes | android Oct 21 20:28:22 Doesn't work, either. Oct 21 20:28:26 INvalid input, it says Oct 21 20:28:46 should work fine, unless it's expecting something other than y Oct 21 20:29:03 Unknown response 'y Oct 21 20:29:53 Some people are using expect to get around it https://stackoverflow.com/questions/4681697/is-there-a-way-to-automate-the-android-sdk-installation Oct 21 20:30:28 just get android studio and it will tell you when to update Oct 21 20:30:36 no point on using eclipse Oct 21 20:33:42 Is there a built in way to get the location for the first time without pressing a button? cause all of the examples press a button Oct 21 20:35:19 cmon ... Oct 21 20:35:43 g00s dude, I'm working and you've been putting me a hard time all day...if you don't want to help me please don't talk Oct 21 20:36:58 j4f-shredder thats because you are wasting our time. i'm sorry you have a limited amount of time to learn android, and that you don't actually want to learn it, and just copy pasta stuff from wherever ... Oct 21 20:37:46 so yeah, those of us who are also busy shun intellectual laziness Oct 21 20:37:46 no dude, I'm doing my job, but I have specific questions on advanced stuff, even you didn't know how to answer most of the questions a coupleof hours ago...don't come know acting as if you already know Oct 21 20:37:58 not everything is on the docs Oct 21 20:38:04 sometimes you have to combine things Oct 21 20:38:09 and it's not as perfect as in the docs Oct 21 20:38:59 thats called 'learning' (vs spoon feeding) Oct 21 20:39:34 don't feel bad, often when somebody has JS or PHP background and comes around, they get hell Oct 21 20:39:37 the docs are embarassingly obvious on how you do this Oct 21 20:39:38 it's not spoon feeding, I only asked you one simple thing and you didn't know the answer, and that's fine, but don't give complicated answers just to encapsulate what you don't know Oct 21 20:39:45 they even call it exactly what you asked for "get last known location" .... Oct 21 20:39:58 that was not the original question Oct 21 20:40:01 it'sok Oct 21 20:40:02 yes, it was Oct 21 20:40:07 the question was about services Oct 21 20:40:11 This channel sucks Oct 21 20:40:26 too many expect work done for them Oct 21 20:40:30 not because of my question, btw Oct 21 20:41:25 I have a gps service that gets the location even when the app is shut down, I need that the first time the app is alive again, get the location for the first time and the question was that if I use a listener to get the location, how do I do to get the location the first time, is there any built in method?...that was the original question Oct 21 20:41:38 but no, he can't give a straight answer, he wants to humilliate me Oct 21 20:41:41 you aren't even making sense Oct 21 20:41:44 explodes: why do you say that this channel sucks? Oct 21 20:41:50 yes, there is a built in method, but you refuse to look at it Oct 21 20:41:52 how the hell is your service working when the app is shut down ? Oct 21 20:42:02 go read the lifecycle docs Oct 21 20:42:06 again, and again Oct 21 20:42:09 until you get it Oct 21 20:42:20 it's working Oct 21 20:42:25 I can send you the screenshots Oct 21 20:42:31 it's calleda sticky service Oct 21 20:42:36 god no Oct 21 20:42:57 I'm watching it as we speak how it updates while the app is closed Oct 21 20:43:03 then your app isn't closed Oct 21 20:43:15 you just don't have a foreground activity Oct 21 20:43:16 it is, I just swipe it to the left Oct 21 20:43:32 it's not closed Oct 21 20:43:40 swiping doesn't always kill apps Oct 21 20:43:41 I believe you Oct 21 20:43:46 Melatonina: not gonna get into it Oct 21 20:43:57 at least I thought I was closing it Oct 21 20:43:58 Also, because --accept-license isn't a thing: http://pastebin.com/6agHs3m7 Oct 21 20:44:22 explodes, docs seem to indicate gradle plugin 2.2.0+ automatically installs missing sdk components Oct 21 20:44:55 ;__; Oct 21 20:45:13 pfn, please, explain Oct 21 20:45:27 why it's not closed, it'ssupossed to be Oct 21 20:45:30 when you swipe i Oct 21 20:45:31 t Oct 21 20:45:49 explodes: I'm part of this channel and I don't suck Oct 21 20:46:39 pfn: Oh. I also need system images, so I have to do this anyways Oct 21 20:46:48 Melatonina: I believe you! Oct 21 20:47:23 explodes, well, if you wanna use sbt, it's built-into sbt-android to install components automatically (no-prompting) Oct 21 20:47:44 sbt "android-install system-images;android-24;...." (set ANDROID_HOME beforehand) Oct 21 20:48:11 anyone ever deal with permissions while writing an OEM setup wizard on M Oct 21 20:48:21 extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta1 Oct 21 20:48:21 [error] - ConstraintLayout for Android 1.0.0-beta1 Oct 21 20:48:22 interesting Oct 21 20:48:32 pfn yeah i had that too Oct 21 20:48:33 constraintlayout stuff gets its own m2repository components now? Oct 21 20:48:37 yeah Oct 21 20:48:44 but its weird, said failed to install Oct 21 20:48:50 but , was there anyhow Oct 21 20:49:21 i think the problem is, the standalone sdk manager and AS sdk manager don't have the same things Oct 21 20:49:40 AS sdk manager I think uses ~/extra/m2repository Oct 21 20:50:25 i wish google would just publish all this shit to maven central Oct 21 20:50:37 or their own hosted repo Oct 21 20:53:14 pretty much a hosted repo would be acceptable Oct 21 21:01:08 so tempted to buy a 4k monitor... Oct 21 21:03:16 how can an app tell if mock locations is enabled? Oct 21 21:06:32 pfn: Don't think they're worth it yet.. Was not the impression I got when I shopped monitor earlier this year at least Oct 21 21:07:53 SimonVT, pricing is reasonable, ~$450, and should still be able to run 60hz on it (if over displayport vs. hdmi) Oct 21 21:07:57 since I have an older gpu Oct 21 21:11:43 The 4k monitors use TN panels (at least the cheap ones). 1440p monitors usually have ips/pls/whatever they call it, which should have better colors Oct 21 21:11:57 the LG I'm considering is IPS Oct 21 21:12:12 http://www.lg.com/us/monitors/lg-27UD68-W-4k-uhd-led-monitor Oct 21 21:13:31 30Hz or 60Hz? Oct 21 21:13:37 60hz Oct 21 21:13:54 do you do gaming? Oct 21 21:14:11 some lol Oct 21 21:14:41 if gaming is a big thing, you might be better off with a 120hz 1440p monitor. Oct 21 21:14:49 60hz is fine Oct 21 21:14:52 for lol Oct 21 21:15:43 i’m guessing it’s mostly for development, though? Oct 21 21:15:48 and watching cat videos? Oct 21 21:15:52 pretty much Oct 21 21:16:00 go for it Oct 21 21:16:36 ok, i have a question, I have a second activity open up with a listview that gets populated with data. It shows the data in the listview, like its suppose to. But when I hit back press and re open the activity it won't repopulate, my logs show its gets the data, and log also shows notifydatasetchanged was used, but the LV is blank. Oct 21 21:16:56 depending on your eyes, you might not want true 1:1 pixel mode, but having it scale to 1200p or whatever my macbook does works pretty good Oct 21 21:17:12 Question is, do I need to reset listview or adapter when I close the second activity or no? Oct 21 21:17:13 yeah, 1.25x or 1.5x is probably pretty reasonable Oct 21 21:17:19 1:1 is much too small Oct 21 21:17:49 doesn't have to do with listviews, Demon_Jester, you're doing something wrong with some flag or something Oct 21 21:18:07 let us know how good the monitor is Oct 21 21:18:23 Odaym, flag? you mean with intent? Oct 21 21:18:40 the upgraded monitor, for $150-200more has usb-c (27ud88), which is pretty cool Oct 21 21:18:47 the activity is recreated everytime, so the ideal condition that made it work the first time is there everytime Oct 21 21:18:56 there's something that you're doing that's keeping it from being populated Oct 21 21:19:49 2 typical errors leading to the issue Demon_Jester describe is: 1- the array in the adapter is not the same as the one being updated/populated 2- simply mishandling lifecycle Oct 21 21:26:32 adq, Last night I was thinking something similar on your first suggestion. Oct 21 21:28:39 Demon_Jester: Should be easy to debug. Try placing a Log call in your Adapter.getView override. Oct 21 21:29:07 last NIGHT? Oct 21 21:31:34 Odaym, Yeah I was working on it for little, but and went to bed. I just started on it not to long ago. Oct 21 21:31:55 good cause it sounds simple Oct 21 22:14:46 how can an app tell if mock locations is enabled? Oct 21 22:15:58 usually it can't Oct 21 22:25:26 why would requesting a permission on M cause an activity to restart? Oct 21 22:33:22 Not sure whether it was a rhetorical question, but if not then I guess it's this: "Further, granting some permissions may require a restart of you application. In such a case, the system will recreate the activity stack before delivering the result to your onRequestPermissionsResult(int, String[], int[]).": https://developer.android.com/reference/android/support/v4/app/ActivityCompat.html Oct 21 22:33:59 it wasn’t rhetorical Oct 21 22:44:53 I've called ActivityCompat.requestPermissions but the prompt is not displaying Oct 21 22:45:45 Target >= 24, run on >= 24 Oct 21 22:48:03 SimonVT: isn't it api 23 not 24? Oct 21 22:48:37 Right 23 Oct 21 22:48:48 my phone is api 23 Oct 21 22:49:35 and the app targets 24 Oct 21 22:49:49 Maybe you've already granted it Oct 21 22:50:12 checkSelfPermission says otherwise Oct 21 22:52:02 ah... nvm found the error Oct 21 22:59:04 hello is it wrong to first create the main functionality of an app first and then stylizing it in android apps? Oct 21 23:09:28 http://pastie.org/10947753 Oct 21 23:09:31 isn't she a beaut Oct 21 23:15:26 2/10 Odaym Oct 21 23:15:32 wat Oct 21 23:15:45 at LEAST 3 Oct 21 23:17:06 zero googling though Oct 21 23:17:21 maybe that's why it's so bad Oct 21 23:17:23 OOOHHHH Oct 21 23:17:24 :P Oct 21 23:18:02 ok 3, then ;) Oct 21 23:18:15 lots of static stuff, but hey, 10 minutes ago i thought it was undoable Oct 21 23:18:32 this "stitches" together several images into one, in a grid shape Oct 21 23:21:12 yep, you could improve it by making it a bit more generic (regarding the different kind of sizes, some are even hardcoded it seems), + minor things like final int len = parts.size() and use len in the for loop, you don't really need an array of bitmap, you could directly "read bitmap + draw it directely rescaled" per iteration which would reduce OOM fear if many big images (though other additional things should be done) etc Oct 21 23:21:18 it's not that bad anyway Oct 21 23:21:55 also no need new paint() in last param of drawBitmap Oct 21 23:22:21 I had null there and I replaced it with new Paint because I thought the last param was the culprit Oct 21 23:22:29 it was files that were not found that was causing it Oct 21 23:22:36 black magic programming Oct 21 23:22:42 almost no use with paint and drawbitmap alas, it's basically use for the alpha iirc Oct 21 23:22:55 maybe few other things, but otherwise you can safely pass null Oct 21 23:23:35 see those 2 loops? Oct 21 23:23:53 those were there from the first trial, i kind of have a habit of optimizing way later Oct 21 23:24:00 sure sure Oct 21 23:24:05 and stick with "what got it up and running the first time" for an uncomfortably long time Oct 21 23:28:04 well, gnight! Oct 22 00:05:23 GMS 9.8.00 , yes thats double-mother-f%$%-zero ! Oct 22 00:37:58 The screenshot-capture window in Android Studio is bizarre. If you scroll the image down or right, the icons (at the top-left) scroll away. Oct 22 00:38:12 Those toolbar icons are pretty useless. Oct 22 00:41:49 screenshot capture in Android Emulator? Oct 22 00:42:04 or did you really mean Android Studio? Oct 22 00:42:42 huh, so there is a Chrome Dev summit Nov 10-11, and a Firebase Dev Summit .... but no Android Dev Summit Oct 22 00:42:49 it's a real mess, it does not "remember" the previous checkbox states (glare, etc) or the zoom (enormous), window have to be closed if you don't copy to clipboard but save the file to retake another screenshot Oct 22 00:42:54 i could go on, and on, and on Oct 22 00:44:47 Melatonina: In Android Studio. Oct 22 00:45:00 let's do a "Android Dev Summit" ourselves! Let's get drunk! Oct 22 00:45:50 TacticalJoke: ah ok. I didn't even know you could do that in Android Studio Oct 22 00:46:14 All 295 people in the channel all drunk! Oct 22 00:46:45 Isn't what these google summits are all about, in the end? Oct 22 00:47:10 Ehh, I can't stand alcohol. Oct 22 00:47:20 Never liked the taste; dislike how drunk people act; etc. Oct 22 00:47:58 That's ignoring the countless deaths and misery caused directly by it. And the wasted time of police officers, paramedics, etc. Oct 22 00:48:16 Not sure why I started ranting about alcohol. Oct 22 00:49:32 No problem. I don't drink alcohol either Oct 22 00:50:31 We could make a summit with ice cream too Oct 22 00:50:34 tough Oct 22 01:00:38 isn't big android bbq this weekend Oct 22 01:00:45 out in BFE, Texas Oct 22 01:07:13 JakeWharton: Do you have any thoughts about the Kotlin compiler adding a call to Intrinsics.checkParameterIsNotNull for every parameter of every method that could be called by Java code? Just curious of your thoughts. Oct 22 01:08:16 I'm not sure whether to ask them to document and fully support the compiler flags that prevent this behaviour. Oct 22 01:08:21 TacticalJoke: I did wrote him via email. Oct 22 01:08:33 Melatonina: Whom? Oct 22 01:09:39 TacticalJoke: you think it's a problem? Null checks are cheap Oct 22 01:10:40 Someone complained he was not active in this channel anymore. I don't remember if it was you or somebody else. Oct 22 01:10:52 I was concerned about the calls to static methods (with two parameters each time), but I know almost nothing about the cost of this on ART. Oct 22 01:11:01 to the static method* Oct 22 01:13:06 If I recall correctly, a call such as `foo(a, b, c, d, e)` would generate five calls to Intrinsics.checkParameterIsNotNull. Oct 22 01:13:08 They should inline it Oct 22 01:13:15 Yeah. Oct 22 01:13:21 It's not really a problem, ART will Oct 22 01:13:33 You'd be lucky to even get it show up on a profiler Oct 22 01:13:51 Interesting. Do you know of any web resources that talk about optimizations ART does? Oct 22 01:14:11 Hey Oct 22 01:14:16 I couldn't find anything substantial before. Oct 22 01:14:49 I have a basic widget app, I was wondering if it is possible to play a radio stream while a widget is on screen Oct 22 01:14:51 SteveDonJon: hi! Oct 22 01:14:54 Simple play/pause button Oct 22 01:15:12 or would I need to use service ? Oct 22 01:15:38 Melatonina, Money is still green, so here I am working Oct 22 01:15:39 Lol Oct 22 01:16:17 No Oct 22 01:17:59 I guess I'll have to read this: https://android.googlesource.com/platform/art/+/master/compiler/optimizing/inliner.cc Oct 22 01:18:30 "static method" has a hit there. Oct 22 01:26:10 Anyone know what's new in play-services-cast:9.8.00 ? There isn't anything listed on the site Oct 22 01:33:13 Does anybody used the "Save Project as Template" command in Android Studio? Oct 22 01:33:22 It should be in the "Tools" menu Oct 22 01:33:34 but I only find "Save File as Template" Oct 22 01:35:29 It's mentioned here: https://www.jetbrains.com/help/idea/2016.2/saving-projects-as-templates.html Oct 22 01:36:08 Is AS based on 2016.2? Oct 22 01:36:39 Ctrl+Shift+A finds commands, by the way. Oct 22 01:37:32 AS 2.2 is based on IntelliJ 2016.1. Oct 22 01:37:40 Ah ok Oct 22 01:37:46 I didn't know that. Thanks Oct 22 01:37:57 https://developer.android.com/studio/releases/index.html Oct 22 01:42:45 I thought Android Studio was just IntelliJ with some plugin shipped as one product. Oct 22 01:44:30 AFAIK, it's more like a branch that doesn't stray too far. Oct 22 02:09:17 understood, thanks Oct 22 02:09:25 capellasBrain: hi Oct 22 02:10:18 hi to you! Oct 22 02:13:43 TacticalJoke the G4 is getting Nougat in India anyhow Oct 22 02:14:33 I should move to india. Oct 22 02:14:37 India* Oct 22 02:20:23 soulisson: hi Oct 22 02:20:37 Melatonina: hello how are you? Oct 22 02:20:53 soulisson: Ok. Thanks. You? Oct 22 02:21:04 Melatonina: fine, thank you Oct 22 02:25:20 Melatonina: I thought about you, I was reading head first android development, they refer to activities, broadcast receivers, as classes, so I guess you're right and there is room for interpretation, this is not mathematics after all :) Oct 22 02:25:40 :) Oct 22 02:26:53 I was also able to find the dex files (even I didn't need to), they were in instant-run.zip, apparently this is some kind of optimization provided by Android Studio, but I'm not sure I understand it Oct 22 02:29:33 I don't know anything about dex and proguard and that kind of stuff. Oct 22 02:30:02 I'm goal oriented currently. So I learn only what's needed to do what I have to do Oct 22 02:30:56 Melatonina: np, apparently instant run is some kind of feature provided in Android Studio, to push easily changes,... Oct 22 02:31:28 yes **** ENDING LOGGING AT Sat Oct 22 02:59:58 2016