**** BEGIN LOGGING AT Sat May 31 03:00:00 2014 May 31 03:07:34 not May 31 03:48:37 hello all May 31 03:58:37 Anyone know where I can input some text online and get a class outline/overview for java class files? May 31 04:07:37 how can I access my preference builder from onPostExecute in asynctask? May 31 04:07:49 errr, alertdialog.Builder* May 31 04:18:22 IE I have a preference that extends dialogpreference, and I'm trying to pull the html from a url as a string and then set the dialog message to the html May 31 04:18:37 I have asynctask set up and pulling data May 31 04:18:51 just dont know how to access the preference's alert dialog builder May 31 04:24:09 jesperhead May 31 04:24:14 add a listener to your async task May 31 04:24:19 which is your fragment or activity or whatever May 31 04:24:21 lasserix: hello again May 31 04:24:38 Wazzup yo' May 31 04:25:11 k, i will try that. i have since then broken my app May 31 04:25:17 so i need to fix that first May 31 04:25:24 anyways you can add interface AsyncTaskResultListerner { onResultAvailable(String resultHtml); } to your async task May 31 04:25:24 If I have a .apk, is there a way to figure out what the app's name will be as displayed on the phone? Or, given the app name on the phone, how can I find the .apk file associated with it? May 31 04:26:23 as a nested interface, then make your constructor like HtmlAsyncTasker(AsyncTaskResultListerner l) where you call HtmlAsyncTasker = new HtmlAsyncTasker(this) from your activity May 31 04:27:01 Install it and see what it generates as a launcher? May 31 04:27:31 you kind of blew my mind there. this will take some time May 31 04:28:11 For example, I have an app on my phone called "Caller Name Id." I would like to find the .apk file and delete it. May 31 04:28:42 I'm not sure how to link the displayed name to the file, and Google hasn't offered any useful suggestions so far. May 31 04:28:46 you can literally almost cut and paste ;p May 31 04:29:01 Renfield sorry are you building this apk from a project? May 31 04:29:26 Nope, I am deleting it from my phone. I assume somewhere in the apk is it's display name. May 31 04:29:57 You are manually deleting it? And you want to know what dissapears? May 31 04:30:16 I want to know what to delete before I do so. May 31 04:30:35 The app's name is, among others, "Caller Name Id." May 31 04:30:44 But there is no apk with a similar name. May 31 04:30:52 So I wonder how to find it. May 31 04:31:15 How to search inside each apk for information as to what app name it will display (if any at all). May 31 04:31:55 There's another, "NFL Mobile." I do not care for sports, and would like to reclaim the system resources that this apk consumes. May 31 04:32:38 I was able to delete a slew of Amazon apps, because they had sensible names. May 31 04:37:55 ok sweet app fixed. May 31 04:46:04 Renfield you are in the wrong channel, please navigate to #android and ask there--you'll probably get more help. May 31 04:49:22 interface AsyncTaskResultListerner { onResultAvailable(String resultHtml); } - invalid method declaration, return type required? I nest this within my extended asynctask class right? May 31 04:49:39 oh May 31 04:49:41 uhh May 31 04:49:47 sorry i did that too quickly May 31 04:49:53 what is missing from that definition? ;p May 31 04:50:02 *that code May 31 04:50:09 onResultAvailable May 31 04:50:14 is missing? May 31 04:50:18 err May 31 04:50:28 no thats just what was yelling at me May 31 04:50:42 yeah but that's a method and all methods require... May 31 04:50:52 ah i need to void it? May 31 04:50:58 i do not know what it is called May 31 04:50:58 uhh well May 31 04:51:05 String then May 31 04:51:08 sorry May 31 04:51:13 forgot what i was doing May 31 04:51:13 i dont know about your usage of the verb void in that statement May 31 04:51:16 but yeah, you need to add void May 31 04:51:22 for the method return type May 31 04:51:45 interface AsyncTaskResultListerner { void onResultAvailable(String resultHtml); } May 31 04:51:45 or string or whatever, but since you are passing the string as an argument, then it's returning void most likely May 31 04:52:41 public DownloadWebPageTask(AsyncTaskResultListerner a) { } is fine empty? May 31 04:54:07 no May 31 04:54:14 sigh im going to read up on interfaces, im lacking fundamentals here May 31 04:54:48 an interface is just a basically a custom access extension May 31 04:55:18 so if you cast the object implementing an interface into that interface, then you can only access those methods defined in the interface May 31 04:55:44 hence it's like access modification with public -> protected -> private, but custom May 31 04:55:57 only when called May 31 04:55:58 there's a verb here i can't remember but anyways May 31 04:56:17 you want to add AsyncTaskResultListerner mAsyncTaskResultListerner to your async task May 31 04:56:35 and then set it to to a, if a != null, May 31 04:56:43 in the constructor body May 31 04:56:45 just, anywhere? a variable at the top of the class? May 31 04:56:47 k May 31 04:56:49 yeah May 31 04:57:04 usually near the interface definition but really wherever you normally odds and ends May 31 04:57:59 you also might check it not null before you call onResultAvailable in case the homefragment is no longer around since it's an async task May 31 04:58:11 (in onPostExecute) May 31 04:58:32 also you might spell check if you copy pasted May 31 04:58:53 listerner lulz May 31 04:59:46 lest the listerners and orbservers finalize us all! May 31 05:03:35 so within my onPrepareDialogBuilder, I want DownloadWebPageTask task = new DownloadWebPageTask(this); ? May 31 05:04:12 uhh i would make the event that causes the activity that generates the dialog May 31 05:04:16 to first get the html May 31 05:04:25 then generate the dialog, and set the title with it passed in May 31 05:04:28 i had that in do in packground May 31 05:04:32 background* May 31 05:04:40 ? May 31 05:04:49 i can pause with onpreexecute May 31 05:04:58 ohh May 31 05:04:59 okay May 31 05:05:00 yeah May 31 05:05:00 the dialog content is from a webpage May 31 05:05:14 the dialog itself allows the user to pause the async task? May 31 05:05:49 inside the asynctask you can user onPreExecute to display some "loading" text until doInBackground completes May 31 05:05:54 you can use* May 31 05:05:59 i would say yes, but the thing is dialogs are transistory, so my own coding instinct says to route the result through the activity showing and hiding the dialog May 31 05:06:18 thats where i am May 31 05:06:23 preferences.java May 31 05:06:35 oh May 31 05:06:37 nvm May 31 05:06:52 uhh see May 31 05:07:01 in my mind the async task has the sole responsibility of getting the html May 31 05:07:09 once you start making it responsible for setting of the dialog May 31 05:07:13 it's violating some coding principle May 31 05:07:13 no May 31 05:07:15 nonono May 31 05:07:22 heh May 31 05:07:23 thats precisely what I want too May 31 05:07:32 use asynctask to get html. just give it back to me! May 31 05:07:33 so don't set the dialog text in onpreexecute May 31 05:07:46 the async task should have no awareness of the dialog May 31 05:07:47 im calling asynctask inside my extended onPrepareDialogBuilder May 31 05:08:03 yeah so start the async task in that May 31 05:08:11 set the title after you start the dialog May 31 05:08:16 err async task May 31 05:08:16 no not setting the text, its different. i forgot what object it was May 31 05:08:36 but it like greys the screen May 31 05:08:45 it legit looks like a little batch of loading text May 31 05:08:47 well i dont know that that detail matters, the whole point is that whatever object is making the dialog appear should be the one to do that May 31 05:08:50 not the async task May 31 05:08:57 ok cool May 31 05:09:08 im just confused, how am i getting the html again? May 31 05:09:12 heh May 31 05:09:14 umm May 31 05:09:21 no i mean May 31 05:09:24 im getting it fine May 31 05:09:28 network wise May 31 05:09:33 can you post the snippet where the dialog is getting called to be shown or created? May 31 05:10:03 i'm assuming you have an activity showing this dialog in response to the user clicking a button or something (the specifics dont matter) May 31 05:10:04 May 31 05:10:06 android:key="tos" May 31 05:10:09 hehe May 31 05:10:11 no no no May 31 05:10:12 not here May 31 05:10:15 erm May 31 05:10:21 sorry May 31 05:10:25 use pastebin May 31 05:10:32 well its a preferences.xml May 31 05:10:37 i'm assuming you have an activity showing this dialog in response to the user clicking a button or something (the specifics dont matter) May 31 05:10:41 im calling it as its own preference May 31 05:10:57 the activity is preference.java May 31 05:11:02 what i'm saying is that that activity or whatever should also be the one setting the dialog text, ie: it starts the dialog creation and shwon process May 31 05:11:10 also starts the async task May 31 05:11:17 the async task result listener is the activity May 31 05:11:28 and then when the activity gets onresultavailable called it sets the dialog text May 31 05:12:02 that way the async task has no responsibility otehr than getting the html, the activity is doing its responsibility of controlling the view (the dialog), and the dialog is happy not coming to the altar with its fly down May 31 05:12:32 well but then I can't use onPrepareDialogBuilder to set the message text May 31 05:12:47 the alertdialog.Builder May 31 05:13:09 we;; May 31 05:13:18 builder.setMessage() yo May 31 05:13:29 my guessing of your situation is incorrect that's why i was asking can you post some of the code so i can get a sense of how you are structing this May 31 05:13:35 btw what i just described is: http://en.wikipedia.org/wiki/Single_responsibility_principle May 31 05:13:59 well yeah i would make the listener your subclass dialog builder May 31 05:14:04 and the same principle applies May 31 05:14:54 you subclass dialog builder must have a method like userClickedSomethingAndNowADialogShouldBeShownThatHasATitlteSetByAnHttpGet() May 31 05:14:58 ok here's whats up. I had to subclass DialogPreference because I wanted the dialog to have no "cancel" button. To change thise, I had to pull onPrepareDialogBuilder, which contains the AlertDialog.Builder object. That object is what sets the buttons and messagetext etc May 31 05:15:36 and it must have some method like userClickedSomethingAndNowADialogShouldBeShownThatHasATitlteSetByAnHttpGet() May 31 05:15:47 wherever that method is May 31 05:15:48 if I could pull that object to onPostExecute or pull the html to onPrepareDialogBuilder im set May 31 05:15:57 yeah May 31 05:16:00 not the first May 31 05:16:04 that's violating the principle May 31 05:16:07 but the later May 31 05:16:16 onPrepareDialogBuilder is your result listener May 31 05:16:27 when onPrepareDialogBuilder implements onResultAvailable May 31 05:16:35 you'll get that method called May 31 05:16:40 and you do setTitle May 31 05:16:47 DownloadWebPageTask task = new DownloadWebPageTask(this); gives me an error under "this" May 31 05:17:02 what class is this line of code in? May 31 05:17:18 the extended DialogPreference May 31 05:17:25 this would go a lot faster if you posted some code ;p May 31 05:17:26 DialogTOSPreference May 31 05:17:46 yeah, let me copy/paste/rip out personal info May 31 05:17:46 DialogTOSPreference --> DialogTOSPreference implements AsyncTaskResultListener May 31 05:18:04 you should probably read up on how interfaces work but we're almost down May 31 05:18:06 *done May 31 05:18:31 i KNEW implements was needed somewhere May 31 05:19:48 that didnt like that May 31 05:20:09 ide autofilled to class DialogTOSPreference implements DialogTOSPreference.DownloadWebPageTask.AsyncTaskResultListener { which is errored all across May 31 05:20:26 erg hold on, code incoming May 31 05:22:21 http://pastebin.com/T2nwpBSE May 31 05:25:19 you can add builder.setMessage("hurrdurr"); after task.execute as well May 31 05:28:36 i think lasserix lost all hope from my code and went to go get drunk. May 31 05:28:54 you're half right May 31 05:29:21 implements DownloadWebPageTask.AsyncTaskResultListener May 31 05:29:25 does not work? May 31 05:31:06 uhhh May 31 05:31:29 must be declared abstract or implement onResultAvailable May 31 05:31:39 yeah May 31 05:31:41 implement the method and return resultHtml? May 31 05:31:44 did you add implemented methods? May 31 05:31:47 dont return May 31 05:31:52 right, void May 31 05:32:07 how it works is when onPostExecute is called it'll call resultListener.onNewResult available May 31 05:32:25 do nothing in onResultAvailable May 31 05:32:32 no May 31 05:32:45 how it works is when onPostExecute is called it'll call resultListener.onNewResult available resultListner is your DialogTOSPreference May 31 05:32:46 which means May 31 05:32:50 that method will now get called May 31 05:32:54 so this is when you... May 31 05:32:56 also, now cyclic inheritence error May 31 05:33:04 and im paying attention May 31 05:33:16 yeah i think DialogTOSPreference either has to be static or top level May 31 05:33:36 ie new class file May 31 05:33:37 ? May 31 05:33:40 ahh May 31 05:33:41 no May 31 05:33:42 nevermind May 31 05:33:45 go back to your async task May 31 05:33:47 do May 31 05:33:48 k May 31 05:33:50 public interface May 31 05:33:53 not interface May 31 05:34:14 public interface AsyncTaskResultListener { void onResultAvailable(String resultHtml); } May 31 05:34:21 right, now it's exposed May 31 05:34:24 n May 31 05:34:26 same error May 31 05:34:33 umm can you post the code again sorry May 31 05:35:16 np, one sec May 31 05:36:18 http://pastebin.com/xANX13fW May 31 05:38:08 public static class DownloadWebPageTask implements DownloadWebPageTask.AsyncTaskResultListener May 31 05:38:17 are you the kind of person who likes talking to himself? May 31 05:38:24 change May 31 05:38:55 public static class DownloadWebPageTask implements DownloadWebPageTask.AsyncTaskResultListener -> public class DownloadWebPageTask May 31 05:39:17 uhh May 31 05:39:26 doesn't downloadtask extend async task? May 31 05:39:28 anyways May 31 05:39:33 also change May 31 05:39:43 yeah it did. i was confused May 31 05:39:48 class DialogTOSPreference extends DialogPreference --> class DialogTOSPreference extends DialogPreference implements DownloadWebPageTask.AsyncTaskResultListener May 31 05:40:04 the dialogtospreference is the listener for the results right? May 31 05:40:22 the asynctask doesn't need to listen for results, it already knows it has results (thats onPostExecute) May 31 05:40:24 no. preferences May 31 05:40:28 no May 31 05:40:39 ah May 31 05:40:40 the dialogtospreference needs to know the result to set the title May 31 05:40:41 correct May 31 05:40:54 two classes, they arent nested May 31 05:41:00 yeah May 31 05:41:10 you should try and avoid that May 31 05:41:28 i do May 31 05:41:39 Cannot resolve DownloadWebpageTask May 31 05:41:46 in the implements part May 31 05:42:03 oh May 31 05:42:15 you have to make the downloadwebpagetask static again May 31 05:42:29 if it's not static than its parent class has to be instantiated, otherwise it doesn't exist May 31 05:42:29 it is :-\ May 31 05:42:32 umm May 31 05:42:35 post the code again? May 31 05:42:38 hehe May 31 05:42:53 also May 31 05:43:02 can you put async task in its own top level class May 31 05:43:14 and then remove the static May 31 05:43:23 it doesn't need to be nested, that's what the listener is for May 31 05:43:42 http://pastebin.com/FEsGjsck May 31 05:43:48 k May 31 05:44:09 then theres the most updated code, except im move the downloadwebtask May 31 05:44:15 to be unnested May 31 05:44:47 whyd i do that in the first palce May 31 05:46:59 ok weird May 31 05:47:02 only one error left May 31 05:47:08 DownloadWebPageTask task = new DownloadWebPageTask(this); May 31 05:47:33 removing "this" takes care of it May 31 05:48:46 umm May 31 05:48:56 you should probably take a break May 31 05:48:57 soon May 31 05:48:58 but May 31 05:49:08 if you look at your downloadwebpagetask May 31 05:49:24 why would it throw an error if you are calling a constructor defined for it that takes an arguement? May 31 05:50:21 the argument is passed with .execute May 31 05:50:23 public DownloadWebPageTask(AsyncTaskListener l) { if (l != null) { mAsyncTaskListerner = l; } else { throw new NullPointerException("Someone forgot about me."); } } May 31 05:50:34 uhh yeah you can just do May 31 05:50:54 DownloadWebPageTask task = new DownloadWebPageTask(this).execute("url"); May 31 05:51:17 if you add a proper constructor... May 31 05:51:21 *add that May 31 05:52:47 got it? May 31 05:53:02 no :-\ May 31 05:53:33 DownloadWebPageTask task = new DownloadWebPageTask(this).execute("url"); still errors under "this" May 31 05:54:13 and adding public DownloadWebPageTask(AsyncTaskListener l) { if (l != null) { mAsyncTaskListerner = l; } else { throw new NullPointerException("Someone forgot about me."); } } as a constructor to webpagetask that also errors May 31 05:55:36 my brain hurts May 31 05:58:10 okay May 31 05:58:11 once sec May 31 06:00:00 thanks btw for the patience. im trying to wrap my head around this. May 31 06:01:52 problem is you have very complicated flow control May 31 06:01:53 so May 31 06:01:54 umm May 31 06:02:05 at what is in onPrepareDialogBuilder called? May 31 06:02:28 this is called in response to somethign being called like createDialog right? i m asking when is this method called, May 31 06:02:39 can you post the code where you create and show the dialog? May 31 06:04:38 uhh yeah May 31 06:04:52 i think you'll find this interesting May 31 06:05:50 http://pastebin.com/RCMZvNmz May 31 06:06:58 uh May 31 06:07:06 what code is calling this layout to be inflated? May 31 06:07:58 and how are you setting the URL or is the url constant? May 31 06:08:10 constant May 31 06:08:19 this is how android handles preferences May 31 06:08:33 the url is constant but the string it returns is not? May 31 06:08:48 subject to change May 31 06:08:49 its a TOS May 31 06:08:56 they want the content of the url May 31 06:09:01 not a static string May 31 06:09:08 ah okay May 31 06:09:09 well May 31 06:09:30 i am assuming onPrepareDialogBuilder gets called after onCreate gets called in Preferences? May 31 06:09:42 yes May 31 06:09:46 sorry i haven't used preferences before May 31 06:09:50 well May 31 06:09:54 this gets to be a lot more fun ;p May 31 06:09:59 because without a dialog, there no onPrepareDialogBuilder May 31 06:10:09 hehe May 31 06:10:23 is there no preference fragment? May 31 06:10:25 but it doesn't matter May 31 06:10:29 so this changes a lot of things May 31 06:10:30 unfortunatly May 31 06:10:32 i havent learned fragments May 31 06:10:43 err wait one second let think May 31 06:10:47 but plan to update to them after i get main functionality May 31 06:11:06 okay May 31 06:11:13 i think it will be okay not sure though but we'll see May 31 06:11:14 one sec May 31 06:11:18 k May 31 06:11:46 the tos is the title or what? May 31 06:11:53 title or message or what? May 31 06:11:57 message May 31 06:12:17 builder.setMessage("message") is the simplest way to set it programatically May 31 06:12:52 how often does the TOS change? May 31 06:13:00 couldnt tell you May 31 06:13:02 i mean, if the user leaves the activity and comes back, do you need to check it again? May 31 06:13:07 well ill leave that up to you May 31 06:19:31 ya reading up on preferences? May 31 06:19:50 http://pastebin.com/FbPWRPQR May 31 06:19:55 no just dialog May 31 06:20:03 that should work but i haven't used dialogpreference before May 31 06:23:12 here this is a little bit clearer http://pastebin.com/Xjf85tma May 31 06:26:38 not DownloadWebPageTask task = (DownloadWebPageTask) new DownloadWebPageTask(this).execute("url"); May 31 06:26:40 ? May 31 06:30:57 ok i simply copy pasted the last link, only one error Asyncresultlistener is not resolving in preference.java May 31 06:31:11 in DownloadWebPageTask task = new DownloadWebPageTask((AsyncTaskResultListener) this).execute("url"); May 31 06:31:58 uh are they in the same subpage? May 31 06:32:13 no definitly not that first one May 31 06:32:30 different files May 31 06:32:31 you are passing in the TOSDialog as the listener May 31 06:32:37 to the downloadtask May 31 06:32:43 ok May 31 06:32:48 i just casted it to point out that that's whats going on May 31 06:32:56 think of it this way: if you were working on this code with other people May 31 06:33:12 should another programming who has to use the downloadtask be able to access anything in the TOSDialog? May 31 06:33:14 no. May 31 06:33:29 ok May 31 06:33:31 hence you cast it and restrict the calls that can be made it to from inside download task to onNewResultsAvailable May 31 06:33:33 see why? May 31 06:33:47 *programming->programmer May 31 06:33:56 anyways May 31 06:34:06 did you make sure everything was imported? May 31 06:34:20 yeah May 31 06:34:36 DownloadWebPageTask imported fine it appears May 31 06:34:38 is DialogTOSPreference still a second class hanging out at the bottom of preferences? May 31 06:34:44 yes May 31 06:34:47 ahh May 31 06:34:51 sep file? May 31 06:35:09 i dont do classes like that but i am guessing this is now references to the toplevel class which is Preferences May 31 06:35:11 not the TOSDialog May 31 06:35:26 yeah you can fix it that way May 31 06:35:37 before you do May 31 06:35:40 hover your mouse over this May 31 06:35:49 does it say it's refering to TOSdialog or Preferences? May 31 06:36:23 neither, just "cannot resolve Async..." May 31 06:36:54 or did i misunderstand May 31 06:37:28 okay well May 31 06:37:43 just make TOSDialog nested inside May 31 06:37:49 Preferences May 31 06:38:07 you dont have to put it in a seperate class, but don't leave it dangling like anachronistic appendage May 31 06:38:51 like this May 31 06:38:51 http://pastebin.com/E9BzRtQQ May 31 06:38:54 tabbingmight be wrong May 31 06:39:12 yeah i nested it May 31 06:39:14 same error May 31 06:39:16 weird May 31 06:39:19 oh you will have to change your xml May 31 06:39:36 it's probably just better to make it its own top level class / file May 31 06:39:52 ok May 31 06:40:11 well if i do that, will the onPrepareDialogBuilder still remove the button? May 31 06:40:17 the cancel button May 31 06:40:35 yes, but it'll also rip a whole in the space time contium May 31 06:40:39 :) May 31 06:41:01 why wouldn't it? the code is still going to be executed May 31 06:41:32 hehe May 31 06:41:34 when you make its own class make sure your xml file May 31 06:41:36 com.example.airwave.DialogTOSPreference May 31 06:41:39 is still correct May 31 06:41:57 ie at the TOSDialogClass file, it'll say package. make sure this is com.example.airwave May 31 06:42:19 do you get private message May 31 06:42:20 otherwise the xml file won't be pointing to the right thing and it'll crash May 31 06:42:21 s May 31 06:42:25 yeah i think so May 31 06:42:38 because ive sent you a few May 31 06:43:38 sorry May 31 06:43:41 i got like May 31 06:43:46 a billion things going on at once May 31 06:43:51 really i should get back to cleaning my house May 31 06:43:58 so i dont have to waste all day tomorrow May 31 06:45:00 ok im still erroring out at DownloadWebPageTask task = new DownloadWebPageTask((AsyncTaskResultListener) this).execute("url"); May 31 06:49:29 grep it up May 31 06:49:50 you grep i grep we grep grep grep grep grep it up May 31 06:49:51 derp May 31 06:49:52 ;p May 31 07:06:38 grep-a-delphia May 31 07:20:00 mornang May 31 07:23:58 why might the first item in my gridview be vanishing/moving whenever i scroll? May 31 07:25:09 because your adapter implementation is wrong May 31 07:28:34 well its initially empty. it stores a list of instantiated imageviews May 31 07:28:58 don't you have a BaseAadapter that is fed to your gridView with setAdapter? May 31 07:29:30 no May 31 07:29:39 how do you construct the grid then May 31 07:30:11 Sicp. oh yes i do May 31 07:30:17 of course May 31 07:30:21 the way its done is wrong May 31 07:30:43 let me show you a solid implementation of it, after having suffered from the above for a long time May 31 07:31:31 its getView() that causes this May 31 07:33:08 the problem occurs when Im trying to reuse convertView May 31 07:33:23 yea yea May 31 07:33:24 I know May 31 07:35:01 here, http://pastie.org/9241754 May 31 07:43:09 is a mainactivity.java necessary or can it be named something else? i used "android create project" in the terminal and it doesnt seem to have generated one, but it did generate a "name of application".java May 31 07:43:25 you can name it whatever you want May 31 07:44:07 okay, cool. Was it standard convention for it to be mainactivity.java? watching tutorials and it seems like more often than not, people used mainactivity.java May 31 07:44:17 you've got to have a main activity.. May 31 07:44:37 the one where the meat of your app is, you're gonna want to name it Main May 31 07:44:46 you can name it Cat, but it will only confuse you May 31 07:45:40 try to have it as "nameOfActivity"_Activity May 31 07:45:52 cause later you will have Adapters, Interfaces, etc. May 31 07:45:59 so you'd know where you have to go to to fix XYZ May 31 07:46:18 right, that makes a ton of sense for readability. Okay, thanks a lot. :) May 31 07:46:42 sure May 31 08:25:41 Hey devs! Didn't have much luck in #android.. Anyone around? May 31 08:28:24 beardedbuddha: Only for you babe. ;) May 31 08:28:38 woah.. Friendly channel for sure! May 31 08:28:55 I'll slip into something more.. comfortable.. while I type out my question May 31 08:29:31 No pants allowed. May 31 08:29:36 Check! May 31 08:29:39 did it work, true-techie ? May 31 08:29:54 no May 31 08:30:13 did as the document showed? May 31 08:30:18 with BaseAdapter? May 31 08:30:32 I'm looking for an app which absolutely must be out there, but I can't find it. I just want a background app which sends all my notifications to a custom endpoint/URL May 31 08:30:42 yea May 31 08:30:51 Filtering would be nice, but I can live without May 31 08:30:53 Sicp: Perhaps you could help me out. May 31 08:31:01 I was using a baseadapter with my sqlite database May 31 08:31:02 usage of position variable outside the if (convertView == null)? May 31 08:31:09 but I was having trouble linking ID's to positions May 31 08:31:23 so I switched to a cursoradapter, but it doesn't feel right using cursors outside of my db helper May 31 08:31:37 Sicp, i am doing that right now May 31 08:31:53 let me put the code on pastebin... May 31 08:32:23 Ive never used cursorAdapter, but here's the document I use to get a flawless list of strings, each reporting its correct position and none switching places with the other when scrolling http://pastie.org/9241754 May 31 08:33:02 it must be implemented like that, I've tried 4 other ways May 31 08:33:04 all fail May 31 08:33:36 mainly because the position variable is not for you to use when the views are still being constructed (and while they are being recycled at runtime) May 31 08:35:42 Sicp: http://pastie.org/private/xbtuo7krpat1m9grzujx4q May 31 08:36:11 don't cast it into a linear layout May 31 08:36:15 what for/ May 31 08:36:23 ah ok May 31 08:36:32 i am adding the views dynamically May 31 08:36:46 do all of that outside the first if May 31 08:37:11 position will report wrong values if inside that if, try it May 31 08:37:20 it will go 0, 1, 2, ......, 0 May 31 08:37:29 Log.d it May 31 08:37:37 Heh, cheers. May 31 08:37:45 therefore you get the first as the last and the last as the first, as you are scrolling May 31 08:37:54 and other fuck ups May 31 08:37:59 What I'm doing is returning a cursor that runs off a select _id from table; May 31 08:38:08 I do that too May 31 08:38:17 returns all of the tables id's, then I get an object based off that id May 31 08:38:30 (to create the row view) May 31 08:39:24 MyModelobject myo = databaseHelper.getMyModelObject(cursor.getLong(0)); May 31 08:39:28 something like that May 31 08:40:46 all I can say is try what is in that document above, all things using position to be outside if (convertView == null) May 31 08:40:57 and log position to see what I mean May 31 08:41:59 it's a real problem, this adapter issue May 31 08:42:24 there's no set-in-stone way for it, mainly because it's in the "DIY" realm of listviews/gridviews/etc.. May 31 08:42:31 i.e. custom May 31 08:42:31 Aye. May 31 08:42:56 Another problem I have is that some of these objects are quite big and need to deserialize data when retrieved May 31 08:43:08 so to merely list these objects May 31 08:43:12 I need to do all that work. May 31 08:43:29 that's in the way you've designed your app May 31 08:43:33 Well, the phone needs to do all that work. Yeah. May 31 08:43:34 you made it that way May 31 08:44:08 what Im talking about is the primitive way of just listing rows with let's say only a textview, try to do that and you will see the first row swapping with the last, and things replacing each other when you scroll May 31 08:44:22 mainly because of the nature of the position value and how the view creator shares access to it with you May 31 08:50:08 it will take a bit of refactoring but ill try to move the position variable outside of that if statement May 31 08:51:23 only initialize there May 31 08:51:49 my problem is, i need the information in the old instance of the imageview for the new instance inside that if statement May 31 08:52:04 then do that initialization outside as well May 31 08:57:59 initializing the imageview outside means ill probably have to add it to the view outside as well. viewholder might throw a null pointer exception when its trying to find the views May 31 08:59:19 but thats some pretty valuable info though about position. i dont see a lot of people on stackoverflow with this problem. i wonder why May 31 09:03:00 there are May 31 09:03:06 http://stackoverflow.com/questions/19564012/listadapter-getview-with-wrong-value-for-position May 31 09:04:11 some guy here explained this to me once, but it doesn't make sense to expose it to the developer as something to be used when internally it has other plans May 31 09:06:31 they should blog about ways to avoid using position then May 31 09:08:53 why so many problems May 31 09:10:33 how do you do it, pfn May 31 09:12:28 do what, it just works for me... May 31 09:13:04 it <-- May 31 09:13:30 youre probably solving small problems May 31 09:14:05 "small problems" yep, I only solve small problems May 31 09:14:40 haha May 31 09:15:13 more along the lines of you're probably doing it wrong May 31 09:15:18 show a sample of your base adapter implementation May 31 09:15:54 of course it's being done wrong, how else would it not be working! May 31 09:16:08 Dark magic. May 31 09:18:20 http://pastie.org/private/zf6nby3p3wcpimdmnfyxfq May 31 09:18:51 I was asking pfn to do that, true-techie May 31 09:18:56 instead of saying the rest are wrong May 31 09:19:00 and that it should be easy May 31 09:19:29 oh May 31 09:19:55 there are numerous correct adapters available from a multitude of sources, including github and aosp May 31 09:20:09 then why say anything at all dude May 31 09:20:19 absolutely zero contribution May 31 09:20:30 just want to show that you know better May 31 09:20:36 beh! May 31 09:20:53 Hi guys, i have login activity as start followed by main activity which implements all my fragments. How to navigate to main activity when (soft/hard) back-key is pressed May 31 09:21:27 from where? May 31 09:21:38 Which activity are you in when the back key is pressed May 31 09:23:36 and Yuck, wtf is the point of imgvw May 31 09:24:51 tx: onBackPressed() May 31 09:25:12 shmooz: No as in. You're on the login screen... May 31 09:25:20 which is the first activity May 31 09:25:20 you might as well assign your created layout imgvw[position] May 31 09:25:35 Sicp, you May 31 09:25:40 do you want it to that when you press back May 31 09:25:46 it launches the 'main' activity? May 31 09:25:49 that isn't my code May 31 09:25:51 so that* May 31 09:25:51 it works for me May 31 09:25:57 I posted a working implementation May 31 09:26:00 just trying to help them May 31 09:26:01 r useless blather has been no contribution May 31 09:26:07 maybe May 31 09:26:19 your opinion May 31 09:26:52 there's no reason to have redundant image views May 31 09:27:07 that's true-techie's code May 31 09:27:30 I'm not talking to you May 31 09:27:40 ok May 31 09:28:05 lol May 31 09:28:21 Grow up. May 31 09:28:43 pfn, my data comes from the net. i use a custom imageview to chop up a rectangular image. when i want to reuse said imageview i have to make a new instance of it inside getview May 31 09:29:01 but you don't May 31 09:29:01 thats why you see me getting the settings from the old imageview May 31 09:29:20 reuse the view, you already have it... May 31 09:30:44 i had it like that before. there were two lines in getview. one got the imageview from the list, the other returned it May 31 09:31:11 this didnt give me a problem but i thought it was a bad design since i wasnt using convertview May 31 09:31:49 the convert view is to prevent creation May 31 09:31:59 creating too many views May 31 09:32:46 http://pastie.org/private/lbppj4g9evi70gr8taykrq this works flawlessly but i thought it was a bad design May 31 09:32:49 your list is already bound in size, not to mention, it's already a bad design to create your list of views to begin with May 31 09:33:27 abstract your data model instead of having a hacky view that serves as your model May 31 09:34:50 what does that mean? May 31 09:34:54 you're completely ignoring the meaning of adapter there May 31 09:36:21 * pfn wanders off May 31 09:40:56 i guess you meant a list containing a class May 31 10:44:23 how would I get a checkbox in a fragment to be text, then checkbox. currently it's checkbox, then text May 31 10:52:51 im looking for generic root privilege escalation exploits so i can write some plug-n-play rooting scripts fo8r myself, any pointers? May 31 10:53:19 #android-root May 31 10:54:23 ok May 31 11:07:06 why on here it say galaxy s3 resolution is 480X800 http://jacksonkr.com/content/basic-android-device-resolutions May 31 11:07:25 but on every other phone specs site it say it's 720X1280 May 31 11:07:34 http://www.phonearena.com/phones/Samsung-Galaxy-S-III_id6330 May 31 11:08:45 bad research? sgs3 mini is 800x480 though May 31 12:10:43 Hello, guys. May 31 12:11:21 How can I compile some .cpp files unsing pre-compiled .so files that I have lurking in the /jniLibs solder? May 31 12:11:23 folder* May 31 12:11:28 I'm using Android Studio. May 31 12:20:09 Any ideas? May 31 13:13:38 I not sure in the Android Studio May 31 13:14:12 I just abit new to Android Studio myself:) May 31 13:19:50 android studio doesnt support ndk May 31 13:28:39 oh really May 31 13:31:53 just build using ndk-build May 31 13:33:31 Heya, when I try to generate the Android Facebook Key Hash on a mac, i write the following in my terminal: keytool -exportcert -alias androiddebugkey -keystore ~/Desktop/debug.keystore and have added the debug.keystore file to my desktop May 31 13:33:47 I get prompted for a password and type in ”android”, once it is done I just get a bunch of jibberish returned in the terminal? And no properly formated hash? May 31 13:33:49 What am I doing wrong? May 31 13:34:03 Got this for example: ?=??O?f?pſ6q#?\r?8??O??sDm?.=Ha??9??݋???64"A?t???^b??j May 31 13:34:03 ??>+?~C?@??ZYxK??ķq??_@#^C??o??8O)?????P3%??t?-??KU?o[*O?mF??cd??7???{?>oᦛ??E????T:?X%m=r??*?`?A%\?Q?c??a;??6 May 31 13:34:31 ehm wut May 31 13:34:54 yesh May 31 13:35:04 not sure what’s messing about? May 31 13:37:17 Gah all the guides on google are from windows too May 31 13:48:53 * capella sighs ... finally gave Play store a fake phone number so it'd stop asking me on every install May 31 13:53:38 capella thats what google voice is for May 31 13:54:11 google voice can give out fake phone numbers :/ ? May 31 13:54:53 google voice can give out real numbers May 31 13:55:22 heh - seriously, maybe I missed something, but I couldn't figure out how to decline to give my phone number >and< make the nag go away May 31 13:56:11 -_- May 31 13:56:14 capella May 31 13:56:15 im saying May 31 13:56:19 create a google voice number May 31 13:56:24 give that to play store May 31 13:57:32 I'm trying to avoid getting more involved with google than I need to so I'm still confused at your offer of help ... ;) May 31 13:57:59 now if they want to put me on the payroll I'll give them anything they want May 31 13:58:56 Or how about this, when they publish a customer service number, they can have my home phone number May 31 13:59:43 capella do you know what google voice is? May 31 13:59:51 no actually May 31 13:59:56 -_- May 31 14:00:00 never mind... May 31 14:00:44 But I don't jump into every service out there, avoiding twitter, facebook, etc May 31 14:00:55 google+ was a - for me May 31 14:01:35 But that's off-topic for software dev ... May 31 14:22:31 * capella almost finished reading through AbstractQueuedSynchronizer and ReentrantReadWriteLock ... and my head hurts :p May 31 14:40:06 Guy, can you help me with loading a library in the NDK? May 31 14:40:10 Guys* May 31 14:40:43 I compiled Bullet in another project and now I have the .so files for each architecture. May 31 14:40:57 Now I want to use these in my current project. May 31 14:41:25 I jave a few JNI .cpp file who are including the Bullet .h files. May 31 14:41:33 files* which* May 31 14:41:57 And I want to link the .so file that I've compiled to my JNI .cpp files. May 31 14:42:47 So that in the end I'll have to load 2 libraries: libbullet.so and libmylib.so May 31 15:21:33 Hi guys, how do you test snippets of code? Is there some easy way other than creating a new project. something like jsfiddle, please help guys May 31 15:23:42 meadhikari, I don't know of anything like that unfortunately May 31 15:31:22 Floens, thanks for answering, now i just hope there is no such thing and carry on May 31 15:42:50 So? May 31 15:43:09 Any ideas on how to use a shared library with the new build system? May 31 16:04:14 Is there really no one who can lend a hand? May 31 16:23:46 i have a spinner who's array changes values depending on another spinner's selelection, I did this with the adapter's notifyDataSetChanged(), which loads the new spinner data, but it keeps the position of the old selection. how can I make it also resett to the top position of data? May 31 16:24:00 Hi, if anybody is a little free, can you look into my app and give some feedback. This is my first app, so I am not sure what to do and what not. http://pastebin.com/25ah6F1E May 31 16:24:55 your app in a pastebin?.. May 31 16:25:09 ah, I see May 31 16:25:14 no one will bother with your link, WantToCode May 31 16:25:24 you're better off at reddit/r/androiddev May 31 16:25:36 ah, he wants a UI designer :) May 31 16:25:45 I have posted there. Waiting for response. May 31 16:25:49 you are not allowed to post jobs here May 31 16:26:14 Looking to override a method defined like this: May 31 16:26:21 you're better off at lance May 31 16:26:32 elance* May 31 16:26:42 Sicp, any experience with the NDK? May 31 16:26:48 very little May 31 16:26:48 well, I don't think he wants to hire one, he wants to chat with one May 31 16:26:50 hehe, capella. I am in no position to provide a job :P I quit my Civil Engg job to make apps myself, Just a college graduate May 31 16:27:07 yah that -----^ May 31 16:27:13 but there's already Google News and Weather May 31 16:27:17 why bother May 31 16:27:21 protected void onClusterItemRendered(T item, Marker marker) { May 31 16:27:40 Sicp: Google News doesn't fit everyone, same with weather :D May 31 16:27:46 They are not so good in here. May 31 16:27:50 yeah May 31 16:27:52 well ...I don't know May 31 16:27:59 I would look for real problems to solve May 31 16:28:03 How can I override this? when I try to use the same argument types in my override method, it complains May 31 16:28:09 but hey, you want to code May 31 16:28:19 meh - theoretical problems are fun to tinker with May 31 16:28:29 Plus supporting 15 languages would be fun :D May 31 16:28:37 as long as one winds up learning something in the process May 31 16:28:43 I tried to find the source of the Gradle Android plugin. May 31 16:28:52 But I couldn't find it. May 31 16:28:54 * Sicp melts at the sound of Gradle May 31 16:28:57 it buuuuurnssssss May 31 16:28:57 Can anyone help? May 31 16:29:01 I know... May 31 16:29:07 It burns me as well. May 31 16:29:07 is there no method to set the position of arrayadapter to zero? I can only fine get position method May 31 16:29:24 well May 31 16:29:30 there is May 31 16:29:48 when I use notifyDataSetChanged() it keeps same position which iIdont want May 31 16:30:10 There's setSelection. :P May 31 16:30:19 oh wait, sorry, I'm thinking about spinners. May 31 16:30:38 I really need some help. I've compiled Bullet into shared libraries and now I want to use it with JNI but I can't seem to compile it properly with Gradle. May 31 16:30:56 actually Im using it with a spinner May 31 16:31:06 So guys, how do you store preference keys? May 31 16:31:12 I've hard coded mine instead of using strings.xml May 31 16:31:19 because you're wasting space if you do translations May 31 16:32:23 (I use constants programatically though) May 31 16:33:08 njcomsec: the way I have my spinners set up now means that I don't call notifyDataSetChanged at all May 31 16:33:44 even when I need to update them :P May 31 16:33:54 I literally reinitialize them because I was getting frustrated. May 31 16:34:08 that's a nice app, WantToCode May 31 16:34:27 well done if you are the only person May 31 16:34:29 Sicp: wow May 31 16:34:46 yes started learning android on 28th March :D May 31 16:35:10 thanks. I set selection on the spinner and it worked May 31 16:35:11 Thanks a lot Sicp:D May 31 16:35:15 you do need design May 31 16:35:20 cause that grid..... May 31 16:35:33 and that Plus sign May 31 16:35:36 hehe May 31 16:35:57 I wanted to make something like Speed dials are for desktop browsers May 31 16:36:11 like bookmarks? May 31 16:36:23 yeah something like them May 31 16:36:33 man, images are so important in apps like this May 31 16:36:42 replace the ones you have with bad images, the whole app breaks down May 31 16:36:49 so different from web May 31 16:36:53 worlds apart May 31 16:37:40 I had a different idea too for the navigation, but I wanted to be little different and creative :P May 31 16:38:19 Like the speedial in this Dolphin Browser http://puu.sh/8TY5P May 31 16:39:17 So overriding So how can I override functions with generic type arguments? May 31 16:48:04 well theirs is different May 31 16:48:11 it makes sense there May 31 16:48:26 but with you, the width of the canvas you are working with is quarter of the browser May 31 16:48:48 so you get (if on phone) 2 items for column, on like 20 columns May 31 16:48:52 if you have 40 news papers May 31 16:48:59 even if 15 newspapers, it will look ugly on phone May 31 16:49:33 1st step to getting better, admitting that you need a designer May 31 16:49:34 lol May 31 16:49:37 Ok. Thanks for this. I'll see if I can do something for the phone version then. For Tablets it is okay then? May 31 16:49:59 Im not in position to say if ok honestly May 31 16:50:06 hire someone to say if ok or not May 31 16:50:23 I am open to it but dont have a cent to pay someone :( May 31 16:50:31 I'll see what I can do May 31 16:50:43 start releasing May 31 16:50:43 Thanks a lot! for taking out time :) May 31 16:50:55 even if not 100000% done May 31 16:51:56 I'll try to add 3 more newspaper and release it (and add some stuff to Settings activity too) May 31 16:52:03 Thanks man :) May 31 16:52:31 sure May 31 16:58:36 I've a method defined as protected void onClusterItemRendered(T item, Marker marker) May 31 16:58:40 I want to override this in a class that extends the class onClusterItemRendered is contained in May 31 16:58:46 However, it keeps complaining T can't be resolved to a type in my overridden method May 31 16:58:50 thoughts? May 31 17:00:23 maybe it has no constructor with the stuff you're asking for May 31 17:00:27 Hi May 31 17:00:31 the only constructor is the one you are not using maybe May 31 17:02:30 I created a game linking one of my apps to it but mistakenly I forgot to change the hash from the console (console.developers.google.com) to my certificate's hash and published it. Can I now just delete the client id and create a new one? I'm getting a "this app is incorrectly configured" error when trying to login. May 31 17:02:56 you cannot delete any app from the store May 31 17:03:00 the domain name is gone May 31 17:04:18 think I misunderstood what you're asking May 31 17:04:22 I think you did May 31 17:04:23 but meh May 31 17:04:30 Sicp: I don't understand? Constructor? May 31 17:04:49 look...I'm out! May 31 17:04:52 ooook* May 31 17:04:53 I created a new client ID with the correct hash but it doesn't work. Do I need to link the app again? May 31 17:04:57 cause 2 questions misunderstood May 31 17:04:58 lol May 31 17:05:05 I thought you were overriding from Android source May 31 17:05:08 not your own method May 31 17:05:35 I am Sicp, from the google-maps-utils library May 31 17:05:56 yea well the way that method comes is pretty much what you get, if it doesn't take X as parameter, you cannot make it do so May 31 17:06:10 you can't make it take a String if it takes an int May 31 17:07:01 use right click > Source > Override/Implement Methods to get the methods you want May 31 17:07:19 hmmm May 31 17:07:28 you'll see a whole list May 31 17:07:52 oh wow! May 31 17:08:00 Didn't know that was there! Sweet! May 31 17:08:25 yea pretty cool May 31 17:09:09 Now weird follow up question May 31 17:09:11 Ok, I figured it out. May 31 17:09:50 The type that the arg has to be is implemented by another class of mine, can I make it use my other class? May 31 17:10:28 Android NDK anyone? May 31 17:29:58 listen to the clusterfuck that I've gotten myself into May 31 17:30:11 I've made a listActivity that shows up as a "dialog" upon a button click May 31 17:30:22 and open an item click in that list activity, a password dialog shows up May 31 17:30:49 when the OK is clicked on that password dialog (actual dialog), the dialog disappears and the user is taken to a brand new activity May 31 17:31:17 the password dialog is implemented (codely) inside that list activity, and from that OK press I want the list activity to disappear May 31 17:31:23 so it must tell itself to go away May 31 17:32:20 hey people, i used android studio to create a project with a navigation drawer, the problem is, how can i use this? May 31 17:32:38 i can't find any tutorials on how to add different fragments etc... May 31 17:33:03 hell, i don't even get fragments... i'm one of those "i learned activities!" people.. May 31 17:33:50 the black art of fragments May 31 17:38:44 Sicp, you know any resources? May 31 17:38:57 the navigation drawer from Google docs is very good May 31 17:39:03 very simple too May 31 17:41:07 yeah, i used AS's "New Project" navdrawer template May 31 17:43:02 that's not the one I mean May 31 17:43:15 there's one online where you read how it's done and get to download the sample code May 31 17:44:06 If I have the name of an app, what's the best way to find out the process ID of the main process of the app from within the emulator? May 31 17:44:23 I think you can use PS May 31 17:44:40 Sicp, i wish it was easier.. May 31 17:44:58 helicopter88: sure, but I need to use it in a systematic and automatic way May 31 17:45:06 i.e. in my program May 31 17:45:19 easier than the one posted online? https://developer.android.com/training/implementing-navigation/nav-drawer.html May 31 17:45:22 you can't be serious May 31 17:45:53 ohuhm, mdim there was a thing to find all the processes May 31 17:45:56 memory is short tho May 31 17:46:09 ps lists all processes May 31 17:46:16 in java May 31 17:46:19 but I need only one May 31 17:46:57 I have the following uglyness, but I'm sure there's a much better way: adb -P $ADB_SERVER_PORT shell "ps" | grep -v "USER " | grep $APP_NAME | head -1 | awk -F" " '{print $2}' May 31 17:47:16 ps axo pid,user,pmem,pcpu,comm | { IFS= read -r header; echo \"$header\"; sort -k 3,3nr; } | head -7 May 31 17:47:31 that will get you 7 of the highest memory intensive processes May 31 17:47:34 do head -1 May 31 17:47:56 you get PID, USER, MEME, CPU, and name of process May 31 17:49:20 Sicp, http://pastie.org/private/ryrqfzbftghaahljj6kmnw that's my Main.java code, what's the placeholder fragment for? May 31 17:49:58 I don't know, I never went beyond the sample I linked to May 31 17:50:05 in 2 weeks I will though May 31 17:50:07 lol May 31 17:55:26 hi guys May 31 17:55:58 hi May 31 17:56:04 I have an issue with adt it's quitting when I try to create a new project (when I click on finish to create the project) . May 31 17:56:15 LINUX! May 31 17:56:21 yep opensuse May 31 17:56:26 buy mac May 31 17:56:27 please May 31 17:56:28 haha May 31 17:56:48 no one can help you with that here May 31 17:56:51 sawreh May 31 17:57:10 everyone is using mac here? May 31 17:57:16 no way in hell May 31 17:57:24 no, but this is not the channel for such a question May 31 17:57:38 this is for when you do finally get ADT to work and start using it May 31 17:57:45 OS advocacy, fight! ;) May 31 17:58:35 Sicp, it was working until I upgraded to the last distrib of opensuse May 31 17:58:49 now it's strictly a linux question then May 31 17:58:52 has nothing to do with act May 31 17:58:55 adt* May 31 17:59:12 why would you use opensuse man... May 31 17:59:15 its 2014 May 31 17:59:27 what distro should I use? May 31 17:59:29 Arch OK....Ubuntu sure.... May 31 17:59:51 I planning to switch to arch but I dont have yet the knowledge to May 31 18:00:18 I used to be like you, huge linux advocate May 31 18:00:35 but then I took an arrow in the productivity May 31 18:00:52 and you switched to mac? May 31 18:01:02 I had the mac thrust upon me May 31 18:01:17 is bsd less productive than linux? :p May 31 18:01:30 if so I ll have to try it May 31 18:01:32 as much as the sun is better than the moon May 31 18:03:01 so you re using a mac to do android dev? May 31 18:04:01 yea May 31 18:04:37 I mean come on, you want to use a software and it isn't allowing you to! May 31 18:04:45 why the fuck do you accept this, fuck desktop linux May 31 18:04:58 let the fanboys suck my apples May 31 18:05:09 but it used to work (adt) May 31 18:05:16 used to May 31 18:05:21 now it doesn't May 31 18:05:26 why should it ever break May 31 18:06:13 coz I'm not used to it yet May 31 18:06:20 yea, blame yourself first May 31 18:06:52 this is not code, this is a product you want to use, if it does not work as expected its the developer's fault not yours May 31 18:06:57 you except CLICK > WORKS! May 31 18:07:01 anything else is WRONG May 31 18:07:13 if I need to type 1 line in the command line, its wrong May 31 18:07:52 whether I accept this to be the way I use the computer or not, that's up to me. but if Apple does it, then everybody who isn't doing it should be condemned May 31 18:08:07 computer hitler! May 31 18:09:11 that's right but I have to use the terminal coz I'm web dev & all the hosting is done on linux May 31 18:09:19 that's different May 31 18:09:25 Hi all, should logcat show log messages from a physically-connected device? May 31 18:09:31 I'm talking about a perfectly working binary breaking because of your OS of choice May 31 18:09:42 of course, Da_Rhyno May 31 18:10:26 sure May 31 18:10:34 google it May 31 18:10:38 at work I use windows lol May 31 18:10:38 maybe there's a package that will fix it May 31 18:10:41 lol May 31 18:10:49 everything work as it should May 31 18:10:51 Sicp - Thanks. I'm using a wrapper library for the android logs, which shows the messages when I use an AVD, but it's not showing any of my messages. May 31 18:11:14 try using Monitor May 31 18:11:30 its in your sdk May 31 18:14:13 Okay, thanks... gonna check it out. May 31 18:14:15 Hi all May 31 18:15:17 Someone can tell me why the development is a lot different in Android and Blackberry knowing that those platform use both java ? May 31 18:18:02 Sicp - Awesome! It showed me what I wanted, and what I was doing apparently is feasable! =D Thanks! May 31 18:29:22 Sicp, i managed to get it working :D May 31 18:33:47 no really :) May 31 18:33:50 how? May 31 18:35:57 been a while since i've done android dev, and i have a few layouts in android studio that when i click them, i get xml, others show the visual representation / designer. how to switch between the two views, or where can i find the snippet of documentation about this? May 31 18:36:41 i moved all the usages of position outside of the if statement and i used setters to set up my imageview instead of using the constructor May 31 18:37:10 excellent May 31 18:37:36 bullet proof adapter May 31 18:37:39 ill probably use that "abstract model" pfn was talking about in the future but Im satisfied right now :) May 31 18:37:49 yea... May 31 18:37:53 you might as well do it now May 31 18:37:54 lol May 31 18:38:02 but whatever, its been all day May 31 18:38:04 right May 31 18:38:14 yea May 31 18:40:40 when something works, https://www.youtube.com/watch?v=IluRBvnYMoY May 31 18:40:43 haha May 31 18:44:06 stop laughing at yourself. May 31 18:46:54 save your keystrokes May 31 19:16:19 Dumb question, but why do the NDK website and the docs inside the NDK try to avert people from using the NDK for regular development? May 31 19:16:40 It seems counterproductive in some aspects, especially if you'd want people to port software to your system. May 31 19:17:16 Counterproductive /and/ counterintuitive, I must add. May 31 19:19:13 because of the way Android is structured May 31 19:19:28 writing full apps in C code is a terrible idea May 31 19:20:32 also, noone wants you to port software from other systems. May 31 19:21:42 Well, it's not too difficult to write wrapper functions using JNI from what I can tell. And why wouldn't they? I mean what makes more sense from a marketing standpoint: limiting yourself to one system, or shooting for as many systems as you possibly can? May 31 19:22:03 The more systems you hit, the wider your audience will be. May 31 19:24:12 writing a JNI wrapper for every Android API, datastructure and interaction is just insane May 31 19:24:23 not to mention boxing / safe-unsafe transition costs when crossing barriers May 31 19:24:47 and while developers might wanna make a watered down app for all platforms May 31 19:25:10 platform owners and users heavily prefer apps that were built for their platform with its strenghts and features in mind May 31 19:25:46 I'm not saying a wrapper for every API that exists; you're right, that would be insane. I mean only for the ones that developer would need. May 31 19:27:55 The thing is this: say someone makes a custom game engine. If that person planned ahead well, they'd try to make the game mechanics and features as system-independent as possible, so that way it's not too hard to add touchscreen support for smartphones and tablets, or keyboard/mouse support for a PC, or joypad support for consoles, etc. May 31 19:28:18 Think back to id software and their games, namely Doom and Quake May 31 19:29:04 They were, and still are, good games and yet ported to pretty much any system that can support them. May 31 19:33:41 There must be someone who knows how to use a shared library within JNI in Android Studio, right? May 31 19:34:15 I don't, sorry. I use eclipse/ndk-build. May 31 19:34:28 Isn't there any documentation on it? May 31 19:34:51 Da_Rhyno, yes, for games that regulary happens May 31 19:35:04 Da_Rhyno, since OGL/OAL interfaces are exposed in C May 31 19:35:14 see Unity, Corona and other game engine frameworks May 31 19:36:13 No documentation. May 31 19:36:41 sogard, what exactly is your problem? May 31 19:36:42 I imagine there has to be a way to tell Gradle to use the shared libraries. May 31 19:36:45 hey guys May 31 19:36:49 and what has Android Studio which is just an IDE do with it? May 31 19:36:54 "Gradle" uses nothing May 31 19:37:00 you just have to pack them in your apk May 31 19:37:04 Hey. May 31 19:37:13 I'm not a moron. May 31 19:37:15 this question has been killing me for the past two days May 31 19:37:34 but what is the key in android-studio to go to end of statement when you finish stuff inside parenthesis or similar May 31 19:37:39 like the eclipse enter May 31 19:37:46 I want to compile my native files with the shared library. May 31 19:37:56 Android Studio does this autmatically. May 31 19:38:03 automatically* May 31 19:38:10 mine doesn't May 31 19:38:13 And it uses Gradle for that. May 31 19:38:25 ah ok, wrong conversation May 31 19:39:19 What I don't want is putting hundreds of copy-pasted files into JNI and compiling the whole thing. May 31 19:39:37 I just want my JNI files to use the shared objects. May 31 19:40:58 I don't know what Gradle / AS plugin you use for your native builds May 31 19:41:10 but you'll have to fix Android.mk file to add include and library paths May 31 19:41:17 Gradle puglin 0.9.0 May 31 19:41:33 You cannot use the Android.mk file from within Android Studio. May 31 19:41:36 and of course, your libraries will have to be compiled for all architectures you'll build libraries for May 31 19:41:53 Yeah. Android Studio does that automatically. May 31 19:44:44 O.o May 31 19:46:17 well, you'll have to add include and library paths to cflags and ldflags in ndk section then :) May 31 19:47:11 Aren't ldflags enough? May 31 19:47:26 depends if you use includes. May 31 19:47:26 I would have really liked a solution that would be Git friendly. :P May 31 19:47:44 if you find one let me know May 31 19:48:04 :) May 31 19:48:05 There' that LOCAL_SHARED_LIBRARY option in the Android.mk file. May 31 19:48:25 So it would be reasonable to think it can be changed within the Gradle file, right? May 31 19:48:57 well as you noticed gradle plugin is still kinda alpha :) May 31 19:49:13 perhaps someone that actually uses gradle can help :) May 31 19:50:53 The guy developing it is quite friendly and helpful. May 31 20:55:21 does andoid code run on jdk 1.8? May 31 20:55:37 or do we have to use jdk 1.6? May 31 21:02:32 h4k1m doesnt run on the jdk at all May 31 21:02:40 but its compliant with 1.6, and parts of 1.7 May 31 21:04:29 not 1.8? May 31 21:04:56 I meant the version required by adt May 31 21:05:15 I suppose since it's eclipse it wont cause an issue with v8 May 31 21:06:34 h4k1m, 1.6 and 1.7 work fine May 31 21:06:53 1.8 isn't officialy supported May 31 21:06:55 1.8 should too May 31 21:07:15 I dont know I think I ll stick with 1.7 May 31 21:08:33 hey, i am developing an server client app. - the problem is that the server has no internet connection but the connection should be established via wifi. as far as i know its not possible for non system apps (= compiled in the rom or a root app) to set up a hotspot automatically.... is there a way around? May 31 21:10:51 h4k1m shouldn't matter May 31 21:17:37 Karatektus, use wifi direct. May 31 21:17:55 or bluetooth May 31 21:19:03 hi, i am newer in android. I have a program with TabHost and other with a map. I need put a map in tabhost, but i don't know how to create this, can anybody help me? May 31 21:19:23 i was using fragments, but i don't know how to add a map in a Fragment May 31 21:20:56 jug6ernaut, sure since it's just needed by eclipse not android sdk May 31 22:17:21 Hello May 31 22:18:04 I'm having an issue with authentication when trying to use the Google Maps Android API. Specifically, it tells me that there's an error contacting Google servers May 31 22:18:29 After googling the problem, I've double-checked the settings in my manifest file May 31 22:18:58 I have also double-checked my API key, deleted it, and regenerated it May 31 22:19:59 I also believe that I have all the necessary permissions in my manifest May 31 22:29:00 Hmm, it seems to be working, changed the package identifier and regenerated the API key using the new id May 31 22:50:24 hello … for andriod studio users … how can i migrate to gradle May 31 22:50:27 i dont understand where to begin... May 31 22:51:09 meh May 31 22:51:11 gradle May 31 22:53:56 what's the #android-dev.wisdom on gradle these days? (Haven't been following its progress, just curious) May 31 22:56:30 i love it May 31 22:56:36 well i love adnroid studio that is May 31 22:56:45 beats the hell out of eclipse May 31 22:57:20 using gradle is somewhat orthogonal to the IDE isn't it? [or at least, I hope so :)] May 31 22:58:36 I'm mostly wondering whether there's much purpose for me to migrate away from the usual ant-based builds. May 31 23:00:34 kbs yes it is May 31 23:00:43 tho AS forces gradle May 31 23:00:49 why i use intellij lol May 31 23:00:54 kbs: IDE integration has a lot to do with the build system May 31 23:01:00 tho i plan to do some projects with gradle... May 31 23:01:09 ah, I see - thanks, didn't realize that :) May 31 23:01:18 * kbs is a command-line using dinosaur May 31 23:01:22 What an IDE does is often a thin wrapper around build system commands May 31 23:01:35 aye! May 31 23:14:40 Any anyone every had trouble linking different versions of libraries when building JNIs? May 31 23:15:08 WHen doing ndk-build it only copies the libswscale.so files not the libswscale.so.2 files May 31 23:15:30 I tried manually copying but that doesn't seem to work either. May 31 23:27:02 i need to pick up custom advertisement data in BluetoothAdapter.LeScanCallback. i get the parameter of interest in ios by dictionary key name, for instance, [advData valueForKey:@"kCAdvDataIsConnectable"]; i realize that is not java, or anything near what i'd expect anyone here decipher. but the point is, i can see key names, whereas in android instead of key value pairs, i get byte[] scanRecord, and don't know how to May 31 23:27:03 make heads or tails of it. May 31 23:28:17 https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.LeScanCallback.html is the reference, and i'm looking at the byte[] scanRecord which should contain the information i need. May 31 23:40:52 I'm not familiar with BLE, but does it sound like all you get is the low-level packet? So, you'd need to parse the packet 'by hand', so to speak? May 31 23:43:06 hey guys, I have some app that has a service... how do I make an intent for this service from another app? i.e. how do I specify this specific service? May 31 23:48:25 hi May 31 23:52:31 Also when I send an intent how do I get the result (if the service creates a bundle and fills it with a string response) Jun 01 00:10:11 kbs, yeah, but i don't know the mapping, and ios doesn't expose it, am hoping to find some reference material on standard structure, as mine is not custom Jun 01 00:33:17 Hello. Is there any way to load a dll file in android? Jun 01 00:33:32 a windows dll file? Jun 01 00:34:02 Yes Jun 01 00:34:29 Highly unlikely Jun 01 00:34:40 your talking about two languages Jun 01 00:34:44 compiled Jun 01 00:35:02 darkswordchris: in short: no Jun 01 00:35:06 I have one that I need to use, but I have no source, and the only alternative would be to replicate it, which would take a lot of time. Jun 01 00:35:18 p_l: petecouture alright, thanks :/ Jun 01 00:35:54 darkswordchris: i'd look up if there isn't a possible replacement Jun 01 00:36:27 darkswordchris: the dll is a PE written for x86, and you want an ELF made for ARM, so you're going ot need to rewrite it Jun 01 00:36:45 p_l: There is no replacement. The only thing I am finding is Mono, which may work Jun 01 00:37:21 Mono only uses .DLL as containers (CLR is wildly different from x86 native code) Jun 01 00:37:34 gdogg: Alright, I was hoping I wouldn't have to, especially being new to android development and java Jun 01 00:37:39 Yeah Mono reads MIL Jun 01 00:37:46 Ah, ok Jun 01 00:37:52 darkswordchris: what dll do you need? you may be able to find similar libraries Jun 01 00:38:56 It's the RPG Maker XP "RGSS102E.dll" There is no alternative, as it is a very specific dll. Basically I was hoping to be able to just write a wrapper for it. Jun 01 00:41:06 why is it that someFragmentTransaction.beginTransaction().replace(R.id.some_frame, new SomeFragment()).commit() Jun 01 00:41:14 causes onCreateView() to get called twice? Jun 01 00:41:33 that is, the fragment's onCreateView() Jun 01 00:42:59 arrrrrgh, freakin' fragments Jun 01 00:43:04 always causing all sorts of problems Jun 01 00:52:45 Is building with android source different then building with teh NDK? Jun 01 00:56:56 nm Jun 01 01:23:19 hey Jun 01 01:24:25 hey Jun 01 01:26:22 cliffreich: petecouture: http://media.portable.tv/wp-content/uploads/2012/10/Steven-Quezada-gomez-hey-bank-busted-smile.png Jun 01 01:27:36 steven looks like a nice guy, smiling and all Jun 01 01:28:33 cliffreich: haha, have you seen that breaking bad episode? Jun 01 01:28:44 although this is a bit off topic Jun 01 01:29:11 its possible to add a custom image as title and remove title? i tried but damn, when i tried to remove text only it wiped my image too Jun 01 01:29:49 cliffreich: do you mean the actionbar? Jun 01 01:30:06 yeah! where the title is supposed to be Jun 01 01:30:42 app name* Jun 01 01:30:52 yeah I think you can set a custom view. check the AB docs and look for adding a custom view - I believe their example is an expanding search view Jun 01 01:30:56 you can adapt it to your purposes Jun 01 01:31:56 oh ok, will check thanks Jun 01 01:32:11 it's not super simple but it's pretty well documented Jun 01 01:32:11 still learning and finding good android dev books Jun 01 01:32:17 looking for Jun 01 01:32:20 it's been ages since I've cared to do it so that's all i remember really Jun 01 01:32:56 thats sounds like i should focus on other stuff :^) Jun 01 01:35:11 whats the best android book to learn? or should i focus on docs plus trial and error? Jun 01 01:35:20 I've used docs + google + stack exchange Jun 01 01:35:33 but i almost always prefer internet to books Jun 01 01:35:56 the android API isn't changing super fast, but there's almost always a good tutorial Jun 01 01:36:35 cliffreich: big nerd ranch is pretty good when starting out Jun 01 01:37:31 though once you're done you should immediately drop eclipse and install android studio Jun 01 01:38:33 yeah. f eclipse. Jun 01 01:38:34 heh Jun 01 01:39:32 oh ok thanks Jun 01 01:40:17 also you will come to hate sqlite and fragments Jun 01 01:40:34 fecking tables! Jun 01 01:41:06 load four side by side to try and figure a way to make them work together Jun 01 01:49:44 Mango_Man: can't you do it without fragments ? Jun 01 01:51:14 make apps without fragments? definitely Jun 01 01:53:09 I did master/detail without fragments, I just created two detail layouts one for portrait and one for landscape and show and hide the right one when the user rotates Jun 01 01:57:21 and I save the states I need to restore which are minimal Jun 01 01:58:57 the scroll position of the listview for when I come back to it pretty much Jun 01 02:33:36 anroid_load_priority [0], There is no sepolicy file … when trying to get gps location from webview Jun 01 02:33:55 1-6942/com.itcuties.android.apps.itcwebviewexample E/SQLiteLog﹕ (14) os_unix.c:32512: (2) open(/CachedGeoposition.db) - Jun 01 02:36:13 hello Jun 01 02:39:45 hello Jun 01 02:44:02 Hey so I'm having an issue with a ViewPager. One of my tabs is a fragment that responds to scale pinch gestures but they only work if I pinch vertically because it interprets it as a swipe to another tab otherwise. Any way to make it not change tabs when the user pinches Jun 01 02:46:46 I considered completely disabling swiping and just using the ActionBar tabs but its a nice feature and I think there should be a way to do thi Jun 01 02:46:49 s Jun 01 02:46:52 wish i knew Jun 01 02:47:14 dont use viewpager Jun 01 02:47:33 ia9371: thanks what should I use Jun 01 02:47:34 use a different activity Jun 01 02:48:22 just use a different activty Jun 01 02:48:29 you dont ave to use viewpager Jun 01 02:48:35 ia9371: How would I use a different activity? I have action bar tabs and I need it to be able to switch out fragments based on the tabs Jun 01 02:49:33 just link to another actiity Jun 01 02:50:36 ia9371 … u have any idea why my webview geolocation is freaking out? Jun 01 02:50:39 with gps enabled Jun 01 02:51:11 its not freking out Jun 01 02:51:36 ia9371: Alright thanks I will try that Jun 01 02:52:04 how should i fix this geolocation.db thing not being found… could it be im targeting a SDK version that my phone doesnt like for this particular thing? Jun 01 02:53:33 is youre phone gathering data from gps Jun 01 02:53:57 im trying to enable gps on my webview … the webview is going to be using html geolocation **** ENDING LOGGING AT Sun Jun 01 02:59:58 2014