**** BEGIN LOGGING AT Sun Jul 13 02:59:59 2014 Jul 13 03:03:08 Still having test problems -- Got it to recognize my test class, but the simplest one of all (no setUp, no tests) on ActivityInstrumentationTestCase2 won't compile -- complaining about getActivity() clashing from android.test.ActivityTest Jul 13 03:04:02 Gah... nevermind. Jul 13 03:41:22 is there a way to force my phone to use the old style usb mass storage? Jul 13 04:41:25 no Jul 13 04:41:50 an hour late... Jul 13 04:48:07 :( Jul 13 04:56:39 plug in an external sdcard if you want that Jul 13 04:57:02 I think external cards might allow the old ums mode Jul 13 04:57:38 Hello… i need some help with an idea i was working on… If you have some text displayed on ur android screen.. for example a webpage.. once loaded, i want to shift the content of the screen based on phone motion alone.. i.e. if the phone moves right, the content moves left so the reader can read whats on right of the current content of the display Jul 13 04:58:11 something in the effct of moving ur magnifying glass over some news paper and reading whats under ur glass.. Jul 13 04:59:04 i want to know what to read/understand to be able to get hold of the content of the screen for any app Jul 13 04:59:13 hope i am making some sense :) Jul 13 04:59:28 pbhagav: have you heard of the equivalence principle? Jul 13 05:00:19 not but looking it up now.. Jul 13 05:00:22 you can say the newspaper is moving or the magnifying glass is moving, both are correct. Jul 13 05:00:42 meaning, you can just make a "magnifying glass" ie a zoomed viewport, and use it to do what you want Jul 13 05:00:51 hook it into the accelerometer if you want Jul 13 05:01:05 its a cool idea, just make sure you do it before someone else does ;p Jul 13 05:02:32 ok i get what u meant by equivalence principle.. my other question.. how can i change display of any app displaying text on the screen? Jul 13 05:02:46 you can't Jul 13 05:02:50 you want to make an input method Jul 13 05:03:02 but you can't do what you want in the framework Jul 13 05:03:16 err what i mean is, that idea has to be applied to each reader, Jul 13 05:03:34 yes thts wht i was asking.. Jul 13 05:03:36 thanks.. Jul 13 05:03:37 so unless you make an app browsing for all data types, you can't hook it into other apps Jul 13 05:03:47 ok.. Jul 13 05:03:54 you could make an android library project, get some rep Jul 13 05:04:21 another question.. quite related to this .. Jul 13 05:04:29 http://www.ruf.rice.edu/~mobile/publications/rahmati09percom.pdf Jul 13 05:04:38 this paper talks about noshake.. Jul 13 05:04:56 as in stablizing content on the screen while the phone is say vibrating... Jul 13 05:05:22 you just have to apply a low pass filter to your input method Jul 13 05:05:28 i understand the physics and stuff in there…. Jul 13 05:05:51 i am trying to know how to get hold of whats on screen (pixels say) and move each pixel by an offset Jul 13 05:05:55 its a little overkill, a simple low pass filter would probably suffice Jul 13 05:06:15 you could do that on rooted phones by dumping the frame buffer (the pixels) Jul 13 05:06:30 ok.. framebufffer.. i'll look that up.. Jul 13 05:06:32 actually, not totaly sure that's possible, but you're making an app that isn't not generally usable Jul 13 05:06:46 frame buffer -> memory set of pixels on the screen, Jul 13 05:07:16 ok.. Jul 13 05:07:21 brb afk Jul 13 05:07:34 thanks i think this should get me rolling :) Jul 13 05:07:48 i'll try and see what i can do with framebuffer.. Jul 13 09:32:53 Hi, after applying a custom style to my action bar, the app icon in the top left no longer appears. Does anyone know why this may be? Jul 13 09:37:18 If i want to start a background thread on app startup, where do I start it? In onCreate in the main activity? Jul 13 09:40:47 do you want a Service? Jul 13 09:41:25 prinsen, what do you want this thread for? Jul 13 09:42:24 Leeds: My first app, so behind on the terms. The thread polls GPS data and sends it to a server Jul 13 09:44:31 so now would be a good chance to spend some more time with the tutorial docs Jul 13 09:45:03 trying to cut corners here! Jul 13 09:45:09 don't Jul 13 09:58:09 Leeds: So an IntentService? Jul 13 09:58:56 If you actually read the doc Jul 13 09:59:12 you would see that IntentService is totally unsuited for what you're trying to do -_- Jul 13 10:11:37 What do you use most for creating background thread? Java thread / Runnable, AsyncTask, what? Jul 13 10:11:56 <_3mpty> depends for what Jul 13 10:12:15 http request Jul 13 10:12:21 <_3mpty> volley Jul 13 10:12:23 <_3mpty> :P Jul 13 10:12:29 <_3mpty> or async Jul 13 10:12:51 async = asynctask? Jul 13 10:13:04 gdrc, Retrofit Jul 13 10:13:13 or ThreadPoolExecutor if doing it manually Jul 13 10:14:50 <_3mpty> gdrc: asynctask yea but still depends for what case are u using it Jul 13 10:25:49 hi all, what is the best way to fake a call (incoming, outgoing) for testing purposes from java code? I can always run adb commands but I thought that there might be a better way for doing that... Jul 13 10:30:08 adb commands Jul 13 10:45:15 If i want to send a Runnable to an IntentService, how do I implement Parcelable? Is it possible? Jul 13 10:46:34 prinsen, did you read what Mavrik wrote? Jul 13 10:47:00 <[twisti]> prinsen: yes, of course its possible to implement interfaces. you do it by writing "class ClassName implements x", where x is the name of the interface or interfaces Jul 13 10:47:26 <[twisti]> so to implement Parcelable, you write "class MyClass implements Parcelable" Jul 13 10:47:51 <[twisti]> and if you also want to implement Runnable, you separate them by comma, like so: "class MyClass implements Parcelable, Runnable" Jul 13 10:49:34 [twisti]: I know oop, just not the android way of doing things Jul 13 10:49:51 <[twisti]> implementing interfaces in android is no different than in 'normal' java Jul 13 10:50:50 [twisti]: duh but the to send an arbitrary class that implemets Runnable you need an generic Parcelable instance, which you cant write Jul 13 10:51:19 why would you use an IntentService for GPS logging, anyway? Jul 13 10:51:37 <[twisti]> why would you need a generic parcelable instance instead of just implementing it ? Jul 13 10:51:59 <[twisti]> what would that even be Jul 13 10:52:03 [twisti]: Because I need to send it arbitrary Runnable objects Jul 13 10:52:22 <[twisti]> well you cant Jul 13 10:52:33 Leeds: My original question was how to run longlasting background threads Jul 13 10:52:43 <[twisti]> if they are serializable you could just send them as a field Jul 13 10:52:49 I came up with IntentService from the docs but it was wrong Jul 13 10:52:52 no it wasn't - it was how to start a thread when your app starts Jul 13 10:53:25 [twisti]: A generic runnable object isn't serializable, you would need something like Haskells Hint Jul 13 10:53:41 Leeds: Well yes Jul 13 10:53:44 <[twisti]> thats why i said 'you cant' Jul 13 10:53:58 I read a lot about the monitoring tools, and I was wondering if there is a way to specify a treshold (for memory for example), and it'll fail the test if it goes beyond it. Any idea how to do it? Jul 13 10:54:03 <[twisti]> you need to be able to serialize the parcel contents, and if you cant do that, then YOU CANT DO THAT Jul 13 10:54:22 Im sure you are all right, just trying to find the right way to do it, reading about AsyncTask atm Jul 13 10:55:46 Seem unsuitable too, maybe just start the Thread from the onCreate in MainActivity the first time it runs Jul 13 11:27:41 how many layout files do you guys make for phone vs tablet? Jul 13 11:27:53 just two? or more corresponding to each major increment in size? Jul 13 11:28:20 depends. Jul 13 11:28:34 usually we test on phone / 7" tablet / 10" tablet Jul 13 11:28:59 and then decide - alot of layouts are ok for phones and 7" tablets (e.g. mostly portrait layouts) when they aren't for 10" Jul 13 11:29:36 yeah i'm just doing portrait Jul 13 11:30:02 but it looks weird on tablets, so i guess i'll have to make a layout-hdpi folder? Jul 13 11:31:32 KaylieG, hm Jul 13 11:31:33 no Jul 13 11:31:38 dpi isn't the same as size. Jul 13 11:32:27 you did read this right: http://developer.android.com/guide/practices/screens_support.html :) Jul 13 11:32:35 true, but i assumed i'd need to do it by pixel density because right now the only problem between the two layouts for me is the size of the imageview Jul 13 11:32:46 i have set it to about a 100dp Jul 13 11:32:54 which is fine for most phones under 5 Jul 13 11:32:57 inches Jul 13 11:36:40 KaylieG, well the issue you have is that you have mdpi, hdpi, xhdpi phones that are 4" and mdpi, hdpi, xhdpi + tablets that are 10" :) Jul 13 11:37:16 I'm really missing css percentage styling right now Jul 13 11:40:57 basically i have an image button, that is displayed predominantly in the center of my activity, to be clicked. any recommendations as to what I should do? Jul 13 11:41:53 the image is 256x256 pixels, and I setting width and height to 100dp works well on phones of about 4 inches Jul 13 11:42:03 9patch. Jul 13 11:42:10 or use different sizes Jul 13 11:48:39 alright Jul 13 11:49:23 is it possible to restrict apps to phone? Jul 13 11:50:26 or is it a really bad idea to say no to tablets? Jul 13 11:51:03 because i can't really afford to get a tablet to develop, and my POS machine can't run emulators properly, and really I haven't optimized the app for tablets anyway Jul 13 11:51:18 is it possible to just skip it completely? or is it basically app suicide? Jul 13 11:52:44 if there a reason you're not using x86 emulators for tablets? Jul 13 11:52:56 it Jul 13 11:53:05 *is Jul 13 12:13:20 suppose I have a FrameLayout that holds a SurfaceView which shows a camera preview Jul 13 12:13:38 should I expect an overriden onDraw in said FrameLayout to work? Jul 13 12:15:31 um Jul 13 12:15:37 don't really understand the question Jul 13 12:15:48 but if you mean what I think you mean... you don't have to override anything Jul 13 12:21:17 Mavrik I want to draw an overlay on top of a SurfaceView Jul 13 12:24:04 riiight :( Jul 13 12:24:06 :) Jul 13 12:24:35 MohammadAG, if SurfaceView is IN the FrameLayout then, of course, anything you draw on the FrameLayout won't be visible Jul 13 12:24:51 also, remember, SurfaceView can only be in front of everything or behind everything. Jul 13 12:25:07 Mavrik ah, so I should overlay a View on top of the SurfaceView then Jul 13 12:27:24 yes. Jul 13 12:27:28 if you want to drav over it :) Jul 13 12:31:44 Mavrik thanks, that worked fine Jul 13 12:44:49 Hey guys I'm running into issues with my native app... Jul 13 12:45:15 it used to work fine, I'm building with the new SDK now and the app starts and then loses focus right away, when you come back to it I get a black window. See logcat: https://gist.github.com/jerstlouis/894c28294584ebee1a56 Jul 13 12:48:07 it's kicking the app out or something? Jul 13 12:51:32 The old build of my apps still work fine... Jul 13 12:52:48 Hmm, possibly the Native API has been updated :P Jul 13 12:56:54 AppComands values changed? :S Jul 13 12:57:33 What is the proper way to get the shared_prefs dir? As of now I have tried 'String sharedPrefsDir = getApplicationContext().getFilesDir().getParent() + "/shared_prefs/";'. Will this be safe for working on all devices? Jul 13 12:58:34 I think there was an api to get that Jul 13 13:03:39 nope,can't find it Jul 13 13:07:38 yeah... I've been searching around Jul 13 13:07:45 There should be one... Jul 13 13:08:18 Since it's not adviced to hard code paths there should be some proper and universal way to get the dir? Jul 13 13:08:59 I'd say it's not /advised/ to access that directory at all. Jul 13 13:09:03 Either that or I am missing something basic and it's not needed to get that path for saving shared_prefs files under normal conditions and I'm doing it wrong Jul 13 13:09:07 By hand, at least. Jul 13 13:11:18 As of now before trying to find the non hard coded way I have used: "File markerFile = new File("/data/data/org.something.app/shared_prefs/" + entry.getKey() + ".xml"); Jul 13 13:11:46 Is there a way that's better where you don't have to specify the shared_prefs dir or what's the deal? Jul 13 13:12:17 jesperj, what do you need the path for? maybe there's another solution for your problem Jul 13 13:14:14 EPG: Basically just for accessing and saving the shared_prefs file. *googles if it's needed* Jul 13 13:14:25 no, you don't need this Jul 13 13:14:37 why do my native windows get killed right away on start up :| Jul 13 13:14:37 use a SharedPreferences.Editor for editing Jul 13 13:14:51 * flan3002 wonders what jesperj did before. Jul 13 13:14:59 jesperj, there are additional issues if there are multiple users Jul 13 13:15:10 ESphynx: Log? Jul 13 13:15:24 flan3002: ? before what :) Jul 13 13:15:42 jesperj: Well, how do you edit your SharedPrefs currently? Jul 13 13:16:46 flan3002: https://gist.github.com/jerstlouis/894c28294584ebee1a56 Jul 13 13:19:54 Hmm. It seems that I have been using SharedPreferences.Editor at some places and at some places I have hardcoded the path... Perhaps not the best ;) Jul 13 13:20:11 No, not really... Jul 13 13:20:59 flan3002: does that tell you anything? Jul 13 13:21:12 I'm getting a focus changed and then a pause :S Jul 13 13:22:48 ESphynx: No, is that all? Jul 13 13:23:19 flan3002: https://gist.github.com/jerstlouis/894c28294584ebee1a56 -- I edited with textual values for commands Jul 13 13:23:29 right on startup, it closes... Jul 13 13:25:32 Sorry, ESphynx, I can't help with that. :/ Jul 13 13:25:36 :( Jul 13 13:26:53 Is it possible to have hidden UI elements and have them shown when you select a checkbox Jul 13 13:27:40 Say I have a checkbox sports and when I check it two EditText elements appear right bellow it and move what was bellow the checkbox before down Jul 13 13:30:02 neredsenvy: You want .setVisibility(View.GONE)? Jul 13 13:30:33 (That was View.GONE, right?) Jul 13 13:31:54 flan3002: EPG: Oh here we have it; I have been using the hardcoded path to check if the shared_prefs file exists or not. Perhaps there is another way. Jul 13 13:32:39 after the "File markerFile" etc above I do: if (markerFile.exists()) { do stuff } Jul 13 13:35:59 flan3002: Oh hell yes : )) Thanks I thot this will be much more complicated : )) Jul 13 13:36:01 Thanks a lot Jul 13 13:44:43 jesperj, why do you need to know whether the file exists or not? Jul 13 13:45:54 EPG: Because if it exists, I retrieve data from it and update some views with it. If it doesn't exist it shouldn't be created... Jul 13 13:46:23 uhm, why should(n't) it be created? Jul 13 13:48:12 jesperj, as long as you don't use an Editor on it and commit/apply changes it won't be created if it doesn't already exist Jul 13 13:50:26 EPG: Because my programming logic is such that if it exists, the program will read the data and update the views with it... Jul 13 13:50:56 that's not a good logic Jul 13 13:51:02 I'm not a good programmer Jul 13 13:51:24 instead just get the SharedPreferences instance, (try to) get all the preferences you need and use them if they exist Jul 13 13:51:35 Is it possible to get the URL from a HttpClient? Jul 13 13:51:56 I'm trying to figure out if it was redirected and sent to a URL (different to the one I provided). Jul 13 13:53:48 EPG: Ok I'll try to implement that Jul 13 13:53:58 jesperj, check http://developer.android.com/reference/android/content/SharedPreferences.html Jul 13 13:54:09 if you need more help just ask Jul 13 14:00:18 EPG: Thank you very much :-) Jul 13 15:34:00 ahoy fellow devs :) Jul 13 15:36:14 has anyone any experience in working with wifi controls, to turn a device into an AP without root access? is that possible with the latest SDK? Jul 13 15:37:24 er, it's been a standard feature in Android for years - no need for root or a special app Jul 13 15:38:01 Leeds: sorry, i've been checking some old threads, so wasn't aware Jul 13 15:38:18 *really* old threads, apparently Jul 13 15:39:10 Leeds: via WifiManager or? Jul 13 15:39:33 via settings Jul 13 15:40:00 hello, have anyone worked with google maps who can help me? Jul 13 15:40:20 I've done everything as google says Jul 13 15:40:27 but my mapdemo crashes Jul 13 15:40:35 here is the log http://pastebin.com/H6AduF7J Jul 13 15:41:50 Papaecho91: pastebin your manifest Jul 13 15:42:20 Leeds: are you talking about the GUI or API? Jul 13 15:42:41 shmillz: I'm saying you don't need an app for tethering Jul 13 15:43:12 or you could be more specific about what you're actually trying to do Jul 13 15:43:38 http://pastebin.com/fxkfQbnX Jul 13 15:43:42 Manifest Jul 13 15:43:42 Leeds: ah :) well, i'm trying to make an app which will turn the device into a wifi ap (so more than 1 client can connect) Jul 13 15:44:08 can connect to what? Jul 13 15:44:20 to that device Jul 13 15:44:51 Papaecho91: and what does line 29 of your pasted log say? Jul 13 15:45:04 shmillz: because connecting to a non-routing network is useful, right? Jul 13 15:45:50 right :) it won't be internet connection sharing, just connecting Jul 13 15:46:20 so apps can exchange data without internet Jul 13 15:48:18 meh, you've explained your probably pretty badly, but... the answer is either bluetooth or wifi direct Jul 13 15:48:20 Papaecho91: ? Jul 13 15:49:20 shmillz, tethering already allows multiple devices... Jul 13 15:49:52 Leeds: sorry ^^ ,, by wifi direct you mean P2P mode (which is just 2 devices) Jul 13 15:49:57 Papaecho91: stay on channel please, unless you're offering to pay me for direct support Jul 13 15:50:02 and wifip2p works for the local network case Jul 13 15:50:06 shmillz: wifi direct. it's a thing. Jul 13 15:50:10 it's not just 2 devices Jul 13 15:50:29 ah! i've confused it with ad-hoc mode then Jul 13 15:50:54 so, package android.net.wifi.p2p is where to look then? Jul 13 15:51:00 hmm, they do also call it p2p, yes Jul 13 15:51:07 http://developer.android.com/guide/topics/connectivity/wifip2p.html Jul 13 15:51:11 go, read Jul 13 15:51:23 iirc, ad-hoc mode isn't limited to single client... Jul 13 15:51:32 rtfm eh? :) i'm on it Jul 13 15:54:03 Leeds the meta-data should be correct Jul 13 15:54:11 Leeds: Jul 13 15:54:18 Papaecho91: well, it isn't - so I'll wish you good luck and move on Jul 13 15:55:03 thx for the help Jul 13 16:01:15 I got it working! I just added the meta data under the application tag Jul 13 16:01:22 thx again for your help leeds Jul 13 16:01:55 which is exactly what line 29 in the log told you to do... Jul 13 16:09:07 I was actually not right (obvi) Jul 13 16:09:26 (obviously) Jul 13 16:09:51 I did not read the google tutorial Jul 13 16:09:55 exactly Jul 13 16:10:12 I missed the "under application tag" Jul 13 16:11:03 or the error message, which also said that Jul 13 16:39:59 Hi guys. A quick question. When i create a CursorLoader with a query to load all data from sqlite database. Does the loader get ALL data or just get it on request? Jul 13 16:48:18 skulltower, fairly certain the latter, but i'm not sure why you'd want to know except curiosity. if this is affecting how you design something i wonder why. Jul 13 16:49:34 timemage, hmm. Come to think of it would it use more memory or not? Or is sqlite db using memory and cursorloader would only point to there? Jul 13 16:50:24 skulltower, not sure. what did you mean by "it" ? Jul 13 16:51:21 Would cursorloader loading all the data take up more memory instead of limiting it to like 20 results ? Jul 13 16:57:23 skulltower, sorry, i don't understand the question. Jul 13 17:00:23 timemage, Mm i understand i'm not being clear enough. I have a sqlite db table with 1k rows. Is there any performance difference from creating a cursorloader whose query gets all the rows VS querying myself and getting results partially (like 20 each time). Jul 13 17:01:10 "My way" would re-query once the users reaches some specific point in a list or another data holder. Jul 13 17:01:27 skulltower, i suspect very little difference. you may even find you attempt to limit the amount you pull actually performs worse. Jul 13 17:02:18 in any case you cann use LIMIT OFFSET Jul 13 17:02:55 skulltower, that i know of, there's no requirement that the cursor itself actually store all of the results it represents. and i supect that it doesn't do this. there is probably some amount of caching going on, which you probably don't have much control over. if you make a pile of little querys you may end up just creating a bunch of caches, thrashing the gc, etc. to know for certain you'd need to test. Jul 13 17:03:32 Well that's what i'm doing atm, thepoosh just wondering perhaps i should create a cursorloader with a single query to get all items and let it do the rest (if it does that) Jul 13 17:04:01 skulltower: from what I saw in grepcode, there is no limit on the query from CursorLoader Jul 13 17:04:09 but I suspect it's there somewhere Jul 13 17:04:09 Problem is i can't find anywhere that the cursorloader actually fetches the data from db partially not gets all the data and just when i request sends something from his array or w/e it hols the data in. Jul 13 17:05:31 Kinda confusing to me as i create cursorloader with a query that gets all the items. but whether it actually gets all the items or partially i don't know. Jul 13 17:06:27 Maybe i just misunderstand how the sqlite db works in general.. Jul 13 17:07:34 skulltower, well, i probably should have mentioned this before, but i don't know what the cursor loader has to do with anything. there loader is there to requery the data when the data changes underneath the cursor. the cursor is basically an iterator. you could implement it with only storage for 1 item, or perhaps even no items. Jul 13 17:07:51 can anyone recommend a good messaging app or whatever? i think the default is preventing me from sending picture messages or something Jul 13 17:07:54 skulltower, i should say, it's there to get a new query for which to requery. Jul 13 17:08:12 skulltower, ack, a new cursor for which to.... Jul 13 17:09:27 timemage, my data doesn't change. Does that make the loader unnecessary? Jul 13 17:09:40 skulltower, it would seem so. Jul 13 17:10:05 skulltower, this is some sort of lookup table that comes distributed with the app? Jul 13 17:10:45 timemage, Just want to display the table's content in a list Jul 13 17:10:48 skulltower, actually, you may want to the loader just to put the act of doing the cursor acquisition in the background. Jul 13 17:11:24 skulltower, it's maybe slightly overkill for that, but it does the job not so different from asynctask. Jul 13 17:12:36 timemage, i am using asynctask to load the bigger queries atm. Still i'm wondering maybe i shouldn't use limit and offset for my queries and just get all the rows? Jul 13 17:12:49 skulltower, test and see. Jul 13 17:13:14 timemage, So my new question is: Does the sqlite database store it's rows on the ram or the disk Jul 13 17:13:40 skulltower, either, normally on disk. Jul 13 17:15:29 timemage, well 10k takes longer than 20 :D but i'm not sure still as i parse the cursors afterwards.. Jul 13 17:16:14 timemage, Anyways thanks for your help, I think i'll stay away from the loaders just yet. Jul 13 17:16:38 skulltower, what are you doing with the cursor? Jul 13 17:17:05 Umm i get some id's put em to an array and strings to a diff array. Jul 13 17:18:13 It's impossible for me to pass the cursor straight to the adapter as the data "is not ready". Would need to change the table structure then. Jul 13 17:18:21 skulltower, hmm, meaning if you load 10k items you're just going to put them into an array? =) Jul 13 17:18:46 timemage, well when you put it that way xD yea.. Jul 13 17:19:42 skulltower, heh, well, then yeah, it'll use more memory, but not because of anything you're doing with the cursor. if you ask for 10k but only copy 20 from the cursor into the array, the memory footprint is probably similar. Jul 13 17:20:01 skulltower, so, what is this data? Jul 13 17:20:11 Well it's not meant to show that much data at any single time anyway so i guess it's ok :D Cursor loader would be better here. Jul 13 17:20:33 timemage, just some strings and numbers :) Jul 13 17:21:07 skulltower, well, the thing is, if you have something like a listview with a simplecursordapter which you hand an sqlitecursor, and you have millions of records, it probably won't even flinch. Jul 13 17:22:17 skulltower, i should try it, but that is what i expect based on how i understand everything to be working. that's why i wanted to know what you're doing. there may be another way to go about it. Jul 13 17:23:04 timemage, When you say it wouldn't flinch you're talking about getting the cursor with a loader? Jul 13 17:23:31 skulltower, i mean that it will perform fine. it's not going to load the entire db into the listview. Jul 13 17:23:35 skulltower, in ram, that is. Jul 13 17:23:50 skulltower, these things are specific designed so you don't have to do that. Jul 13 17:24:43 So simple query doesn't store the resulting cursor in ram? It's only a pointer to specific data in the database? Jul 13 17:26:20 skulltower, it's easier to answer the second half. the cursor need only be a pointer. and with an sqlite cursor it probably is, pointer + small amount o cache. the first question becomes somewhat nonsensical. Jul 13 17:26:49 Yes Jul 13 17:26:52 skulltower, maybe "iterator" is a better word. Jul 13 17:27:19 That means i'm doing a lot of unnecessary calculations when converting to arrays... Jul 13 17:27:40 And using additional space i shouldn't be using Jul 13 17:27:44 skulltower, probably. that's why i was trying to figure out what you were doing. Jul 13 17:28:04 Well damn xD Jul 13 17:28:18 Hey I'm having some issues with org.apache.http Jul 13 17:28:36 For some reason httppost is sending the request in a weird way Jul 13 17:28:46 so my server is not receiving the POST data Jul 13 17:28:55 bas_, did you ever find what in your account was tripping android studio? Jul 13 17:29:03 POST: https://nnmm.nl/?Hf3 Code: Jul 13 17:29:06 http://git.muhcloud.eu/azise-android/blob/master/app/src/main/java/net/Azise/azise/AziseApi/AziseApi.java#L-126 Jul 13 17:29:14 timemage: ye it took me ages but I found it out Jul 13 17:29:23 bas_, yeah? Jul 13 17:29:40 java was being an asshat and it was crashing on launch for some reason Jul 13 17:29:52 I reinstalled java and did a quick reboot and that seemed to fix it Jul 13 17:30:06 It was still a pretty odd thing :/ Jul 13 17:30:29 bas_, so what you're saying is i should have opened with "have you tried turning it off and then on again?" Jul 13 17:30:53 I guess. But normally that won't fix an issue when using linux Jul 13 17:30:57 but then again ~java~ Jul 13 17:31:11 bas_, well, openjdk maybe. Jul 13 17:31:58 It didn't run when I tried using openjdk so I had to install the properitary oracle jdk Jul 13 17:32:15 bas_, i probably should do that. haven't yet. Jul 13 17:44:24 What would be the best way to make my app check with my server every minute even if the app has been removed from the running apps list? Jul 13 17:47:02 Hi. I seem to be finding that applying a custom theme to my app will prevent the ActionBarDrawerToggle from appearing. Does anyone know why this may be? Jul 13 17:51:14 bas_, alarm manager, but don't do that Jul 13 18:05:46 skulltower, the cursor has with it a small cache (CursorWindow). it seems you have some control over that as well. Jul 13 18:08:53 timemage, Can a loader be used throughout the whole application? By different activities that is Jul 13 18:09:25 skulltower, the cursor you mean? Jul 13 18:09:42 no i mean a cursor loader Jul 13 18:09:56 skulltower, ehh, not sure how that would work. Jul 13 18:10:33 Nvm i need to research this stuff more Jul 13 18:10:37 Thank you Jul 13 18:11:49 skulltower, maybe. i think you may still be confused on what the cursorloader does. might be some help just to load at parentclasses's in order to understand the loader part as separate from the cursor, database, and so on. Jul 13 18:12:40 timemage, Yea i'm confused about cursors in general I guess since I haven't used them. Jul 13 18:13:18 skulltower, you've played with iterators, or at least streams, yeah? Jul 13 18:14:09 All the streams i did was to copy my db from assets to the device :D Jul 13 18:14:16 And not sure what you mean by iterators.. Jul 13 18:15:15 Hey all. trying to create a very simple camera app using the camera api and the process described here: http://developer.android.com/training/camera/cameradirect.html Jul 13 18:15:48 skulltower, well, in the case of streams you know that having a stream object present in your program and attached to a file doen't mean the entire file is loaded into memory, right? Jul 13 18:15:50 but Im not sure whether I should be adding a surfaceView to my layout and somehow use that to show the camera preview, of if Im supposed to be doing it different Jul 13 18:15:56 because currently, Im just getting a black box Jul 13 18:16:29 Is there a way I can control how HttpClient handles Redirects? I can't find much information on it. Jul 13 18:16:53 I'm not too fussed how it handles them, but is there a way to know if it has been directed? Jul 13 18:16:54 Well yes that much is obvious Jul 13 18:17:22 Or a way to compare the provided URL with the URL after is has a response? Jul 13 18:17:48 skulltower, so they present something something more like a position in some resource and some operations you can perform at that position. a cursor isn't much different than that. Jul 13 18:18:19 timemage, what about the database to which the cursor points to? Jul 13 18:18:41 skulltower, not much different than the file to which your stream object points. Jul 13 18:18:58 I see. Jul 13 18:19:53 skulltower, underlying the stream interface there is going to be some buffering going on a different levels. same is true for the database. this buffering needn't be in proportion to the size of your request. Jul 13 18:21:34 timemage, meh crazy router Jul 13 18:21:57 GO ARGENTINA Jul 13 18:22:12 skulltower, i'll privmsg you the my last if you want. Jul 13 18:22:40 That'll be nice , ty Jul 13 18:26:00 timemage, Who controls the buffering then? Jul 13 18:26:24 skulltower, usually people who have more time to invest in that sort of thing than we do. Jul 13 18:27:02 :D Jul 13 18:27:10 skulltower, if you look hard enough, you can usually find ways of tweaking it. for now you're probably better off not worrying about it. Jul 13 18:35:27 lol been debugging code for an hour to find out why a new theme doesn't apply only to figure out that i changed the xml before and forgot to switch back xD Jul 13 18:35:50 General question: if I use twitter/FB/google+ for single sign-on, what username do i store on my servers? Do I just use first name of the person? If so, how can I ensure it doesn't clash with other usernames in my DB? Jul 13 18:36:55 We use the email address as the unique identifier Jul 13 18:38:21 Hi, I'm getting some class error when I'm trying to run the treasurehunt demo for cardboard, I do not know how to solve this. Hints please? http://tny.cz/7968bfc2 (Note 3) Jul 13 18:40:05 LuxuryMode, you use the username from said login method, should be some unique id you can make out of it Jul 13 18:41:18 pfn That username will be displayed alongside any public actions that the user will take. Couldn't it be surprising in a bad way to users to find out that this is their username? Jul 13 18:41:54 opaque id vs display data Jul 13 18:42:02 you never show opaque ids Jul 13 18:42:27 so they still should choose display id basically? Jul 13 18:42:42 where the single sign-on benefits them mainly in that they dont have to remember a password? Jul 13 18:43:12 huh? why would they choose their ID, what you display comes from the SSO account Jul 13 18:43:52 the SSO account will give me both an opaque id and display name? Jul 13 18:43:59 you generate an opaque id for a primary key that you store on your server Jul 13 18:44:18 no, you should generate one off the account Jul 13 18:44:40 account-type + id from account Jul 13 18:45:26 right, thats the id i store, you're saying? Jul 13 18:45:32 sure Jul 13 18:45:36 and the username is simply that SSO account's username? Jul 13 18:45:43 i mean username for display purposes* Jul 13 18:45:47 sure Jul 13 18:46:07 and if it happens to clash with users who've signed up without SSO and just picked a username? Jul 13 18:46:37 display names are bound to clash, that's why it's not a login username Jul 13 18:47:00 say you have LuxuryMode on Facebook and one on Google Jul 13 18:47:09 would it not collide anyway Jul 13 18:47:24 this is true Jul 13 18:47:53 if you want to enforce unique names, then force them to pick Jul 13 18:48:03 and validate that it doesn't collide Jul 13 18:48:05 right Jul 13 18:48:31 i think what i'll do is validate that the SSO username is unique Jul 13 18:48:31 you can default to the username provided by SSO first Jul 13 18:48:40 if it is, then they're good Jul 13 18:48:46 otherwise, ask them to pick one Jul 13 18:48:57 bc i want it to be as frictionless as possible Jul 13 18:49:30 depending on application, users may not want the username from their sso Jul 13 18:49:39 privacy reasons and otherwise Jul 13 18:50:19 yeah, that kind of applies in my case Jul 13 18:50:48 but users that care about privacy will typically not click to use FB/google+ and, instead, opt for username + pass Jul 13 18:50:54 email is even optional with that method Jul 13 18:52:56 Hello, I need to load resources from assets/ instead of res/, I've found this answer on SO http://stackoverflow.com/questions/7776445/in-android-can-i-use-image-from-assets-in-layout-xml Jul 13 18:53:27 Can I map every resource this way to be loaded from assets/ ? Jul 13 18:54:00 I have images of different dpi, strings, layouts and a couple of raw files Jul 13 18:54:43 Hi. I seem to be finding that applying a custom theme to my app will prevent the ActionBarDrawerToggle from appearing. Does anyone know why this may be? Jul 13 19:18:30 How to load layout not from res/ but from assets/ ? Jul 13 19:20:38 why Jul 13 19:21:36 I am limited by an SDK and must not use res/ Jul 13 19:21:51 Good evening. Jul 13 19:22:55 hi Jul 13 19:23:23 I have a library that I need to modify not to use res/ Jul 13 19:24:03 imgae loading, layout loading Jul 13 19:24:04 Does anyone here know how I may be able to read and check from sharedpreferences? I'm trying to pass an if statement where if an EditText has the same string as a setting in SharedPreferences an action should occur. I am however stumped at the moment with the error "Required: Editable, found String". The if is: if (pin.getText() = sPref.getString("pinPasword", "")) Jul 13 19:24:15 there must be a way Jul 13 19:25:33 LuxuryMode, I disagree, I want SSO, but don't want people to see my email username to spam m Jul 13 19:25:50 pfn yeah i hear you Jul 13 19:28:09 KjellInge: you only of 1 = which is trying to assign, plus you don't compare strings using ==, use isEqual or compareTo etc Jul 13 19:28:23 only have 1 * Jul 13 19:29:16 hey all, is there an open source control to get music playback controls in the notification pull down? Jul 13 19:30:15 Can I somehow substitue compiled resources files and resources.arsc with ones from assets? Like setResourcesArchive('assets/res/resources.arsc'), they are compiled, but in different place Jul 13 19:30:22 canvs2321-, Thanks. Give me a few minutes to hit up the document and figure that out. :) Jul 13 19:35:34 canvs2321-, Thank you. toString().equals etc... worked wonders! Jul 13 19:48:30 What would the best way be for my app to request data from my server (REST) even if the app is not running in the app drawer. It must be able to send Notifications to the device. Jul 13 19:48:48 I can't use gcm without chaning the existing REST server :V Jul 13 19:57:03 bas_, uh Jul 13 19:57:08 bas_, change your REST server Jul 13 19:57:22 really, killing your users battery because you don't want to update your server won't fly well Jul 13 19:58:36 Mavrik: to what Jul 13 19:58:42 It's a public REST server Jul 13 19:58:44 to GCM. Jul 13 19:58:53 I can't because it' Jul 13 19:58:58 s a public REST server Jul 13 19:59:17 and? make your own. Jul 13 19:59:22 :V Jul 13 19:59:24 Effort Jul 13 19:59:28 ugh okay Jul 13 19:59:32 well Jul 13 19:59:40 Are there any good docs on GCM? Jul 13 19:59:49 of course you can always go answer to your users why your app makes their phone day in 6 hours. Jul 13 19:59:51 and how to write servers etc Jul 13 20:00:21 Mavrik, I have an S4... my phone's day is only 6 hours long :( Jul 13 20:00:46 *shrug* Samsung. Jul 13 20:00:47 My Z2 lasts for 2.5 days (average use) Jul 13 20:00:52 with stamina mode on about a week :P Jul 13 20:01:22 brb Jul 13 20:21:19 I wish I got the whole football mania. Wife and kids in the other room cheering. They really like wathing it. Jul 13 20:23:21 Can anyone answer a widget question for me? In the API-demos, the "ExampleAppWidgetConfigure", it says that "Make sure we pass back the original appWidgetId", and adds it as an extra. Can I put another extra there, and reach it from my provider-class? Jul 13 20:24:08 I got the data sent both by SQL and sharedPreferences, but putting an extra seems so much easier? Jul 13 20:27:29 Hi to All, Who here makes a decent money on their App? would like to talk to you, thanks! Jul 13 20:30:38 I made $0.00 the other day! Jul 13 20:31:04 Not surprising though, considering my app has no ads, and it's a free app. Jul 13 20:31:42 JesusFreke: what motivates you to continue? Jul 13 20:32:13 androidnewb: I make plenty of money in my day job. My app is just for fun :) Jul 13 20:32:37 JesusFreke: but I also want to make money in Apps Jul 13 20:32:50 right. I was just being facetious :) Jul 13 20:33:43 ok, thanks for answering Jul 13 20:52:29 If I create object like so e.g. Object(str1, str2, str3) Jul 13 20:52:47 What orders are str1, 2 and 3 read? Jul 13 20:52:55 What order are they read in? Jul 13 20:53:32 i dont even Jul 13 20:53:41 Sorry Jul 13 20:53:58 I have an object which implements parcelable, but it also extends another object. Jul 13 20:54:18 So one of the constructors takes a Parcel object Jul 13 20:54:22 http://stackoverflow.com/questions/2201688/order-of-execution-of-parameters-guarantees-in-java Jul 13 20:54:41 And in that contructor I have to use Parcel.readString() in the order that I used writeString). Jul 13 20:55:09 kjeldahl, perfect thank you Jul 13 20:55:44 UW GL Jul 13 20:55:53 eh, YW GL! ;-) Jul 13 21:17:48 Is it possible to validate a value passed to an object constructor and reject it? Jul 13 21:19:14 Yes, by throwing an exception. Jul 13 21:19:49 Ok thanks Jul 13 21:21:46 http://pastebin.com/61ncKMZC the following code the code inside gTimeout < 30 only rtuns once any throughs? Jul 13 21:24:20 Well, you've got two return statements inside that if... Sure they aren't being run? Jul 13 21:27:25 positive … before i made some weird change (which im tring to do ) timeout always was his and it returned Jul 13 21:27:36 trying to undo* Jul 13 21:29:10 yea timeout is hit always ... Jul 13 21:29:39 i knowthe gps var is being changed though cause i have another thread where i see it changing on the ui Jul 13 21:31:41 i need to reboot my computer is like dead Jul 13 21:32:20 So change it to and endless loop. If it works then, you know it's your variable getting messed up. If not, you know return is getting hit. Jul 13 21:32:29 AN endless loop I mean Jul 13 21:32:50 if it returns it should end Jul 13 21:33:19 I'm not going to offer any comments on what that code is supposed to do or the quality of it. ;-) Jul 13 21:34:49 thanks. everyone always knows the best way to do “something” 1 says rthis and another “expert” says this so i tend to do things my way Jul 13 21:35:08 anyone having the issue where with gradle mavenInstaller() doesnt include dependencies in the created pom? Jul 13 21:42:41 jug6-away oh no. Jul 13 21:42:53 maybe you need to use mavenDeployer instead then. grep for that in the samples Jul 13 21:43:02 g00s lol Jul 13 21:43:05 yeah I'm looking at that Jul 13 21:43:22 i vaguely remember something like that, a long time ago - but thought it was fixed Jul 13 21:43:45 yeah i see comments about it around google from years ago lol Jul 13 21:43:49 :S Jul 13 21:44:29 mavenInstaller is new i thought O.o Jul 13 22:17:52 hey all, i have created a custom notification and got it showing. i have an image view in the remote view but it will not left align. is there something special i need to do? Jul 13 22:24:05 show your layout Jul 13 22:24:28 canvs2321: http://pastie.org/private/f4xspyghtuadqaj9qfcla Jul 13 22:25:06 hey guys want to see my app that you might like Jul 13 22:25:27 relativelayout children are already left aligned and top aligned by default, show a pic of your notification Jul 13 22:26:12 canvs2321: it looks like a standard notification just with the image view a little over half way to the right of system notifications Jul 13 22:27:16 hey guys want to see my app that you might like https://play.google.com/store/apps/details?id=com.quantumworks.com.ircclient Jul 13 22:28:34 I'd like to have a data model that lives in my app in general (As a singleton?) and then bind views to it (so they update when it updates). Can someone point me to an example or tell me why not to do this? :) Jul 13 22:40:43 Hello Jul 13 22:40:50 hello Jul 13 22:42:12 HellO Jul 13 22:42:37 I am new to android app developement. My app so far communicates witht Google Maps API v2. I have coordinates predefined. I was hoping there may be a good turtorial or resource to help me add the capability to input exactly where I want google maps to view. For example, Boston MA, etc... Jul 13 22:44:12 interesting Jul 13 22:44:17 i make apps to Jul 13 22:44:23 hmmm lol Jul 13 22:44:28 lol Jul 13 22:44:51 pm Jul 13 22:45:03 ehubbard check your mpm Jul 13 23:26:17 Hello Jul 13 23:27:41 Anyone have experience with ffmpeg on Android? Having trouble building the command line binary and was wondering if anyone knows if there is a prebuilt available anywhere... Jul 13 23:33:00 Anyone? Jul 13 23:43:58 how can i convert an image (https://developer.android.com/reference/android/media/Image.html) to a bitmap? Jul 13 23:45:56 dcope: just google it Jul 13 23:46:07 thats a pretty simple question to answer Jul 13 23:46:14 desmin88: i've already tried Jul 13 23:46:23 "android image to bitmap" and "android media image to bitmap" Jul 13 23:46:26 which is why i'm asking in here, now. Jul 13 23:47:07 "http://stackoverflow.com/questions/8717333/converting-drawable-resource-image-into-bitmap Jul 13 23:47:21 first result didnt help Jul 13 23:47:22 ? Jul 13 23:47:46 desmin88: that answer is for resources, not Image Jul 13 23:47:54 can't tell if you're trolling me or just not understanding the question... Jul 13 23:47:59 :| Jul 13 23:48:09 did you read the page Jul 13 23:48:33 yes, yes i did. Jul 13 23:49:09 < desmin88 > thats a pretty simple question to answer Jul 13 23:49:18 ok let me ask Jul 13 23:49:19 meanwhile, still no answer lol Jul 13 23:49:19 dcope: You're not being trolled. The answer is right there at the top of that page. Jul 13 23:49:22 whats your use case Jul 13 23:49:46 desmin88: I have an Image that i want to convert to a Bitmap so i can put it in an imageview Jul 13 23:50:01 i have no resource of this image... it's loaded from the web and stored as an Image Jul 13 23:50:15 just use Picasso Jul 13 23:50:28 it will handle image loading from the web and put it in the imageview in one line Jul 13 23:50:46 https://github.com/square/picasso Jul 13 23:51:38 so this has gone from "it's a simple question to answer" to "pull in a third party lib and have another dependency in your project" Jul 13 23:51:41 OK. Jul 13 23:52:06 uhh Jul 13 23:52:10 http://stackoverflow.com/questions/6407324/how-to-get-image-from-url-in-android Jul 13 23:52:19 your saying it like that is a bad thing Jul 13 23:52:26 the image has already been loaded from the web by the time i need to use it Jul 13 23:52:34 it's already being loaded... and held in memory as an Image Jul 13 23:52:39 libraries for android are specifically there to help you Jul 13 23:52:43 and make things easier Jul 13 23:52:45 i don't need help loading the image.... i don't need help displaying it.... Jul 13 23:52:50 i need help converting an Image to a Bitmap Jul 13 23:53:02 is this simply not possible with the android sdk? Jul 13 23:53:03 how is the image are loaded Jul 13 23:53:08 desmin88: with Volley Jul 13 23:53:13 ... Jul 13 23:53:15 use picasso Jul 13 23:53:20 nope Jul 13 23:53:25 lol Jul 13 23:53:35 you are doing it wrong Jul 13 23:53:48 OK. Jul 13 23:53:54 a+++ channel, would join again. Jul 13 23:54:10 your just being ignorant to sound advice Jul 13 23:54:12 dcope: So "Image" is a Volley class, rather than an Android class? Jul 13 23:54:34 OmniQ: no, Image is an android class https://developer.android.com/reference/android/media/Image.html Jul 13 23:54:38 which i pasted in the original question Jul 13 23:55:31 show us some code Jul 13 23:57:28 dcope: Do you need the Image? Would it make sense to go from bytes to Bitmap directly? Jul 13 23:59:45 dcope Jul 14 00:00:05 you could just use picasso and load it in one line > Picasso.with(context).load("image link here").into(imageView); Jul 14 00:00:41 but if you are using volley dont get the image as an Image object Jul 14 00:08:24 +1 for Picasso Jul 14 00:25:35 if i have a layout in the folders layout and layout-mdpi when I start the app in a ldpi cellphone, the api will load wich layout? Jul 14 00:26:16 which* Jul 14 00:30:36 Suchorski: I believe the base "layout" layout would be used Jul 14 00:31:01 what is the true purpose of android:versionCode ? Jul 14 00:31:30 I am doing testing and I have been changing the versionName, but someone just asked me why I am not changing the versionCode Jul 14 00:31:39 I thought versionCode's only get changed for formal releases Jul 14 00:32:03 Suchorski: http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch Jul 14 00:32:32 The first rule is what I was thinking of, but it explicitely mentions dpi as an exception Jul 14 00:32:55 I believe the ldpi layout would be used in that case Jul 14 00:34:24 JesusFreke i don`t have ldpi layout Jul 14 00:34:29 only default and mdpi Jul 14 00:34:40 Suchorski: yeah, I mean mdpi Jul 14 00:34:48 Suchorski: "For example, when looking for a low-density resource and it is not available, the system prefers to scale-down the high-density version of the resource," Jul 14 00:34:51 I don`t think so Jul 14 00:34:51 from http://developer.android.com/guide/practices/screens_support.html Jul 14 00:35:10 1. Eliminate resource files that contradict the device configuration. Jul 14 00:35:14 so Jul 14 00:35:28 mdpi will bi eliminated Jul 14 00:35:29 Suchorski: "Screen pixel density is the one qualifier that is not eliminated due to a contradiction" Jul 14 00:35:36 hum Jul 14 00:35:46 let me see Jul 14 00:35:56 I think I am going to just keep the versionCode the same until it goes to the market Jul 14 00:35:56 The quote from screens_support.html is pretty clear that it will use the mdpi layout Jul 14 00:36:23 this would be pretty easy to test, right? Jul 14 00:37:06 But I'm not sure what would happen on an hdpi device with your configuration Jul 14 00:37:25 well Jul 14 00:37:30 i have the default layout config Jul 14 00:37:37 hdpi should use this i think Jul 14 00:38:35 I am not an android expert... so stupid question. I have two android studio projects, with different Activities, that I want to combine into one Application. The intro screen just give the user option to start one project or the other. Is there a way I can develop the projects separately then combine them in another project? Jul 14 00:39:42 I am looking at documentation, and it looks like the key is that I have separate modules. Jul 14 01:06:05 Tried setting an EditText style to this: style="@android:style/Widget.Holo.EditText" but it doesn't seem to work. Any ideas? Jul 14 01:36:04 IrishGringo, why don't you just have them in a single module... Jul 14 01:36:36 IrishGringo, sure, you can combine them, but you're just making it painful for yourself Jul 14 01:42:38 hmm Jul 14 01:43:03 intellij no like mvn & gradle imported at the same time... Jul 14 01:53:34 why would you import both Jul 14 02:05:12 is there a way to check if tethering is on? Jul 14 02:37:00 I'm assuming this file --> gradle/wrapper/gradle-wrapper.jar should NOT be in version control? How can I add to that my gitignore? Jul 14 02:44:58 LuxuryMode: it should be Jul 14 02:46:37 JakeWharton ah ok. thanks Jul 14 02:46:47 loving picasso and retrofit btw Jul 14 02:46:55 excellent! Jul 14 02:46:59 starting a new project and these were not around the last time i did android dev Jul 14 02:47:05 makes things ridiculously easy Jul 14 02:48:13 and that's exactly the idea Jul 14 02:48:34 make the mundane, repetitive (yet essential) tasks easy Jul 14 02:48:41 right Jul 14 02:49:01 this right here is as good as it gets (at least in Java): http://take.ms/q6Sau Jul 14 02:50:15 last time i did android development, the amount of work required to handle loading images in a listview was absurd Jul 14 02:50:20 now things just work and its fast Jul 14 02:52:27 Hey, I want to set up GCM for sending push notifications to clients (it seems to be the only sane way) but the only data I have about the client is their UUID and I need to send specific clients (based on their uuid) notifications. What would be the best way to do this? **** ENDING LOGGING AT Mon Jul 14 02:59:59 2014