**** BEGIN LOGGING AT Mon Jan 21 02:59:58 2013 Jan 21 03:01:46 barque, this channel i'ven oticed isn't as used as much as you'd think Jan 21 03:02:06 you might be better off on stack exchange Jan 21 03:02:08 :S Jan 21 03:02:18 I've went up and down on stackoverflow like crazy Jan 21 03:02:24 sigh... no hope Jan 21 03:02:30 did you ask a ? on SE? Jan 21 03:02:44 stackexchange? ummm Jan 21 03:02:52 overflow* Jan 21 03:02:53 what's the different between that and stackoverflow anyway? Jan 21 03:03:01 exchange is the top level site Jan 21 03:03:06 mhm Jan 21 03:03:08 overflow is a sub site Jan 21 03:03:13 I see.. Jan 21 03:03:21 theres other sites like gaming and ... um... others i don't visit Jan 21 03:03:22 well, I've plowed that place top to bottom Jan 21 03:03:24 no help Jan 21 03:04:10 the usual answers are there: libFFmpeg.so, mediaplayer etc. Jan 21 03:23:36 How would I make a TextView similar to a table of contents, with ellipses separating the title (left aligned) from the page number (right aligned). Jan 21 03:24:11 you'd likely need to progmatically determine the width Jan 21 03:24:18 and insert ellipsis Jan 21 03:24:31 Dammit. Jan 21 03:24:34 I found something that does that when I was googling text scaling to screen size Jan 21 03:24:43 it inserted characters until it ran out of space Jan 21 03:25:06 it was on stack overflow. unfortantely that wasn't what I needed so I didn't read through all of it. Jan 21 03:37:03 mdkess: its pretty easy Jan 21 03:37:36 you make a paint object bound to a textview with proper settings (style, size, etc) and then use a method like getPaintedWidth Jan 21 03:37:46 to test against a string Jan 21 03:38:10 makes sense, lasserix. Thanks. Jan 21 03:38:45 alternatively you might be able to use ellipsis attribute with middle set, then use a textview that spans entire horizon Jan 21 03:39:12 and just append the title . page number with extra white space where it works--might be an easier somewhat hackish way to do it Jan 21 03:39:40 fyi the textview's ellipsis functionality is broken for <3.0 Jan 21 03:40:07 by broken i mean it'll only ever allow two lines of text no matter what you set the limit too Jan 21 03:40:23 (not that this applies in this case but just for future reference) Jan 21 03:43:04 Hey guys... I've got a LazyAdapter going on that will populate my listview with my list_row.xml file... Well, I've used it for quite a while, but I thought... hmm.. let me change it up a bit by adding an extra icon to it if a value in the HashMap for that particular item matched "song"... So, that's all fine and dandy, until I scroll... and once I scroll past those items (and they are no Jan 21 03:43:04 longer visible in the list), then my two new icons disappear !! ha. Here's a pic: http://1upcreativegroup.com/be.png Jan 21 03:45:02 I'm guessing that there still is a LazyAdapter aspect going on, and so it's calling the adapter on scroll... inside there, I'm simply finding the ImageView ... ImageView songIcon = (ImageView) vi.findViewById(R.id.songIcon); and then doing this: Jan 21 03:45:16 if(!game.get(SoundboardActivity.KEY_TYPE).equalsIgnoreCase("song")){ songIcon.setVisibility(songIcon.INVISIBLE); } Jan 21 03:46:51 In otherwords... each item in the HashMap contains: map.put(KEY_TYPE, "clip"); or map.put(KEY_TYPE, "song"); .... and I just want to hide an ImageView for that particular item if it isn't a "song". Make sense? Jan 21 03:51:32 Works if I put an else { visible } line in there. Fine by me. ! Thanks for reading, in any case. Jan 21 04:10:59 I'm trying to use MediaPlayer to play a video on an activity's surfaceview Jan 21 04:11:12 I keep getting IllegalArgumentException - surface has been released Jan 21 04:11:16 what the *hell* is going on? Jan 21 04:11:29 I've trying everything... on prepared listener, surfaceholder Jan 21 04:11:58 * Maziz s Jan 21 04:12:39 Did you try: Jan 21 04:12:39 1. Set the surface view Jan 21 04:12:40 2. Set the path of the video Jan 21 04:12:41 3. Set prepare Jan 21 04:13:01 I'll upload my code Jan 21 04:16:56 http://pastebin.com/dJ4NViPh Jan 21 04:17:17 the stuff you're seeing above the commented line is in onCreate after super.onCreate() Jan 21 04:18:46 http://pastebin.com/PkVu611k Jan 21 04:18:51 that's maybe a better paste Jan 21 04:21:05 ok I tried putting prepare at the end Jan 21 04:21:11 now I get a blank screen... no crash at least Jan 21 04:23:52 hello? Jan 21 04:27:53 i suggest you open up sample for media player Jan 21 04:28:04 ... which? Jan 21 04:28:20 there's media playback on Google's website Jan 21 04:28:23 but that's for audio Jan 21 04:28:34 and any suggestions on the code I uploaded? Jan 21 04:30:20 i think a lot of stuff still missing Jan 21 04:30:32 like checking if the surface is ready and created Jan 21 04:30:39 eh? Jan 21 04:30:43 detecting how to handle when the surface is destroyed and changed Jan 21 04:30:47 The surface is part of the xml Jan 21 04:30:53 surfaceholder callback? Jan 21 04:31:01 open the sample Jan 21 04:31:02 oh so I need surfaceholder callback absolutely? Jan 21 04:31:03 and have a look Jan 21 04:31:06 which sample? Jan 21 04:33:04 "open up the sample" is just as much of a statement as "pick the right solution" Jan 21 04:33:14 or "solve the problem" Jan 21 04:33:43 http://developer.android.com/guide/topics/media/mediaplayer.html Jan 21 04:34:02 sigh, that sampel =>*does*<= =>*not*<= cover video Jan 21 04:34:07 beside it could also be your mp4 file cannot be accessed that causing the illegal exception Jan 21 04:34:08 sample* Jan 21 04:34:21 no it stopped throwing exceptions Jan 21 04:34:26 I placed prepare at the very end Jan 21 04:34:40 I'm gonna try SurfaceHolder.callback Jan 21 04:38:19 just letting you know: Details (1) of this link worked : http://stackoverflow.com/questions/11410834/android-sdk-media-player-load-video-stream-from-http-url Jan 21 04:38:28 and yes I needed SurfaceHolder.Callback... thanks for your time anyway Jan 21 04:54:30 is it possible to have action bar items only show on certain action bar tabs Jan 21 05:16:35 DarkIRC2100: yes, have the fragment expose the menu items, not the activity Jan 21 05:21:01 f2prateek: do you know of any example or more explanation? Jan 21 05:21:36 DarkIRC2100: https://developer.android.com/guide/components/fragments.html#ActionBar Jan 21 05:23:48 When using Google Cloud Messaging (GCM), and you wanted a device to be able to activate/deactivate whether or not they receive push notifications, would it be appropriate to use register/unregister for that - or would you leave the device registered and incorporate the active/inactive state and toggle code into your app and 3rd party app server? Jan 21 05:25:54 f2prateek: nice thanks, this should work Jan 21 05:37:45 f2prateek: worked perfectly, thanks again man! Jan 21 05:39:01 glad to hear it ;) Jan 21 05:45:25 If I want to replace a single fragment that should cover the whole screen with 2 fragments each taking a portion of the screen...what's the best way to do that? Jan 21 06:20:09 damccull: delete the first fragment, then add the two new fragments, and wrap all that in a transaction? Jan 21 06:23:22 muhoo that's what i thought too. But should I have two containers or one? And if only one how do I decide the sizes of the fragments on screen? Also, my second fragment is not showing up. Jan 21 06:24:56 i dunno, i'd reckon it'd work if you add the full-screen fragment programatically to a view, then delete it later and add the two other fragments to that same view Jan 21 06:25:23 vaguely remember seeing that done Jan 21 06:28:10 damccull: scroll to example Jan 21 06:28:23 slightly more than 2/3 the way down Jan 21 06:28:23 http://developer.android.com/guide/components/fragments.html Jan 21 06:28:40 shows how to do two and anticpate non-tablet sized phones for just showing one Jan 21 06:29:26 lasserix, yes Ican do that. Sorry I wasn't clear. I want a fullscreen fragment to appear, then be replaced when its clicked by two fragments. One 2/3 screen, the other takes remainder Jan 21 06:34:15 ok, i think i solved part of my problem. Next question. Jan 21 06:34:41 If I am programmatically adding two items to a relativelayout...how do I specify how they are related to each other? Jan 21 06:37:15 damccull: sounds like you want linearlayout & weights though Jan 21 06:37:26 if one is 2/3 the screen Jan 21 06:38:31 g00s i am using a relativelayout, but should I use framelayouts and just set those up and add fragments to them, or try to programmatically relate the fragments to each other after adding? Jan 21 06:41:00 dunno. i would have used 1 LL and stuffed the 1st fragment in it; then removed that fragment and stuffed the other 2 with the right weights Jan 21 06:44:13 how to make the pointer in JsonReader back to the beginning? Jan 21 07:33:32 In a service, I'm calling LocalBroadcastManager mLBM = LocalBroadcastManager.getInstance(this); Jan 21 07:33:43 But this is throwing a NullPointerException. Jan 21 07:33:47 How do I figure out why? Jan 21 07:45:27 sounds like this is not a proper reference? Jan 21 07:50:40 anyone here use the PayPal api? Jan 21 08:00:59 can I use libstagefright.so with Android 2.3.1? Jan 21 08:18:46 http://pastebin.com/2uLYjM48 The NetworkTask is my problem. I start and stop this service multiple times. The first time it runs fine. After that I am getting a NullPointerException caught at line 173. I can't figure out why it won't work subsequent times. The service is being unbound, stopped, and destroyed. But next start something breaks in NetworkTask and I can't figure out what. Anyone can hel Jan 21 08:18:46 p? Jan 21 08:24:07 It seems my doInBackground method isn't getting called. Any ideas? Jan 21 08:26:49 Orr...it's working just REAALLY slowly... Jan 21 09:05:44 hi Jan 21 09:05:55 SimonVT hi, are you around ? Jan 21 09:06:52 do you know if there has been any fixing of this bug that makes the ABS freeze ? https://github.com/JakeWharton/ActionBarSherlock/issues/510 Jan 21 09:07:05 it's been up for like 8months and still there in the last release Jan 21 09:07:14 could anyone point me in the right direction, I need to push a notification when an user has done his part in the game so the counterpart can continue doing his part. What kind of technique / way am I looking for to achieve this Jan 21 09:08:48 Better to vertically center listviews smaller than their container or align to top? Jan 21 09:26:18 Hi can anyone tell me how to hide the suggestions from a SearchView after onSuggestionClick hat been triggered? Jan 21 09:32:56 lasserix, why is it not container sized? Jan 21 09:41:55 I want to test my BT MIC. Are there any apps that i can use to test it Jan 21 09:43:03 if I have Activity a that starts Activity b and then finishes, does a.onStop get called before b.onResume? Jan 21 09:44:03 thepoosh http://developer.android.com/training/basics/activity-lifecycle/starting.html Jan 21 09:44:47 i have an asynctask that I'm calling .cancel() that is not getting it's onCancelled method called until a while after I call cancel. I am connecting a socket to a server, and I think onCancelled() is only calling when the server drops connection for lack of input. Jan 21 09:45:01 thepoosh in your question onStop() is not guaranteed to be called at all Jan 21 09:45:04 doinbackground() is opening a socket and inputstream.read() Jan 21 09:45:08 with a while loop Jan 21 09:45:23 how can I guarantee the socket gets closed? Jan 21 09:45:34 if I call a.finish Jan 21 09:45:39 it does get called Jan 21 09:45:51 your on about for activity a that started b? Jan 21 09:45:57 or your on about b finishing ? Jan 21 09:46:35 if you calling finish() it will go through paused stopped destroyed Jan 21 09:46:36 the code is: a{startActivity(b); finish()} Jan 21 09:46:57 I want to know if both are not active Jan 21 09:47:34 so your calling finish on a ? Jan 21 09:47:40 after starting b Jan 21 09:47:42 ? Jan 21 09:47:45 well, yes Jan 21 09:47:51 a starts b and finishes Jan 21 09:48:56 but on resume will not get called when you finish, but if you mean the whole lifecycle then yes Jan 21 09:49:39 hmmm Jan 21 09:49:44 I need to think this through Jan 21 09:50:15 whats the purpose ? Jan 21 09:50:25 splash screen or something ? Jan 21 09:51:13 could anyone point me in the right direction, I need to push a notification when an user has done his part in the game so the counterpart can continue doing his part. What kind of technique / way am I looking for to achieve this Jan 21 09:53:07 Daani: perhaps you want to define your own protocol (e.g. using something like HTTP REST, if it is turn based) and want to keep the connection alive the whole game. If the game can last very long, this might not be the best appraoch, and you perhaps want to take a look at GCM to push notification to devices Jan 21 09:55:29 timroes: a game can vary a lot in time due to not be real-time played. It is a quiz kind of game. User duels, game starts by retrieving questions from my web service, when user is done answering it should notify the opponent. Jan 21 09:56:00 could GCM be easily invoked by the web service, then it's a good solution Jan 21 09:56:56 Daani: yeah it that varies a lot, you might not want to hold a connection all the time alive, since it is very likely to be killed due to low bandwidth or a tunnel or such :) Jan 21 09:58:25 and GCM can be either invoked to send messages, via a http post request (should be very easy from every language) or they offer a JAVA lib, if you code your server in java Jan 21 09:58:40 you might want to have a look at the docs http://developer.android.com/google/gcm/index.html Jan 21 09:59:09 or to get an overview, you can watch this talk from last year's Google I/O http://www.youtube.com/watch?v=YoaP6hcDctM Jan 21 10:02:37 thanks a lot Jan 21 10:03:01 short warning ahead, only works on devices where google play is installed Jan 21 10:03:29 so most likely isnt the best ide if you are aiming do distribute your game over other channels Jan 21 10:07:40 Are there any android recording apps that make use of BT MIC? Jan 21 10:08:39 rsv: most should work, IMO Jan 21 10:09:08 Is there a simple call to change the color as to "highlight" a row in a simple list view (ie standard arrayadapter)? Jan 21 10:09:30 p_l: my device does not have a sim card. so i have a BT headset. I want to capture voice input using bt headset mic Jan 21 10:09:46 i tried using bluetooth mic test and it force closes the app Jan 21 10:10:14 hey, any idea how to check wich codec gallery app is using to play a video? Jan 21 10:10:20 p_l: any idea what apps i can use on ics Jan 21 10:10:26 rsv: I don't see what sim card has to do with it Jan 21 10:10:40 I mean, I would like to check if it is using a sotware codec or a hardware one Jan 21 10:11:17 p_l: the thing is android layer turns on BT handsfree when a call is in operation Jan 21 10:12:10 timroes: the app is most likely to be distributed on google play so it should be all fine Jan 21 10:12:30 rsv: then you might have a problem that #android-root only can answer Jan 21 10:16:46 no ideas? :( Jan 21 10:17:10 I would like to which codec MediaPlayer object uses to decode video Jan 21 10:17:18 to know* Jan 21 10:18:01 not in the docs ? Jan 21 10:18:10 as in the capabilities ? Jan 21 10:18:48 er.. do you have a reference or link where I can check please Jan 21 10:19:01 i mean the google docs Jan 21 10:19:57 hmm Jan 21 10:23:26 ok, another question, do you know how to remove a decoder? I mean, I don't want my apps to use a specific decoder so I would like to remove it to be sure Jan 21 10:42:52 i was wondering is the android minimalist dialog built in? http://developer.android.com/images/ui/dialogs.png or are they built by each dev. seperately Jan 21 10:43:09 im referring to the style not the actual content of the dialog Jan 21 10:44:34 balls2thewall: and i am wondering, you copied the picture from exactely the page where it is explained how to create such dialogs :D Jan 21 10:45:14 http://developer.android.com/guide/topics/ui/dialogs.html Jan 21 10:46:16 they look different :/ Jan 21 10:46:30 what looks different? Jan 21 10:47:08 the dialog looks different, not plain and minimalist like in the guide Jan 21 10:47:33 the right one is a default AlertDialog with setImage, two buttons, a text and a title? Jan 21 10:48:27 the left one is (I guess) an AlertDialog with setView to set the custom view Jan 21 10:49:18 if you really don't want to set a view, just to call methods like setTitle, you will have the default alert dialog (right one in picture) and the date and time picker dialog available Jan 21 10:49:42 and the list dialogs Jan 21 10:49:48 (http://developer.android.com/images/ui/dialog_checkboxes.png) Jan 21 10:50:04 I guess for everything else you need to call setView to pass it a custom view Jan 21 10:57:51 anyone knows any good resources on the use of sensors wrt the NDK ? Jan 21 11:02:25 I tried using a couple of bt record apps like bt mic test and bt record lite. They crash. anybody tried with anyother bt record apps Jan 21 11:04:54 Anyone here use NFC intents? Seems to be a bug in Android where it can't recognise unformatted Mifare cards Jan 21 11:06:10 Smashcat: what are you filtering for? mifare tech? Jan 21 11:07:14 Ge0rG: I just want to capture ANY NFC tag, no matter what it has on it. Unfortunately this doesn't seem to work for unformatted cards (Android just brings up some options to "open" it in a browser Jan 21 11:08:05 Smashcat: what is the intent you see in logcat when tapping that unformatted tag? Jan 21 11:08:12 Ge0rG: I haven't found a single working example of an app that can read the UID from an unformatted card - the Google demo doesn't work either Jan 21 11:08:35 Smashcat: there was a bug up to 4.0.3 Jan 21 11:08:39 http://code.google.com/p/android/issues/detail?id=22258 Jan 21 11:08:56 that infected mifare classic 1k and ultralight C cards Jan 21 11:08:58 Ive a Service which is created on boot (by a broadcastreceiver). I've a Toast in the Service in onCreate and in onStart(). Now after a few minutes the service get started again and again and again. I thought Android will keep it running? (not like a activity/process)? Jan 21 11:08:59 Ge0rG: It comes up with MifareClassic, NfCA, Ndef Jan 21 11:09:33 Tried all sorts of tech filters, nothing seems to capture it. Jan 21 11:10:00 Smashcat: you tried NdefFormatable? Jan 21 11:10:09 misterli: no, services may be restarted as well Jan 21 11:10:23 misterli: the chance of getting restarted is lower with a foreground service, but that implies a permanent notification as well Jan 21 11:10:36 Smashcat: because if it isn't formated it should be recognized as NdefFormatable afaik Jan 21 11:10:58 timroes: No, but I did try just capturing everything by using TAG_DISCOVERED, with no tech (assumed this should get anything) - but that fails with unformatted cards Jan 21 11:11:34 timroes: I'll try it, thanks Jan 21 11:11:36 yeah afaik (i am not soo much into nfc) that should fail, since tag qould be required to be formated Jan 21 11:11:44 but that is just my guess Jan 21 11:12:43 timroes: Thing is, tags always have a unique ID, even when unformatted, and that's all I need. I'll be working with unformmated cards. Jan 21 11:13:53 try it with the tech filter :) Jan 21 11:13:57 and see if it works Jan 21 11:15:21 and to your tag discovered problem: http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_TAG_DISCOVERED Jan 21 11:15:40 seems like it would start the tag discovered for unformated, as long as no activity is listening for ndef discovered or tech_discovered Jan 21 11:17:11 timroes: Yeah, just tried, and the unformatted tech isn't handled either. Might have to go to the client and ask that they supply all cards formatted with any old junk data so the phones can see them. Jan 21 11:17:59 Smashcat: could you show your manifest file and your techlist file ? Jan 21 11:18:35 timroes: Yep, hang on... Jan 21 11:18:46 Ge0rG, thanks. But onCreate will be called only once? Ive a listener which should only be created once at beginning. Jan 21 11:20:08 timroes: I've pasted both files in here - http://pastebin.com/c6qVt5ax Jan 21 11:20:37 Smashcat: and what android version are you using? Jan 21 11:20:54 timroes: 4.1 for this Jan 21 11:21:10 formatable is written with one t :) Jan 21 11:21:22 misterli: no, onCreate() will be called again if your service gets killed in between Jan 21 11:21:28 see if it works with that corrected :) Jan 21 11:21:37 in your tech list Jan 21 11:21:53 Ge0rG. How does it get killed? by the GC or just by another process/crash? Jan 21 11:22:11 timroes: heh, ok Jan 21 11:22:55 misterli: by androids GC Jan 21 11:23:50 timroes: Nope, same problem. Jan 21 11:23:53 Smashcat: and try to skip the default categoriy in the tech_discovered intent-filter Jan 21 11:24:13 okay, which means: when the service creates an activity which should be displayed to the user, then it would be created several times (when the GC wants it) Jan 21 11:24:19 according do docs you shouldn't put the category filter in the tech_discovered ot tag_discovered Jan 21 11:25:08 oops, github blocked in china :| Jan 21 11:25:27 misterli: you can't just create an activity from a service Jan 21 11:25:36 timroes: Ah, so I can't use the filter at all then? I'll take it out Jan 21 11:25:52 no just the category tagfrom the intene filter Jan 21 11:26:11 Jan 21 11:26:41 timroes: Yeah, just does the same thing - puts the process into the background, and offers to open the tag in a browser Jan 21 11:27:05 hmm Jan 21 11:27:10 the unformated tag ? Jan 21 11:27:29 Really just need the equivelent of android.nfc.action.ANYTHING_AT_ALL ;-) Jan 21 11:27:37 Yes, the unformatted tag Jan 21 11:28:17 in what browser? Jan 21 11:29:11 timroes: This is an Android app. It offers to open the unformatted tag in Chrome or some other browser Jan 21 11:29:17 ah okay Jan 21 11:29:36 what happens if you do so? :) Jan 21 11:29:43 Haven't bothered ;-) Jan 21 11:29:56 There's nothing on the tag, so I'd imagine it'll just go to Google Jan 21 11:30:03 okay Jan 21 11:30:20 sorry to ask again and seeming stupid, just so we don't talk at past each other Jan 21 11:30:32 you have an nfc app isntalled, that offers you a screen to chose a browser? Jan 21 11:30:42 so its not the default android chose some app to handle that? Jan 21 11:31:33 timroes: Nope, the app doesn't use the browser at all. The problem is that when an unformatted tag is swiped, the Android OS itself is taking focus and offering to open the tag in a browser. So my app is not able to do anything with it Jan 21 11:31:48 ah okay Jan 21 11:31:52 then I would assume the tag isnt empty? Jan 21 11:32:07 because i doubt (but don't know) the android browser wants to listen on unformated nfc tags? Jan 21 11:32:17 might they bought, and the company preformated them with their company url or such? Jan 21 11:32:18 timroes: It is totally unformatted. There is no data on it at all, except for the UID Jan 21 11:32:37 okay, then I have no further ideas, and unfortunately have onlyf ormated mifare cards around me Jan 21 11:33:28 I checked with the "TagWritter" app. It just offers to format it Jan 21 11:34:31 only suggestion I would have now is to look into the manifest of tagwriter and see, what intent filter they use Jan 21 11:34:39 and in what they differ from yours Jan 21 11:34:46 Well thanks for trying to help! I'll see if I can request they're all formatted. It doesn't matter what they're formatted with - as long as there's some NDef data, my app works ok Jan 21 11:35:13 Unfortunately there's no source code available for tagwriter Jan 21 11:35:34 i have an emulator with google play isntalled to download the apk to my pc, so i can unzip it and look at it :) Jan 21 11:35:51 Heh, ah! Jan 21 11:35:59 SimonVT do you know if there has been any fixing of this bug that makes the ABS freeze ? https://github.com/JakeWharton/ActionBarSherlock/issues/510 Jan 21 11:40:45 Morning Jan 21 11:41:33 how come i have an android 4 (in a pen with hdmi) and it plays divx videos and my nexus 7 does not, says video play error. What is diferent from one to another? Jan 21 11:42:16 Where are the codecs stored, what can i change in them to make them able to play divx (avi) Jan 21 11:43:09 they are booth android 4.1 Jan 21 11:48:16 hmm. webview gives "page not found". However I can browse normally with the opera browser. Could swear this code used to work. Could this be related to that my phone's default browser has stopped working properly? (Takes like 10-15 minutes before it loads page succesfully. After that it works for a while properly) Jan 21 11:49:42 Smashcat: just a very last question, because i noticed it. in your paste the was missing for the techlist. was this just missing from your paste, or might you have forgotten it in the xml file? Jan 21 11:50:33 timroes: Er, that's missing in the tech list - although there's no errors about it Jan 21 11:52:06 you could also try to add also NDEF_DISCOVERED as a separated intenet filter Jan 21 11:59:12 is there an Dialog meant specifically for errors? the alert dialog is dismissable and the OnDismiss event is only available since v.17 :( which i could sure use Jan 21 12:01:39 balls2thewall: http://developer.android.com/reference/android/app/Dialog.html#setOnDismissListener(android.content.DialogInterface.OnDismissListener) it says from api Level 1 for me Jan 21 12:02:06 the builder has it only since api level 17, but the dialog has it already before Jan 21 12:02:09 eclipse "public AlertDialog.Builder setOnDismissListener (DialogInterface.OnDismissListener onDismissListener) Added in API level 17" Jan 21 12:02:17 oh Jan 21 12:04:48 timroes: Using that manifest has definitely made some progress. It's now relaunching my app when an unformatted tag is used. Really it should just detect it within the app, but at least this is useable! Thanks. Jan 21 12:05:25 Smashcat: http://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc.html#foreground-dispatch Jan 21 12:05:48 if your app is open and you dont want to let android decide what app to handle the intent, use that part from the docu, to make your app handle it Jan 21 12:05:58 i guess thats the reason why its restarting Jan 21 12:06:01 ddreamero: are you using latest ABS release? Jan 21 12:06:17 timroes: Yeah, I've worked from that guide. It doesn't actually work - it's the same code used in the Google demo, but that doesn't detect unformatted cards at all Jan 21 12:06:57 ddreamero: i had that problem too, i fixed it by moving all my options menu for fragments into the parent activity. Jan 21 12:07:25 ddreamero: then later someone said that was a bug related to older ABS release, so updated and switched them back into fragments and it worked Jan 21 12:18:19 hello everybody Jan 21 12:18:46 i want to make a horizontalscrollview with each child on a single page. how can i do that ? Jan 21 12:18:50 afternoon Jan 21 12:18:52 :) Jan 21 12:19:05 presently its showing all the childs attached Jan 21 12:19:21 would you not use a viewPager for that ? Jan 21 12:19:39 can't it happen with horizontalscrollview ? Jan 21 12:20:04 well yes I would imagine with doing lots of the work already there for you in a viewPager Jan 21 12:20:16 ok Jan 21 12:20:19 thanks Jan 21 12:20:40 timroes: I'm wondering if it's a bug in Android - the method .disableForegroundDispatch(this) doesn't actually seem to disable the foreground dispatch. Ive put some debugging output in there, and I can see that it's getting to that statement, then just ignores it :) Jan 21 12:22:00 Smashcat: haven't used it yet, so I am not a big help there :) Jan 21 12:22:29 Heh, no problem thanks. I'll put in a bug report and see what they say Jan 21 12:23:20 StingRay_: but will viewpager support versions 2.3 and below ? Jan 21 12:24:10 sunny_slls with support lib I think so Jan 21 12:24:17 is it possible to supply shadow for shape-drawable? Jan 21 12:24:33 api 1 with support lib Jan 21 12:24:35 :) Jan 21 12:24:38 just checked Jan 21 12:27:20 still no help? Jan 21 12:27:30 how come i have an android 4 (in a pen with hdmi) and it plays divx videos and my nexus 7 does not, says video play error. What is diferent from one to another? Jan 21 12:27:59 BrixSat: one has DivX codec another doesn't Jan 21 12:28:19 p_l: where are they stored? Jan 21 12:28:21 the phones that play DivX tend to use "official" DivX codec that is paid for Jan 21 12:28:44 BrixSat: in core of the OS, you can't copy or install because it would fail (as it's often tied to hw decoding chip) Jan 21 12:28:44 where can ui get the coded, i havent find nowhere info about that Jan 21 12:28:52 because you can't Jan 21 12:29:19 so you mean i wont be able to add divx or xvid support to nexus 7? Jan 21 12:29:27 At least not for normal applications - there are applications that ship with their own codecs, at expense of speed/cpu use, which you can use Jan 21 12:29:53 p_l: for an application using videoview that wont work :/ Jan 21 12:29:56 BrixSat: well, you could try integrating full suite of ffmpeg decoders into media framework in a custom ROM. Have fun Jan 21 12:30:12 p_l: i will try Jan 21 12:32:49 Does anyone have experiences on TapForTap ad exchange network? http://r.tapfortap.com/SeDx1 On idea level it sounds interesting. Show ad in your application -> your ad is shown in another developer's application. I did not implement it yet, but seems easy. Jan 21 12:39:43 If any one is using captivate framework and Adobe AIR in his application, i would appreciate if he would look at this question http://stackoverflow.com/questions/14438524/add-adobe-captivate-framwork-to-android-eclipse-project Jan 21 12:40:06 I mean is this even possible? Jan 21 12:42:04 zipoboy: I cannot answer your question, but I have a counter question. How do you experience the performance of Adobe AIR in Android? I tried few applications using it long time ago with my Galaxy S and the performance was very poor. Jan 21 12:43:16 ASensorEventQueue_hasEvents(mSensorEventQueue); returns -1, signaling that there is an error, but how can I find out where? Jan 21 12:43:25 ndk-gdb doesn't see a segfault or other error Jan 21 12:44:44 I'm guessing that mSensorEventQueue = ASensorManager_createEventQueue(mSensorManager, looper, 0, mycallback, myObj); is generating a faulty queue Jan 21 12:45:41 but what could cause that, the sensor manager and looper get created, 0 can be passed as I'll be relying on the callback and myObj is a pointer to the owning object, which I cast to the owning object class in the mycallback function Jan 21 12:46:24 and then I call the non-static method on my now casted object, but that doesn't happen Jan 21 12:46:30 the callback is never called Jan 21 12:47:02 so I'm wondering whether the callbacks are only usable in a full C++ (no Java at all) NativeActivity Jan 21 12:47:35 Google Groups about the NDK seems to say that it should be possible outside a full NativeActivity Jan 21 12:48:07 IndiumIndeed: I haven't done much high performance testing but the simple game that development team has send me seems to run fine on my HTC Desire. But this is relay simple kids game like guess the color and stuff. Jan 21 12:48:14 but nowhere is mentioned _how_, and I've found the toadlet engine to implement these APIs, but I still must be missing something Jan 21 13:06:57 Anyone knows an Android API for doing epoll/poll on a ParcelFileDescriptor? Jan 21 13:08:48 ah yes, there is my accelerator data Jan 21 13:11:40 hi guys Jan 21 13:11:55 i cannot figure out how to setup a menu for my live wallpaper Jan 21 13:12:05 anyone who can guide me a bit? Jan 21 13:12:19 is there any way to print or otherwise inspect EGLConfig's (https://developer.android.com/reference/javax/microedition/khronos/egl/EGLConfig.html)? Jan 21 13:20:21 I have a class that extends View, in that class I have overriden the onDraw method (draws a simple oval), I want to add this view to a linearLayout is that possible ? Jan 21 13:20:30 Hi, I'm interested in writing a small plugin system for an android application. So far I can dynamically load new files but I still have one big issue: How to do the interfacing? Each plugin implements a "Pluggable" interface but either the Pluggable interface is included in the plugin dexfile which causes an error when the plugin is loaded or I just try to cast a Plugin into the Pluggable interface and then a ClassCastException is throw Jan 21 13:22:57 tagrudev yes Jan 21 13:23:42 lasserix, the thing is that it doesn't render :| Jan 21 13:23:54 I am doing something wrong and I can't figure what's it Jan 21 13:23:58 I'm wondering if it's possible to strip the Pluggable interface definition out of the plugin dexfile such that it is properly linked with my Pluggable definition in the main component Jan 21 13:24:09 tagrudev what constructor do you have implemented? Jan 21 13:24:40 lasserix, one taking the context Jan 21 13:25:08 okay that's for doing it code, fyi the second one taking an additional attribute set is what you have to implement when you are going to add it to your xml layout definations Jan 21 13:25:41 Are you properly adding it to your active layout? Did you verify onDraw is being called? Jan 21 13:25:43 lasserix, the thing is I want to add it dynamically and not define it in the xml Jan 21 13:25:52 then you are on the right path Jan 21 13:25:54 I will gist the class Jan 21 13:25:59 mom Jan 21 13:26:34 Make sure to take your vitamins :) Jan 21 13:26:45 lasserix, https://gist.github.com/4586028 Jan 21 13:28:08 that looks okay one thing you'll want to note is that on different density display's that oval will look different since you are using hard coded pixel values Jan 21 13:28:14 but anyways, Jan 21 13:28:28 refresh I have added the code from my activity Jan 21 13:28:31 can you gist the code where you are trying to add it to your layout? Jan 21 13:28:36 :) Jan 21 13:28:56 don't use application context Jan 21 13:29:03 in this instance Jan 21 13:29:23 what should I use ? Jan 21 13:29:30 uhh Jan 21 13:29:31 this Jan 21 13:29:35 will probably work Jan 21 13:29:52 what's the surrounding code on file2? are you in an activity somewhere? Jan 21 13:30:30 onCreate in activity Jan 21 13:31:05 yeah then the activity is a context that is suitable Jan 21 13:31:07 same thing with this Jan 21 13:31:27 when I add a textView the same way It renders Jan 21 13:31:29 you don't want the pie chart to persist beyond the life of the activity right? so don't use application context, just use the activity as context (ie this should work) Jan 21 13:32:09 maybe it doesnt go in the onDraw method let me check Jan 21 13:32:43 tagrudev: i'm thinking you are not setting any size, the textview will fit its content or whatever when you add in code, but I believe you have to set the piecharts size with layoutparams when you add it to the linearlayout parent Jan 21 13:33:03 yep Jan 21 13:33:23 it doesnt go in onDraw Jan 21 13:33:43 hmm lasserix i am adding my xml definition of the linearLayout mom Jan 21 13:34:10 ahh here Jan 21 13:34:13 its been a while sorry Jan 21 13:34:22 you MUST override onMeasure when using custom views Jan 21 13:34:23 http://developer.android.com/training/custom-views/custom-drawing.html Jan 21 13:35:11 I have added the definition of the xml Jan 21 13:35:13 hmm Jan 21 13:35:14 look at that, the onMeasure part: there's simpler ways instead of calculating padding and all that by using width/heightmeasurespec and specifying EXACTLY or something Jan 21 13:38:06 lasserix, hmm don't get that Jan 21 13:38:39 get which? Jan 21 13:39:06 even If I override onMeasure the render is not done again Jan 21 13:39:26 umm what values did you use for w and h? Jan 21 13:40:51 is there anyway for hook text selection ?? like what x11 offer ?? i want my service know what text selected in all app ?? Jan 21 13:41:08 huh? Jan 21 13:41:10 no Jan 21 13:41:17 text highlighting by itself does nothing Jan 21 13:41:25 the user has to actually select copy/paste/etc Jan 21 13:41:44 and before you say "BUT ANDROID SUXXXXXXXX" android isn't X11, deal with it. Jan 21 13:42:48 that's not an X11-specific thing Jan 21 13:43:09 lasserix, recheck the gist I have overriden the onMeasure Jan 21 13:43:51 pragma-: Yeah, I know. I just get annoyed by "BUT WHY WON'T ANDROID DO XYZ, OTHER OS/FRAMEWORK/LANGUAGE/PARADIGM DOES XYZ, GOOGLE FUCKED UP WITH ANDROID" comments that perennially pop up. Jan 21 13:43:57 lov : no . i love android . and i know its for mobile platform and its restriction !! i Jan 21 13:43:58 I'm not saying weox will actually make sone Jan 21 13:44:00 *one Jan 21 13:44:09 I'm just preemptively saying "don't do it >:(" Jan 21 13:46:29 tagrudev: its been a while and im fairly tired, but try using arbitray values like 100 100 Jan 21 13:46:45 see if draws anything, I can't remember how to setup the onMeasure when drawing like you are Jan 21 13:47:14 lasserix, lol if I set it in the xml as a hard value android:minHeight and android:minWidth it works Jan 21 13:47:16 wtf Jan 21 13:47:17 druid Jan 21 13:47:27 yeah exactly Jan 21 13:47:39 pff wtf Jan 21 13:47:43 i think you can pass those min w/h as the w/h in the onMeasure and it'll work Jan 21 13:48:50 i believe you have a chicken in the egg problem if you are trying to tell it to measure it without it being drawn first, but i can't remember, actually i gota get some sleep Jan 21 13:48:58 google will sort you out :) Jan 21 13:49:04 goodluck! Jan 21 13:49:19 well thanks I guess Jan 21 13:50:14 I want to add a java (non-android) library to an android project: but I need it to be added with sources, not using the JAR file. Is there a way to do so without creating a dedicated Android Manifest? Jan 21 13:51:39 mastroWork: I'm not quite sure what you mean. Jan 21 13:51:54 do you mean you have the source java files, and want your project to reference them instead of a jar? Jan 21 13:52:04 If so, it seems like you can just add that to your compile path Jan 21 13:52:46 android has no restrictions on adding non-android java content, as long as all the class dependencies are satisfied (i.e. no referencing classes new to Java 7, etc) Jan 21 13:58:53 matteo: does that help? Jan 21 13:58:55 er Jan 21 13:59:01 ... damnit, he left. Jan 21 14:00:06 lov, actually I think that adding a library source folder (like the default "src") works in eclipse but its not standard at all (will not compile with android ant scripts...) Jan 21 14:01:08 mastro__: that's true, but there's not a lot that can be done there :P Jan 21 14:01:34 I have to keep two separate build systems going simultaneously :( Jan 21 14:08:34 Hi guys. I have following situation: In a CursorAdapter I'm setting the compound images of a TextView in the bindView method. When calling setCompoundDrawables, the app crashes (the activity and the app closes, no messages). There is nothin in the logs, or at least I can't find it Jan 21 14:08:58 the compound image is on the left side and a indicator for unread messages Jan 21 14:10:12 pastebin your code please, also pastebin the logs. Jan 21 14:10:21 Try looking at dalvikvm for logging information. Jan 21 14:10:32 You might have a segfault instead of a nice pretty java layer error Jan 21 14:11:32 lov: http://pastebin.com/n6YCq9QV Jan 21 14:12:19 what is libcore? Jan 21 14:13:09 hello Jan 21 14:13:17 how are you everyone ? Jan 21 14:13:35 memoryleak: And I'm assuming that if you comment out line 9, you don't crash. Jan 21 14:13:52 memoryleak: Is your phone/emulator particularly spammy? You might want to try adb lolcat *:E Jan 21 14:14:09 lov: Exactly that line is what causing the crash Jan 21 14:14:42 How can I use eclipse to "link" against a jarfile like it does per default with the android framework? Jan 21 14:14:45 how can I use the Posix class? Jan 21 14:15:02 lov: finding setting, default accessibility to not found: accessibility_enabled when this line is executed Jan 21 14:15:22 anyone have any ideas why my simple cursor adapter passes the position of the item in a list view on click instead of its cursor _id? Jan 21 14:15:23 i've a question, can i natively run arm debian app package on android without editing it on Eclipse or another IDE ? if yes, how ? Jan 21 14:15:30 E.g. I've defined an Interface in a jarfile and now I'd like to implement this interface without pulling the interface definition into my code - as I do it with types defined in the android framework Jan 21 14:16:24 it's a game written in QuakeC Jan 21 14:17:42 lov: when using a ImageView it does work Jan 21 14:18:36 anyone ? Jan 21 14:19:39 memoryleak: can you pastebin everything relevant in the logs please? Jan 21 14:19:41 it's this one https://launchpad.net/ubuntu/quantal/armel/nexuiz Jan 21 14:19:57 pleed: you just mark the jar as exported in your project properties. Jan 21 14:20:02 pleed: alternately, place the jar in your libs dir Jan 21 14:20:16 Scored: uh Jan 21 14:20:30 Scored: you'd have to port it to Android first Jan 21 14:20:47 Scored: Android runs by forking a jvm instance for your app; you don't run GUI clients from the command line Jan 21 14:21:05 lov: http://pastebin.com/iFaeVgb5 Jan 21 14:21:18 do i have to create a toolchain fully ? Jan 21 14:21:20 Scored: Quake was actually ported for android back in like 2007 in a pre-release of android; I THINK that it's actually part of AOSP. Take a look at that. Jan 21 14:21:32 Scored: past that, I'm out of my depth, sorry. Jan 21 14:21:40 Scored: it's more than just the toolchain. Jan 21 14:21:46 Scored: you have a new app entry point, etc. Jan 21 14:22:22 memoryleak: your PID is 9881? Jan 21 14:22:28 memoryleak: if not, that might just be a false positive. Jan 21 14:22:30 i see Jan 21 14:22:32 memoryleak: what's your PID? Jan 21 14:22:44 lov: 21590 Jan 21 14:22:49 i saw a similar project indeed Jan 21 14:22:52 an android port Jan 21 14:22:56 called kwaak3 Jan 21 14:23:30 Scored: great, take a look at that. Jan 21 14:23:30 lov: let me create a more precise log Jan 21 14:23:31 i tried to browse the wiki of this project, there's nothing about the compilation Jan 21 14:23:40 memoryleak: 01-21 15:20:15.935: WARN/dalvikvm(21590): threadid=1: thread exiting with uncaught exception (group=0x4151c2a0) neat. Jan 21 14:24:10 memoryleak: you don't have a custom uncaught exception handler set, do you? Jan 21 14:24:23 lov: Nope Jan 21 14:24:29 memoryleak: strange. You should get SOMETHING then. Jan 21 14:24:53 I have no idea why you're not getting a Java stacktrace. Jan 21 14:25:24 OK, here's another thought. Split that line up. Put the getDrawable call on one line, and the setCompoundDrawables line on the next. Jan 21 14:25:30 that should at least help determine where you're crashing. Jan 21 14:25:34 Alternately, step through w/ the debugger Jan 21 14:26:18 lov: thanks Jan 21 14:26:55 lov: http://pastebin.com/iYHCFSSd that's output right before calling the method that causes the problem Jan 21 14:28:25 which call? Jan 21 14:28:39 setCompoundDrawables, or getDrawable? Jan 21 14:28:45 topic Jan 21 14:28:47 er Jan 21 14:28:55 lov: yes, setCompountDrawables Jan 21 14:29:16 lov: textViewTitle.setCompoundDrawables(SAPNewsApplication.getStaticApplicationContext().getResources().getDrawable(R.drawable.icon_arrowright),null, null, null); Jan 21 14:29:35 how do i get a spinner to, instead of just being able to select one out of a list of options, have it be a list of checkboxes where you can select multiple options (like a filter list for searching) Jan 21 14:29:55 memoryleak: right. I asked you to split that line into two, just to confirm that setCompoundDrawables is causing the problem. Jan 21 14:30:15 lov: doing that right now Jan 21 14:30:34 WhereIsMySpoon use something like a dialogue with custom view ? Jan 21 14:30:41 rather than a spinner Jan 21 14:30:42 memoryleak: you may ALSO want to try using the debugger to step into setCompoundDrawables and see if you can catch an exception in there Jan 21 14:30:59 glancing at the source, I don't see anything potentially dangerous to this level Jan 21 14:31:05 lets try another track Jan 21 14:31:09 what's the drawable that you're getting? Jan 21 14:31:33 StingRay_: sorry, i dont really know what a dialogue is, is that a thing like a Button or Spinner? Jan 21 14:31:36 if so i can google it Jan 21 14:32:15 WhereIsMySpoon http://developer.android.com/guide/topics/ui/dialogs.html Jan 21 14:32:42 WhereIsMySpoon you should read all the into google doc stuff Jan 21 14:32:48 things will go quicker Jan 21 14:32:49 :) Jan 21 14:33:03 StingRay_: hm, this looks more like it tbh, then i can just customise the dialog to show checkboxes Jan 21 14:33:06 do I have to use the native sdk in order to use the posix API? I see that it is available in libcore, but I don't understand how I can use libcore in an application. Jan 21 14:33:13 StingRay_: well i did say i could google it, but thx anyway :) Jan 21 14:33:50 lov: textViewTitle.setCompoundDrawables(mIsUnreadDrawable,null, null, null); causes null pointer exception, however, trying right now to see if the drawable is null. Jan 21 14:36:06 lov: http://cl.ly/image/2L2j1e0J3K2B and http://cl.ly/image/3r00273Z3X0L Jan 21 14:36:30 There is no message or other information in the exception Jan 21 14:37:43 memoryleak: is setBounds(rect) called on your drawables? Jan 21 14:37:52 drawable(s) Jan 21 14:39:46 novie: no, trying that now Jan 21 14:40:01 memoryleak: if you don't, use the intrinsic bounds methods. Jan 21 14:40:56 novie: neither of them help Jan 21 14:41:25 why do you use a static application context? Jan 21 14:43:03 novie: because the setCompoundDrawables is called in bindView of CursorAdapter Jan 21 14:43:18 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()) <-- should this be getCallingActivity ? Jan 21 14:44:08 wait no, taht wouldnt work with the constructor of the Builder Jan 21 14:44:11 :S Jan 21 14:44:26 i'm quite a noob at android-dev, so it's quite a huge project to start with this Jan 21 14:44:39 i don't know where to start, even if it's existing code Jan 21 14:44:53 are you familiar with porting lov ? Jan 21 14:46:34 here's the makefile of the app Jan 21 14:46:36 http://gitorious.org/nexuiz/darkplaces/blobs/9b483e302a32f2e76f55dc2660e17d7f7c5e96cb/makefile Jan 21 14:46:41 Scored: no. Bear in mind that Android development is dramatically different than porting c code. Jan 21 14:46:50 ok im confused, this thing you linked StingRay_ has that code above but my activity has no "getActivity" method, it looks like it should be some android method but i cant see anything like it - you able to help? Jan 21 14:47:06 Scored: android typically expects you to develop a java application using a custom framework. see http://developer.android.com/training/index.html Jan 21 14:47:20 Scored: you can use compiled shared libs, but you use JNI to load/reference them. Jan 21 14:47:36 most games go this route; they have a thin java wrapper around a shared lib that handles most of the work. Jan 21 14:47:43 so far, i understood that i could compile C/C++ native code on Eclipse to run it on android Jan 21 14:47:49 You can also use a NativeActivity you absolutely, positively, must never ever ever use java. Jan 21 14:47:56 Scored: not exactly. Jan 21 14:48:01 ah Jan 21 14:48:12 Scored: you might want to look at this first: http://developer.android.com/tools/sdk/ndk/index.html Jan 21 14:48:20 lov, novie: setCompoundDrawable* in any variation with and witouth a provided Drawable causes this empty NullPointerException Jan 21 14:48:23 sure Jan 21 14:48:26 Scored: Android runs on top of linux, but it's not a typical linux distro. Jan 21 14:48:30 it's not even an atypical linux distro. Jan 21 14:48:36 it's totally different from what you're used to. Jan 21 14:49:00 yeah absolutely it's really different Jan 21 14:49:15 memoryleak: uh Jan 21 14:49:17 just fyi Jan 21 14:49:17 android works like a Java VM Jan 21 14:49:19 textViewTitle is null. Jan 21 14:49:23 Scored: no. Jan 21 14:49:34 Scored: Android is a frameworks built on top of dalvik, which is a JVM implementation Jan 21 14:49:45 Scored: apps run by forking a JVM instance and having their code called within it Jan 21 14:49:55 the app doesn't fork; the system forks, and runs your code. Jan 21 14:50:07 right understood Jan 21 14:50:26 into java bytecode Jan 21 14:50:39 Scored: you might want to read http://developer.android.com/guide/components/fundamentals.html and come back. Jan 21 14:50:47 sure Jan 21 14:51:32 Scored: as far as the typical app is concerned, the actual runtime is opaque; you just write a java app that exposes certain hooks, and provides a manifest declaring those hooks. Jan 21 14:51:43 lov: 10 points for you. Jan 21 14:51:52 memoryleak: how did you not see that in the first place >_< Jan 21 14:52:25 I'm still surprised that you didn't get a nice fat stacktrace, though. Jan 21 14:52:44 lov: I'm wondering about that too Jan 21 14:52:52 it's btw running on a SGS 3 Jan 21 14:53:16 to gain time to do what i aim to do, Jan 21 14:53:21 Ok, I've read around SO and still am confused, I have the line AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()) just inside a method in a class that extends Activity, but eclipse says my activity class doesnt have any method getActivity Jan 21 14:54:00 i've an xcode project for iOS i started which runs rather smoothly Jan 21 14:54:01 WhereIsMySpoon: step 1 is to think for yourself instead of copy/pasting Jan 21 14:54:13 my class doesnt extend any fragment but actually extends Activity Jan 21 14:54:18 ... right. Jan 21 14:54:28 hint: what could you pass to a function that expects an Activity or a Context? Jan 21 14:54:31 lov: i read through the code before pasting it and most of it makes sense Jan 21 14:54:32 *cough* Jan 21 14:54:40 *cough cough* Jan 21 14:54:50 oh wait, this ? Jan 21 14:54:54 *ding* Jan 21 14:55:06 <_> Jan 21 14:55:25 why the hell would they put getActivity Jan 21 14:55:52 what's more quick ? rewriting it or trying to find a possible way to compile this xcode into an apk ? Jan 21 14:56:04 surely you're only going to put this code inside the activity its going into Jan 21 14:56:10 therefore only want this rather than getActivity Jan 21 14:56:28 I'm assuming that either Jan 21 14:56:32 1) this is super old code or Jan 21 14:56:37 2) You're calling it from inside of a view or something Jan 21 14:56:42 which actually has a getActivity method Jan 21 14:56:56 For example, a Fragment Jan 21 14:57:01 a Fragment has a getActivity method Jan 21 14:57:26 lov: its from developer.android.com, so i doubt its old Jan 21 14:58:00 paste the url, please Jan 21 14:58:04 http://developer.android.com/guide/topics/ui/dialogs.html Jan 21 14:58:15 public class FireMissilesDialogFragment extends DialogFragment { Jan 21 14:58:19 *cough* Jan 21 14:58:56 hm, i skipped over that cause it wasnt what i wanted Jan 21 14:58:57 :p Jan 21 14:59:08 doh Jan 21 14:59:12 yeah Jan 21 14:59:25 just for curiosity, how long did you start to get into android dev ? Jan 21 14:59:27 the takeaway here is that you need to understand what's happening in the instruction. Jan 21 14:59:36 Scored: I've been doing this since 2008. Jan 21 14:59:39 (poorly) Jan 21 14:59:51 :P Jan 21 15:01:24 it's been a while, Jan 21 15:02:29 just started 1 month ago x) Jan 21 15:05:45 that's some huge project i won't be able to do alone, it would take me years actually, even if i improve my skills on that Jan 21 15:06:39 where would i be able to find people who want to get involved into that project ? to join nexuiz and xonotic dev team ? Jan 21 15:06:55 here maybe :) Jan 21 15:07:12 anyone is interested ? Jan 21 15:07:48 Scored : I imagine this is to be a very poor recruitment opportunity Jan 21 15:07:54 people come here because they're already developing Jan 21 15:08:07 i figured this out yeah Jan 21 15:08:44 well, this is more volunteering than recruitment Jan 21 15:09:04 no, it's recruitment, because you're looking for people Jan 21 15:09:21 volunteering has the connotation of "workingn for free" Jan 21 15:10:29 that the case, working for free and with donations the open-source project following the contribution Jan 21 15:10:30 Scored: contact the nexuiz and xonotic dev team, and volutneer to help them out. Jan 21 15:10:40 * lov points to the topic Jan 21 15:10:45 Please don't recruit for your pet projects in here. Jan 21 15:11:22 sorry, i wasn't willing to advertise for it Jan 21 15:12:09 if i want my phone to work as a bt headset after pairing withanother mobile. what profile i need to support Jan 21 15:14:54 well, thanks for the documentation lov , i'll look into it and maybe come back for further questions Jan 21 15:22:02 hey,can any one tell,at present wat is the best open source 3d game engine for android in java?? Jan 21 15:22:41 best is a bit subjective, and I expect opinions will vary Jan 21 15:22:48 Do a google search for "android 3d game engine" Jan 21 15:22:51 so not really an answerable question Jan 21 15:22:52 :) Jan 21 15:23:41 done google search but iam here for suggestion from live peoples Jan 21 15:24:39 i know some,for eg,jpct,jmonkey Jan 21 15:24:48 I prefer http://code.google.com/p/libgdx/ , but it's not very friendly for new developers. Jan 21 15:25:10 It also kind of depends on what you need to use it FOR. Jan 21 15:25:11 hmmm... Jan 21 15:25:23 can some1 tell me how a service can go through onDestroy() but upon being bound again not go though onCreate() ? Jan 21 15:25:41 ok Jan 21 15:25:48 StingRay_: it can't. You probably have a different instance. Jan 21 15:25:52 StingRay_: look at the lifecycle. Jan 21 15:26:35 I am, it;s not actually a service error ... it more that I register a broadcast receiver in onCreate and unReg in ondestroy Jan 21 15:26:39 hey lov,which is better,libgdx or jmonkey/jpct?? Jan 21 15:27:00 zoro202389: I have no fucking idea. Jan 21 15:27:06 do some research. Jan 21 15:27:08 ok Jan 21 15:27:25 not much is given on google Jan 21 15:27:27 and when my activity re-binds the service has already gone through onDestroy but not onCreate when rebound Jan 21 15:27:31 :P) Jan 21 15:27:31 <--- puzzled Jan 21 15:27:33 er Jan 21 15:27:39 Anyone here ever use ormlite? I'm using createIfNotExists and wondering what exactly it returns... Jan 21 15:27:40 http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/dao/Dao.html#createIfNotExists(T) Jan 21 15:27:47 pastebin your code? I think something is wrong with what you're seeing. Jan 21 15:28:07 We are autogenerating IDs, so I was wondering if I can get the ID from the returned object when it is created Jan 21 15:32:21 Hi, I would like to start a game for android and I would like to know if AndEngine is good. Another question is, how can I make like a map creator so people can create maps and load into my game? (just global questions, I don't want code or something like that) Jan 21 15:49:24 lov thanks Jan 21 15:52:32 what's the property (physics) when I tilt my tablet in one direction? Jan 21 15:52:36 rotation? Jan 21 15:53:31 eg if this is my tablet [ ] with its touch screen pointing towards the ceiling and I then grab its left side and lift it, what am I changing? Jan 21 15:53:34 http://stackoverflow.com/questions/14442355/cannot-stat-libs-armeabi-v7a-gdb-setup-no-such-file-or-directory-when-runni Jan 21 16:02:39 belgianguy: accelerometer, or gyroscope Jan 21 16:03:20 lov: I have an accelerometer, gyroscope and magnetic field sensor Jan 21 16:03:56 is there an optimal algorithm to use all 3 sensors? or does a combination of 2 supercedes the third? Jan 21 16:04:20 it seems the magnetic field is often used to determine what is "up" Jan 21 16:04:35 to then put the accelerometer data into context Jan 21 16:05:37 belgianguy: I cannot imagine magnetic field being used to determine what is "up" Jan 21 16:05:42 that's the job of the accelerometer/gyroscope. Jan 21 16:05:49 Use the gyroscope if it's available Jan 21 16:06:32 anyone ever run/currently running Android 3.0 on a HTC desire? Jan 21 16:07:45 kalman filter belgianguy Jan 21 16:07:52 and it's messy Jan 21 16:08:14 no sensor generates reliable info on pointing Jan 21 16:08:29 to get it to mostly work consistently, you need to use all three Jan 21 16:08:37 and you can still be screwed Jan 21 16:09:09 SpeedEvil: yeah, I'm not that big on physics :( I do know what a Kalman filter is (thanks Udacity) Jan 21 16:11:37 it seems that gyro's have short them accuracy and long term drift, where accelerometers have short term drift and long term accuracy Jan 21 16:11:37 gyros drift, accellerometers only tell you which way down is, and magnetometers are confused by metal objects including building frames Jan 21 16:12:07 and magnetometers don't have that, but are indeed vulnerable to metal frames Jan 21 16:12:47 and you need a magnetosphere model, and a rough location Jan 21 16:13:45 anyone here use the PayPal api? Jan 21 16:16:17 I'm starting with android for a little quiz game for kids, to be installed in a museum. Jan 21 16:16:34 thinking of using the samsung wifi 5.0 devices but they only support 2.3 Jan 21 16:17:35 I'm wondering whether there's some diff document of what has changed in the sdk since then? Jan 21 16:18:41 SpeedEvil: ugh, I didn't think it'd be that hard Jan 21 16:18:45 really dont get it... I cant get permissions to write. I am doing this: File sdDir = Environment.getExternalStorageDirectory(); but when I call sdDir.canWrite() I get false. I have also added to manifest file Jan 21 16:18:49 or anyone with experience why developing for >2.3 is muuuuch better/simpler than developing for 2.3? (we'd go and look for other devices then instead) Jan 21 16:20:21 vpdn: "yes" Jan 21 16:20:31 http://developer.android.com/about/index.html Jan 21 16:20:34 2.3 is Gingerbread Jan 21 16:20:38 vpdn: what are you expecting to be different? Jan 21 16:20:43 3.0 is Honeycomb, 4.0 is ICS, 4.2 is Jellybean Jan 21 16:20:52 You MAY wish to use the compatibility library Jan 21 16:20:55 it's pretty much the same but has newer APIs/objects Jan 21 16:21:05 but really, if this is a one-off thing then you're fine programming against 2.3 directly. Jan 21 16:21:25 gmag: try calling .exists() ? Jan 21 16:21:33 also try calling mkdirs and see the return value Jan 21 16:22:05 Anoia: I remember developing for android, when there we no AsyncTasks available for example. And when AsyncTasks came, it made lots of things easier. Jan 21 16:23:05 or that Activities were killed on device rotation (not sure whether that's still the case) Jan 21 16:24:54 what's the recommended bitmap size for RemoteControlClient metadata? Jan 21 16:25:05 vpdn: that is still the case. Jan 21 16:25:10 vpdn: they still are, but you have functions to save state Jan 21 16:25:28 lov, .exists() returns true Jan 21 16:25:34 lemme check mkdirs Jan 21 16:25:59 oh hmm Jan 21 16:26:13 gmag: if you have WRITE_EXTERNAL_STORAGE that should be sufficient. Jan 21 16:27:33 ok, doesn't sound like anyone is screaming >2.3 has thisAwesomeAPIYouGottaHave™ so I'll stick with that device then. Jan 21 16:27:37 lov, this is my manifest: http://pastebin.com/gT14WEDw Jan 21 16:27:55 should I place it in any other position? Jan 21 16:28:14 Im putting it right before Jan 21 16:29:00 Hi, I would like to start a game for android and I would like to know if AndEngine is good. Another question is, how can I make like a map creator so people can create maps and load into my game? (just global questions, I don't want code or something like that) Jan 21 16:32:01 Lecherito: I'm sure it's good. Regarding a map creator, That's really open ended. Jan 21 16:32:22 You have to figure out what format your map is going to be, and what resources live with it, along with what resources the map creator will share. Jan 21 16:32:46 This sounds a lot like "Hey, I'm going to make a game with 0 experience, help?" Jan 21 16:32:58 in which case I'd really recommend that you ask around on game developer forums, etc Jan 21 16:33:07 We can help with android specific things, but not really game design. Jan 21 16:33:29 lov: I've got 0 experiences with android, not asking for code nor anything Jan 21 16:33:42 thanks Jan 21 16:34:28 Lecherito: really, the short answer is "Figure out what kind of game your making, how it's going to be structured internally, and how you want to develop it" before asking about things like editors, etc. Jan 21 16:34:31 anyone here use the PayPal api? Jan 21 16:35:19 belgianguy: it depends on what you want it for, I guess Jan 21 16:36:13 lov, still struggling with this permissions issue :( Jan 21 16:36:19 lov, any idea? Jan 21 16:36:33 SpeedEvil: I'm making something to put on my resume, I now have a set of balls that are affected by a physics engine/world Jan 21 16:36:45 ah Jan 21 16:36:54 but now I'd like to introduce some factors from the outside (eg rotation of the device) Jan 21 16:37:01 lov: actually I already know that Jan 21 16:37:14 and I have matrix library already (glm) Jan 21 16:37:39 so any translation or rotation matrix computation should be a breeze Jan 21 16:37:57 Just wanted some readings, libraries or whatever. I come from Unix C console programming and I'm not used to resources as java etc Jan 21 16:39:45 eg I just read I need to time my readings as to be able to get degrees out of the gyro readings (which come in degrees per second) Jan 21 16:40:15 have you guys ever run into an issue where a notification sound stops playing when you click on the notification bar? Jan 21 16:40:48 and the magnetometer is expressed in microTeslas, and even that can fluctuate depending on where on this sphere (Earth) you are Jan 21 16:43:01 is there a way to do an incremental build of AOSP? Jan 21 16:43:21 because just "make" doesn't pick up my changes, and "make clean; make" kind of takes a long time Jan 21 16:44:34 belgianguy, tips for magnetometer or in fact anything which tend to vary punctually with noise value, you can use an LFP algo (low pass filter) - http://en.wikipedia.org/wiki/Low-pass_filter#Simple_infinite_impulse_response_filter Jan 21 16:45:11 ah, thanks adq, noisy measurements might indeed prove dangerous Jan 21 16:45:33 with magnetometer, you will also have some weird values from time to time, espcially near computer :) Jan 21 16:45:45 so you just have to smooth them Jan 21 16:46:35 belgianguy, the snippet I use: http://pastebin.com/FhnmvbBK Jan 21 16:46:47 where ALPHA equals 0.2f Jan 21 16:47:42 adq: and did you test random values for ALPHA ? Jan 21 16:47:43 hello, can anyone help me use a sd card in the android emulator? Jan 21 16:47:51 or is this hardware related? Jan 21 16:48:20 belgianguy, ALPHA is just a smooth factor Jan 21 16:48:25 see the wikipedia page above Jan 21 16:49:18 ah, adq, sorry, will read that now Jan 21 16:49:44 np, i'm using 0.2 with SensorManager.SENSOR_DELAY_GAME Jan 21 16:49:55 maybe another value will be more suitable, but i was satisfied Jan 21 16:53:16 adq: I'm using the NDK, and I don't think those DELAY variables are defined there Jan 21 16:53:56 no clue for that Jan 21 16:53:59 << The rate sensor events are delivered at. This is only a hint to the system. Events may be received faster or slower than the specified rate. Usually events are received faster. The value must be one of SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI, SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST or, the desired delay between events in microsecond.>> Jan 21 16:55:08 adq: ah, was just looking that up, as the callbacks refused to function, I now just poll if there are unhandled events :( Jan 21 16:55:42 but I need some sort of 'hardcoded' delay to base my measurements upon Jan 21 16:55:57 so was thinking of introducing a set sleep(millis) function Jan 21 16:56:10 but don't see any pthread function related to that Jan 21 17:03:04 hi Jan 21 17:03:58 nanosleep seems to do the job Jan 21 17:16:04 I have a SmartCard API installed Jan 21 17:16:37 where is the binary stored? Jan 21 17:16:46 i need to modify it Jan 21 17:17:31 the classes.dex lives somewhere under /data/app somewhere. there is no "binary" that gets installed in android. Jan 21 17:21:28 thnx Jan 21 17:39:00 hmm Jan 21 17:39:27 I have my while loop sleep for 1/60th of a second Jan 21 17:40:32 ... Jan 21 17:40:35 but there are 3 sensors that generate data,and my while loop only takes 1 event Jan 21 17:41:25 so then my sleep would introduce too much artificial delay, as events get queued but not handled Jan 21 17:41:43 (accelerometer, gyro, magnetometer) Jan 21 17:42:02 I could up the items handled each time to 3 Jan 21 17:42:15 but even then I guess I could have 2 gyro evenrs Jan 21 17:42:19 and one magnetomů Jan 21 17:42:26 magnetometer reading Jan 21 17:43:04 or I could introduce 2 more threads, and have each handle 1 sensor Jan 21 17:43:10 but isn't that overkill? Jan 21 17:47:42 hmm, maybe my custom delay is not needed Jan 21 18:22:31 Hi all, I am developing an android app. I have hit a road block. I know how I can authenticate the user etc. I am aware of how request parameters are sent to the server in our browser, but I am not sure if this is taken care of in my android program. How can I achieve this? Do I have to pass some parameter explicitly everytime? Jan 21 18:24:34 uh, huh? Jan 21 18:24:43 if you have to ask, I'm going to guess "no" Jan 21 18:24:52 can you be more specific about how you're doing networking than "android program" please? Jan 21 18:25:23 also, I strongly recommend that you perform tokanization of the user ID and store that in a header or a cookie rather than making it part of the url Jan 21 18:25:32 and I really do hope that you're not storing the user's actual credentials. Jan 21 18:28:16 sounds like someone needs to learn how http works :P Jan 21 18:28:21 headers, cookies, etc Jan 21 18:36:20 no thread-local storage with the ndk? wow Jan 21 18:36:51 oh? Jan 21 18:36:59 I'm not sure if that's true Jan 21 18:37:18 if you mean java thread local storage, then yeah maybe Jan 21 18:37:20 there are obviously workarounds but you can't just __thread something Jan 21 18:37:31 * lov shrugs Jan 21 18:37:33 it's been a while Jan 21 18:37:34 i mean C .. ndk Jan 21 18:37:50 yeah, I know Jan 21 18:38:24 lov: I am using Django- tastypie for creating the REST APIs. When I am developing a web application, Django internally handles all the session parameters. So I do not have to worry about it. When I am developing an app which has a login and subsequent requests to the server will be based on the login. I wanted to know how I can implement the same. Jan 21 18:40:38 When using IntelliJ, my app starts with the primary activity when you go to the home screen, and then back in. It didn't do this with eclipse. Is there a way to stop this behavior, so when resuming the app it goes back to the previous activity? Jan 21 18:41:23 roler: in the run configurations you control what happens on build. Jan 21 18:41:42 roler: there's an option to specify the activity to launch, use the default activity, or don't launch. Jan 21 18:42:23 got it! Jan 21 18:42:24 tahnks! Jan 21 18:43:25 roler: np. Jan 21 18:55:06 hello Jan 21 18:57:31 howdy Jan 21 18:58:07 could maybe someone from USA supply me with some APKs that arent available here in germany? Jan 21 18:58:35 warez alert! :D Jan 21 18:58:52 its free apps actually :) Jan 21 19:01:07 while we are at it... does anyone have ingress invitation codes? :D Jan 21 19:01:46 I just installled the Android Eclipse in a different machine of mine and I am getting this error within the AVD of Eclipse: "Error: Unknown Target 'Google Inc.:Google APIs:17' Jan 21 19:02:22 go to android sdk manager Jan 21 19:02:30 and check if API v17 is ticked Jan 21 19:03:16 you mean installed? Jan 21 19:03:33 yes Jan 21 19:03:40 yes it is Jan 21 19:05:17 maybe you have to set PATH? Jan 21 19:05:54 let me check Jan 21 19:07:04 what path ? Jan 21 19:07:14 what OS are you on? Jan 21 19:07:47 Windows 7 Jan 21 19:08:08 in the AVD is is showing up fine...but in Eclipse it is showing fail Jan 21 19:08:50 check the eclipse options, there should be some settings for PATH of sdk and so on Jan 21 19:08:52 I mean you launch AVD itself and it shows fine, but launch AVD from within Eclipse it fails Jan 21 19:10:38 Ah yes I see now. There are two SDK's on the system. One in my own personal folder, and one in the Program files section Jan 21 19:10:59 its probably the one in your personal folder Jan 21 19:11:18 yes..it is pointing to that Jan 21 19:11:20 thanks a lot Jan 21 19:11:22 should be in C:\Users\yourname\AppData\Roaming\.android Jan 21 19:11:32 maybe try the other one Jan 21 19:12:15 oh, if it works :) you're welcome Jan 21 19:12:35 it is showing me where it is pointing to in the Android preferences..thanks Jan 21 19:34:11 does it say "incompatible with Device XY" for everyone on this app? https://play.google.com/store/apps/details?id=com.hti.activity Jan 21 19:34:58 nexus 7 incompatible Jan 21 19:36:39 thanks Jan 21 19:38:49 anyone using android on intel x86 atom? Jan 21 19:39:06 trying create a virtual sdcard Jan 21 19:39:12 I am * Jan 21 19:39:25 actually I think I have created it successfully Jan 21 19:39:35 but Im having problems with permissions Jan 21 19:39:45 my apps cant write on it Jan 21 19:40:15 how did you create it? Jan 21 19:42:41 jaygib, created a partition and created an entry on /system/etc/vold.fstab with dev_mount Jan 21 19:43:27 and added SDCARD= Jan 21 19:43:30 on grub Jan 21 19:43:53 yeah, Im using android on top of ubuntu Jan 21 19:44:50 jaygib, any idea? Jan 21 19:45:07 did you mount it rw? Jan 21 19:45:37 I despise android development, but I'm more proud of it than my iOS code. Mainly because it is built on blood, sweat, and tears... oh god, the tears Jan 21 19:46:02 jaygib, where should I set rw configuration? Jan 21 19:46:08 iOS code is more interesting because people make more mistakes Jan 21 19:46:14 in the vold.fstab file Jan 21 19:46:27 i see Jan 21 19:46:34 havent done that Jan 21 19:46:37 lemme try Jan 21 19:46:42 jaygib: compatible with my Galaxy S 3 Jan 21 19:46:54 Elderwolf, why do you despise android dev? Jan 21 19:47:23 lov, could you maybe download the app and send me the apk? I'd greatly appreciate it Jan 21 19:47:33 o_O Jan 21 19:47:36 android code is more readable, because java forces you to code more component style. Where as iOS you can just lump everyting into one .m, and people often do. I like to flay these people. Jan 21 19:47:53 jaygib: I'd really rather not install random things onto my phone just to resend them to random people Jan 21 19:48:05 i've a Thread and there's a Looper in the Thread. I create a new Object within the Runnable to create an object. But then the Runnable Loop has been stoped? Why? Jan 21 19:48:05 are you sure you mean 'despise'? Jan 21 19:48:25 Joozey: Compatibility, lack of properties for objects that would seem logical (like content of webview), and fragmentation fragmentation FRAGMENETATION Jan 21 19:48:40 hehe ok :-) Jan 21 19:48:43 lov, thanks anyways, could you tell me what country your s3 is registered in so I know what I have to look for? Jan 21 19:48:49 jaygib: USA Jan 21 19:48:57 ok, thanks Jan 21 19:49:02 np Jan 21 19:52:26 jaygib, still not working, maybe I didnt set rw correctly, how do you exacly set that? This is what I currently have: dev_mount sdcard /mnt/sdcard 6 rw /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda Jan 21 19:54:03 http://pastebin.com/db1v5TCa this is my Thread-Run. Its stopping after 1 run? oO Jan 21 19:54:21 misterli: are you calling start, or run Jan 21 19:54:43 also, I'm not sure you "get" loopers? Jan 21 19:54:47 Can anyone point out to me why my service (softkeyboard) is calling onStartInput directly AFTER closing an app that uses it and calling onFinishInput? Jan 21 19:55:02 I mean I SERIOUSLY don't get what you're doing here Jan 21 19:55:14 i use start Jan 21 19:55:40 seriously, why are you doing a network connection, THEN calling Looper.loop? Jan 21 19:55:49 Why in the world are you possibly doing it on the same thread? Jan 21 19:56:17 and then after Looper.loop is interrupted... you're sleeping? Jan 21 19:56:28 I seriously don't understand what the hell is happening here Jan 21 19:56:35 Just tried it a few seconds ago because i got some Warnings (No Looper; Looper.prepare wasnt called on this thread) Jan 21 19:56:47 >_< Jan 21 19:56:51 :{[ Jan 21 19:56:57 X_X Jan 21 19:56:58 That isn't how you solve that error! Jan 21 19:57:43 misterli: You use onStart for a service? Jan 21 19:57:47 yes Jan 21 19:57:57 guys this "sdcard without permissions" issue is really bugging me... I have no idea how to overcome this Jan 21 19:58:03 OK, A, I don't know what's not calling Looper.prepare wasn't called on this thread but I'm assuming that you're trying to update something off of the main thread that ought to be updated on the main thread Jan 21 19:58:04 i prepare the Thread onCreate and use .start onStart Jan 21 19:58:11 B, this isn't what you use Looper for. Jan 21 19:58:19 yes lov. I shoot out some HTTP Requests (HttpClients) Jan 21 19:58:20 Take out looper entirely. Period. Jan 21 19:58:23 the end. Jan 21 19:58:26 Don't have it in there at all. Jan 21 19:58:27 jaygib, you were helping me, come on dont give up on me Jan 21 19:58:30 STRONGLY consider using an AsyncTask. Jan 21 19:58:56 misterli: Hrm, not sure how to do that but I'll look into it. Jan 21 19:58:59 I create an Object which starts an ASyncTask for the HttpRequest via HttpClient. If i dont use a Looper it wont work Jan 21 19:59:12 * lov sighs Jan 21 19:59:22 What part, pray tell, warns you about using a looper? Jan 21 19:59:25 Please, answer this. Jan 21 19:59:32 Be specific. Jan 21 20:00:01 it's Looper.loop() ;) Jan 21 20:00:16 no. Jan 21 20:00:17 no no no. Jan 21 20:00:26 What, in particular, is warning you that you haven't called Looper.prepare Jan 21 20:00:33 so you say "Boy, I guess I better call looper.prepare then" Jan 21 20:00:41 why, exactly, did you bring Looper into this at all Jan 21 20:00:49 I want you to point me to a line of code Jan 21 20:01:07 Because i've some GPS-Stuff which is called inside the Thread. If i dont use a Looper i'll get an Error that it has to be run in the MainUI Jan 21 20:01:17 WELL MAYBE YOU SHOULD RUN IT ON THE MAIN UI THREAD? Jan 21 20:01:22 Learn how to use handlers Jan 21 20:01:24 or, better Jan 21 20:01:26 use an AsyncTask Jan 21 20:01:33 and put the UI component parts in the hooks that run on the UI thread Jan 21 20:01:42 That is the EXACT point of the AsyncTask Jan 21 20:01:48 haha Jan 21 20:01:59 it is a nice wrapper around the idea that you'll be doing a task in the background, but updating the UI as part of it Jan 21 20:02:06 READ THE DOCUMENTATION FOR ASYNCTASK Jan 21 20:02:07 READ IT Jan 21 20:02:09 READ IT Jan 21 20:02:40 ^ it's good... read it! Jan 21 20:03:48 lov: Might you have any insight on my service recalling onStartInput after closing the messaging app? Jan 21 20:03:58 (and thus reregistering my listeners) Jan 21 20:04:09 Blindsight: RAAAAAAAAAAAAGE Jan 21 20:04:12 Blindsight: no, sorry Jan 21 20:04:23 jbkasjk;adfsjkfdsuhsdf a;k <<----rage Jan 21 20:04:55 Blindsight: I try to do as little as possible with the OSK Jan 21 20:05:31 Class assignment and my first venture into android dev. Jan 21 20:05:46 I have everything working but even the prof can't tell me why it keeps running after it should stop Jan 21 20:05:50 Any GCM gurus around? Jan 21 20:07:48 Blindsight: You should get a passing grade for stumping the professor then :> Jan 21 20:08:11 Blindsight: you might want to post on stackoverflow Jan 21 20:08:56 I want to provide the ability to activate/deactivate receiving GCM notifications via a button in the app. Would it be prudent to register and unregister with GCM and the app server to toggle that, or would it be better form to leave the app/device registered and build the active/inactive state into the app and app server logic? Jan 21 20:10:39 Have the app actually register/deregister. Jan 21 20:10:44 Don't just have an "ignore" button in the app Jan 21 20:10:58 lov: Glad to hear that, less work for me. :) Jan 21 20:11:20 hah okay well I think I fixed the issue at least. though didn't really solve why it does it Jan 21 20:11:33 I wasn't really thinking "ignore" as much as I was "tell the app server not to send any notifications while I'm inactive." Jan 21 20:11:47 But regardless, much rather do it the reg/unreg way. Jan 21 20:12:01 KaosMcRage: Oh, ok Jan 21 20:12:11 KaosMcRage: You can definitely do that too. It's certainly a use case Jan 21 20:12:15 (e.g. "vacation" mode for the user) Jan 21 20:12:22 just wasn't sure if the reg/unreg method was garbage for some reason Jan 21 20:12:34 n.b. I haven't actually used GCM Jan 21 20:13:16 I haven't either, so any advice is better than none. Jan 21 20:27:46 Good evening.Iam right here for android kernel dev? Jan 21 20:29:49 switchgott: wherever you go, there you are ! Jan 21 20:30:06 Nice Jan 21 20:30:26 Does somone know this error? Jan 21 20:30:27 tegra-i2c tegra-i2c.0: no acknowledge from address 0x68 Jan 21 20:30:30 switchgott: technically yes, but you're not going to get a lot of help. Jan 21 20:30:35 You might want to try #android-platform Jan 21 20:30:47 if you're working on a custom rom, you might want to try #android-root, or #cyanogenmod or whatever Jan 21 20:31:30 Ok, then only small please, what causes this error?Or what is this error excactly? Jan 21 20:31:45 switchgott: I would guess an error with tegra :> Jan 21 20:31:54 perhaps it's an IPC error? Jan 21 20:32:06 Hardware?Or drivcer problem? Jan 21 20:32:12 I know its terga Jan 21 20:32:51 switchgott: you know as much as (or more than) I do Jan 21 20:32:57 and very likely everyone else in the channel Jan 21 20:35:17 Guys, (erm..gals, too, of course), ... If I add in a "Reference" to another project (e.g., YouTubeAPIDemos), is it going to compile and install an APK for the YouTube demos as well as my project? Or just reference it and compile code accordingly? Jan 21 20:36:28 * reference it in my workspace so it knows where to get the code from that I am compiling as my project. *++ I want to avoid installing the YouTubeAPIDemos app on their device, but point to it and use it for development in my project. Hope that makes sense. Jan 21 20:38:29 http://pastebin.com/fJ61GiPG on line 132 i have an asynctask class. It has a socket in the doinbackground method. I want to be able to close the socket and cancel asynctask from the service's onDestroy() method, which I'm trying. But I think the socket isn't closing properly because when I restart the service it won't connect. If the server then shuts down adn restarts, the client will reconnect ag Jan 21 20:38:29 ain. How can I make sure the socket's closed so i can restart it? Jan 21 20:43:10 Hmm... Jan 21 20:43:14 pierpark: unless the YouTubeAPIDemos is a library project, which you're referencing as an Android library project, no Jan 21 20:43:24 Is there a library project which provides SharedPreferences as Fragments for the v4 support library? I just saw the GoLauncher Ex Theme chooser and it looks like SharedPreferences and it seems to use Fragments (it is possible to swipe between these like SPref. looking fragments) (Device is an Android 2.3.7). Jan 21 20:43:26 lov: thanks. Jan 21 20:43:31 damccull: hold on let me look at your code Jan 21 20:43:34 pierpark: you cannot reference the code of other installed applications Jan 21 20:43:47 pierpark, thanks Jan 21 20:44:23 damccull: First off, you really ought to set read/write timeouts. There are known errors in Android where sockets will just block forever due to strange network state changes. Jan 21 20:44:40 (I don't know if that's been fixed but you should do it anyway so you don't just block forever) Jan 21 20:44:41 lov, you can if the other app was written a certain way :P Jan 21 20:44:47 lov Oooh, how? Jan 21 20:45:11 canadiancow: we'll ignore certain edge cases. Jan 21 20:45:30 damccull: http://developer.android.com/reference/java/net/Socket.html#setSoTimeout%28int%29 , etc Jan 21 20:46:09 lov if I do that will I be able to read until I close the connectoin maually or server drosp it? Jan 21 20:47:34 lov: You know how the YouTube API's came out in December? And when you download the YouTubeSDK zip file... it comes with examples, and you File>New>Other>Android ... from Existing .... , well, you can run that and see the examples... It contains a JAR file in the libs.... should I use that jar file in my libs, or should I right click on my project and reference the YouTubeAPIDemos project Jan 21 20:47:34 in my workspace in order to build my project around those demos? That's what I was trying to imply, if I didn't... I'm thinking the jar, but it'd be easier if I just pointed to the other workspace and could do it that way. Jan 21 20:47:34 or until it times out. Jan 21 20:47:38 damccull: still looking. Jan 21 20:47:47 pierpark, thanks man Jan 21 20:47:57 pierpark: Yeah, if it comes with a jar file that you can drop into libs, you're all set. Jan 21 20:48:14 alternately, if the project is an Android Library project Jan 21 20:48:20 you can just refer to the project and it gets compiled into your project Jan 21 20:50:22 lov Setting that timeout before I read to 500ms (for testing) does make my socket close, which fixes the can't reconnect error. But obviously I can't use a 500ms timeout if I want to remain connected to a server until user or server disconnects, so do you have a suggested time? Jan 21 20:50:41 lov: Thanks... that's what I was thinking but wanted to make sure, before I went through the trouble since there was an easier 'temporary' reference similar to "IsLibrary". Jan 21 20:50:53 Any clue why I'd be getting a NoClassDefFound error for an anonymous inner class that also appears in my jar file when I make the build? Jan 21 20:51:00 damccull: right, I just wanted to point it out. Set your read timeout to something more sane like 30s. Jan 21 20:51:08 Would there be a reason that the dex conversion would somehow (accidentally) be omitting it? Jan 21 20:51:21 damccull: the problem is that sockets in Java are totally blocking, and you can't necessarily interrupt them Jan 21 20:51:25 lov: ok, but if the server doesn't send anything for 30 seconds will i get dropped? Jan 21 20:51:37 damccull: the best you can do is set a flag on your AsyncTask and check that flag as part of your operations Jan 21 20:52:08 lov a boolean like keepConnected=true? Jan 21 20:52:28 more like "isCancelled=false" Jan 21 20:54:09 lov ok. Do you think it is the result of the loop not stopping, or the inputstream.read() blocking that's making my socket not close? Jan 21 20:55:33 lol, LG is just going to start ramping up production of the N4 now :| Jan 21 20:55:39 damccull: lov is right... you need to reference a flag, and have the timeouts, so that for whatever reason/bump in the road, you're going to complete a task there and not have it hanging... Android seems to get real screwy upon incoming SMS/MMS/etc., as well as phone calls. If something does temporarily block it from doing its job, you'll want it to die and try again. Jan 21 20:55:51 g00s yeah now that they've sold the majority of their optimus :D Jan 21 20:56:05 damccull: heh, they are saying that Google underestimated demand though Jan 21 20:57:06 pierpark, I have added a flag. But the whole timeout issue. I'm connecting to a chat server, so I don't want to timeout my connection, right? Otherwise if nothing is sent for it'll close connection right? Jan 21 20:57:27 damccull: it is the read blocking that is keeping your socket alive. Jan 21 20:57:44 lov I thought so. Hrm... Jan 21 20:58:02 How come if I make a new instance of the socket, it can't connect though? Jan 21 20:58:04 JakeWharton: Why should we not use IcsListPopupWindow outside ABS? Jan 21 20:58:13 damccull: I don't understand why you're unable to connect, though. Jan 21 20:58:15 damccull: you might want to read this if you have long lived connections (like to a tcp server) http://www.fiercedeveloper.com/story/mobile-networking-where-html5-falls-short/2013-01-11 … mostly about HTML5 but applies to native too Jan 21 20:58:20 JulienDev: because it's not designed for that Jan 21 20:58:25 err, chat server Jan 21 20:58:33 damccull: You should be able to have multiple connections to the same remote ip/port Jan 21 20:58:50 JulienDev: it's in the internal package for a reason, it's only meant to be used by the action bar Jan 21 20:59:10 lov that's what I thought. For some reason it won't connect again, however, until the first connection is dropped by the server or the phone loses internet Jan 21 20:59:34 damccull: also http://blog.davidsingleton.org/mobiletcp/ Jan 21 20:59:48 damccull: that's flat out wrong somewhere. Jan 21 20:59:57 g00s, i shall read those today Jan 21 21:00:09 lov you mean my theory of what's wrong? Jan 21 21:00:11 JakeWharton: Ok, I'll do without ;) Thanks Jan 21 21:00:22 damccull: no, I mean you should be able to make multiple simultaneous requests to a server Jan 21 21:00:30 damccull: write some java code for the desktop as a proof of concept. Jan 21 21:00:33 lov i agree. Jan 21 21:00:40 generally J5SE code can be directly brought over to android Jan 21 21:00:41 (ignoring UI code) Jan 21 21:01:14 I don't even want to see the name LG... I bought this BluRay player through Dell about a year ago... the damn thing has been a nightmare ever since. Haven't even tried to play a disc on it, but I've had a HD connected to use my digital movies... It has no buffer whatsoever, so it only works well if connected directly to the HD and not streamed the movie from another PnP (why did I say Jan 21 21:01:14 that...I'm drawing a blank on the..media server streaming ... protocol.. uPnP? hmm.. who knows)... so it causes lag from hell, which makes it impossible... plus, it sucks for about ten other reasons, and the WORST SUCK OF ALL: my 3TB hard drive, it won't even recognize. It flashes it's dumb-crap "x" over the USB icon. So it's fine with the 500GB drive by WD, but the 3TB seagate drive = it Jan 21 21:01:14 won't read. Basically, all of the reasons you'd want to have a device like this... you can forget it. I have to run a POS Western Digital 'media streamer/netflix/shoutcast/blah blah' (that has a buffer... btw), INTO the LG piece of crap in order to stream my 3TB drive into WD>into LG BluRay/media-screw-lying-dysfunctional-pos. Jan 21 21:01:41 $400 piece of crap, in other words. Jan 21 21:02:04 cool story, bro Jan 21 21:02:34 how would i go about getting google books to open up a document, what types of files does it open, and what intent is it looking for? Jan 21 21:02:36 is there a way to do an ensure visible of a view in a HorizontalScrollView? Jan 21 21:03:08 monsti like as you scroll it moves so always visible? Jan 21 21:03:55 damccull: i add some elements to a linearlayout and want to make sure that the child is visible Jan 21 21:04:30 monsti you can manually setVisibility(View.VISIBLE) but that's default unless you changed it in xml Jan 21 21:04:39 no Jan 21 21:04:54 i have a horizontalscrollview and this has a single linearlayout Jan 21 21:05:05 now i add some elments to the lienarlayout (by code) Jan 21 21:05:06 like autoscoll? Jan 21 21:05:11 ooh autoscrolL Jan 21 21:05:12 autoscroll Jan 21 21:05:12 ? Jan 21 21:05:16 Crazy, huh? It's all good... I actually discovered things about the Western Digital device that I didn't realize a year ago when I bought it (thinking at the time that the LG thing would be sufficient and started regretting the $99 on the WD device)... now I figured out (yesterday) that this sucker connects to the net and downloads the poster art, cover art, iMDB info, etc., and so it's Jan 21 21:05:16 like you're flipping through an on-screen DVD library from your digital MKV/MP4/AVI/etc. files... Very very nice little device. Can't beat it, for 99 bucks... esp., since it has all the online services built in, and they do frequent updates and support some hardcore Codecs rather than leaving you hanging (like LG). Jan 21 21:05:30 Sorry for changing the topic... back on track now o_O Jan 21 21:06:05 damccull: thx i google for that Jan 21 21:06:20 is that what you want? Jan 21 21:06:23 monsti thank jeppy Jan 21 21:06:55 jeppy`: sounds very close to that! Jan 21 21:06:57 thx Jan 21 21:07:22 you have to set the position of the scroll view when you add a child Jan 21 21:07:48 Is auto-scrolling a horizontalSV an easy task? And what kind of scrolling? Timed scrolling at adjusted intervals, or are we talking... as items as added in on a timer, it scrolls to the first position? I'm trying to imagine what we're talking about here. Jan 21 21:07:57 yeah that's what i want ) Jan 21 21:08:02 I think there's a setScroll... function or something like that Jan 21 21:08:15 pierpark: problem solved ;) Jan 21 21:08:53 needs some hacks ... as always http://stackoverflow.com/questions/4799978/how-to-programmatically-scroll-an-horizontalscrollview Jan 21 21:09:15 monsti: I was just saying I'd like to see that in action... I've never had a reason to use auto scrolling, and can't quite picture how it'd work out... No biggie. That'll go in my 'bored box' for when I have nothing else to do. Jan 21 21:10:24 pierpark: i need some breadcrumbs like widget e.g. as in windows explorer to show a "path" in a tree Jan 21 21:12:05 monsti: https://developer.android.com/reference/android/app/FragmentBreadCrumbs.html Jan 21 21:12:21 JakeWharton: no fragments ;) Jan 21 21:12:30 monsti: ooooh. I see what you're saying. Jan 21 21:12:32 why's that? Jan 21 21:12:41 JakeWharton: because you can't nest them Jan 21 21:12:44 i use my own stuf Jan 21 21:12:54 you can nest them. Jan 21 21:12:55 You can Jan 21 21:13:05 well not in the way i like to Jan 21 21:13:15 then good luck, have fun Jan 21 21:13:29 While I'm on here being dumb, ... anyone care to tell me, in simple terms, what the heck a fragment is? I've built a dozen apps and still don't have a clue what they are. Jan 21 21:13:30 well thx Jan 21 21:13:34 g00s, your articles are interesting and are causing me to rethink my approach. Jan 21 21:13:45 damccull: :) Jan 21 21:13:50 pierpark: they're a management container Jan 21 21:14:03 g00s do you know, off hand, how long it takes to get a push notification once its sent? Jan 21 21:14:18 damccull: no i dont, sorry :( Jan 21 21:14:19 from the viewstack it's a FrameLayout Jan 21 21:14:23 g00s np. Jan 21 21:14:24 no more - no less Jan 21 21:14:38 JakeWharton: if that's simple, I'm in trouble. :) Jan 21 21:14:51 monsti: are you answering my question? (FrameLayout = a fragment?) Jan 21 21:15:00 from the viewstack Jan 21 21:15:05 he's not, and if he is he's wrong Jan 21 21:15:15 monsti: you just want some widget that has something like "Foo > Far > Baz" ? Jan 21 21:15:17 a fragment has no visual representation Jan 21 21:15:33 g00s: yeah and Foo has a popupmenu with children Jan 21 21:15:56 JakeWharton: can you give me a better example, then? Jan 21 21:15:58 g00s: so i can show a "path" from a "tree" Jan 21 21:15:58 sounds like the mac finder; i guess you could just do each crumb with a button Jan 21 21:16:10 g00s: yeah but i need a horizontal scrollview Jan 21 21:16:26 g00s: you know the S3 menu? Jan 21 21:16:27 are LinearLayout, FrameLayout, etc., considered "Views" then? And Fragments are...somehow separate and NOT views? Jan 21 21:16:30 pierpark: it's a management container around a view or dialog, or has no visual representation Jan 21 21:16:35 now I need to see if I can get appengine to let me make outgoing sockets lol Jan 21 21:16:55 damccull: You could just not use Appengine Jan 21 21:17:05 JakeWharton: from the viestack a fragment is a framelayout - very simple Jan 21 21:17:19 monsti: dont know the S3 menu. if the hierarchy is deep and this doesn't fit on the screen, you'll have to do some usability testing to figure out how to represent this bets Jan 21 21:17:20 svm_invictvs, its true, but then i'd have to find myself a host. Know of one where I can run free server processes? Jan 21 21:17:23 JakeWharton: you can have your very own idea of a management controller associated to a framelayout Jan 21 21:17:25 monsti: no, please silence your incorrect statements Jan 21 21:17:33 damccull: Amazon Jan 21 21:17:38 [13:17:28] monsti: no, please silence your incorrect statements Jan 21 21:17:43 svm_invictvs, its free? Jan 21 21:17:55 seriously, people need to stop "teaching" others about thigns they don't understand Jan 21 21:17:57 damccull: They give you a "micro" instance for free. It's good for testing and prototyping. Jan 21 21:18:27 canadiancow: but that's what this channel is mostly good for! Jan 21 21:18:42 damccull: I think it's like 500mb or ram, or so, and 4 gigabytes of disk space. You can run whatever you want on it. Jan 21 21:18:54 g00s: well we tested it and i like it Jan 21 21:18:56 svm_invictvs, i see Jan 21 21:19:04 I'll check it out Jan 21 21:19:35 damccull: I put it on an elastic load balancer, it costs like fifty cents a day Jan 21 21:19:55 JakeWharton: so basically, it is a box containing misc. items (views), and if you move the box the items inside it go along with it? so similar to a container such as LinearLayout, etc., ... but operates differently? Jan 21 21:20:04 svm_invictvs, *nod* Jan 21 21:20:59 pierpark: Fragments don't have to contain views. Jan 21 21:21:04 JakeWharton: I'll go read up on it in a little bit, but mainly I was just trying to separate the logic/purpose so that I could have it in the back of my mind for.. "oh, I probably need a fragment for that..." Jan 21 21:21:07 pierpark: it's a way to encapsulate logic inside a single class which often is closely tied to a dialog or view Jan 21 21:21:32 damccull: I'm running an iOS app backend for it right now. Jan 21 21:21:46 damccull: iOS app's backend on it, rather Jan 21 21:22:35 svm_invictvs, i want to be able to have phone client sign into backend, and then backend will connect to a tcp server and remain connected. If phone closes app, it drops connection to backend but backend remains connected and sends google push notifications. This is possible? Jan 21 21:22:37 JakeWharton: I think I'm getting a hint at what you're saying.. enough to dim the lightbulb a little, anyway. Thanks for the information. Are these ... good for development, or are they advised against? If that makes sense. Jan 21 21:22:43 novie: Thanks for the info. Jan 21 21:22:49 They are very good Jan 21 21:22:59 Every modern app should use them Jan 21 21:23:00 Evening. Does someone have a good link to ImageView zooming which "locks" image to center and does not make it draggable + zoom for infinity? Kind of like the default Image Gallery app on my samsung? I have tried webview which defenitly didn't work as I expected when center etc, and I have tried about 10 different solutions to ImageView zooming, all enabling infinity zooming and draggable non-centered image. Would appreciate if s Jan 21 21:23:00 omeone had a good link and felt like sharing :) Jan 21 21:23:14 pierpark: they are very good, they create reusable view/logic pairs Jan 21 21:23:15 pierpark: http://developer.android.com/guide/components/fragments.html << I recommend this read. Jan 21 21:23:55 novie, SimonVT, JakeWharton: Thanks guys... I'll defnitely look into them, now. I appreciate the information. Jan 21 21:24:06 novie: Thanks..headed to the link, now. Jan 21 21:27:28 how in java do I override a method of a custom class of mine ? Jan 21 21:27:42 just redefine it in a subclass Jan 21 21:28:05 well I create a subclass in an activity that extends myclass Jan 21 21:28:12 u mean like that ? Jan 21 21:28:22 StingRay_, type the same method into the subclass that exists in the superclass Jan 21 21:28:32 StingRay_, yes after you extend the superclass Jan 21 21:28:50 hmmm I do, just seems to call the previous method Jan 21 21:29:03 StingRay_, also, if you want to EXTEND the functionality of the new method instead of replace it, you can call super() from inside the overridden method Jan 21 21:29:30 StingRay_, If you want to REPLACE the functionality of the superclass' method, leave out the super() call Jan 21 21:30:04 damccull yeah I'm missing something basic here, cause I do everything you said Jan 21 21:31:22 so... whats the best way to get all possible storage devices on a device in android? i was thinking about parsing the vold.fstab and calling it a day ;x Jan 21 21:31:31 oh odd now that it works Jan 21 21:31:36 after a project clean Jan 21 21:32:36 StingRay_, lol i do that all the time Jan 21 21:32:37 i just think hardcoding all the possible mount points in java is a crap idea Jan 21 21:35:55 svm_invictvs, what language do you suggest to use as a backend server? Jan 21 21:37:01 is there any way of knowing, if someone cancels an order, what os version of the device that was from ? Jan 21 21:37:25 i started getting a bunch of cancellations and suspect its from a particular device Jan 21 21:37:54 or android version, - possibly since 4.2 changed the BT stack from bluez Jan 21 21:38:27 i have some PDF's i would like to open with google play books, it seems that you cant import. Is the application looking for ANY intents? i'm willing to change formats if i have to. Any help would be great. Jan 21 21:46:05 Eppo: try asking in #android or something. I don't think this is the best way to contact the Books tema. Jan 21 21:46:08 *team Jan 21 21:46:17 toastcfh: Oh, god help you there. Jan 21 21:46:19 We do that. Jan 21 21:46:27 It works great except for the places where it doens't. Jan 21 21:46:29 *doesn't Jan 21 21:46:46 Make sure you exclude: Jan 21 21:46:46 why should i click twice on back button to exit my app? Jan 21 21:46:53 * filesystems that are not writeable Jan 21 21:46:56 * filesystems < 16MB Jan 21 21:47:04 * filesystems under /data Jan 21 21:47:09 * filesystems under /system Jan 21 21:47:16 * filesystems that are VZBackup Jan 21 21:47:19 If I have stated that my Android app supports all screen sizes in my manifest file, but Google Play reports it as incompatible with any/all tablets, what are some recommendations to fixing the problem? Jan 21 21:47:43 KScorp: you shouldn't; that's terrible UX. Jan 21 21:48:11 UX? what's UX? Jan 21 21:48:17 lov: Jan 21 21:48:43 user experience Jan 21 21:48:56 (or you could have done a google search for "ux") Jan 21 21:49:06 lov : haha Jan 21 21:49:10 KScorp: http://developer.android.com/design/index.html Jan 21 21:49:12 Read through that Jan 21 21:49:19 and have your designers read through that too if you have any Jan 21 21:49:27 actually if you have designers chain them to their desks until they read it Jan 21 21:51:02 lov that guide/suggestions are crap though, and only intended for programmers who fancy themselves as a design, to cut down on the programmer art/design in lots of the apps Jan 21 21:51:12 some of it is really bad if i remember Jan 21 21:51:32 and if followed, every app would just be...well, a bit boring Jan 21 21:51:56 At least all settings manuals are the same, thank god Jan 21 21:52:25 thanks lov for your input, going to try in there. I figured i would try in here just incase someone tried to develop an app that sent intents for google play books. Jan 21 21:52:55 StingRay_: Eh, how so Jan 21 21:53:03 how so what ? Jan 21 21:53:12 i ranted a few things Jan 21 21:53:13 :) Jan 21 21:53:15 How is it bad Jan 21 21:53:26 StingRay_: depends how you define "boring". An app might have a boring design, but it is the idea and features that makes the app, not the design. But I agree that it has to look good do, if thats what you ment with "boring". Havent read that guide Jan 21 21:53:44 UpnP apps are the worst in my experience. They all are really different, and generally ugly Jan 21 21:53:44 Kleggas I have to disagree there Jan 21 21:54:56 StingRay_: maybe its a personal thing. For me, I have downloaded so many fugly apps and I am using them as they fllfill my needs, not cuz of their design :) Jan 21 21:55:15 the thing with UI/UX is that..whatever awesome you think it is, someone will hate it anyway Jan 21 21:55:32 Kleggas well in my world they would simply not sell or be a success Jan 21 21:55:40 my world = vfx/console games Jan 21 21:55:52 I need this fixed :P http://code.google.com/p/android/issues/detail?id=42601 Jan 21 21:55:57 Please, could somone tell me if this error is normal on a tegra tablet?tegra-i2c tegra-i2c.1: I2c error status 0x00000008 Jan 21 21:56:01 The design guidelines are not intended to cut down on art/design Jan 21 21:56:10 I know many visually stunning games that are actually a load of crap that have done amazingly well Jan 21 21:56:19 They define expected behavior and usage of ui components Jan 21 21:56:22 nebkat: contribute a patch to AOSP then Jan 21 21:56:23 but not may functional good games that look creap do Jan 21 21:56:27 crap* Jan 21 21:56:42 You should absolutely apply your own custom theming Jan 21 21:57:01 JakeWharton: have you had this issue? Jan 21 21:57:03 StingRay_: Hey, you didn't mention games. Games can not be played if not looking better than any other game (in my world) :D Jan 21 21:57:05 (yes, plain holo is boring) Jan 21 21:57:13 nebkat: no, nested fragments are lunacy Jan 21 21:57:13 JakeWharton: I was just looking at how Nested fragments were implemented now actually :) Jan 21 21:57:37 If I have stated that my Android app supports all screen sizes in my manifest file, but Google Play reports it as incompatible with any/all tablets, what are some recommendations to fixing the problem? Jan 21 21:57:50 fixing your manifest Jan 21 21:58:42 Hey guys, is it possible if I have an AsyncTask that runs a certain function that loops forever (essentially), I can update the progress dialog or dismiss it from within the function thats being called (since onPostExecute does not get called)? Thanks. Jan 21 21:58:50 bubbleguuum: Your insight is remarkable. Let's assume, for the sake of argument, that I have gone through the standard troubleshooting of making sure all screen sizes are set to true, providing a requiresSmallestWidthDP...and it's still happening. Jan 21 21:59:32 recheck you manifest and each declaration. check that statements are in the correct parent tag, etc Jan 21 21:59:43 Still, fix your manifest.. How much debugging do you expect us to be able to do with no information other than "it's broken"? Jan 21 22:00:11 I'm asking for common troubleshooting that would address the issue. Jan 21 22:00:21 I'm not asking you to fix the problem. Merely a nudge in the right direction. Jan 21 22:00:53 if you have native libs that affects filtering too Jan 21 22:01:31 could someone from USA maybe download a free app and send me the apk? its not available in germany, I'd greatly appreciate it Jan 21 22:01:38 Wrong channel Jan 21 22:02:13 why's that? Jan 21 22:02:19 try changing your dns works fine for me Jan 21 22:02:31 Because this channel is about app development Jan 21 22:02:36 _development_ Jan 21 22:03:05 isn't reverse engineering also a part of development? Jan 21 22:03:20 hehe Jan 21 22:03:21 No Jan 21 22:03:21 its not like I'm spamming the channel or anything, it was just a question Jan 21 22:03:43 jaygib: its about the development part of developement :) Jan 21 22:04:28 so why is it a problem if I ask for it? I'm not derailing the channel with it, am i? Jan 21 22:04:47 You're in the wrong channel. Jan 21 22:04:50 you just caused a major train wreck here, everybody got derailed Jan 21 22:05:04 so where would I be going for that? Jan 21 22:05:25 I don't get why people have to be so strict, it isn't completely unrelated Jan 21 22:05:47 you can use a proxy and install it yourself Jan 21 22:05:50 Don't know, #android ? Anywhere but here Jan 21 22:06:31 bubbleguuum, doesn't work unfortunately because I only have an old desire HD and emulator doesnt have google play Jan 21 22:08:05 jaygib: pm bubbleguuum and he can help you out Jan 21 22:08:45 there are images on the web that have play Jan 21 22:09:53 toxicalien, thanks! I didnt know that Jan 21 22:10:00 is there any circumstance where content://sms would not resolve to sms db on android ? Jan 21 22:10:15 tried on a few diff devices and it does Jan 21 22:10:25 different manf. diff versions Jan 21 22:11:10 i have on pc but now am on this slow phone ill hook u up tommorow remind me Jan 21 22:36:11 can someone recommend me an emulator image with google play? Jan 21 22:40:21 I have a file that is hosted on a server that I must authenticate to be-able to view. I use a webview to get to the file, and do the authentication. But, I want to download a pdf that the server tries to display. I have a webviewclient that I setup and it notices the file. But, how do I download the file? I attempted to use HTTPURLConnection but I was directed to the login page. Jan 21 22:40:56 I noticed that when I don't add a webviewclient that the regular android webview auto-downloads the file, which makes me believe it is do-able. But, I am not sure how. Jan 21 22:43:21 any hint would be greatly appreciated, I am racking my brain trying to figure out how to get this file. I wrote a pdfviewer using mupdf just for this purpose and it is completely useless unless I can download the file. Jan 21 22:45:18 I can definitely notice the file by using shouldoverrideuriloading, and then testing for the file extension endswith .pdf Jan 21 22:47:48 hi Jan 21 22:47:58 evening JohnnyL Jan 21 22:48:04 do you guys normally use opengl for even 2d apps? Jan 21 22:48:06 wordToDaBird: :) Jan 21 22:49:22 JohnnyL: I like opengl, once you can work well with it, it is great. But canvas will suffice for a 2d app Jan 21 22:54:11 * wordToDaBird would punch a porcupine for the answer to this problem Jan 21 22:57:25 any good literature on handling sensors? I've got access to their data, but seem a little behind on what I can do Jan 21 22:58:21 it seems the best possible result would come from combining the three sensors (gyro, magneto and accelero) and then remove the noise through some sort of filter (Kalman?) Jan 21 22:59:05 belgianguy: there are some pretty good google IO videos about sensors Jan 21 22:59:26 http://www.youtube.com/watch?v=Q0V_ld7iNw4 Jan 21 22:59:28 that might help! Jan 21 22:59:52 you might have to skip around to find what's relevant to what you are doing Jan 21 22:59:59 tnzr: ah, thanks! :) Let's see what I need to brush up upon Jan 21 23:01:20 tnzr: I've found watching the whole IO's usually teaches me a few things I never thought about Jan 21 23:04:19 wordToDaBird: i'm writing cross platform so canvas, not so much. Jan 21 23:06:11 would a YouTube video ever consist of multiple videos? Jan 21 23:06:28 as in multiple camera viewpoints ? through which you could flip Jan 21 23:06:56 artists can montage if they so desire, but for something technical you might want to have other preferences Jan 21 23:07:01 JohnnyL: I wanted now several times to learn OpenGL, but I am only interested in 2D games, and OpenGL compared to Canvas has (of course) an aweful api if you just need to paint bitmaps on some drawing area. Jan 21 23:07:32 timroes, agreed but I need to release on pc and mac. Jan 21 23:07:36 so only advantage would be speed, and I made several tests with OpenGL vs. canvas, and on newer devices you will get also very sufficiant speed with canvas (even though OpenGL ofc always outruns it) Jan 21 23:07:57 JohnnyL: that way you want to use OpenGL, but you asked if WE code in opengl :) Jan 21 23:08:11 you gave libgdx already a look? Jan 21 23:08:38 i have said cross platform twice now. 3 times in fact. Jan 21 23:08:44 OpenGL really isn't that much work nor than hard to learn. I wouldn't say that I am an expert but the easy stuff with it is fairly straightforward once you get the coordinate system down. Jan 21 23:08:50 I bit the bullet and learned OpenGL ES Jan 21 23:09:04 but went straight to NDK after using it in Java Jan 21 23:09:17 as the libraries I was most accustomed with are written in C++ Jan 21 23:09:24 learning OpenGL is still on this big todo... i think it will take at least 6 monthes ;( Jan 21 23:09:25 belgianguy: exactly. Jan 21 23:09:33 speed is in fact not the biggest issue, or less than most think Jan 21 23:11:14 NDK documentation isn't great though Jan 21 23:11:39 so if OpenGL ES is the target, I'd say see if you need 1.x or 2.0 Jan 21 23:11:40 belgianguy: yeah and thats what made me not want to learn it. I tried several stuff, and in java it ends up destroying you clean architecture and code Jan 21 23:11:43 if you can't read the headers you should probably not be using the ndk Jan 21 23:11:48 because in fact it wasn't meant to be used in java Jan 21 23:12:06 OpenGL is a state machine, and therefore is untamable by OO practices Jan 21 23:12:11 it's very procedural Jan 21 23:12:15 yeah Jan 21 23:12:25 and when shaders enter the fray, that's a whole other story Jan 21 23:12:37 oh yeah passing things around as strings :D Jan 21 23:12:47 feels like 90th javascript :) Jan 21 23:12:58 and you need to have a very thorough understanding of math (matrices) Jan 21 23:13:20 because when I first got OpenGL at uni, I didn't get that, and it becomes a black box then Jan 21 23:13:41 okay most of the math I did, was aiming for 3d techniques Jan 21 23:13:41 and can be very frustrating staring at a black screen :) Jan 21 23:13:47 and the other half to simulation and processing :) Jan 21 23:13:57 hello Jan 21 23:14:10 hi Jan 21 23:15:34 I'm new to developing in android, I'm just wondering...is it possible to have a fragment inside a fragment which is in an activity? or is it possible have a swipe navigation and it swipes between different fragments? Jan 21 23:16:54 sorry, can't help you with that Jan 21 23:18:12 fragments in fragments - i think 4.2 lets you do that. swipe nagivation between fragments - have a look at viewpagers Jan 21 23:26:56 Ugh, I have to prepare myself or get into the mood of building tiles. Jan 21 23:27:10 I don't have the man power (1) to do anything bigger. But it will be a stepping stone. Jan 21 23:28:35 JohnnyL, I have done some cross platform apps Jan 21 23:30:09 JohnnyL: I'm just doing it to have something on my resume Jan 21 23:30:25 atm they all refuse to hire me because I lack "experience" Jan 21 23:34:14 I am doing it because I want to develop non violent games. Jan 21 23:34:29 And no one locally here likes my independent personality. Jan 21 23:34:36 (as far as jobs go) Jan 21 23:35:02 JohnnyL: I hear you, I have had my share of asshole managers Jan 21 23:35:06 JohnnyL, I have a good cross-platform nonviolent game ready to go, you can have it Jan 21 23:35:11 so I'd rather pave my own way Jan 21 23:35:23 but that might be a pipe dream Jan 21 23:35:33 for example they say they were looking for more experience for a SQL developer even thought I have 9 years on the mark experience with it. Jan 21 23:35:51 HR bs Jan 21 23:36:14 I think it's my New York accent raised by two independent-type brooklynites. :) Jan 21 23:36:24 belgianguy: exactly Jan 21 23:36:48 JohnnyL, There is a cross platform library called SDL. Here is one of my cross-platform games which uses it: http://bit.ly/11MK0E6 Jan 21 23:37:09 JohnnyL, are you going to the NYC Android meeting next week? Jan 21 23:38:04 JakeWharton please stop releasing stuff, I'm not up to speed with the last thing you released yet ;) Jan 21 23:38:49 Ologn: yes I am aware of SDL. Jan 21 23:38:55 Its not to bad imho. Jan 21 23:39:07 Ologn: congratulations on doing so well with it. Jan 21 23:39:20 I wasen't aware that android can use it too Jan 21 23:39:35 Chainfire: we have two things on deck for release in the next ~two weeks! Jan 21 23:40:56 looks like GL ES 3.X just came out. Jan 21 23:41:14 JohnnyL: what devices would that run on? Jan 21 23:41:24 belgianguy: ? Jan 21 23:41:25 JohnnyL, sure. The math game one has been popular - and I only have it in English and Spanish...if I did the work I could have it in all the languages they ported it to. Jan 21 23:41:30 (curious :) ) Jan 21 23:41:43 JakeWharton you bastard ;) Jan 21 23:41:48 JohnnyL: most mobile devices atm run 2.0 at max I think Jan 21 23:42:03 but it's nice to know they're actively working on it Jan 21 23:42:05 belgianguy: i right, i hear you. Jan 21 23:42:15 yes. Jan 21 23:42:42 I'm not a big fan of GL because of states you can get stuck in without a debugger. Jan 21 23:43:14 JohnnyL: GL I do with lots of testing Jan 21 23:43:18 I have only touched the service of it though. Jan 21 23:43:25 surface Jan 21 23:43:32 JohnnyL, here's source code for a cool non-violent game ready to go on Android. No one has released it: http://bit.ly/YjqTR7 Jan 21 23:43:37 :P Jan 21 23:44:07 It seems it's a recurrent issue with new Android developers, and it seems odd to me that there are so many people complaining about it on the internet and I have found no answers at all (answers that fixed the issue). When I export my Android app (using Eclipse) to my Android smartphone and clicks to Install, after the installing it says "The application is not installed." I thought it was something with my mobile, but I tested my friends and it hap Jan 21 23:44:13 Does anyone have any clue? Jan 21 23:44:30 JohnnyL, It is a good game, the only thing is it needs some time to fix up better and I don't have the time. It works on Windows and Macos X as well Jan 21 23:45:21 what do you guys think of the Donation model? Jan 21 23:45:32 Ologn: thanks! I will give it a looksie. Jan 21 23:46:09 I'm such a newb to android, does it have kernel apis you can changereplace. Or api calls like GetFirstInDirectory() GetNextInDirectory? Jan 21 23:46:17 sorry about the typos guys. Jan 21 23:46:42 Does it have kernel apis you can change/replace? Jan 21 23:46:45 anyoen have problems with gameCIH before? Jan 21 23:46:45 JohnnyL: I wouldn't touch the kernel too much when starting out :) Jan 21 23:47:11 belgianguy: i agree. Jan 21 23:50:59 what I mean to say can you override kernel functions in your apps, or is it like typical kernel-space? Jan 21 23:51:55 Nobody has nothing to say to my problem? :( Jan 21 23:52:52 vuln, I had a similar problem, my issue was that I lacked space Jan 21 23:53:06 but it was an old phone, so I deleted some apps and it hasn't done it again Jan 21 23:54:26 JohnnyL: I'm not that accustomed to the kernel, what would you like to do? Jan 21 23:55:07 one of my initial thoughts were to make a search engine for apps,docs,etc. Jan 21 23:57:20 JohnnyL: no idea if there's an API for that Jan 21 23:57:21 belgianguy: just tried removing lots of apps and still the same message :( Jan 21 23:57:41 vuln, what is the IDE you are using Jan 21 23:57:43 and what OS Jan 21 23:58:01 I'm running Eclipse Indigo with ADT in Ubuntu 12.04 Jan 21 23:58:14 vuln, ah, okay Jan 21 23:58:34 I'm on Ubuntu as well, but on 12.10, and have been using 12.10 Jan 21 23:58:40 if you compile a hello world app Jan 21 23:58:44 does it still do it? Jan 21 23:58:47 Yes :( Jan 21 23:58:52 How do you send your APKs to your phone? Jan 21 23:59:29 vuln: do you know adb? Jan 21 23:59:50 belgianguy: Yes. Jan 22 00:00:01 (normally I just pick Debug As > Android Application) Jan 22 00:00:07 and Eclipse should overwrite it Jan 22 00:00:17 is your device listed in adb devices? Jan 22 00:00:22 vuln, have you tried "adb install my.apk"? Jan 22 00:00:37 no. Jan 22 00:00:41 apd install bin\apptoinstall Jan 22 00:00:43 ? Jan 22 00:00:45 belgianguy: it is not :( Jan 22 00:00:49 opps Jan 22 00:00:51 sorry Jan 22 00:00:53 adb Jan 22 00:01:43 vuln, try doing that Jan 22 00:02:10 Okey. Jan 22 00:02:20 vuln: http://developer.android.com/tools/device.html Jan 22 00:02:27 did you add the udev rules? Jan 22 00:02:36 nope Jan 22 00:02:36 51-android.rules Jan 22 00:02:42 let's start with that Jan 22 00:02:51 that'll make your phone visible to your system Jan 22 00:06:08 OMG Jan 22 00:06:11 something REALLY weird just happened Jan 22 00:06:12 lol Jan 22 00:06:24 vuln: ? Jan 22 00:06:36 When I did everything there, I unplugged my Samsung Galaxy 5 Jan 22 00:06:41 and the screen went dark and lots of errors and stuff Jan 22 00:06:42 lol Jan 22 00:07:08 SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev" Jan 22 00:07:18 Is this a proper line for my 51-android.rules since my phone is a Samsung Galaxy 5? Jan 22 00:07:50 vuln: yeah Jan 22 00:08:31 When I run ./adv devices, there is no device listed :( Jan 22 00:08:47 adb devices Jan 22 00:08:49 OW Jan 22 00:08:51 now it is ;D Jan 22 00:08:56 I turned on debugging mode Jan 22 00:08:57 :) Jan 22 00:09:05 now go try that hello world app Jan 22 00:09:23 aw Jan 22 00:09:24 older sdk lol Jan 22 00:10:14 I will try the helloworld app Jan 22 00:12:25 OMG Jan 22 00:12:28 I think I'm gonna cry Jan 22 00:12:28 lol Jan 22 00:15:05 Thank you all so much :) Jan 22 00:15:17 vuln: no problem, have fun with it :) Jan 22 00:16:01 i love stories with a happy ending! now where's the inevitable daily "how do i disable the home button" question? ;) Jan 22 00:17:11 * belgianguy winces Jan 22 00:17:54 the "Ui guidelines aren't important and I like Comic Sans" types are adorable too Jan 22 00:18:18 amg ios lets me use custom fonts can't i do the same thing on android? Jan 22 00:18:25 o i can't? android is dumb Jan 22 00:19:09 belgianguy you may snigger at this Jan 22 00:19:20 but by far the most phones I have seen IRL on Android have used Comic Sans as font Jan 22 00:19:27 might as well design for it ... Jan 22 00:19:27 belgianguy: ty ;D Jan 22 00:19:57 Chainfire: oh the horror :p Jan 22 00:20:18 it's called "actually knowing people from the female persuasion" ;) Jan 22 00:20:56 I only have one female designer friend, very weird cat that Jan 22 00:21:09 belgianguy: females are weird in general Jan 22 00:21:26 yeah, the more I study them the less I understand Jan 22 00:25:11 http://www.youtube.com/watch?v=wse_hgca220 Jan 22 00:37:59 Hi, Jan 22 00:38:25 I want to use the monkeryRunner but I have a big problem with the device.shell function Jan 22 00:38:26 on a Timer, ... timer1.schedule(local1,1500L) ... <---- is 1500L = 1500ms ? Jan 22 00:38:37 I want to run a long time program Jan 22 00:38:55 and the runner always return a timeout error msg Jan 22 00:39:11 how can I set timeout for the monkeyrunner? Jan 22 00:49:33 ick .... NumberPicker doesn't allow negative numbers (?) Jan 22 00:49:55 negative numbers and zero aren't really numbers Jan 22 00:50:14 that's just sciencespeak trying to confuse you Jan 22 01:05:43 how would i go about opening a dialog from a service? Jan 22 01:06:15 clever: make a notification Jan 22 01:06:31 then it would wind up in the notification bar, wouldnt it? Jan 22 01:06:50 its being triggered from a call in an action, the user is not going to be in another app Jan 22 01:07:27 clever: if you have an activity in the foreground, you can send a broadcast to it to open a dialog Jan 22 01:07:55 i dont know which activity is going to be open at that moment Jan 22 01:08:03 so id have to add the code to a superclass above it Jan 22 01:08:17 plus, there is the use-case of opening the dialog from a notifications click event Jan 22 01:08:28 when the user isnt in my app, and i need to ask some info Jan 22 01:08:39 clever: yes Jan 22 01:09:22 is there a way to set the style of an activity, so it looks like a dialog? Jan 22 01:09:47 yes, there is Jan 22 01:09:56 that would almost be simpler i think Jan 22 01:09:58 but it is not going to solve your problem ;) Jan 22 01:10:05 Ge0rG: how is that done? Jan 22 01:10:33 * Ge0rG would just add a custom view to an AlertDialog created with a builder Jan 22 01:54:16 g'day all, anyone about? Jan 22 01:58:44 Well if there is anyone about, I was wondering if anyone knew if it is possible to draw a border on a LinearLayout? Jan 22 01:59:37 use a 9patch as a background Jan 22 02:02:15 That's what I am doing at the moment, I was hoping for a more elegant solution. Jan 22 02:05:19 can't you just use a Shape as a background? Jan 22 02:05:38 depending on how complex a border you want, that is Jan 22 02:11:19 Use a Shape? Jan 22 02:13:11 yup Jan 22 02:13:23 Either way, the 9patch is working, I can't spend anymore time on that. Thanks romainguy and Leeds. Jan 22 02:14:18 uh-huh... Jan 22 02:18:48 is there any way to defend against apk modding? Jan 22 02:20:29 JatoFire: how is using a 9patch not elegant? Jan 22 02:20:35 it's the proper way to do borders on Android Jan 22 02:22:25 romainguy: http://forum.xda-developers.com/showthread.php?t=1554338 are you aware of this? Jan 22 02:23:48 nvmd seems its just an xml edit for country restrictions Jan 22 02:35:09 romainguy: Perhaps elegant is the wrong word. It just doesn't allow me to do exactly what I want, however what I want has a lower priority than I have time right now. Thanks for your answer though. Jan 22 02:35:23 Ologn: are you still there? Jan 22 02:35:28 qwhois Ologn Ologn Jan 22 02:35:43 2 hours idle :( dont think so Jan 22 02:45:47 Without scrolling the listview at all, calling notifyDataSetChanged() seems to recycle the views such that I get a different view for the same position than I had before. It poses a problem because I've got an image that I toggle on and off, so I change a boolean and call notify data set changed, because I thought that was a cleaner solution than keeping a hashmap of references to Buttons Jan 22 02:46:14 Literally, if I leave the listview scrolled to the top, internally, the views are recycled such that I get a different one :| Jan 22 02:46:21 I wish this weren't so Jan 22 02:46:30 do I really need to keep a hashmap of button refs? Jan 22 02:46:56 that's how ListView works Jan 22 02:47:07 and the way you're using it is… a bit weird Jan 22 02:47:19 your data model is supposed to know the entire state of the presentation Jan 22 02:47:23 it does Jan 22 02:47:26 the thing is Jan 22 02:47:30 and when getView is called you need to bind the views properly Jan 22 02:47:56 I assure you, I'm doing the standard viewholder and model is separate from presentation. I have an array of Foo objects that I change, then I call notifyDataSetChanged() Jan 22 02:48:10 the problem is I hit a disk cache to reload an image over this whole fiasco Jan 22 02:48:16 the images are kinda high res Jan 22 02:48:24 so I can't keep them all in memory simultaneously Jan 22 02:48:36 you should have an in-memory cache of images to avoid this kind of problem Jan 22 02:48:49 (which you would need anyway for the case when the user scrolls the list up and down) Jan 22 02:49:27 thanks. I'll take a closer look at my cache and see if I can fix the problem there Jan 22 02:49:37 good luck Jan 22 02:55:27 hm, it's not as bad as I thought. i have an in-memory cache already. it's just displaying a progress image when it doesn't really need to Jan 22 02:58:50 tdignan: Are you loading all of the images at once or are you lazy loading them? **** ENDING LOGGING AT Tue Jan 22 02:59:58 2013