**** BEGIN LOGGING AT Wed Mar 23 02:59:59 2016 Mar 23 03:04:05 hey guys Mar 23 03:05:03 I'm building a multiplayer game, and I need some tips on how to authenticate users Mar 23 03:05:24 I'm going to use socket.io as the transport protocol Mar 23 03:06:29 The currently design I have in mind is a cookie-type setup, where I log the user in at the start of the app, give them a token, and that token is passed for every action that the user perform Mar 23 03:06:34 how is that design? Mar 23 03:11:38 By login when the app starts don't store the users password Mar 23 03:12:10 when you get a token query the server if the token is still valid, if not ask user again for password Mar 23 03:17:06 Please help here: http://android.stackexchange.com/questions/139643/google-now-not-speaking-or-executing-comand Mar 23 03:23:28 wrong channel Mar 23 03:41:00 is putting strings directly into my java source really that bad? Mar 23 03:41:12 suppose I will never support another language or locale? Mar 23 03:41:32 Not really Mar 23 03:42:09 it seems like string resources get so unorganized Mar 23 03:44:32 refactorial, so in other words...it's a good design? Mar 23 03:46:49 sector_0: for a game it will be ok, use encryption and etc.. never store users password and etc.. follow security practices and you'll be fine Mar 23 03:47:25 refactorial, cool Mar 23 03:49:00 Same as it ever was. Mar 23 03:49:30 Just looking for the library reference page about the new flashlight functionality in API 23 Mar 23 03:52:16 Why does that d.android.com link lead to the spanish version of the docs? I never told Android I wanted any specific language I'm confused. Mar 23 03:54:03 I want to use rxjava to repeat this network call every 20 seconds or so Mar 23 03:54:28 ideally only when the app is focused Mar 23 04:00:07 RustyShackleford it might be easier to just spin a thread looping and sleeping every 20 seconds doing the network request. And shut downn the thread on Activity.onPause, restart on onStart. Mar 23 04:00:39 already have rxjava doing the network calls and database persistence Mar 23 04:00:45 pretty neat Mar 23 04:01:06 I'm finding a flash_mode_torch setting...which is cool, but not what I'm looking for. Mar 23 04:04:36 repeatWhen? Mar 23 04:05:37 RustyShackleford: maybe take a look at the first example here for polling: http://orbyt.github.io/RxCookbook/ Mar 23 04:07:32 still not sure if rxjava is helping or hurting this project Mar 23 04:08:15 sqlbrite and rx are a neat combo. I hardly have to deal with Cursor objects at all Mar 23 04:11:43 I'm writing something specifically for Android Marshmellow and newer and I don't have a test device...anyone have a new phone and willing to try something in an hour or so? (it'll be an unsigned .apk for manual install). [Mine's Ice Cream Sandwich, hah] Mar 23 04:11:58 bcadren: genymotion Mar 23 04:12:14 unless you really need the hardware (ADA or something like that) Mar 23 04:12:32 I never dev on my phone anymore Mar 23 04:13:14 It's specifically for one of the new hardware API's (accessing the flashlight funciton) Mar 23 04:16:44 What's the import for collections? Arrays? Mar 23 04:18:28 ALT+ENTER in android studio will auto import them for you Mar 23 04:18:37 if not check your spelling Mar 23 04:35:53 hey all. I'm pretty new to android dev and i'm struggling to write unit tests against some model classes i have. my models are ORM members, and unit tests require Context, however getting the right context has proven difficult. `AndroidTestCase` yields null when `this.getContext()` is called. I also tried using `InstrumentationRegistry.getContext();`, but `getApplicationContext();` is eventually called on _that too_, which is Mar 23 04:35:53 `null`. The ORM needs a Context because it uses SQLite under the hood, which requires it Mar 23 04:41:02 cdargine: i've used roboelectric in a project to run the unit tests in jvm. seems to work pretty well if you want to go that route. Mar 23 04:43:15 @dsardari, i've seen/heard of it, but i also figured that it must be such a common thing (testing Models) that i could probably get away with a lighter, ready-to-go, out-of-the-box solution with the android toolkit Mar 23 04:43:28 but i'll check it out regardless Mar 23 04:45:12 Anyone illuminate this for me? Mar 23 04:45:13 http://pastebin.com/fUGj5drQ Mar 23 04:46:04 we've got older tests that basically just extend AndroidTestCase and call "getContext" in the "setup" override. they work i'm pretty certain. Mar 23 04:47:43 if they are open-source i'd love to take a peek! i'm going bald pulling my hair out over here :) Mar 23 04:51:45 sorry :( Mar 23 05:12:05 how can I replace a retrofit network call with a json/xml response? Mar 23 05:12:18 er I mean like a file saved in the project. Mar 23 05:12:50 serialize to string or xml ? Mar 23 05:12:54 or json Mar 23 05:14:52 string constant would work I suppose Mar 23 05:15:10 I dunno I want to run it through my xml parsing code Mar 23 05:16:05 ideally my retrofit calls would return the contents of these files as if I had receieve it as a response Mar 23 05:17:02 The proxy is an interface, implement it yourself Mar 23 05:17:42 any google search terms or class names I should look at? Mar 23 05:20:12 eh Mar 23 05:20:24 RustyShackleford: https://square.github.io/retrofit/ Mar 23 05:20:30 check converters Mar 23 05:29:01 i'm using simplexml Mar 23 05:29:25 now I just want to make a request in postman, copy and paste it to a file Mar 23 05:29:48 then run it through my retrofit calls so I can use static data for unit tests Mar 23 05:29:57 integration tests, whatever Mar 23 05:31:54 if I put a return statement in the middle of a loop, it breaks the loop and immediately returns the value yes? Mar 23 05:37:38 @bcardren yeah if you do return value; Mar 23 05:46:04 Anyone tried this? Mar 23 05:46:09 http://calaba.sh/ whoops Mar 23 05:46:19 well Mar 23 05:48:57 I'm having a suprisingly hard time googling this Mar 23 05:49:35 I just want to mock out the servers/network. I do want to test my xml serialization Mar 23 05:49:53 there must be a way to record a server's response and then use it in unit tests Mar 23 05:50:06 Are you using your own xml serialization? Mar 23 05:51:09 retrofit and simplexml converters Mar 23 05:51:49 RustyShackleford: I gave you an answer above, what is wrong with it? Mar 23 05:52:15 Rusty you don't need to test your xml parsing. If you want to mock your network, I'd suggest this pattern: http://pastebin.com/raw/gNXqQEy9 Mar 23 05:52:35 xml parsing is already testing in the simplexml library. Mar 23 05:52:59 what CedricBeust is suggesting is *the* way to go Mar 23 05:54:18 CedricBeust: I guess the problem is that I did not understand what you meant Mar 23 05:54:25 explodes: that is so rediculously simple Mar 23 05:54:35 awesome Mar 23 05:55:15 The problem you'll run into is how you obtain your instance of AppService. Whether it was created by Retrofit's adapter factory, or by you doing "new MockAppService()" - Mar 23 05:56:03 ah crap its late and I haven't written any code Mar 23 05:57:08 Dependency Injection can help out here. If you don't want to mess with the boilerplate of all of that (which you should ;) you can have a function that is really crappy like this: http://pastebin.com/raw/24LyS0Tp Mar 23 05:59:03 I tried using some dagger Mar 23 05:59:22 :+1: emoji Mar 23 05:59:24 ended up implementing it myself for the database anyway Mar 23 05:59:35 dagger is wierd Mar 23 05:59:36 :-1: emoji Mar 23 05:59:48 lol Mar 23 06:19:27 You know since I'm devving on it I can tell you that this phone has 1.5 gigs available on the main device and 3.7 on the card...yet it's complaining that it's close to full I don't...what? Mar 23 06:37:28 explodes: the advantage I see of passing a file trhough my xml serialization code is that it's really easy to load different responses Mar 23 06:37:57 and then my model objects are created Mar 23 06:38:38 i'm not testing my serialization code Mar 23 06:41:04 I want to use that serialized data in my tests Mar 23 06:46:34 RustyShackleford: seems like you're doing something terrible wrong ;) Mar 23 06:46:47 wanna look at my repo? Mar 23 06:46:54 if you've got nothing better to do Mar 23 06:57:28 I'm at work Mar 23 07:00:46 I have created a project skelleton to act like a template for specific project types, but now do I have to rename the package name and project name and stuff manually each time ? Mar 23 07:00:47 gordon_: so? Mar 23 07:00:54 no its cool, I didn't realize Mar 23 07:01:59 make it an aar? Mar 23 07:39:07 Has anyone seen lib for "countdown timer button", not sure how it's called. Button that has default action that is executed after x amount of time : cancel(3)..cancel(2)..cancel(1) Mar 23 07:48:18 vegetabl_, why adding a lib for this? just do it yourself ;_) Mar 23 07:48:39 So you dont have to add opensource licence (probably) and you'll learn more Mar 23 07:51:03 sure. why using gson, retrofit, picassa/glide - lets make everything by ourselves Mar 23 07:52:41 lol Mar 23 07:53:05 y do we need to reinvent the wheel Mar 23 07:53:14 altough that button seems easy to do Mar 23 07:53:52 when we have good stack of libraries Mar 23 07:54:30 It depends what you are going to do, a "timer button" is not really something i would add a dependency for. Mar 23 07:54:41 its probably 10 lines of code Mar 23 07:54:50 Thats why we see apps with 50MB Mar 23 07:55:16 if you're using rx already, it's pretty much a one-liner Mar 23 07:55:56 something like Observable.interval(1, TimeUnit.SECONDS).take(4).doOnComplete(() -> { button.hide(); ... }).subscribe(i -> { button.setText("Cancel (" + (4-i) +")"); });, although that doesn't include support for orientation changes. not much longer doing it manually though. Mar 23 07:59:34 shit.. i think time to learn Rx Mar 23 07:59:59 ktwo, I already am, but why not search for some good lib first. Was hoping fore something pretty with iphone like countdown animation. Times when I want to recreate everything are long gone. Mar 23 08:02:17 I dont know, i think its kinda an attitude, I personanlly first like to do thinks myself to keep my app clean and slim and just for the sake of learning, instead of getting one blackbox after the other Mar 23 08:02:23 and just learn how to add dependencies Mar 23 08:02:35 Only when i see that doing it is too hard or cumbersome i resort to libs Mar 23 08:04:03 try https://android-arsenal.com/search?q=countdown Mar 23 08:04:09 ktwo, work as a software engineer for 10y and then come back to this question. If there is something good I can use and save time.. I'm def going for it Mar 23 08:04:34 vegetabl_, already did and doing ;) Mar 23 08:05:44 And countdown is easy, I need some good animations with it thou. Client wants "just like on iPhone" x_x Mar 23 08:06:09 why doesnt he buy iphone then Mar 23 08:06:24 he did Mar 23 08:09:14 [solved] Mar 23 08:09:18 next! Mar 23 08:09:55 Ashiren: my wife won't make me pancakes! what should I do? Mar 23 08:10:05 get new one Mar 23 08:15:41 return her, clear case of DOA ^^ Mar 23 08:18:35 anyone familiar with android's video processising capabilities? Mar 23 08:19:08 I need to load huge video and crop only 30 seconds of it Mar 23 08:19:38 not huge exaclty, just any video Mar 23 08:20:51 well - hardware dependend obviously if you got a fast one i dont see a problem Mar 23 08:22:08 yeah, but question is - how to trim video? :) Mar 23 08:22:10 see - thats a case where a library for doing it might make sense ;-) Mar 23 08:22:24 ffmpeg maybe? Mar 23 08:22:35 i was afraid of that ) Mar 23 08:23:32 I was expection to find some builtin functionality to work with video Mar 23 08:24:06 proably there is depending on the codecs you are using Mar 23 08:24:30 look for MediaCodec Mar 23 08:24:54 http://stackoverflow.com/questions/20468211/use-mediacodec-and-mediaextractor-to-decode-and-code-video# Mar 23 08:25:56 vigilancer, you don't have magical API supporting video editing for all possible video formats Mar 23 08:25:58 but basics are there. Mar 23 08:26:05 And "cropping".... isn't as easy as it looks :P Mar 23 08:26:26 But I guess you could use MediaMuxer if you don't want to compile stripped down ffmpeg Mar 23 08:28:06 Mavrik: well, our ios guy said it has api for such task. yeah, I know kinda lame excuse to hope to find something similar in android :) also Gallery2 can do trimming with action "com.android.camera.action.TRIM" Mar 23 08:28:25 I did tell you: mediamuxer Mar 23 08:28:40 It's analougous to iOS VideoToolbox method that iOS "guy" is talking about. Mar 23 08:28:44 It also has same limited format support. Mar 23 08:28:49 ah, sorry, missed. will take a look Mar 23 09:00:16 Can someone give me an example of how they use Volley so it doesn't cause activity leak? Mar 23 09:27:06 Mavrik: ah, thanks, that will do. Gallery2 sources proved useful also Mar 23 09:38:51 oh fun, our test APK just hit 65k limit Mar 23 09:38:57 because espresso pulls in ALL THE GUAVA Mar 23 09:45:16 Mavrik: happens Mar 23 09:45:42 nyoro~n Mar 23 09:46:03 65k methods ought to be enough for anybody Mar 23 09:46:39 said nobody never Mar 23 09:47:07 well, android developers did say that didnt they Mar 23 09:47:15 no idea Mar 23 09:47:26 seems fishy Mar 23 09:49:47 related: http://developer.android.com/tools/building/multidex.html Mar 23 10:18:40 Where does android get the text it shows on the top of app when you click recent apps button. Mar 23 10:20:56 from android:label in manifest Mar 23 10:26:06 Why can't I start an activity like this? http://pastebin.com/T3r3wv1p it can't resolve the constructor. Mar 23 10:31:23 Oh is it the "this" ? Might I use "Intent intent = new Intent(MainActivity.this, LoadingActivity.class);" instead? Mar 23 10:32:46 yes Mar 23 10:33:03 good , thanks Mar 23 10:39:02 do you guys work with photoshop when you receive stuff from designer Mar 23 10:39:19 or do you receive the assets all extracted and already sized appropriately? Mar 23 10:39:36 Designers are the bane of my existance Mar 23 10:40:40 jvrodrigues: depends on designer really. it's extra work designer too. so you have to say what you need Mar 23 10:41:06 its extra work? Mar 23 10:41:35 delivering a photoshop file is the same as me delivering my work in a zip file with all the code Mar 23 10:41:41 do you expect them to resize and put graphics properly into drawable-*dpi Mar 23 10:41:47 yeah, you need to extract it, resize or whatever. event with Assets Generator in Photoshop Mar 23 10:41:51 and expect the customer to know how to build the apk Mar 23 10:42:09 but with vector compat it's less extra work, so I do it myself Mar 23 10:42:58 Ashiren: I do, ofc Mar 23 10:43:11 jvrodrigues: you are not customer, you and designer are part of team. or suppose to be :) Mar 23 10:43:37 if my company hires a freelance designer, then I am, in fact, a customer Mar 23 10:44:00 so charge extra from company for dealing with psd, big deal Mar 23 10:44:41 or provide document to your manager what kind of resources do you expect to do your job Mar 23 10:47:03 jvrodrigues: but honestly, try VectorCompat, it's such a timesaver in context of assets managment Mar 23 10:48:37 can you link me to that? Mar 23 11:11:57 hey Mar 23 11:12:17 my CursorAdapter.swapCursor doesn't seem to work Mar 23 11:12:58 (CursorAdapter <- some instance of CursorAdapter) Mar 23 11:45:09 Hello peoples. Mar 23 11:51:39 How is the USB audio support on Android ? Mar 23 12:22:42 Hi, I want to create a search widget like in Play Store app. How do I proceed? Mar 23 12:23:30 Is it a toolbar whose look has been modified or a composite view made and put in framelayout? Mar 23 12:24:03 take a look in android monitor's hierarchyviewer Mar 23 12:24:06 :P Mar 23 12:26:36 hey guys Mar 23 12:26:42 how do I use ListActivity? Mar 23 12:27:37 I have a ListView element and a class that extends ListActivity Mar 23 12:27:51 Zharf: I did and hierarchyviewer doesn't say if the widget particularly uses toolbar or a simple relativelayout Mar 23 12:28:02 but I don't know how does it "connect" to the class Mar 23 12:28:28 I also used UIAutomator to check the UI elements, however it also gives a list of base ui classes (like relativelayout and linearlayout) Mar 23 12:28:58 xJeremyCx, listactivity is glue that looks for a ListView with android:id/list from the layout Mar 23 12:29:12 frankly I wouldn't bother using it, it's a thing of the past Mar 23 12:29:18 learn to use recyclerview instead Mar 23 12:29:51 thanks Mar 23 12:56:32 The preview phone showing when designing in the xml file isn't very relevant? It's shows nothing correctly to what I'm seeing on my real device.. Mar 23 13:01:00 hi, i've been wondering Mar 23 13:01:12 can i add in app purchase later after deploying a free app? Mar 23 13:03:53 rkb: just push a new version to market with iap implemented Mar 23 13:04:18 Bernzel_, the preview most often works like I want it to show on the phone, for me Mar 23 13:04:41 Zharf: hm okey. Must be something seriously wrong with my layout Mar 23 13:05:24 some components make it hard to trust the preview Mar 23 13:05:35 and some devices are just broken :p Mar 23 13:12:16 @bernzel, ok thanks Mar 23 13:18:21 hithere Mar 23 13:18:35 I would like to achieve visible title on smaller display within settings. Something similar to what can be seen on larger display http://snag.gy/X0QXs.jpg (red circle). On smaller display it looks like this http://snag.gy/yqJKt.jpg (user can easily loose context). Mar 23 13:18:43 Way the settings are integrated can be seen here https://github.com/sonavolob/ABIconTest . This problem appeared adding Toolbar instead of old ActionBar. Mar 23 13:18:49 Iam still searching for solution (as it seems to be, I not the only one with such problem). Unluckily none of them work for me. Among those found solutions were http://stackoverflow.com/questions/6831325/custom-title-of-preferenceactivity-problem , http://stackoverflow.com/questions/4921825/set-custom-title-bar-in-preferenceacivity/18191443#18191443 http://stackoverflow.com/questions/30139548/how-to-add-toolbar-in-preferenceactivity Mar 23 13:18:55 Hi all, anyone know if its possible to have my application select a specific keyboard to use. For example if i make a soft keyboard layout, can i force the device to use that layout in my app, or do keyboards have to be seperate apps Mar 23 13:19:51 question is - are you using Preferences similar way I do - if yes - how do you add Title to Visible preference? Mar 23 13:23:13 * Zharf never used preferenceactivity Mar 23 13:23:22 but the solution in the last link looks good to me Mar 23 13:24:22 What the hell is this :D http://abload.de/img/astrot6s1d.png Mar 23 13:24:58 ktwo: saw that popping up today as well Mar 23 13:25:04 easter? Mar 23 13:25:18 april fool it says but its 23.3 :D Mar 23 13:25:22 No, if you click it you will be redirected to a google search on April Fools Mar 23 13:25:31 aha Mar 23 13:25:41 seems like a poor april fool Mar 23 13:25:53 on the other hand I don't think I've ever seen or heard of one that wasn't Mar 23 13:25:55 They are probably preparing for an April Fool's joke Mar 23 13:26:06 but then I'm a spoilsport Mar 23 13:26:29 I haven't looked at my app ratings in years Mar 23 13:26:30 :p Mar 23 13:26:33 funny it says 6 "planets" when there are shuttles^^ Mar 23 13:27:03 apparently I have the same Mar 23 13:28:11 I haven't looked at my app reviews in years because 98% of them are in russian and the google's translations are terrible :p Mar 23 13:28:18 I have no idea why there's so many russian users Mar 23 13:29:05 I want to mock out my network calls Mar 23 13:29:09 instead of going through the network, I want to use a response that I've saved to a file Mar 23 13:29:15 run the xml through the retrofit converters, then use the data in my tests Mar 23 13:29:20 mostly because it seems easier than having to instantite my model classes manually Mar 23 13:29:48 write an okhttp interceptor to do it Mar 23 13:29:49 ? Mar 23 13:30:01 what is your app for? maybe its popular in russia :P Mar 23 13:30:08 it's a music player Mar 23 13:30:42 Zharf: might work. Would you know of an example somewhere on github maybe? Mar 23 13:31:02 Hello Mar 23 13:31:11 https://github.com/square/okhttp/wiki/Interceptors Mar 23 13:31:30 I want to ask how can I force stop a intentservice from my activity Mar 23 13:34:25 RustyShackleford, application level interceptor should do, just build your Response and return it without calling Chain.proceed Mar 23 13:38:50 Zharf: this goes in my application code? Mar 23 13:38:56 yep Mar 23 13:38:58 or is this something I can do in the unit test project Mar 23 13:39:20 well, you just need some way to inject that in the interceptors list Mar 23 13:39:56 should be possible to write something that's only there in test builds Mar 23 13:41:20 also you need retrofit > 1.8 Mar 23 13:41:31 using 2.0 Mar 23 13:41:35 alright Mar 23 13:41:41 ahh crap I have to go to work Mar 23 13:41:47 :) Mar 23 13:41:48 I'll never get this side project done Mar 23 13:47:22 Zharf: http://pastebin.com/A1R8ttuF Mar 23 13:47:39 here's my service. I'm still failing to see how to use the interceptor Mar 23 13:47:54 I'm trying to write a class for setting values with SharedPreferences , but I can't reach "getSharedPreferences" without implementing it in an activity as it seems? What does my class have to extend/implement for this? Mar 23 13:49:18 RustyShackleford, write an interceptor like you have there but instead of chain.proceed(request), check what the request endpoint is and load data based on that and return a Response from it Mar 23 13:49:56 well what confuses me is that the return value is retrofit.create(TrainTrackerService.class) Mar 23 13:50:13 why does that confuse you? Mar 23 13:51:18 good question Mar 23 13:51:24 don't worry about that, you need to inject the interceptor in the OkHttpClient.Builder Mar 23 13:51:52 well I have a response recorded. I'm failing to see where I can inject the xml content of my recorded request Mar 23 13:52:03 er, response not request Mar 23 13:52:42 that's what the interceptor (that you need to write) would do :) Mar 23 13:54:51 this andoid studio installer isn't going to install any weird browser toolbars or "clean up" utils on my system is it? Because I'm just clicking through it Mar 23 13:56:37 @bernzel hi, what do you mean by new version? Mar 23 13:56:48 RustyShackleford, you could probably write some dummy interceptor (in a separate class, not inner class) that you can add to the interceptors list in the builder and then provide a mocking alternative for test flavour builds in gradle Mar 23 13:56:52 RustyShackleford, or something Mar 23 13:58:27 if i create a free app, and later i implement iap Mar 23 13:59:30 do i need to create another application and upload the updated apk or Mar 23 13:59:51 just upload a new apk on old free listing? Mar 23 14:00:07 rkb, you'd update your application with a version that has IAP implemented, yes Mar 23 14:00:50 thanks for the advice Zharf Mar 23 14:00:58 I have to go unfortunately. Have a good one Mar 23 14:01:03 is there any documentation from google, cause i need to present it to my team and boss Mar 23 14:01:32 RustyShackleford, later Mar 23 14:02:06 rkb, http://developer.android.com/google/play/billing/index.html Mar 23 14:02:54 i already presented that by the way Mar 23 14:03:07 rkb: read that link Zharf gave you thoroughly as it's important to do it right from the beginning, considering people are going to spend their own money Mar 23 14:03:27 is it in "Any application that you.." line Mar 23 14:04:07 ohh, noted Mar 23 14:06:12 Zharf: do you know of any examples where you build a custom Response? Mar 23 14:06:46 also will I need to write like a DebugTrainTrackerService? Mar 23 14:06:58 not seeing how I can inject the interceptor Mar 23 14:07:02 lol I said I was leaving Mar 23 14:07:52 Here's an example of what I'm trying to do: http://pastebin.com/F9hBjWdH but as I said, I can't reach that "getSharedPreferences" in this class. I suppose I need to extend some interface or something? Mar 23 14:09:00 RustyShackleford, let's talk when you have time again Mar 23 14:09:21 my hands kinda hurt so I don't really feel like typing right now -.- Mar 23 14:09:27 hah fair enough Mar 23 14:09:32 okay. going to work then Mar 23 14:09:36 Android is based in C# or something? That code snippet of Bernzel_'s looks to me like C# Mar 23 14:09:49 :E Mar 23 14:09:54 java Mar 23 14:10:52 Hello Mar 23 14:10:55 I want to ask how can I force stop a intentservice from my activity Mar 23 14:17:56 can I extend Application in order to build this class? Or what sort of affect does it have? Mar 23 14:19:09 Bernzel_, huh? Mar 23 14:19:39 Zharf: http://pastebin.com/5YrWYT92 like that Mar 23 14:20:21 I would then reference that class through out my application to set/get values Mar 23 14:21:39 read the java doc for that class :) its being explained Mar 23 14:22:20 Bernzel_, you need to set the classname in androidmanifest for it to be instantiated with the application itself Mar 23 14:23:24 rkb, http://developer.android.com/distribute/tools/launch-checklist.html#decide-price if you're looking for confirmation that you can sell stuff in free apps Mar 23 14:24:29 any reason for using clang++ over g++ for android dev? Mar 23 14:25:00 Zharf: yeah. But is it the right way to go at all, extending Application for a class who's only function is to set values for SharedPreferences. I'm just trying to have it organized and not setting hardcoded values along my Activites. Mar 23 14:25:08 puffybuf, not sure nowadays, clang came up with better error messages and some code analysisbut g++ might've caught up Mar 23 14:26:01 Bernzel_, if context is available where you're accessing it from then you could just write a simple helper class Mar 23 14:26:14 or possibly a singleton if you need state in it Mar 23 14:26:45 not everything that compiles on g++ compiles on clang++ Mar 23 14:26:56 arguably that's the fault of the author of said code, but... Mar 23 14:27:16 I have a SettingsUtil class that has some static setter methods for things and each method takes context as a parameter Mar 23 14:27:23 my program is quite complex opengl and uses some libraries, to my surprise it compiled with clang Mar 23 14:27:35 Zharf: this will be a daft question but, how do I know if Context is available? Mar 23 14:27:45 puffybuf I've never experienced it with code I'ver personally written, but it happens with 3rd party libs and code all the time Mar 23 14:28:47 OMG why give me an outdated version of the dev studio to download? Now I'm sitting waiting for updates to finish before I can do anything Mar 23 14:29:58 I'm using openal for sound, which had a problem compiling on clang but I patched it Mar 23 14:31:13 Bernzel_, sometimes you might want to call it from some place where getting a context would be ... inconvenient at least Mar 23 14:31:24 I personally don't like to throw around contexts everywhere :p Mar 23 14:32:18 I see, so just extending Application would cause less issues in the long run Mar 23 14:34:08 hi Zharf, thanks for your answer Mar 23 14:34:12 even with Application you'd need to use a static instance variable in the class to make it accessible without context Mar 23 14:34:29 i think that last link give a light Mar 23 14:35:07 rkb, http://developer.android.com/training/in-app-billing/preparing-iab-app.html also says "Depending on whether you are creating a new application or modifying an existing application, follow the instructions below to add the In-app Billing Library to your project." Mar 23 14:36:04 Bernzel_, using Application for it feels dirty though :p Mar 23 14:36:34 Application is easily bloated, I think... there's usually better places for things Mar 23 14:36:38 well, i think, my boss has a thinking that there is a free, paid, and in-app purchase app Mar 23 14:36:46 rkb, ah Mar 23 14:36:56 and need a definite answer, since this is our first app :D Mar 23 14:36:56 rkb, yeah the second link should clarify that Mar 23 14:37:32 the only thing you can't do with a free app, is turn it into a paid app Mar 23 14:38:09 oh, ok nice to know Mar 23 14:40:42 it's night here, i need to go home first Mar 23 14:40:44 bye Mar 23 14:40:57 Zharf: something like this then perhaps? http://stackoverflow.com/questions/19612993/writing-singleton-class-to-manage-android-sharedpreferences The accepted answer Mar 23 15:03:30 I watched some of the talks by Yigit Boyar from Google talking about how a messaging app should have two threads. One local execution for db entries, and another execution for doing the network requests. I do my network requests in a service, but how would I create a local execution to have db inserts? Mar 23 15:04:10 sorry, not two "threads", but it should be doing two forms of execution when "sending" messages, one task that writes locally, and another task that syncs up with the server. Mar 23 15:07:17 Bernzel_, that's pretty much what I do, yes Mar 23 15:07:56 splendid Zharf , I'll give it a go Mar 23 15:10:33 I guess my main question is... if I start a thread that has the sole purpose of doing database inserts, should I stop the thread when it's done working? or should I leave the thread open to accept work? Mar 23 15:11:49 if you expect more work to be done shortly, no point in rolling out a new thread, just sleep until there's more work to be done Mar 23 15:11:53 imo Mar 23 15:12:11 but that implies external life management Mar 23 15:12:36 if you don't want to, or can't, manage the thread life from outside the thread then it should stop when it's out of things to do Mar 23 15:14:15 Zharf: I want to make sure the inserts are done in order as well. Mar 23 15:14:34 eghdk, blockinqueue Mar 23 15:14:48 Is that a type of thread or something? Mar 23 15:16:04 it's just a queue that I like to use to give work orders for my working threads Mar 23 15:16:09 http://developer.android.com/reference/java/util/concurrent/BlockingQueue.html Mar 23 15:17:07 it'll be emptied in sequential order, no need to worry about things getting out of order Mar 23 15:17:33 or in the order that things were added of course Mar 23 15:17:54 the take() part is the part which allows the thread to sleep while there's no work to be done Mar 23 15:18:13 Okay. I'll look into it. My main issue is, that I think I want the thread to stay alive so I don't keep one for each insertion Zharf Mar 23 15:18:33 you should keep the insertions in one thread Mar 23 15:19:11 if you insert from multiple threads, you'll run the risk of doing things out of order Mar 23 15:19:59 I have a relative layout with the button at the bottom having alignparentbottom true and in the layout have a edittext and the bottom button is coming in top of it ? Mar 23 15:20:31 how to fix? Mar 23 15:26:47 rathodvikas10, depends, possibly change the whole layout into something else :) Mar 23 15:29:29 Zharf: Can I just keep the thread open? Mar 23 15:29:39 eghdk, yes Mar 23 15:30:07 So a thread starts, does its job, and dies. How do I keep it open? Mar 23 15:30:19 wait on something Mar 23 15:30:38 (like blockingqueue) Mar 23 15:31:26 while (isRunning) { Job job = jobQueue.take(); /* do job */ } Mar 23 15:31:28 or something Mar 23 15:32:50 hey guys. Im gonna to create a ListView like this http://prnt.sc/aiz0j4 . Can anyone give me some ideas? Mar 23 15:35:31 Oh Yay, volte finally enabled Mar 23 15:36:36 @Zharf Can you suggest any other alternative for this layout http://pastebin.com/wZaL2tM0 Mar 23 15:38:25 removed? Mar 23 15:44:52 Zharf: Gotcha. SO the Thread uses BlockQueue. Will give it a shot. Mar 23 15:45:17 eghdk, your views are declared in the wrong order? Mar 23 15:46:11 Also, LinearLayout would be better no? Mar 23 15:49:53 Hi. Is there a library that provides an Optional type, like the one in Java 8? Mar 23 15:50:08 guava, somewhat Mar 23 15:50:36 or if you want to go whole hog, scala Mar 23 15:50:47 pfn, guava's seems fine, thanks! Mar 23 15:59:59 Hi all. I searched SO but couldn't find an answer. Is it possible to detect whether the user has paid for an app that previously had a price? I.e. previously you had to pay for it but now you it's free. Mar 23 16:00:11 NoirAvlaa: What? Mar 23 16:00:16 I'm talking about threading Mar 23 16:00:39 Whoops Mar 23 16:00:42 Meant rathodvikas10 Mar 23 16:00:42 Haha Mar 23 16:00:43 Sorry :p Mar 23 16:02:17 Hey guys I have a question about a custom big content notification. Is it possible to make the height of the notification dynamic? I set the height of the outer layout to wrap_content but this seems to always end up being 256dp and leaves blank space in the middle of the notification. Mar 23 16:07:07 howdy Mar 23 16:07:26 OK - now I have a simple hello world type app : just a minimal blank app created by android studio, with an extra activity added where Activity A does startActivityForResult on Activity B Mar 23 16:07:37 Renarii, I'm rather certain that notification sizes are static Mar 23 16:07:39 Then B returns a result to A Mar 23 16:07:48 I've got a question Mar 23 16:07:57 Things work fine until I make A a “singleInstance” in the manifiest. Mar 23 16:07:59 Mavrik: alright, thanks. Mar 23 16:08:49 At that point, when A does startActivityForResult(B), I get an immediate result of RESULT_CANCELED in A. B does start, but it doesn’t return a result to A. Mar 23 16:09:38 I'm using the Android Emulator. It has an option to emulate mounting an SD card. Using DDMS I see that the path for that SD card is `/storage/1A05-3F1E`. How do I get that path in code? Mar 23 16:09:46 Hey is anyone here familiar with Retrofit? Mar 23 16:09:57 I've used Retrofit Mar 23 16:10:11 So it looks to me like startActivityForResult doesn’t work as expected with a singleInstance activity doing the starting, at least on my 4.4.2 tablet. Mar 23 16:10:25 I've fount my old lib has some core bugs and I need a little help replacing it Mar 23 16:10:57 I need to sunchronously get a result from an API call, but I can't seem to find a way to return it to a function running on the main thread Mar 23 16:11:17 I am familiar with the library named Retrofit Mar 23 16:11:20 The same .apk works as expected, even with the “caller” activity set to singleInstance, on my 5.1 device. Mar 23 16:11:26 dang :( Mar 23 16:11:53 I know I can run the .execute method of a call in an asynctask, but as that can't return anything it's no help Mar 23 16:12:53 If anyone can advise me as to how I fac return the response in from a function call in the main threat they would be doing me a uge favour Mar 23 16:13:35 My god that sentence was a train wreck, sorry :P Mar 23 16:14:34 Do you guys store iap purchases in local preferences or check for ownership everytime the app starts? Mar 23 16:14:59 In english: I need to call an api endpoint using Retrofit, and return the result to the calling function Mar 23 16:15:02 wtf. i just tried to import google's own map activity from the activity gallery and it autocrashes Mar 23 16:16:00 But doing a call.execute() crashes the app when run in the main thread; but that's where I need the result Mar 23 16:18:50 Is it possible to detect whether the user has paid for an app that previously had a price? I.e. previously you had to pay for it but now it's free. Mar 23 16:18:51 Gaffen: does it crash in onPostExecute? Mar 23 16:19:19 As in if I call the method asynchronously? Mar 23 16:20:47 yhes Mar 23 16:21:11 Nah it works fine Mar 23 16:21:12 doesn't execute() return an AsyncTask? Mar 23 16:21:36 no, it returns void Mar 23 16:22:02 It seems to be setup to return what the method expects in return Mar 23 16:22:21 is there a way to change the textcolor of an pagertabstrip programmatically? there is a setTextColor but if I use this methode in my onCreate it won't work.. Mar 23 16:22:21 So my interface has a method Call tokenRefresh Mar 23 16:22:42 .execute returns a Response object Mar 23 16:22:50 Well it doesn't Mar 23 16:23:02 it triggers a NetworkOnMainThreadException Mar 23 16:23:19 Nooooooooo Mar 23 16:23:21 :( Mar 23 16:25:04 hello Mar 23 16:27:55 is this the right place to get help for android dev? Mar 23 16:28:16 fireang3l: possibly... but you'd need to ask a question first Mar 23 16:28:22 +1 Mar 23 16:29:27 Generally on irc people won't get involved unless they genuinely think they can help Mar 23 16:29:52 Especially if they're working a day job simultaneously Mar 23 16:31:40 that makes sense Mar 23 16:31:56 fireang3l: also, you did read the channel topic, right? Mar 23 16:32:27 umm...im not to familiar with irc Mar 23 16:32:42 is the topic the banner at the top? Mar 23 16:32:56 yes, or use the "/topic" command to read it Mar 23 16:33:11 Gaffen, or to troll suckers Mar 23 16:33:17 lol Mar 23 16:34:02 theres not much mentioned in that topic lol.....all i see is "Android app dev" and no ads or job posting lol Mar 23 16:34:05 Dammit Buoy172; I thought you were my saviour Mar 23 16:34:14 YOU WERE THE CHOSEN ONE Mar 23 16:35:13 fireang3l: it would seem to answer your initial question... Mar 23 16:35:30 lol ok....i just wanted to confirm anyone was here at all :P Mar 23 16:35:43 * Gaffen waves Mar 23 16:36:26 so im new to android app dev actually, but im a java dev.....i was working on a keyboard app and was able to create a keyboard view Mar 23 16:36:29 in the meantime, I'm assuming that the Google recruiter who randomly emailed me earlier this week doesn't actually know where I live, since she suggested having a chat at 1am in my timezone... Mar 23 16:36:45 ^ lol Mar 23 16:37:09 the part im having issue is integrating an open source emoji view available on git with the keyboard i created Mar 23 16:37:42 Leeds: maybe they want to see how you adopt to it :D Mar 23 16:38:48 Leeds: if you will complain about it or be a bitch that will obey everything :P Mar 23 16:39:24 i know google should be my best friend in terms of find out how to do the integration....however as a newbie in android app dev, is there any specific tutorial i can look at to understand the basics? Mar 23 16:39:55 I think telling her where I do live, and suggesting that I'm not particularly interested in relocating, would probably put an end to the conversation pretty quickly anyway Mar 23 16:40:07 fireang3l: unfortunately, keyboard dev is a pretty niche thing Mar 23 16:40:34 what’s the issue you’re having? Mar 23 16:41:04 i figured it would be a niche thing lol....hence the reason im having trouble finding enough information to resolve the issue >_> Mar 23 16:41:12 Zharf, ad "but the solution in the last link looks good to me" http://bit.ly/1UGqIeV, It would be ok, but - it crash when emergin one of fragments http://pastebin.com/02Z1UYeZ Mar 23 16:42:58 s73v3r: im not sure how exactly i can integrate it into the keyboard view.....the git emoji can be using textview or editview and im not sure how to use those Mar 23 16:43:10 is using* Mar 23 16:43:59 maybe the disconnect for me is understanding how the different views can interact with one another Mar 23 16:44:57 i was able to create the keyboard without too many issues and alternate between the alpha/number/symbol layouts Mar 23 16:45:49 bolovanos, that's not the answer I was talking about Mar 23 16:46:31 http://stackoverflow.com/questions/30139548/how-to-add-toolbar-in-preferenceactivity this one Mar 23 16:49:57 Anyone else got any ideas on my Retrofit problem? Mar 23 16:50:03 Zharf, yes sry - I have shorten the wrong link - short link is composed of two last links I have posted before Mar 23 16:50:28 Zharf, this is implementation of what is on the last link ... https://github.com/sonavolob/ABIconTest/blob/master/app/src/main/java/com/example/abicontest/SettingsActivity.java Mar 23 16:50:53 https://github.com/sonavolob/ABIconTest/blob/master/app/src/main/res/layout/activity_settings.xml Mar 23 16:51:55 I am trying to connect GeneralPreferenceFragment with R.layout.activity_settings Mar 23 16:52:24 but it crashes inside FragmentManager Mar 23 16:52:38 Hmm, I guess I just have to change all my synchronous calls to asynchronous :'( Mar 23 16:57:29 I would like to have a background service that is running continuously (whether the main Activity is running or not) to receive various callbacks from various places. I don't do any kind of heavy work in it, so I don't need it to be in a separate thread. Any suggestions on what kind of design pattern would be appropriate here? Mar 23 16:58:05 Right now I'm using a BroadcastReceiver, but that gets re-created everytime it gets called, so I can't register it as observer-object with some of the pure-java libraries I'm using Mar 23 17:00:03 I just had an idea for a unique keyboard design, one which when orientation is horizontal, the keyboard is split with vowels on the right hand side of the screen and constanents on the left Mar 23 17:00:12 That is an idea Mar 23 17:00:22 which when I think about it, probably would look pretty weird :D Mar 23 17:00:31 wouldn’t one thumb be doing most of the work, then? Mar 23 17:00:35 Yes Mar 23 17:00:41 but it's unique Mar 23 17:00:55 One thumb does most of the work when you play games with a controller Mar 23 17:01:16 Of course you could split it different ways Mar 23 17:01:36 but I thought it'd be unique to do constanents on one side vowels on the other (and maybe commonly used emojiis) Mar 23 17:02:16 I don't think I've ever seen it done before but something like that could work on phones with big screens Mar 23 17:02:25 might be worth whipping up a quick POC, but it might get some time getting used to Mar 23 17:02:37 POC? Mar 23 17:03:13 It'd take some time to get used to, much like flesky the one where you swiped to make a space Mar 23 17:03:17 proof of concept i'm assuming Mar 23 17:03:20 I see Mar 23 17:03:37 fireang3l: Make it happen! Mar 23 17:04:35 anyone know if a FileProvide is required to share files? Mar 23 17:05:53 lolll guys Mar 23 17:06:00 yeah i dont think that would work well Mar 23 17:06:29 unless swype was included along with that keyboard....then it would be loved Mar 23 17:06:49 but its a good idea Mar 23 17:07:12 if you guys can help me with the question i had.....then maybe i can implement your idea :) Mar 23 17:11:11 bolovanos, apparently preferenceactivity layout is more complicated than that nowadays... Mar 23 17:13:44 Is it possible to detect whether the user has paid for an app that previously had a price? I.e. previously you had to pay for it but now it's free. Mar 23 17:17:07 interesting read https://joreteg.com/blog/why-i-switched-to-android Mar 23 17:17:08 bolovanos, http://stackoverflow.com/a/27455330/857853 seems to have a lot of research gone into it Mar 23 17:17:11 :p Mar 23 17:17:14 it's a bit hacky though Mar 23 17:18:18 should i assume that i need to do more research before i ask you guys a question? :/ Mar 23 17:18:44 g00s, meh, dude is just another web developer Mar 23 17:18:55 chrome is really awesome on android for web apps, though Mar 23 17:19:33 fireang3l, doing at least some level of research on your own only helps you get better ;) Mar 23 17:19:43 fireang3l, did you ask a question though? I may have missed it Mar 23 17:23:12 Zharf, thanks for link - I do understand how G can release something (Toolbar) which is not simply "compatible" with other parts (PreferenceActivity). Mar 23 17:25:02 there's plenty of incompatibilities around :) Mar 23 17:25:57 but as I said earlier, I've never used preferenceactivity for anything.. Mar 23 17:26:22 I looked at it a few years ago for a little bit but thought that it was a bit too restrictive somehow Mar 23 17:27:33 zharf: i did ask a question....i did do some research but the more i read about how android dev works the more confused im getting Mar 23 17:27:41 lol Mar 23 17:27:46 Is there a way to simulate incoming SMS? Mar 23 17:28:14 casadogg, in an emulator I guess Mar 23 17:28:17 Zharf, which means you have build your own preferences Mar 23 17:28:30 Zharf not possible in a real device? Mar 23 17:28:38 bolovanos, yep Mar 23 17:28:55 casadogg, I don't think so, unless it's in some vendor developer mode Mar 23 17:29:05 exit Mar 23 17:29:16 fireang3l, what are you confused about Mar 23 17:36:53 bolovanos, of course it's compatible, what are you talking about Mar 23 17:37:29 bolovanos, if you're talking about appcompat, there is a preference compat lib Mar 23 17:40:16 pfn, it was in quotes, by that I mean that using new Preferences (for example from Android studio template Setting template) you will have to implement Toolbar in that template because nobody because that template is using ActionBar instead Mar 23 17:40:51 I don't use templates, wouldn't know Mar 23 17:41:21 pfn, which means you have to find solution which will show Toolbar in PreferenceFragment - http://stackoverflow.com/questions/26564400/creating-a-preference-screen-with-support-v21-toolbar/27455330#27455330 Mar 23 17:41:46 which seems to be not that straight forward Mar 23 17:42:26 not hard, but ok Mar 23 17:45:04 pfn, "not hard, but ok" - we know that statement is relative... Can you point me to some solution which can be okeily reimplemented to this example? https://github.com/sonavolob/ABIconTest Mar 23 17:45:47 I'm not going to read that repo Mar 23 17:46:40 and for that matter, you just Mar 23 17:46:46 how is that difficult? Mar 23 17:47:12 you want to embed it in preference fragment? inflate preference fragment as a child Mar 23 17:47:21 it shouldn't be embedded within preference fragment Mar 23 17:47:55 where do you guys store your android app certificates? Mar 23 17:48:48 i don't want to check the certificate into git (seems like a bad idea) but i'm afraid of forgetting where I put it if i stick the certificate in S3 Mar 23 17:49:17 is there a google service for holding credentials (kinda like IAM in aws)? Mar 23 17:49:49 zharf: how i can integrate different views Mar 23 17:50:08 pfn, "" I must stick it together with what I have now Mar 23 17:50:58 kommunicate: a debug certificate or your real signing cert for release deployment? Mar 23 17:51:01 pfn, "it shouldn't be embedded within preference fragment" - are you sure that it is embed in "my" aproach? https://github.com/sonavolob/ABIconTest/blob/master/app/src/main/java/com/example/abicontest/SettingsActivity.java Mar 23 17:51:22 dunno, I'm not reading your blob of code Mar 23 17:51:29 I'm going by how you're describing what you're trying to do Mar 23 17:51:40 I definitely wouldn’t check the release cert in, but for a debug cert that can be convenient. Release certs I only store on build machines plus a backup in a safe location (not a cloud service) Mar 23 17:51:42 duboisj: both Mar 23 17:52:31 The debug certs, if you never release under them and make it clear they’re for debug (when I generated mine I put ‘Debug’ in the org name etc.) I think are probably safe. I can’t think of a realistic danger, anyway. So having them in git seems fine. Mar 23 17:52:51 I use my release keys so rarely that I always forget where I put them ;) Mar 23 17:52:55 hm.. i'm a bit afraid of _not_ using a cloud service to store the release cert, but I was hoping there'd be something tailored for this kind of application Mar 23 17:53:19 Zharf: exactly! Mar 23 17:53:39 I always find it though, not that big of a problem for me Mar 23 17:54:00 I guess whatever you do with the rest of your backups. Personally I wouldn’t use a third-party service for it, but if that’s your safest place. Sorry, though … I don’t know of a service. Maybe others do. Mar 23 17:54:45 i'm just thinking of making an encrypted s3 bucket and tossing it on there Mar 23 17:55:16 kommunicate, I had this idea of turning the release key into base64 and then making a qr code of it, printing it and storing it in a bank deposit box Mar 23 17:55:51 (as a backup Mar 23 17:55:52 ) Mar 23 17:56:07 but I never got around to actually doing that Mar 23 17:56:26 hah! I love the idea of turning it into a QR code. You could make it 40 ft tall and paste it over time sq and odds are that nobody would ever even notice Mar 23 17:56:41 :) Mar 23 17:56:47 http://picturesofpeoplescanningqrcodes.tumblr.com/ Mar 23 17:57:26 is there anything wrong with using one page for your android app\ Mar 23 17:57:44 ? Mar 23 17:57:49 guideX: you mean 1 activity? Mar 23 17:58:01 SPA/SAA Mar 23 18:00:08 Guys...where can I get a original Samsung Micro USB Cable (5 Feet length) with 8mm tip ? I searched eBay, Amazon etc... but still nothing!!! Mar 23 18:06:03 pfn, in different words - I think I am inflating Toolbar from PreferenceActivity. Opening fragment ends with "E/FragmentManager: No view found for id 0x1020356 (android:id/prefs) for fragment GeneralPreferenceFragment{645ed55 #0 id=0x1020356}" Mar 23 18:06:16 http://pastebin.com/02Z1UYeZ Mar 23 18:06:57 bolovanos, that's because you replaced the content Mar 23 18:08:02 you need to have id/prefs in your layout for preferenceactivity to load preferences into Mar 23 18:09:14 kommunicate: yes just one activity Mar 23 18:12:07 pfn, honestly I really appreciate your trying but your answers are so minimalist that it does not meet level of my knowledge :/ Mar 23 18:12:48 guideX: the biggest reason you wouldn't want to do that is that if your activity got killed / went out of focus you wouldn't be able to (easily) restore state Mar 23 18:13:22 bolovanos: post the layout associated with where the crash is happening Mar 23 18:13:27 pfn, are you suggesting to use different aproach than that https://github.com/sonavolob/ABIconTest/blob/master/app/src/main/res/layout/activity_settings.xml ? Mar 23 18:13:53 s73v3r, here is the java code https://github.com/sonavolob/ABIconTest/blob/master/app/src/main/java/com/example/abicontest/SettingsActivity.java Mar 23 18:13:55 anyone know what prevents a long press on the power button from triggering shutdown when the screen is asleep? Mar 23 18:13:57 you'll also turn your app into one big blob and the UI will be harder to manage. Lastly, if you do want to break it up into subcomponents, you'll need to use fragments everywhere, then turn your activity into one super fragment manager Mar 23 18:13:59 your issue is that something is looking for a view with an id of prefs, but not finding it Mar 23 18:14:02 bolovanos, you don't have @android:id/prefs as required by AppCompatPreferenceActivity Mar 23 18:14:07 s73v3r, here is layout with Toolbar I am trying to use https://github.com/sonavolob/ABIconTest/blob/master/app/src/main/java/com/example/abicontest/SettingsActivity.java Mar 23 18:14:14 bolovanos, the error says that Mar 23 18:14:59 bolovanos: Look in the code for AppCompatPreferenceActivity Mar 23 18:15:00 pfn, yes, but only in PreferenceFragment Mar 23 18:15:27 kommunicate: well I kind of assume it's like the web, and everything is lost when the app is closed Mar 23 18:15:37 so everything I want to get, I must do it myself Mar 23 18:15:44 not necessarily Mar 23 18:15:49 don’t approach it like the web Mar 23 18:15:55 bolovanos, saywhat Mar 23 18:16:09 bolovanos, error already told you what's missing, you refuse to add it Mar 23 18:16:09 ah ok, so it's more like the desktop Mar 23 18:16:16 i'll try to force that into my head Mar 23 18:16:19 s73v3r, what do you mean - this https://github.com/sonavolob/ABIconTest/blob/master/app/src/main/java/com/example/abicontest/AppCompatPreferenceActivity.java ? Mar 23 18:16:30 thus far i've been treating it exactly like web Mar 23 18:16:38 actually like mvc web Mar 23 18:16:43 bolovanos: Your error message says that it’s looking for a view with a certain ID, and it’s not finding it Mar 23 18:16:46 that’s your problem Mar 23 18:16:53 pfn, maybe there is a problem I am aware of, but I do not know how to do that Mar 23 18:17:04 guideX: it's more like a webapp with many entry points (activities), but, just because devices have limited resources, you might find your site kicked out of memory or having limited connectivity to the internet Mar 23 18:17:15 bolovanos, what's not to know, the system is looking for @android/id:prefs, you don't provide it Mar 23 18:17:19 PROVIDE IT Mar 23 18:17:43 bolovanos, you have a in your preference activity, why, think Mar 23 18:18:45 guideX: you have to deal with the activity lifecycle, and normal mvc webapps don't have that Mar 23 18:19:02 oh hrm Mar 23 18:19:35 imo, the mvp pattern gets used as an alternative to plain vanilla mvc because it's better at handling lifecycle events than mvc Mar 23 18:19:37 I was assuming I have one thing for state, memory.. and I either have it or not.. then everything else is in the database.. each call is done to a webservice Mar 23 18:20:04 the ui is changed during the login a bit, then you're looking at logged in stuff Mar 23 18:20:17 depends on your app: do you need to have high availability? If so you can't rely on connectivity Mar 23 18:21:39 someday I should look at what mvp is... Mar 23 18:21:42 if I use setInexactRepeating() on an AlarmManager every time my app loads does it create multiple instances of that alarm or does it set only one? Mar 23 18:21:55 no, I want them to login all the time.. maybe I want to cache the login somehow on the device Mar 23 18:21:57 mvp architecture? Mar 23 18:22:00 that's about it.. Mar 23 18:22:13 I feel like it's a webapp, but I'll try to stop thinking of it like that :P Mar 23 18:23:01 i'm writing something that does what you're describing (not finished yet though) Mar 23 18:24:28 i have a sign in activity that creates new users remotely and sets you up locally, then after you're logged in you can go to any of the other activities Mar 23 18:24:53 s73v3r, afraid of asking, but do you know how to provide that view when "getActivity().setContentView(R.layout.activity_settings);" does work? Mar 23 18:25:12 the other activities extend some base activity to get your user credentials locally. Then, periodically, it'll check you're set up properly remotely. Mar 23 18:26:37 bolovanos: You need to have something with that id in your layout Mar 23 18:28:03 pfn, Why - maybe this is a reason - "PreferenceActivity extends ListActivity, and when you inflate the preferences from xml with addPreferencesFromResource(), it puts the stuff into the standard ListView that ListActivity uses." Mar 23 18:29:27 bolovanos, AppCompatPreferenceActivity is not PreferenceActivity Mar 23 18:29:35 son of a bitch. the developer.android.com site is trying to give me the chinese version Mar 23 18:29:39 bolovanos, my answers are intended to make you think, not answer for you Mar 23 18:29:55 I will almost never give a direct answer Mar 23 18:29:59 pfn, app compat extends PreferenceActivity Mar 23 18:30:07 s73v3r: dns error? Mar 23 18:30:08 in my case Mar 23 18:30:14 no clue Mar 23 18:30:17 thanks for helping out guys.....ill just continue my research Mar 23 18:31:18 bolovanos, huh? no it doesn't Mar 23 18:31:21 pfn, ok I understand that it wont be for free :), keep with my slowness Mar 23 18:31:51 pfn: he has an AppCompatPreferenceActivity which extends PreferenceActivity Mar 23 18:32:00 pfn, yes it does - at least in my case - cannot past the code because you would not look at it Mar 23 18:32:13 cannot == will not Mar 23 18:32:14 then it's not an AppCompat activity Mar 23 18:32:35 don't call it that Mar 23 18:32:57 and don't extend PreferenceActivity, use preference-v7 and preference-v14 Mar 23 18:33:01 I am calling it the way G named it Mar 23 18:33:13 G named nothing AppCompatPreferenceActivity Mar 23 18:33:27 come on Mar 23 18:33:36 and any activity you derive from PreferenceActivity cannot be AppCompat Mar 23 18:33:46 unless you're going through all the AppCompatDelegate nonsense Mar 23 18:34:03 also, it will not work on v7-v14 if your goal is to support those versions Mar 23 18:34:13 https://chromium.googlesource.com/android_tools/+/7200281446186c7192cb02f54dc2b38e02d705e5/sdk/extras/android/support/samples/Support7Demos/src/com/example/android/supportv7/app/AppCompatPreferenceActivity.java Mar 23 18:34:17 well, v7-v10, but whatever Mar 23 18:34:50 If you were about to look in concrete example I am talking about, you would know that I am supporting 15+ Mar 23 18:35:06 are you using AppCompatDelegate? Mar 23 18:35:14 yes Mar 23 18:35:18 yuck, ok Mar 23 18:35:20 through that posted code Mar 23 18:38:26 btw - another reference I have given before - http://stackoverflow.com/questions/26564400/creating-a-preference-screen-with-support-v21-toolbar/27455330#27455330 - on of offered solution is using that AppCompatPreferenceActivity from Google (which means AppCompatDelegate... Mar 23 18:38:33 so what exactly is the problem Mar 23 18:38:50 on == one Mar 23 18:39:06 too much pasting, not enough explaining of what you're doing and trying to accomplish Mar 23 18:39:45 I have described my problem before - by words supported with screens, references to my code, and other solutions Mar 23 18:39:54 trying to accomplish same result Mar 23 18:40:19 I can repaste it if wish Mar 23 18:40:50 if you wish Mar 23 18:40:55 just because you’ve said it before doesn’t mean we remember it or saw it Mar 23 18:41:00 this isn’t slack Mar 23 18:41:31 s73v3r are you on slack for android ? Mar 23 18:41:39 nop Mar 23 18:42:21 I have scrollback, but I'm not going to Mar 23 18:42:42 make an actual effort of explaining instead of pasting shittons of links Mar 23 18:42:49 preference fragment is not hard, can't imagine what all the issue is Mar 23 18:43:07 he's going some roundabout way to make PreferenceActivity behave like AppCompat Mar 23 18:43:08 s73v3r, I do not say that, but I do not want to flood channel with repeated text, if there is no intention to read it... Mar 23 18:43:09 s> hithere Mar 23 18:43:09 I would like to achieve visible title on smaller display within settings. Something similar to what can be seen on larger display http://snag.gy/X0QXs.jpg (red circle). On smaller display it looks like this http://snag.gy/yqJKt.jpg (user can easily loose context). Mar 23 18:43:09 Way the settings are integrated can be seen here https://github.com/sonavolob/ABIconTest . This problem appeared adding Toolbar instead of old ActionBar. Mar 23 18:43:11 Iam still searching for solution (as it seems to be, I not the only one with such problem). Unluckily none of them work for me. Among those found solutions were http://stackoverflow.com/questions/6831325/custom-title-of-preferenceactivity-problem , http://stackoverflow.com/questions/4921825/set-custom-title-bar-in-preferenceacivity/18191443#18191443 http://stackoverflow.com/questions/30139548/how-to-add-toolbar-in-preferenceactivity Mar 23 18:43:27 well, the Compat one IS kinda pain in the ass, and doesn't behave like the normal one i guess Mar 23 18:43:27 you haven't described your problem Mar 23 18:44:08 oh, you don't have a title on your small screen Mar 23 18:44:11 add one... Mar 23 18:44:49 you don't have a toolbar in your tablet layout either... Mar 23 18:45:53 bolovanos but isn;t that the default behavior .. Mar 23 18:46:01 it may be weird, but its weird for everyone i giess Mar 23 18:46:13 I would love to add one, there is still one questin. How? Yes there is no Toolbar in tablet, but there is header on side which is ok with me Mar 23 18:46:36 g00s, what do you mean? Default behaviour for what? Mar 23 18:46:46 the missing label on mobile Mar 23 18:47:13 i would think the preference framework handles all of that. if you have the screen a name, and it doesn't show then meh Mar 23 18:47:17 oh that problem wasnt there with ActionBar, because title / context was positioned there Mar 23 18:47:43 add one to your layout... Mar 23 18:47:51 i'm having alot of trouble with the recylcerview Mar 23 18:48:02 g00s, yes it seems to me, that Preference framework is responsible for the part in the red cyrcle Mar 23 18:48:03 circle Mar 23 18:48:07 is there a page with a simple example? I see lots of abstract thinking, not alot of how it works Mar 23 18:50:15 g00s, but that same PreferenceActivity framework does not handle what is going on in PreferenceFragment Mar 23 18:50:35 i wouldn't worry about it then :D Mar 23 18:50:39 it is what it is Mar 23 18:53:32 pfn, thank you for your effort to tell me that I may add something I need to add and overlooking fact that I am trying to find out how to do that... Mar 23 18:53:54 if i have an arraylist with a number of items in it, and i pop the last two items, will that change the length property? Mar 23 18:53:56 g00s, you would not worry about it because it the way it is, or why? :) Mar 23 18:59:54 hi Mar 23 19:00:18 i am looking for the Android SDK on Debian jessie - is there a packaged version? or are there licensing restrictions that keep that from being shipped with debian? Mar 23 19:02:08 android sdk comes from google Mar 23 19:02:11 nowhere else Mar 23 19:02:22 anarcat yes there are licensing issues ;) Mar 23 19:02:35 i believe at some point you could do an apt-get for the android sdk Mar 23 19:03:00 crap Mar 23 19:03:02 okay thanks Mar 23 19:03:21 that's really too bad, so the Android SDK really isn't free software anymore :/ Mar 23 19:03:48 specifically, you must agree to the " 'you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK'" part Mar 23 19:03:50 no, that statement is horseshit Mar 23 19:04:08 yeah pretty sure there are third party repos on most distros Mar 23 19:04:14 I know I can yaourt it Mar 23 19:04:47 "yaourt it"? Mar 23 19:05:53 anarcat: https://aur.archlinux.org/packages/android-sdk/ Mar 23 19:06:03 not that it helps you since you are on debian Mar 23 19:06:25 missingno: i have found this: https://packages.debian.org/jessie/google-android-build-tools-installer Mar 23 19:06:27 but it's i386 only Mar 23 19:06:35 just download it from google Mar 23 19:06:41 ^ Mar 23 19:07:05 yeah Mar 23 19:07:34 you fire up AS and it install it from Google for you Mar 23 19:08:55 so anyone know of a simple way to do the recyclerview without alot of abstract concepts? Mar 23 19:09:01 I don't really understand them all yet Mar 23 19:09:07 no Mar 23 19:09:13 I see alot of examples, but they're kind of abstract Mar 23 19:09:30 missingno: AS? Mar 23 19:09:35 guideX, start with listview Mar 23 19:09:44 guideX, understand adapters first, then moving to recyclerview is easy Mar 23 19:10:02 the enforced viewholder thing is a little weird, which is the only abstraction that's a little weird Mar 23 19:10:09 hrm ok Mar 23 19:10:11 everything else is typical