**** BEGIN LOGGING AT Tue Jan 24 03:00:02 2017 Jan 24 03:58:12 Cool Foxconn! http://www.americanthinker.com/blog/2017/01/apple_supplier_foxconn_mulling_7_billion_investment_in_us_to_create_50000_jobs.html Jan 24 03:59:12 mildly on topic, Foxconn does Android Jan 24 04:06:03 When using location services, the system will optimize how it determines location, whether that be gps or through a network. Using either of these, is it accurate enough to differentiate two locations ~15 yards from each other indoors? Jan 24 05:17:02 capella are you going to apply for a job there ? :D Jan 24 05:26:36 hey guys, what do you like to use when looking for consulting work? Jan 24 05:29:17 * capella trying to remember if Foxconn was helping Samsung in the Rust/Servo crossovers... pretty sure they did something with moz phone Jan 24 05:37:19 I am using jni to call from native code up to a java method. For some reason, when I call a static method (CallStaticMethod) that only accepts two integers, I keep getting leaks. This is on Android and I get an error saying no more space in the reference table since it is full Jan 24 05:37:26 this function is being called "a lot" Jan 24 05:37:29 but from my understanding, there isn't a reference created just by calling a method Jan 24 05:38:28 sleepster are you sure it's not calling itself? Jan 24 05:42:23 shipit: yeah. I double-check :) Jan 24 05:42:31 *double-checked Jan 24 05:42:33 hmm Jan 24 05:42:39 it keeps telling me my reference table is full Jan 24 05:42:55 hmm. Jan 24 08:04:13 * raoul11 thepooshes thepoosh Jan 24 08:04:40 thepoosh http://i.imgur.com/swiFU7R.png Jan 24 08:14:46 Is there a mechanism similar to sharing, except that instead of an action_share intent, where the apps that accept that action are listed, i can specificy the apps that should be displayed to the user myself by package name? Jan 24 08:48:30 Is there a way to find out what intent filters an app supports? Jan 24 09:00:33 Look at its AndroidManifest? Jan 24 09:00:52 can I do that without decompiling their app? Jan 24 09:01:37 Look at package manager shell commands, there's probably one that lists existing intent filters Jan 24 09:03:28 thanks, I think I found a way to do that. Jan 24 09:38:20 raoul11: HODOR! Jan 24 09:40:28 HOLDDOOR! Jan 24 09:44:23 is there a way to authenticate to IIS using chrome on android? Jan 24 09:44:40 is there a way to authenticate to IIS using a certificate on chrome on android? Jan 24 09:57:17 sup thepoosh Jan 24 10:09:34 sup sup sup Jan 24 11:24:13 Syzygy: http://stackoverflow.com/questions/8308666/how-to-force-share-intent-to-open-a-specific-app Jan 24 11:24:58 Syzygy: http://stackoverflow.com/questions/9730243/how-to-filter-specific-apps-for-action-send-intent-and-set-a-different-text-for Jan 24 11:25:08 I'll check it out. Jan 24 11:37:48 Hello, is it possible to change a property in style programmatically and have it apply everywhere it's used ? Jan 24 11:40:12 Melatonina, thanks but that's not quite what I wanted to know. As an example, let's say some cinemas have apps where you can buy tickets, I have an app that highlights new movies and a "buy ticket" button that forwards the user to one of these apps. I'm not aware of any generalized ACTION_BUY intent action or any commonly used custom intent action. Jan 24 11:41:48 Syzygy: you should talk to the cinemas and ask for an API to use Jan 24 11:42:40 I do however know the package name of all of these apps, so I can at least start their main activities. The only options I see right now is push for a somewhat standartized "ACTION_BUY_CINEMA_TICKET" or write a view that copies the share functionality and takes the package names of those apps as it's input. Jan 24 11:51:49 I'm also looking for an idea on how to figure out if there already is some standard except by checking for each and every app. Jan 24 11:57:46 I wonder if there are any people here that have done ndk / jni stuff. I am having some problems with getting some basic stuff from working (standard lib being different) Jan 24 11:58:42 ndk-build seems to be complaining about 'std::string hello = "Hello from C++";' in the basic template file android studio produces Jan 24 11:59:32 saying "undeclared identifier 'std'" Jan 24 12:00:07 try this one https://github.com/jdermont/NdkExample Jan 24 12:00:23 although it was initially created before android studio 2.0 Jan 24 12:00:32 ok will have a look. The main issue I've had so far is that there seems to be multiple ways of doing jni over the years Jan 24 12:01:20 yes. havent checked recently but most tutorials still assume eclipse Jan 24 12:01:24 Ashiren, ah looks like this approach is the pure gradle way (experimental?) Jan 24 12:01:56 I had been messing around with Android.mk files, trying to link some of the [android]stand-c libs Jan 24 12:02:08 no Android.mk needed nowadays Jan 24 12:02:27 this is why I was getting confused Jan 24 12:02:33 so many changes... Jan 24 12:02:36 well project was made with android studio with some changings to gradle configs Jan 24 12:02:53 i think i should start the example from new AS from scratch Jan 24 12:03:05 ok thanks, I will pick through it, and hopefully try to copy some of the concepts across Jan 24 12:03:23 I am in this situation because I used the AS 'wizard' :P Jan 24 12:04:09 ndk seems to assume a hardcoded $PATH/jni directory.. whereas AS makes a $PATH/cpp dir Jan 24 12:05:05 but anyway, thanks Ashiren . I will report back soon ;) Jan 24 12:05:24 hrmf. Jan 24 12:05:31 Not sure if using the experimental plugin is the best idea :) Jan 24 12:05:41 But ok for hello world I guess. Jan 24 12:06:06 ^ well that was the reason why I had not looked into it much Jan 24 12:06:17 but right now.. I'm on a deadline and need to get it working :P Jan 24 12:06:17 my game is based on experimental plugin :v Jan 24 12:06:33 any issue so far Ashiren? Jan 24 12:06:46 i still have not switched to the experimental plugin for one of my project Jan 24 12:06:48 once I can get the C/C++ paired with javaworld, I can get the C devs to work Jan 24 12:07:02 no, aside from that i should eventually move it to 'normal' plugin Jan 24 12:08:05 What's the current version of that anyway? Jan 24 12:08:50 just don't trust always AS leeming, you might hit (i hit it) those kind of false positive: https://code.google.com/p/android/issues/detail?id=198720#c4 Jan 24 12:08:58 0.8.2 i think Jan 24 12:09:21 well maybe tonight ill make another, proper this time, ndk example Jan 24 12:09:54 0.8.3 and 0.9.0-beta2 Jan 24 12:24:11 * leeming gives AS the evil eye Jan 24 12:24:42 this keeps happening... adb devices, shows my phone is connected... however AS doesn't see it Jan 24 12:25:35 but it does randomly see it.. like just then after random unplug/replug cycles.. urgh Jan 24 12:27:20 its not strictly ndk is it Jan 24 12:31:27 be sure you only have one adb binary in your OS (some ppl got the one from the sdk and another from who knows where), other than that you can try to go menu > Tools > Android > Enable adb integration Jan 24 12:32:32 adq, yeah I've already done that. Jan 24 12:32:54 then no clue, you did not provide enough details about your issue Jan 24 12:33:05 I was just ranting =) Jan 24 12:33:14 but yes, maybe multiple adb's Jan 24 12:33:34 i said binary, not instances of adb Jan 24 12:34:23 Can someone spot why CustomBottomViews layout_height="wrap_content" is not working in this? Instead it fills the whole screen. https://gist.github.com/Syzygy2048/7d15232335f73a8cce29cde108a1fa0b Jan 24 12:34:42 I just need to figure out how to include compiled static libraries using the gradle approach now Jan 24 12:35:07 adq, I didn't say instances either :) my dev machine is a mess atm Jan 24 12:35:19 -_- Jan 24 12:44:10 Hi guys, in my baseActivity im overriding onKeyDown to check for backPressed and I call onBackPressed().. recently ive been reported a crash where the user would get into a state where this is called after onSaveInstanceState() which crashes the app. Jan 24 12:44:22 because it tries to popBackStack on fragment Jan 24 12:44:25 Hello ! Do you know how to extend Android Things /system partition on rpi pi 3 ? Jan 24 12:44:33 Im thinking about overriding onBackPressed, and check if instanceState was saved already, if so I dont do anything, (since the activity seems like its already finishing, right?) what do you guys think? Jan 24 12:57:05 * raoul11 thepooshes thepoosh Jan 24 13:03:30 Hi everyone! Can someone help me with an in-app purchasing issue i'm having in my app? Jan 24 13:03:44 hi. How much error-correction do you use for QR-codes? Less error correction = bigger "pixels" in the code. More error correction = smaller pixels for the camera, but more dirt allowed. Jan 24 13:03:59 The absolute size is fixed anyways... Jan 24 13:04:01 hm Jan 24 13:07:49 Everytime i'm trying to do an in-app purchase I get the following message: E/Volley: [4116] c.a: Unexpected response code 500 for https://android.clients.google.com/fdfe/ees/commitPurchase Jan 24 13:08:26 and before that an exception stating: E/Parcel: Class not found when unmarshalling: com.google.android.finsky.billing.lightpurchase.PurchaseParams Jan 24 13:10:58 raoul11: not sure what's happening here Jan 24 13:11:10 what buddy? Jan 24 13:13:54 hey, i'm new to android dev ; i'd like to open a new view and wait for it to build a class that i'll use later. In c#, there's ShowDialog() that does that job (opening a new form and wait for it to be closed). How can I achieve this in android ? Jan 24 13:15:23 My objective is a ToDoList app ; what I'm trying to achieve is : User clicks the button "Add Todo"; it brings up a new view with different fields (name, due date, content...) ; the user clicks the Submit button, then I access the fields that have been filled Jan 24 13:16:06 the screen is called Activity Jan 24 13:16:12 what you ask is Dialog Jan 24 13:16:21 View is a component like Button or TextView Jan 24 13:17:00 so youd set ClickListener on this button, which will build Dialog with custom layout using AlertDialog.Builder etc etc Jan 24 13:17:49 Oh. In that case, what I want is a new Activity, no ? I already have code that makes an AlertDialog, but it is not a new Activity Jan 24 13:17:59 thanks, i'll look into that Jan 24 13:18:18 you want the entire new screen show up or only the part of it Jan 24 13:19:36 I'd want a new Screen ; my main screen is the one showing already created todo Jan 24 13:19:57 ah ok, then mostly new Activity is way to go Jan 24 13:20:51 When user clicks the add todo button, i'd want a new Activity that shows fields to build a new todo, then from the main view add this new todo to the database Jan 24 13:21:36 Although, i've just read that I shouldn't access those variables from the MainActivity, because i'll run into garbage collections problems. I should add to the database from the AddTodo Activity then. Jan 24 13:23:37 Hello. I want to have the state of my GUI dependant on a worker thread. I read the android article about inter thread communication using Handlers. Jan 24 13:24:23 hm? Jan 24 13:24:34 you cant update UI in nonUI thread Jan 24 13:24:35 But now I'm not sure where to put the Handler. In the example they had basically a singleton thread manager who had the handler and a reference to the View object (a photoview or something). Jan 24 13:25:15 I have my Activity on the UI Thread and then the other Thread (let's say something that checks connectivity). Jan 24 13:25:48 I could put the Handler into the Activity, I guess, but I'm unsure how I should make a reference to it inside the Thread. Jan 24 13:26:20 normally in background thread you do something, then if you want update views, like TextView, you use handler.post(new Runnable()) which is done in UI Thread Jan 24 13:26:34 depending how is your worker thread is implemented Jan 24 13:26:47 Which object owns "handler"? Jan 24 13:27:06 The worker or the UI thread? Jan 24 13:27:34 UI, I guess. If that is the case, how do I reference the UI thread from the worker thread to even get access to the handler? Jan 24 13:27:43 new Handler() should be created in UI thread, otherwise it will throw exception (unless you put looper) Jan 24 13:28:15 is worker thread completely separated from UI/Activity? Jan 24 13:31:15 Handler could be used like singleton pattern or you can create one in background thread new Handler(Looper.getMainLooper()); Jan 24 13:31:43 or if its completely separate like separate Service you can use local BroadcastReceiver Jan 24 13:34:01 If I create the Handler in the Worker Thread, I would not be able to get the Views, would I? I don't think findById works in there. Jan 24 13:34:32 you want Ui Thread or Activity's view? Jan 24 13:34:36 Do you mean fire off intents from the worker Thread and catching them in the UI Thread? I thought about that. Jan 24 13:35:20 Let's say: I have a textbox in my activity, which is not enabled. I want to start a worker thread to do something time intensive. Somewhere along the line it might be necessary to enable the textbox. Jan 24 13:36:08 I know that only the UI Thread can access Views and that I can communicate between the threads using handlers. But I am confused how I can create a Handler in a way, that it can access the views while itself being accessible from the worker thread. Jan 24 13:36:12 you can implement AsyncTask. Activity starts AsyncTask, AsyncTask has doInBackground for intensive task. onPostExecute with result is done in Ui Jan 24 13:36:52 That sounds good. Still feel like I'm missing something by not being able to figure it out with Handlers. Jan 24 13:37:13 or Activity would implement interface and methods like updateText() and worker thread would have WeakReference of it Jan 24 13:39:52 I saw a WeakReference in the example code. Will look up what it is. Jan 24 13:39:56 Thanks Ashiren :) Jan 24 13:40:25 there re actually tons ways to do it Jan 24 13:59:41 Anybody got time to help me out with an in-app purchase issue i'm having? Jan 24 14:00:36 i've just finished up writing my problem on Stackoverflow Jan 24 14:00:44 http://stackoverflow.com/questions/41829623/android-in-app-purchase-error-your-order-could-not-be-processed Jan 24 14:14:49 I cloned a git repo of an old project that was built in Eclipse. I think I've converted it to Gradle but when I try to build it I get a ton of "No resource found" errors like this one. How can I fix that? Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'. Jan 24 14:26:29 raoul11: what's news? Jan 24 14:26:33 missing you here Jan 24 14:27:01 dougquaid: it sounds like your compileSdk and/or build tools are outdated Jan 24 14:29:19 thepoosh: I have "compileSdkVersion 19" and "buildToolsVersion '19.1.0'" in build.gradle. I chose 19 since I want my app to work on all android versions from 4.4 and newer Jan 24 14:30:00 dougquaid: that means the minSdk should be 19, compile and target should probably be much higher Jan 24 14:30:05 I would chose 25 Jan 24 14:30:11 *choose Jan 24 14:30:16 Ok I'll try that Jan 24 15:32:47 good evening Jan 24 15:32:59 is anybody in here a happy user of realm? Jan 24 15:34:34 tilerendering: so far Jan 24 15:34:47 but it was a small, experimental project Jan 24 15:34:54 @tilerendering i am but when using multi-threading it can kinda become annoying Jan 24 15:35:56 hm Jan 24 15:37:02 Tripwire999: why? I remember darkly that when I experimented with realm, I wanted to place some global variables in my application, I think one of them had to do with realm Jan 24 15:37:53 @tilerendering because realm doesn't support multi-threading yet which means that you can't access a realm object created in thread 1 in thread 2 Jan 24 15:38:04 you can try but then it crashes the app Jan 24 15:38:48 Tripwire999: hm - and if you keep all realm functionality in an extra thread? Jan 24 15:39:17 Tripwire999: btw: which functionalities of realm are we talking about here, when discussing its use in multithreading - transactional integrity? Jan 24 15:39:22 @tilerendering then it should work didn't try that though Jan 24 15:39:35 ok Jan 24 15:39:37 That pretty much stops me from using it. Jan 24 15:39:50 Mavrik: what exactly? Jan 24 15:39:58 They have mutable objects that change as you call getters which is murder for reasoning about performance and multithreaded operation. Jan 24 15:40:12 It's thus also really hard to pair them with RxJava and other good practices. Jan 24 15:40:32 Maybe they changed something lately, but last time I've evaluated it they still expected you to do queries on main thread for lists. Jan 24 15:40:42 Mavrik: why do they change when calling getters Jan 24 15:40:55 Because they do lazy loading. Jan 24 15:41:24 is it possible to easily detach/attach an object tree retrieved via realm? Jan 24 15:41:34 detach/attach to realm obj mgmt Jan 24 15:42:04 what are you using now - sqlite ? Jan 24 15:42:20 hm - 3 users with experience - none of them really happy Jan 24 15:42:30 actually the product seems to be so bad they stopped using it Jan 24 15:42:42 I wonder whether it’s worth a deeper try Jan 24 15:42:52 Try it. Jan 24 15:42:57 I've seen quite a few happy users. Jan 24 15:43:02 See if it maybe works for you. Jan 24 15:43:44 until when have you been using it? Jan 24 15:43:58 or what version? Jan 24 15:50:02 how do webview.apk load its *.so from within webview.apk? is any kernel patch required? Jan 24 15:50:29 i just built my own webview.apk like the prebuilt one but it can't find libwebviewchromium.so Jan 24 15:51:35 it can't find the lib. even if i unzip it, error changes to "cr_ChromiumAndroidLinker: GetLibraryLoadSize: Failed to find library at address 0x7ff8b4ba4000" Jan 24 15:52:35 wrong channel Xuefer, try #android-root or xda forums Jan 24 15:54:11 hrm... this channel is for apps Jan 24 15:54:32 Xuefer, that's a pretty good question really Jan 24 15:54:50 But I guess you'll have to dig into the dload code Jan 24 15:55:06 yeah. i see other system apps have *.so extracted, not bundeled Jan 24 16:11:31 Hi. Is there an "edit keystore" function in android studio? I'd like to delete a key, but I can't find it. Jan 24 16:11:39 I mean the keystore for signing the generated APKs Jan 24 16:14:21 pl: use ‘keytool’ Jan 24 16:27:33 Does anyone have a link to instructions on how I can compile this libpcap into my app? https://android.googlesource.com/platform/external/libpcap.git Jan 24 16:30:23 Is there an accurate method for getting the user's country if they're on a tablet? Jan 24 16:30:42 or can pretty much any method be incorrect given a vpn, disabling location services, changing google play store, etc. Jan 24 16:41:44 Is there a good way to add shadows behind views with appcompat without using a cardview? Or should I just use card views when I need them? Jan 24 16:44:08 Manually adding a png seems hacky and I’d hate for Android to update the shadows and to leave the app inconsistent across devices Jan 24 16:48:26 konk3r, setting elevation should be enough Jan 24 16:48:29 konk3r: If you add an elevation attribute you'll probably get drop shadows Jan 24 16:48:42 Oh cool, I didn’t realize that elevation worked pre L Jan 24 16:48:45 more importantly, be sure to add shadow where it makes sense Jan 24 16:49:22 i don't think it works pre L Jan 24 16:49:30 maybe with some component in the support lib, not even sure Jan 24 16:49:45 yeah cardview does Jan 24 16:50:00 Google just did a review of our app and told us there are a few views that need shadows to meet their material guidelines, and were insistent that it needs to work pre-L Jan 24 16:50:12 I’m thinking cardview would be the easiest way for us to manage it Jan 24 16:50:38 Huh. I've never had Google come down on me for basically ignoring Material guidelines Jan 24 16:50:56 i think only "top" developers got this chance Jan 24 16:50:57 I didn't think they much cared if people followed their own sense of aesthetics Jan 24 16:52:14 Heh, yeah. I’m not 100% sure why this happened, someone higher up in the company has been in contact with google for something or other and they did a full review of our app. Whatever the reason I’m happy, it got our product owner to start listening to us on matching material guidelines more Jan 24 16:52:22 We were still fairly holo themed and they were hesitant to change Jan 24 16:57:57 <[Saint]> Maybe it's like furniture from the 60s and 70s? Jan 24 16:58:23 <[Saint]> If you hang on to a Holo UI for long enough it'll come back in vogue. Jan 24 16:59:31 I could honestly see a more steamlined holo-ish UI being popular again in the future Jan 24 17:00:19 I’ll just tell the company that and we can avoid work here Jan 24 17:24:14 if you get a response from a rest api, which is a collection, would you prefer the collection to be wrapped in a root object like “ordercollection” or just prefer to receive a collection of orders? Jan 24 17:25:54 It depends on the project. Usually I just want the collection directly, but sometimes it’s nice to wrap it with metadata Jan 24 17:26:12 Although for the most part metadata is better sent in headers Jan 24 17:27:07 Does anyone have a link to instructions on how I can compile this libpcap into my app? https://android.googlesource.com/platform/external/libpcap.git Jan 24 17:27:22 thanks konk3r Jan 24 17:43:30 how can i get a spinner to look like the material docs? Jan 24 17:44:15 Are you using the material theme in your styles? Jan 24 17:45:52 Girafferson, AppCompat Jan 24 17:46:16 I want the currently selected item to have a darker background Jan 24 17:46:23 but only in the dropdown Jan 24 17:51:02 I'm not sure stack overflow is offline lol. I feel like the answer would be creating a drawable resource. That's what I tend to do with custom widgets. Might want to check stackoveflow when it's up Jan 24 17:51:59 Might be able to use material theme for specific widget. I mean I don't use AppCompat theme so idk how it works. But if I were to use it, I'd switch between that and material theme depending on their version Jan 24 17:55:55 [error] org.gradle.tooling.model.UnsupportedMethodException: Unsupported method: AndroidLibrary.isProvided(). Jan 24 17:56:03 I hate you, old gradle plugins Jan 24 17:59:11 $ git grep com.android Jan 24 17:59:12 build.gradle: classpath 'com.android.tools.build:gradle:1.2.3' Jan 24 17:59:19 :( Jan 24 18:15:17 raoul11: are you here man? Jan 24 18:24:42 thepoosh Jan 24 18:24:46 i am here Jan 24 18:24:49 yay! Jan 24 18:24:54 as big as life and twice as fugly Jan 24 18:28:14 I created a dev key hash as instructed by Facebook SDK. Am I supposed to sign my app with it or put it in the app manifest or anything?. My app is complaining at runtime within a Facebook view, "Invalid key hash. The key hash 'foo' does not match any stored key hashes' Jan 24 18:36:59 * google repository v 42 available * Jan 24 18:40:34 and if conflicted while updating Jan 24 18:40:37 awesome Jan 24 18:40:51 it* Jan 24 18:41:25 Girafferson, custom themeing removes material animations Jan 24 18:52:51 <_0xbadc0de> android developing is absurd Jan 24 18:53:05 <_0xbadc0de> why can't I make a shell based app just to test some code Jan 24 18:53:12 <_0xbadc0de> no - I want to test crypto code Jan 24 18:53:17 <_0xbadc0de> I need to make a gui APP Jan 24 18:53:19 <_0xbadc0de> >_> Jan 24 18:53:36 My Facebook key hash is different in my app than the one I generated and I can't figure out why. I'm looking at my device which shows a facebook view that complains that the hash doesn't match and I don't know where the one it's showing is coming from – it's not the one I generated Jan 24 18:53:43 I've grepped my project dir and it's not in there. Jan 24 18:55:05 <_0xbadc0de> or...is there? Jan 24 18:55:30 hm, this ObjectBox thing looks interesting Jan 24 18:56:20 wonder if this new FCC guy kills net neutrality and I have to pay extra for IRC Jan 24 18:57:46 you’ll be lucky if you get to use IRC Jan 24 19:05:42 Is there a way to disable auto-populating the search field in Android Studio? It drives me nuts. Jan 24 19:09:42 oO Jan 24 19:10:19 ashark, how come it's auto-populating by itself, what do you use as shortcut? Jan 24 19:10:29 cmd+f Jan 24 19:10:52 Searches for whatever's currently highlighted. Jan 24 19:11:12 Which is super annoying if I have something in my clipboard that's not what's highlighted, and I want to search for that. Jan 24 19:11:19 Or I want to type something in. Jan 24 19:12:00 Even when what's in my clipboards is the same as what's selected, muscle memory takes over and I usually paste a second copy of it after the first, ruining the search. Jan 24 19:12:26 It's a harmful rather than useful features 95% of the time. Jan 24 19:13:29 it does not do that for me, only if i select something it will populate the search field Jan 24 19:13:51 If I have something selected when I hit cmd+f it comes up populated with whatever's selected. Jan 24 19:13:56 And if I start typing it will override whatever it populated the search field with Jan 24 19:14:12 I have a URL which, according to my log statements, 100% contains the word "placeholder" in the url. Yet, a call to str.contains("placeholder") never returns true. Is there any reason why this may be happening? Jan 24 19:14:30 Not on MacOS, anyway. Cursor is dropped *after* the pre-populated junk, so if I paste or start typing it's after that. Worthless. Jan 24 19:14:57 I'm on sierra, works fine here Jan 24 19:15:07 i can confirm that on windows ashark Jan 24 19:15:18 but i think it works as intended Jan 24 19:15:52 the heavy way is to ctrl-f, ctrl-a, delete or suppr and type what you want, but it's much easier to simply not select anything prior to hitting ctrl-f Jan 24 19:16:27 I'm a compulsive highlighter. Jan 24 19:16:28 i envy you, your problem is using ctrl-f while for me AS is collapsing at many critical places several times per day Jan 24 19:16:46 I always have *something* selected. Jan 24 19:16:57 hit an arrow just before then Jan 24 19:17:15 Zero percent chance that will stick in my muscle memory when nothing else works that way. Jan 24 19:17:32 Oh well, I'll just live with constant annoyance. Jan 24 19:17:51 Ah, ignore my comment, for some reason logcat was set on a disconnected emulator and showing previous logs -.- Jan 24 19:19:17 i'm still dreaming of multiple logcat (especially for multiple vm/emu and android wear side by side), of course i can spawn a shell but then i lose the link of code line in my custom logger which allows me to in _one click_ go to the source at the corresponding line Jan 24 19:19:33 i cannot believe it's still not there Jan 24 19:20:36 and opening 2 projects side by side doesn't work for parsing code lines out of a the project scope + AS miserably started to have crazy glitches Jan 24 19:21:12 lot of side effects :x Jan 24 19:23:57 Whats causing me confusion is that im trying to load a custom drawable into an imageview if a URL contains that above string. This should've been straight forward, but for whatever reason any custom drawable I use will not show up Jan 24 19:24:33 I removed everything out of the drawable to just be a blue rectangle (http://pastebin.com/yM1SD1zm), yet it still will not appear Jan 24 19:25:33 I have something similar in another place in the app that loads as a placeholder using Glide (Glide.with().load().placeholder(R.drawable.example)) which works fine Jan 24 19:26:12 well, no clue, could be a recycling happening out of your control if you share the same drawable for all without mutable or something Jan 24 19:26:28 i'm starting to dislike glide, especially because of bitmaptransform and how slow it is if you scroll fast on a recyclerview Jan 24 19:26:37 not even mentionning how many allocations it generate, it's crazy Jan 24 19:26:50 despite they use a caching mechanism, it's burried under many allocs Jan 24 19:27:05 also the number of issue they got on their github is... wow Jan 24 19:27:23 I would assume its not an issue with my imageview because when the url does not contain that string I load an image normally just fine Jan 24 19:27:26 i know it's a popular lib, explaining why more issues, but still Jan 24 19:27:56 well, orbyt_, try without anything network involed, with a regular local drawable you cloned and without glide Jan 24 19:28:04 and start A/B ing to find the culprit Jan 24 19:28:05 Doing that now Jan 24 19:28:37 or use the debugger maybe Jan 24 19:29:28 Yea, setting the drawable as the imageviews src directly in xml loads fine. I wonder why Glide is having an issue here. Jan 24 19:29:51 victim of glide complexity for simple things i believe Jan 24 19:30:20 and really, those new new new new made me really wonder few things, did they even profile Jan 24 19:30:54 this lib has been there for ages, they started to be a decent alternative to picasso and become famous for more flexible settings + animated gif Jan 24 19:30:58 and now it's a [redacted] Jan 24 19:31:52 new new new new? Jan 24 19:31:56 (i'm not blaming them ofc, good job, it's open, anyone can try to fix it (lol) but.. i think it's important to mention few things) Jan 24 19:32:23 I've never once had a serious issue with Glide, nor have I had an issue with Picasso Jan 24 19:32:25 orbyt_, just spawn an alloc tracker while using bitmaptransform you will see Jan 24 19:32:36 it's not an issue by itself Jan 24 19:32:46 I know imgur uses Glide, so I doubt its going anywhere. Jan 24 19:33:26 well, facebook stepped in this field too Jan 24 19:33:37 and with their lib, their offloading on the jni side to bypass the heap limit lol Jan 24 19:33:43 I assume your refering to fresco Jan 24 19:33:45 yeah Jan 24 19:33:47 referring* Jan 24 19:33:54 (havn't played with it, yet tbh) Jan 24 19:34:00 Neither have I Jan 24 19:34:30 https://plus.google.com/+IanLake/posts/bzdUvt4xjZ8?sfc=false for those developing on Wear Jan 24 19:39:49 book or any other resources suggestions for android development? Jan 24 19:39:56 other than official docs ofc Jan 24 19:40:39 The big nerd ranch book is ok Jan 24 19:40:47 All of slidenerd's videos on YouTube Jan 24 19:43:57 I'm trying to make a transparent curved line over a black shape. i've made the line using the pen tool and everything, I just don't know how to make the line itself transparent lol Jan 24 19:43:58 halp Jan 24 19:44:52 pen tool? Jan 24 19:45:14 using photoshop Jan 24 19:45:33 Are you sure you're in the right channel Jan 24 19:45:52 thanks s73v3r and Dagmar Jan 24 19:46:37 yeah trying to create a logo for an app i'm developing - so i think so, idk lol Jan 24 19:47:31 Dagmar, is this the list? https://www.youtube.com/watch?v=hzrGAZnMOMQ&list=PL1q3ROAofjeOUwh7lPBnGbg__DUodwLN7 Jan 24 19:51:45 Lieutenant, you need to clip your image your your line Jan 24 19:51:52 with your* Jan 24 19:52:46 same technic used when, for example, making a circular image from a square one, you would clip the outer part of the circle Jan 24 20:11:44 having some proguard woes. my app uses a webview with javascript interface. I have added this to my proguard-rules.pro: -keepclassmembers class fqcn.of.javascript.interface.for.webview { public ActivityNameHere; } is this improper syntax? Jan 24 20:12:31 my error is Warning:Exception while processing task java.io.IOException: proguard.ParseException: Expecting class member name before ';' in line 16 of file 'proguard-path-here' Jan 24 20:19:19 Jesperhead, if you literally pasted those lines into your proguard it's probably complaining they don't exist - those are dummy example names Jan 24 20:19:52 ActivityNameHere is not ActivityNameHere Jan 24 20:20:10 but otherwise it is the same Jan 24 20:20:24 i see now though... Jan 24 20:20:33 fqcn.of.js.interface :P Jan 24 20:21:01 thanks for pointing that out. wish me luck bro im goin in! Jan 24 20:21:25 Hopefully that's it - presumably it's looking at pg time to have a valid path Jan 24 20:23:46 ur my hero Jan 24 20:26:18 fully-qualified-class-name... ohhhhhhhh Jan 24 20:38:42 how long should a proguard enabled compile take? my unoptimized app was at ~25MB. gradle build has been going on for14 minutes now Jan 24 20:42:29 not sure if that question answerable with the data i provided... i know im to expect "longer" build times. just hoping for a reference Jan 24 20:49:59 Jesperhead: A couple key factors are missing: How long did the build take without Proguard? And are those 25MB resources, or massive amounts of code? Because proguard only cares about code, not resources. And in my experience proguard adds 2-5 minutes on the build time. Jan 24 20:51:09 Thorbear: thanks for the input. normal builds are <1 minute i'd say on average. the 25mb are mosstly resources I'd wager. I have a couple thousand lines of code though Jan 24 20:51:24 trying to cancel... and studio is just hanging Jan 24 20:51:37 dont want to force close but i might be out of options Jan 24 20:52:20 Nothing wrong with just force closing. Then perhaps try running a clean-build from the commandline? Jan 24 20:52:55 next on the list Jan 24 20:56:22 I'm getting the error "cannot resolve method" for findViewById. Do I need to import findViewById somehow? Jan 24 20:56:33 14 minutes is often a symptom of dex failin Jan 24 20:56:43 increase the heap available to dex Jan 24 20:57:03 and don't use optimized proguard, there's little benefit Jan 24 20:57:29 the multiple optimization passes hurts build times dramatically Jan 24 20:58:19 pfn: minify, the experimental gradle optimization, or the "additional" proguard optimization? Jan 24 20:58:27 or all of the above? Jan 24 20:58:37 additional proguard optimization Jan 24 20:58:46 ah, ok i have that one turned off Jan 24 20:58:57 proguard optimization can add multiple minutes to a build, depending on how many optimization passes you have configured Jan 24 20:59:07 will look into increasing the heap. never tried it before Jan 24 20:59:18 there should be a dex max heap setting in gradle Jan 24 20:59:26 if you're using in-process dex, then you'll need to increase the heap given to gradle Jan 24 21:00:46 gotcha Jan 24 21:25:50 pfn: ultimately it appeared there were warning not being presented during my "long stretch" build. after cleaning and rebuilding I started seeing warnings akin to https://github.com/square/okio/issues/60 and per their note, added dontwarn to proguard for okio. it compiles very quickly now Jan 24 21:33:01 indeed Jan 24 21:47:27 Hi, I have some problems with doze mode Jan 24 21:48:30 don’t we all Jan 24 21:50:49 anyways, if you have a question, better to just ask it Jan 24 21:51:15 I use setAndAllowWhileIdle and "adb shell dumpsys alarm" shows me the alarm Jan 24 21:52:41 but if I wait for a while the alarm disappears Jan 24 21:54:48 Obviously before the time it must fire Jan 24 21:55:50 That means the BroadcastReceiver onReceive method is not executed Jan 24 21:55:53 I assume it will come back before it must fire Jan 24 21:56:23 My TextInputEditText is set to android:ems="2" and yet there's not enough room for "MM" in it. Any suggestions to why this happens? Jan 24 21:58:55 i would imagine that ems would be the size of the text, not the size of the textview Jan 24 21:59:10 turn on Show Layout Bounds under developer options to make sure Jan 24 21:59:36 ems != characters Jan 24 22:00:03 ...and the letter M is usually 1.5 wide anyway. Jan 24 22:00:51 according to SO, setEms will set the width of a TextView to fit a text of n “M” letters regardless of the text size Jan 24 22:01:05 however, this only happens when layout_width=“wrap_content" Jan 24 22:01:21 other layout_width values override this setting. Jan 24 22:01:22 I have wrap_content Jan 24 22:01:26 http://stackoverflow.com/questions/7053738/what-is-meant-by-ems-android-textview Jan 24 22:01:56 so what does it look like? Jan 24 22:02:02 I'm reading it. I've tried setting minEms too. Jan 24 22:02:04 It also assumes the font is tagged properly for that, and that terms like "warm" are precise measurements. Jan 24 22:02:32 s73v3r: The TextInputEditText has a hint="MM" and the last M is not fully showing. Jan 24 22:02:45 What happens if you type into it Jan 24 22:03:45 Well, it's a numbers only field (for a month actually) but there's room for "99". Jan 24 22:04:13 it could be that the hint text and actual text vary on their sizes Jan 24 22:04:31 yes, I'll try making the field accept text Jan 24 22:04:39 See my above comment about M tending to be more like 1.5 "ems" wide Jan 24 22:04:42 yoiu probably want android:maxLength Jan 24 22:04:53 but you still need to handle a minimal amount of width to display your 2 chars Jan 24 22:04:56 This is a long-standing bit of bullshit with fontography, not necessarily an Android bug Jan 24 22:05:41 heh, it line wraps.. Jan 24 22:05:52 you can enforce one line too Jan 24 22:06:28 in worst case scenario, you can use paint.measuretext according to the known sp (you need to convert it in pixel) of your text and set the width yourself + a little gap to be safe Jan 24 22:06:41 I have maxLength="2". I don't understand why ems="2" doesn't make room for 2 × 'M'. Jan 24 22:06:47 but seriously, you should just handle the problem differently Jan 24 22:07:13 Zta: Because the font, like MOST, isn't marked properly Jan 24 22:07:47 Ah yes, it could of course be a bad font. Jan 24 22:08:45 will you hurt that you put it 3? :) Jan 24 22:09:03 who knows what some support libs does via overriding inputtext + some custom styling Jan 24 22:09:13 it's not like android dev is not full of surprises Jan 24 22:09:14 It seems like as good an approach as any Jan 24 22:09:19 adq: heh.. ems="4" for "YYYY" is already way too wide. Something is askew.. Jan 24 22:09:34 why do you need to save that little amount of space? Jan 24 22:09:48 Because I want it to look nice and tight. Jan 24 22:09:55 you can get around it, i did some form with lot of inputs, everything can be properly aligned Jan 24 22:10:03 It's a simple set of DD-MM-YYYY fields. Jan 24 22:10:04 i feel you, every details count Jan 24 22:10:07 not worry on that Jan 24 22:10:09 no* Jan 24 22:10:36 I probably need to measure it and set the width dynamically, as you mentioned Jan 24 22:10:50 maybe you can populate date differently, if you need 3 inputtext for DD, MM and YYYY Jan 24 22:11:05 you're probably attacking the problem wrongly Jan 24 22:11:50 Yeah because I'd go for a picker over a custom input widget for things like dates, in a heartbeat Jan 24 22:12:04 a picker is indeed what most would use on android platform Jan 24 22:12:55 you could also make a custom textwatcher one edittext which will at same time constraints what is being typed Jan 24 22:12:59 and add if needed the dash Jan 24 22:13:03 The default date picker on Android M is confusing; selecting year is a mess. Users can't figure it out. Even Google doesn't use their own picker in their Contacts app for entering birthday. Jan 24 22:13:09 there are so many ways, but 3 edittext == nope.jpeg Jan 24 22:13:18 yeah i don't like the circular picker Jan 24 22:13:20 it's kinda ugly Jan 24 22:13:29 ppl are more used to classic rectangular calendar Jan 24 22:14:03 go onto android arsenal and try and find something else that looks good Jan 24 22:14:04 adq: Too difficult. Too many weird cases when user moves cursor and starts typing and/or deleting in the middle. Jan 24 22:14:19 it's do-able Jan 24 22:14:32 when there is too many cases, make a little FSM which handle all the cases nicely Jan 24 22:14:36 s73v3r: I made a quick browse and couldn't find anything; it's mostly date picker with range for some reason Jan 24 22:14:50 FSM? Jan 24 22:15:12 finite state machine (it's a big word, but it's just few if and else inside each other) Jan 24 22:15:26 Anyway! I have something that works. It just looks ugly and the width is set fixed with a magic number that I though would work =). Jan 24 22:15:48 adq: could work. Jan 24 22:15:50 https://android-arsenal.com/tag/27?sort=created seriously Jan 24 22:15:56 lot of choices here as s73v3r pointed out Jan 24 22:16:02 you could take one and tweak it Jan 24 22:16:10 But then again.. setting a text view to a with of 2 chars should be easy too =) Jan 24 22:16:27 ahahah Jan 24 22:16:31 a n d r o i d Jan 24 22:16:37 true Jan 24 22:16:43 ridiculous things can get overly complicated Jan 24 22:16:44 I'll try Paint.measure Jan 24 22:17:06 paint measure is almost a hack, but it will give you the exact width in pixel of the string you pass to it Jan 24 22:17:08 Especially when Samsung decides to "fix" it all. Jan 24 22:17:46 but i think there are edge cases with measure, not sure how it handles font, you better populate all parameters of your paint object (and don't forget to convert sp in px) Jan 24 22:17:52 err px in sp Jan 24 22:18:35 and you need to pass big letter, because if you measure "ii", it's shorter than "ww" Jan 24 22:18:53 see, it's already painful Jan 24 22:18:55 not even started Jan 24 22:19:55 I'll pass the hint (MM or YYYY) and then the max value (99 or 9999) and use the Math.max of those Jan 24 22:22:11 WW is kinda biggest Jan 24 22:22:21 but i bet some emoji would be bigger Jan 24 22:23:24 ahah Jan 24 22:23:30 more edge cases Jan 24 22:24:04 now you need to make a loop of all characters with Math.max on every char tested and keep the longest which you will keep precalculated for later Jan 24 22:24:19 nope.gif Jan 24 22:24:49 but somehow, you're safe an emoji is not valid as a date char entry Jan 24 22:25:06 you could just test a limited set, but still it's over-engineered Jan 24 22:25:12 why not this http://imgur.com/gallery/qA4Bu Jan 24 22:25:41 :) saw that elsewhere few monthes ago Jan 24 22:33:06 Quick question on threads. Does the .cancel on a thread get executed, even if the .run of the thread is still running? Writing the question down the answer is obviously less, but just want to check. Jan 24 22:34:10 .cancel() on thread? Jan 24 22:34:37 Yeah. Jan 24 22:35:14 there is no cancel on thread class? Jan 24 22:35:16 Like, if a socket operation blocks in run() and I want to cancel() the thread. Jan 24 22:35:39 you can interrupt() the Thread Jan 24 22:35:57 for most blocking operation InterruptedException will be invoked Jan 24 22:36:27 but if you have your own loop i.e. while (true) { ... }, you have to handle it your own, checking if current thread is interrupted Jan 24 22:36:33 mchl_nix: depends on what it's doing.. for a socket, you can just close the socket Jan 24 22:37:22 In general, canceling / interrupting threads usually gives you no guarantee current operation is listening to you. Jan 24 22:37:30 I'm going through the BluetoothChat example. I figured the cancel() method was an override. But now I see it wasn't. Jan 24 22:37:50 They use a thread to listen for incoming connections. Jan 24 22:38:24 Since that blocks, I wonder how to actually close the thread. Jan 24 22:39:39 They just close the ServerSocket in cancel(), but for that to work the cancel would need to run, while the run() is still blocked Jan 24 22:39:58 yeah don't use cancel Jan 24 22:40:09 other thread should use cancel Jan 24 22:40:20 use interrupt + a variable you test yourself inside your thread Jan 24 22:40:30 mchl_nix: closing a socket that another thread is waiting on should cause it to exit the blocking operation immediately Jan 24 22:41:15 kroot Both methods are in the same thread, though. That's why I'm confused. Jan 24 22:41:44 The thread executes a blocking call, thought, adq. Jan 24 22:42:01 oh, then.. Jan 24 22:42:17 you better use a nice boilerplate handling network operation + timeout Jan 24 22:43:18 mchl_nix: this is just class. even if extends Thread, it doesnt meand all the methods happen in that thread (well the run() does if you start it) Jan 24 22:44:16 I'm not sure, what you are getting at, Ashiren. Jan 24 22:44:37 neither do i Jan 24 22:44:41 :v Jan 24 22:54:28 I'm hungry... Jan 24 23:01:07 The example does not work without problems anyway. Maybe I should not harp on it too much. Jan 24 23:04:11 Let's talk about Horizontal recycler views within a vertical recycler view within a ViewPager and D-Pad navigation. Jan 24 23:04:25 The default behavior of the dpad totally sucks. A lot Jan 24 23:04:46 How do you make it less shitty? Implement a "leaning backwards" library or something? Jan 24 23:04:56 maybe call it LeanBack? Jan 24 23:05:07 Or is there a way to make it just work correctly? Jan 24 23:05:50 that sounds like you might want to rethink your UI Jan 24 23:07:28 np, i'll just throw it all out and start over Jan 24 23:08:01 explodes could you post a picture? Im interested Jan 24 23:08:11 sounds like something from android TV Jan 24 23:08:19 i’m sorry, but you may need to think about your UI. Usually, if things are hard to make work well, they’re not the best of experiences Jan 24 23:08:30 it isn't for android tv, it is for accessibility Jan 24 23:08:39 Um.. Jan 24 23:08:43 i cant post a picture but i can post a sample app that has the problem Jan 24 23:08:43 what has a D-pad on it? Jan 24 23:08:56 let me publish it to github one sec Jan 24 23:09:33 I'm sure you write beautiful code but I just wanted to see an image of that layout. Jan 24 23:10:14 yes, in this instance seeing a mockup of the ui, or i guess other apps that do something similar would be a big help Jan 24 23:11:02 The code is actually disasterous, it is a proof-of-concept we can build upon without having to wait for our 2-minute builds. Jan 24 23:12:25 http://imgur.com/a/yONwb Jan 24 23:12:30 Posting code too, one sec Jan 24 23:13:34 https://github.com/explodes/dpap-poc Jan 24 23:13:40 Nice, typo in the repo name. Jan 24 23:14:06 nice padding on potato ;) Jan 24 23:14:13 Is left/right swiping disabled on the viewpager? Jan 24 23:14:26 so you said this is for accessibility? Jan 24 23:14:40 adq: yea that recycler is scrolled over a little bit so it looks off Jan 24 23:14:51 orbyt_: no, left/right swiping is enabled Jan 24 23:15:07 ^^ Jan 24 23:15:18 s73v3r: yes , and firetv (unfortunatley( Jan 24 23:15:24 An issue arises where the user tries to swipe a horizontal RV but instead scrolls the viewpager Jan 24 23:15:34 yes it does Jan 24 23:15:42 or when they try to use the dpad :P Jan 24 23:16:00 could be that you have to handle the focus, no? Jan 24 23:16:08 i don't think it will work well without extra care on that part Jan 24 23:16:26 yeah, you’re gonna have to do a good amount of work defining areas of focus and stuff Jan 24 23:16:29 (iirc vlc (code is open) had an issue with navigating with key, which should be simialr to dpad) Jan 24 23:16:49 What is the middle tab? Jan 24 23:22:23 we call it "browse" - more recyclers Jan 24 23:22:35 its not the best icon for the job lolz Jan 24 23:22:46 but given the content it is accurate Jan 24 23:23:27 aaahahahaah this text sizing is driving me nuts. I'll just increase the width and hope it covers all devices. Jan 24 23:23:50 I'll talk the folks in #videolan - the android people aren't usually active tho Jan 24 23:25:01 they are but it's a bit late in france right now Jan 24 23:39:11 Asked this yesterday but didnt get a response...are location services accurate enough to differentiate two locations ~10 yards from each other indoors? Jan 24 23:39:21 probably not Jan 24 23:39:35 unless you have a bunch of BT beacons who’s location is known. Jan 24 23:40:01 Well, for example, say you're in a mall, and theres a gamestop and a footlocker store right next to each other. Could I determine which store the user is in? Jan 24 23:41:45 Why wouldn't you go to the mall and log those gps coordinates? Find out for yourself Jan 24 23:41:58 by yourself? Probably not Jan 24 23:42:06 especially if you’re in the interior of the mall Jan 24 23:43:45 I should add that in this scenario, the store owner would have opened the app and logged the stores location. Jan 24 23:44:10 i don’t think gps by itself would be enough unless it’s an outdoor mall Jan 24 23:44:37 this also ignores the problem of getting all the store owners to participate Jan 24 23:45:34 That concept I had was to make a sort of "social" foursquare type app, where users could create custom notifications for say there house/apartment, so then when another user enters that geofence, the notification is triggered Jan 24 23:45:59 Issues arise when two locations are near each other, like two small studio apartments Jan 24 23:46:22 in that instance, just present a list and let the user choose where they are Jan 24 23:47:07 Yea, though in a best case scenario user input wouldnt be required Jan 24 23:47:25 that’s what most of those social “checkin” apps do Jan 24 23:47:50 because, quite frankly, I highly doubt any user wants the app to automatically track and publish where they are at all times Jan 24 23:48:50 Foursquare and its offspring swarm do this quite well, I get a notification whenever I enter some of my favorite restaurants. I dont recall ever manually checking into these locations Jan 24 23:49:08 don’t auto check people in. it’s a terrible thing to do Jan 24 23:49:26 imagine someone with an abusive ex. you’ve now just automatically broadcast their location to the world Jan 24 23:50:07 s73v3r How so? In this concept, their location is not presented to any user..its just used to trigger notifications once they enter a geofence Jan 24 23:50:28 you said it notified the person that set up the geofence Jan 24 23:51:11 The notification is triggered on the phone of the person entering Jan 24 23:51:18 It's not going to be able to notify someone their "friend" has arrived without monitoring _their_ location all the time Jan 24 23:51:19 I would generally use gps then use the accelerometer to make a guess at where they are. Jan 24 23:51:27 ...or passing around a heaping pile of geofence data Jan 24 23:51:53 Dagmar As mentioned, it does not notify the user who sets up the geofence Jan 24 23:52:34 I wonder if it would be bad practice to log the nearby wifis... lol Jan 24 23:52:37 Imagine a scenario where there is a picnic in a park. The organizer sets up a custom message. When a person visits the picnic, a notification with the welcome message is displayed. Jan 24 23:52:40 Thats it Jan 24 23:53:26 how are you going to know there’s a geofence there? Jan 24 23:53:26 Just play around with gps data. If it isn't accurate enough you can adjust. Jan 24 23:53:45 i know someone who did something similar: https://play.google.com/store/apps/details?id=org.jraf.android.dcn it notifies you the door code when you're close to a friend place Jan 24 23:54:08 it's almost the same concept, except the location is fixed, only one guy is moving Jan 24 23:54:08 Would have the geofence data stored on a server after its set up by the organizer s73v3r Jan 24 23:54:14 or yah geofence there ya go Jan 24 23:54:15 (iirc he used the fusion sensors) Jan 24 23:54:21 fusion location* Jan 24 23:54:38 ok, but how does the user know they’re in the geofence? Jan 24 23:54:45 ah and his code is open Jan 24 23:54:48 Hello guys, anyone know any conventional android applications that save their activity state? Jan 24 23:54:49 so you can look what he did Jan 24 23:54:52 as in, how often are you sending GPS data back to your server? Jan 24 23:55:27 s73v3r I would guess it would have to be at least once every 30~45 seconds or so. Jan 24 23:55:39 adq Will give it a look Jan 24 23:55:57 and indeed, if both actors are moving, you need to sync between them with "something" Jan 24 23:56:11 adq Only one party is moving Jan 24 23:56:54 then the first who arrives need to notify the other his location, then the other needs to trigger he is near enough the end point Jan 24 23:57:14 still require communication, but lighter protocol probably Jan 24 23:57:26 adq No, I think you're misunderstanding the concept Jan 24 23:57:41 i thought it was just to tell someone, hey i just arrive 'im near you Jan 24 23:57:47 Nope Jan 24 23:57:51 ah sorry the Jan 24 23:57:55 Ashiren: I just tried the Thread thing, implementing just the Bluetooth Thread from the sample. And it worked. I could use the cancel() method to stop a blocking run() method. Jan 24 23:58:02 The picnic example I gave above describes it pretty well adq Jan 24 23:58:20 My guess is, that the cancel() method runs on the thread I call it in (main thread) not the thread it belongs to. Jan 24 23:58:30 main thread = UI thread Jan 24 23:58:31 ok so it's not important if the guy leave the picnic place, it's just telling others "here is the picnic place" when they are near? Jan 24 23:59:18 adq Pretend you set up a geofence around your house so that when someone visits, they get a welcome message specified by you on their phone Jan 24 23:59:30 hmm Jan 24 23:59:41 i see, there is another thing then, it's called a beacon Jan 24 23:59:46 but it's not anymore the same thing lol Jan 24 23:59:59 Could you elaborate? Are you talking about bluetooth? Jan 25 00:00:03 you can broadcast an url via bt or wifi but it requires a physical token Jan 25 00:00:14 and ppl nearby will catch it if they allow it Jan 25 00:00:36 hi everyone - I have an app that I have to login to; It works all fine. But I deleted it, cleared cache and data and re-installed it and I am still logged in. It's crazy. My developer thinks my phone is keeping token in memory somehow; how is this possible? Jan 25 00:00:56 it's not anymore the same thing i guess Jan 25 00:01:13 monsterco, it's the auto backup feature, you can disable it in the manifest Jan 25 00:01:31 very important for stuff encrypted with the keystore for example, because usually data are invalid after and cannot be decrypted Jan 25 00:01:41 adq - we are developing on Cordova; so autobackup is another memory on Android? Jan 25 00:01:52 something like android:allowBackup="false" Jan 25 00:02:05 in your node of the manifest Jan 25 00:02:08 no clue for cordova Jan 25 00:02:12 what the heck; I would have thought everything is in our local db :( Jan 25 00:02:14 but thanks a lot Jan 25 00:02:14 we will look at this now Jan 25 00:02:18 it's trivial Jan 25 00:02:32 adq - is there any way for user to clear autobackup data for a specific app? Jan 25 00:02:48 yes, but that means you know the sharedpreference filename being used Jan 25 00:02:53 keep in mind that, as long as your auth token regularly expires, this shouldn’t be too much of an issue Jan 25 00:02:55 usually it's the default corresponding to your packagename Jan 25 00:03:03 what is the path? Jan 25 00:03:04 check the doc of sharedpreferences Jan 25 00:03:31 mind blowing; but this only happend on 7.1.1? Jan 25 00:03:40 it doesn't happen on 4.4 Jan 25 00:03:46 auto backup improved probably Jan 25 00:04:17 so autobackup picks up content randomly and puts there? Jan 25 00:04:27 wat Jan 25 00:04:40 this "autobackup" storage location only takes tokens? Jan 25 00:04:42 or what Jan 25 00:04:42 no, it saves your sharedpreferences and restore them Jan 25 00:04:49 read the documentation Jan 25 00:04:54 got it; thanks Jan 25 00:05:07 it's more a mystery what triggers the restore Jan 25 00:05:16 usually a factory reset + installing the app will do Jan 25 00:05:25 (since it's the main use case, or when you switch to another device) Jan 25 00:06:03 It's still a bit magical. Jan 25 00:06:21 there is a way to control it more properly but i don't remember well without looking the doc Jan 25 00:06:23 adq, so 'clear data' is not enough to remove everything about an app? Jan 25 00:06:24 very magical Jan 25 00:06:42 CrowX-, i have no idea if clear data prevents a subsequent restore Jan 25 00:06:45 but def do not want to factory reset my phone Jan 25 00:06:54 i did not tell you to factory reset -_- Jan 25 00:07:17 i told you the purpose of saving data is for restoring them, like after a factory reset Jan 25 00:07:24 or other scenario Jan 25 00:08:35 adq, our problem (mine and monsterco's) is that our app is saving some data in the local storage Jan 25 00:09:14 and we want to remove that data. we tried going in settings -> apps -> our_app, and we do clear data, and while this works on android 4.4, it doesn't on 7.1 Jan 25 00:09:36 should work fine on 7.1 Jan 25 00:09:47 pfn, any idea what could prevent it on 7.1? Jan 25 00:10:17 bad rom Jan 25 00:10:22 hi Jan 25 00:10:25 because it definitely keeps data that was saved in the local storage. Jan 25 00:10:25 Clear the data, _don't_ uninstall and reinstall it Jan 25 00:10:25 nothing would prevent it Jan 25 00:10:34 "definitely keeps" prove it Jan 25 00:10:47 Dagmar, we cleared data, then uninstalled and reinstalled the app. Jan 25 00:10:54 Read what I just typed Jan 25 00:10:54 we start the app, and the data is still there. Jan 25 00:11:10 Dagmar, ok, we'll try with just clearing data. Jan 25 00:11:43 When you reinstall the app is when it would restore the cloud backup of the sharedPreferences data Jan 25 00:11:58 I see Jan 25 00:11:59 thanks Jan 25 00:12:01 https://hastebin.com/sedekemudu.scala gives me this error...setImageBitmap(android.graphics.Bitmap)' on a null object reference any ideas? Jan 25 00:12:02 we're going to test now Jan 25 00:12:56 bubbely: It's not getting the video, ergo no thumbnail Jan 25 00:13:10 Dagmar: should i use an async procedure Jan 25 00:13:33 maybe there is a little to a big amount of time between clear data, and uninstall, otherwise something might not be triggered on the otherside (who knows again, it's closed and not described and probably cloud dependent) Jan 25 00:13:33 For network retrieval of content? Yes. Jan 25 00:14:01 so if the delta is short, it believes data needs to be restored because it did not get the state data was cleared Jan 25 00:14:08 but it's just a guess, i have no idea for sure Jan 25 00:14:20 It's a guess but it sounds about right Jan 25 00:14:37 _When_ the Play Store synchs it's list of what you have installed is pretty much random Jan 25 00:14:51 yeah, would be interesting to dump logcat Jan 25 00:15:06 and do many empiric tests, with different delta of time with same sequences Jan 25 00:15:08 Sometimes it seems like it's immediate, sometimes it won't know about things you installed an hour ago Jan 25 00:15:09 on different devices, etc Jan 25 00:15:12 good luck lol Jan 25 00:15:41 I've got an app that does login stuff. I just added a button to dump the sharedpreferences to eliminate the problem Jan 25 00:16:12 or store a timestamp or a state yourself Jan 25 00:16:18 so even if it's restored, you know what to do in your app Jan 25 00:16:27 (need to check at every launch tho) Jan 25 00:16:32 ...mainly because I noticed that in the docs it mentions about the default sharedprefs file being backed up, but not when or how often Jan 25 00:16:43 word Jan 25 00:16:54 Dagmar, your solution worked. Thank you. Jan 25 00:17:28 Amusingly, it's the use of the _camera_ that's making Play tell me I need a privacy policy Jan 25 00:17:33 Pfft Jan 25 00:17:37 Dagmar, yeah, that's annoying Jan 25 00:17:58 privacy policy: your personal data is not used Jan 25 00:18:19 Oh their personal data is used, in that they enter a "name" to identify themselves to the server instance Jan 25 00:18:25 ...but they're the ones who will have to run the server instance. Jan 25 00:18:38 ...and the only reason the camera is used is to read QRcodes Jan 25 00:19:50 anyone have a good example of loading a thumbnail from a URL with an .mp4 file.. prfereably the first frame to the mp4 Jan 25 00:23:27 i am working for almost 4 week to deliver an app for a clients Jan 25 00:23:46 how much $ are u gonna make Jan 25 00:24:25 not that much its like delivering 10 thousand dollars worth for 500 hundered one Jan 25 00:24:53 compatibilty issue i have and i cannot decode arabic text in json Jan 25 00:25:10 in android 4.1.1 and below it works Jan 25 00:25:39 on android 4.1.1 and above it throws an exception whenevers there an arabic text in the json string Jan 25 00:25:42 ??? Jan 25 00:25:49 Hmm... $10,000-worth for $500 would get them the "trial" version of the app Jan 25 00:26:07 the app will work for 3 months Jan 25 00:26:12 "We're sorry, the trial version of AwesomeEditor does not support vowels." Jan 25 00:26:17 to deliver news for festival Jan 25 00:26:36 so even they paid much they willl not use it forever Jan 25 00:27:15 my issue did someone face it before what is wrong with arabic text i tried unescaping them before sending to client and they dont show up ! Jan 25 00:27:34 and am broken and cant buy phones to test and i have bills and loans etc Jan 25 00:28:00 i have one phone and genymotion with limited net bandwidth Jan 25 00:28:04 ??? Jan 25 00:29:05 how long they’re going to use it shouldn’t matter Jan 25 00:29:22 anyways Jan 25 00:29:37 i want to market myself lolz Jan 25 00:29:49 you’re sending text in JSON in Arabic, and it’s throwing an exception? Jan 25 00:29:57 show up like the one who does lots of work with less $$$ Jan 25 00:30:02 you’re not marketing yourself, you’re selling yourself as slave labor Jan 25 00:30:08 yes Jan 25 00:30:21 that’s a shitty position to be in, because you’re losing the respect of your clients Jan 25 00:30:30 and when you do want to raise your rates, those clients won’t have it Jan 25 00:30:39 iuse php as backend for my app small CP for publishing news and uploading media Jan 25 00:30:41 but back to your problem. what is the exception thrown? Jan 25 00:31:07 that don't know that yet Jan 25 00:31:16 i have 1 day to deliver it Jan 25 00:31:24 and loans Jan 25 00:31:32 we can’t really help, then Jan 25 00:31:56 mx8manger: SO is full of Q&A about the subject Jan 25 00:31:56 can i give you exception on pastebin Jan 25 00:32:07 that’s what I just asked for, yes Jan 25 00:34:24 * mx8manger waits for emu to load then he will pasta and apologizes for lots of txts Jan 25 00:42:36 anyone have a good example of loading a thumbnail from a URL with an .mp4 file.. prfereably the first frame to the mp4 Jan 25 00:42:52 check the mediaplayer API Jan 25 00:44:53 bubbely: you can playback 1 frame a get the image from the surface and save it. I developed a filmstrip library for that but I ended up moving the feature to the server side Jan 25 00:45:47 final Bitmap thumbnail = ThumbnailUtils.createVideoThumbnail( videoUrl, MediaStore.Video.Thumbnails.MINI_KIND ); Jan 25 00:45:52 that looks real Melatonina ? Jan 25 00:47:15 bubbely: you can also use ffmpeg on android Jan 25 00:48:07 Melatonina: can i use what i just showed u in an async task Jan 25 00:49:29 bubbely: I guess that's the best use. I didn't know that method. But then my library had a larger scope Jan 25 00:52:01 werid its suddenly just fixed! ?? Jan 25 00:52:21 maybe my ide is affected my xml files i guess when i leave them open Jan 25 00:53:08 anyways is there somesort of frimware to lock my app on expire like whatsapp does or do i have to do on my own parse the val from net then exec the kill Jan 25 00:53:37 hey melatonina can u help me write an asyncprocedure for this method Jan 25 00:53:44 its kinda confusing Jan 25 00:54:30 icanz help u too Jan 25 00:55:08 kk Jan 25 00:55:14 but am sorry i have to leave bye Jan 25 00:55:19 oh Jan 25 00:55:36 Any gradle experts here? Jan 25 00:56:13 I’m trying to figure out if I can specify a specific dependency in `gradlew app:dependencies` to only show hierarchies containing it Jan 25 00:57:39 please just ask the question. don’t ask to ask Jan 25 00:58:07 bubbely: if your code doesn't work, link it, please Jan 25 00:58:25 s73v3r: was that to me? Jan 25 00:59:00 asking to ask cannot succeed in trumps america Jan 25 00:59:42 konk3r yes Jan 25 01:00:13 Ha, I wasn’t asking to ask, I was just curious if anyone here was very familiar with gradle. I know that most developers know enough to scrape by Jan 25 01:00:39 if someone can answer your question, they will try to Jan 25 01:01:08 Just trying to make a bit of conversation instead of using this as just another stackoverflow Jan 25 01:01:14 No need to take offense Jan 25 01:01:46 i’m not taking offense, but far too many people just ask to ask, and it gets in the way Jan 25 01:01:46 Melatonina: https://hastebin.com/oqaxuguqiq.scala ..... i need this to work dynamically, so i must first pass the ImageView i want to use, how can i do this ? Jan 25 01:03:09 bubbely: create a field and store it in the field when you create the AsyncTask Jan 25 01:03:46 bubbely: AsyncTask is a class that you can subclass just like any other Jan 25 01:05:10 any other non-final class Jan 25 01:06:39 Melatonina: i can only input one paramater to the download part..? Jan 25 01:06:46 a "URL" Jan 25 01:08:10 this answer is a sloppy as your question: yes Jan 25 01:08:18 as Jan 25 01:08:18 is there a way to build my ndk project with maximum debugging information? Jan 25 01:08:25 I am building it through Android Studio Jan 25 01:08:40 apparently, I am supposed to set some NDK_DEBUG=1 flag but not sure where to set it Jan 25 01:10:25 in my crash dumps, I get strings that look like (JNIEnvProxy::~JNIEnvProxy()+99), but I want that to show me which exact line and which exact source file Jan 25 01:10:33 I am guessing I am missing symbols or something Jan 25 01:10:37 Melatonina: can you show me how to add a field when i create my asynctask Jan 25 01:11:31 bubbely: don't be lazy Jan 25 01:11:58 bubbely: I already told you what to do Jan 25 01:12:53 he is so lazy he never formatted his SO post from last time, nor provided the answer he got here Jan 25 01:16:08 Anyone here use intellij, how do i change the default browser from firefox to chrome? Jan 25 01:16:26 it keeps loading up firefox.... Jan 25 01:17:15 mewn: https://www.jetbrains.com/help/idea/2016.3/configuring-browsers.html Jan 25 01:17:29 (I googled "intellij default browser".) Jan 25 01:17:40 lmao thanks Jan 25 01:22:55 hey guys Jan 25 01:23:01 has anyone integrated android pay in-app here? Jan 25 01:33:46 Melatonina: https://hastebin.com/ewowuqevof.scala Attempt to invoke virtual method 'void android.widget.ImageView.setImageBitmap(android.graphics.Bitmap)' on a null object reference Jan 25 01:35:13 wait, lineageOS? Jan 25 01:35:25 bubbely: use the debugger to check why it's null. The code looks "ok". Jan 25 01:38:42 anyone know of a trick to translate ndk crash dumps to source line numbers Jan 25 01:39:42 they all look like this: Stack frame #01 pc 00005b43 /data/app/com.myapp-1/lib/x86/libmine.so (SomeClass::~SomeClass()+99) Jan 25 01:39:50 I want source code + line number Jan 25 01:39:58 the +99 I am guessing is byte offset Jan 25 01:40:01 but not line number Jan 25 01:45:03 gonna give it a go, tx? Jan 25 01:46:08 sleepster, https://developer.android.com/ndk/guides/ndk-stack.html Jan 25 01:46:50 there was another tool in the past with llvm, but it has been so long i don't recall it Jan 25 01:46:57 thanks adq . that's actually what I am using Jan 25 01:47:07 adb logcat | $NDK/ndk-stack -sym $PROJECT_PATH/obj/local/armeabi Jan 25 01:47:11 that's the command I am using Jan 25 01:48:24 here's the actual command: adb logcat | ndk-stack -sym /git/my-app/lib/build/intermediates/ndkBuild/debug Jan 25 01:49:38 adq: ah I found it Jan 25 01:49:43 I was pointing at the wrong directory Jan 25 01:49:58 apparently you are not supposed to point it directly at the *.obj files Jan 25 01:50:00 but a few levels up Jan 25 01:50:03 capella: yeah Jan 25 01:50:11 but I can't add a card because none of mine work! Jan 25 01:51:25 yeah your path is weird, + you're using intermediates Jan 25 01:54:03 yeah, the path I ended up using was: build/intermediates/ndkBuild/debug/obj/local/x86 Jan 25 01:54:21 basically where the .so and the obj_x86 directory was Jan 25 02:21:50 <_raw_> Jan 25 02:21:59 <_raw_> whats wrong in this code? Jan 25 02:25:17 <_raw_> anyone around? Jan 25 02:26:43 http://www.androidpolice.com/2017/01/24/google-io-2017-will-held-shoreline-amphitheater-may-17-19-according-googles-scavenger-hunt/ Jan 25 02:44:21 hello, Jan 25 02:44:45 how can I determine what styles are used to style particular components Jan 25 02:45:10 in particular, I am trying to know what style is used in BottomSheetDialogFragment Jan 25 02:49:50 canoe: Is it this? https://android.googlesource.com/platform/prebuilts/sdk/+/master/current/support/design/res/values/themes.xml#19 Jan 25 02:49:57 I've only had a quick peek. Jan 25 02:53:26 TacticalJoke, thanks for that link. I've tried a few so far.. (listed as the parent) i guess it is just a test and see for yourself situation Jan 25 02:55:30 (dont worry, that is not a real production theme - that is just me scratching out a bunch to find the right one, then i will clean it up) Jan 25 02:58:31 In case you're wondering where I got that name from, it was this: https://android.googlesource.com/platform/frameworks/support.git/+/master/design/src/android/support/design/widget/BottomSheetDialog.java#153 Jan 25 02:59:17 (Of course after looking at https://android.googlesource.com/platform/frameworks/support.git/+/master/design/src/android/support/design/widget/BottomSheetDialogFragment.java .) **** ENDING LOGGING AT Wed Jan 25 03:00:01 2017