**** BEGIN LOGGING AT Mon Jun 02 02:59:59 2014 Jun 02 03:04:40 Jonno_FTW: I never use that template before, but i think it shouldn't be difficult to implement a master detail flow. Only thing to change is using Fragments to the activity you've created. Jun 02 03:06:02 piracyd3: thanks Jun 02 03:06:38 piracyd3: I love the facebook fails :D Jun 02 03:07:43 p_l: ya lol Jun 02 03:07:57 https://android.googlesource.com/platform/libcore/+/81abb6fb7332dfe62ff596ffb250d8aec61895df <--- most funny Jun 02 03:10:15 though C+ with their cleartext password... :D Jun 02 03:16:55 why would someone backwards compatibility for 3rd party app ? Jun 02 03:17:34 gordon_: because huge amount of people use it? Jun 02 03:17:57 I'd have left it and sent facebook a grumpy email Jun 02 03:18:55 *left it vroken Jun 02 03:18:59 *broken Jun 02 03:20:08 alex_PP: and instead people would complain about google breaking facebook, and fb would find yet another way to break stuff Jun 02 03:25:29 i doubt it Jun 02 03:25:35 if facebooks the only app crashing Jun 02 03:26:00 and you can't let a 3rd party app drag down the quality of you internal stuff Jun 02 03:26:04 that's bananas Jun 02 03:28:37 if they want to access private fields, the onus is on them to keep an eye out for changes Jun 02 04:09:35 * gordon_ wishes to have event bus... Jun 02 04:19:04 piracyd3: this is harder than I thought to convert Jun 02 04:19:31 * jaspertheghost wishes he was a baller Jun 02 04:20:24 what baller Jun 02 04:21:35 * jaspertheghost shot caller Jun 02 04:32:54 Jonno_FTW please explain, we could help. Jun 02 04:35:23 ah Jun 02 04:35:32 I need to try scala on android... Jun 02 04:35:49 list find (e => e.id == 1) would be nice... Jun 02 05:06:33 how do I pass a bundle to a fragment subclass? Jun 02 06:44:28 Jonno_FTW: hm/ Jun 02 06:56:05 android and nested fragments <3 Jun 02 06:56:08 PAIN Jun 02 06:56:58 i know right Jun 02 06:57:26 Still struggling though. Havng trouble replacing fragments inside viewpager hm Jun 02 06:58:30 onActivityResult hacks < Jun 02 06:58:31 <# Jun 02 06:58:33 <3 Jun 02 06:58:54 <3 will look on that Jun 02 06:59:27 http://delyan.me/04-28-2013/android-s-matryoshka-problem/ Jun 02 06:59:28 this Jun 02 07:00:37 Thanks! Jun 02 07:02:28 well i've done it like this Jun 02 07:02:58 http://pastebin.ws/3ydmf7 Jun 02 07:03:32 if the device is a tablet, then the infofragment is loaded into the linearlayout at the end of the mainactivity Jun 02 07:03:41 otherwise it just starts a new activity Jun 02 07:06:04 now I get an exception on drawerlayout 06-02 16:31:21.690: E/AndroidRuntime(1934): java.lang.IllegalArgumentException: DrawerLayout must be measured with MeasureSpec.EXACTLY. Jun 02 07:06:44 how do I put a fragment next to the drawerlayout for a tablet? Jun 02 07:08:20 isnt it the same ? Jun 02 07:08:27 oh i've seen that error before ... can't remember what causes it. mixing non-support and support views rings a bell Jun 02 07:08:33 never done tablet design but it shouldnt be the case here Jun 02 07:09:32 bankai_au: I don't think I've mixed them, I'm only using support.v4 Jun 02 07:11:03 latest version? Jun 02 07:13:28 I assume so Jun 02 07:16:09 Perhaps this tutorial can help you out a bit: http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/ Jun 02 07:16:28 Helped me when creating drawer Jun 02 07:16:59 piracyd3: I've already got it working, I just want a fragment to the right of the drawerlayout Jun 02 07:18:05 It's all about replacing the fragment with another Jun 02 07:21:07 um Jun 02 07:21:16 so do I need another layout then? Jun 02 08:02:19 hi i have a linearlayout and i want this 50% inside the screen and other 50% outside the screen Jun 02 08:02:24 how can i do this Jun 02 08:02:27 hi there, i think i have a bad coding style for calling drawing updates which i handle at the onsensor changed. any ideas how to fix the "engery hungry" code? http://pastebin.com/mS479ZfM Jun 02 08:05:09 WEtxx, write a Layout which can handle this. Jun 02 08:05:25 or use a relative layour Jun 02 08:08:36 Does anyone how to return to previous Fragment from an Activity? The Fragment is in ViewPager though, so I'm having a hard time returning to the specific Fragment inside it. Jun 02 08:09:00 ViewPager holds 3 fragments. Let's say I'm returning to Fragment A from the Activity. Jun 02 08:12:11 Is there a way I can automate taking screenshots on Android? It is too difficult to press power + vol up to take a screenshot in an app I want to put on google play. Jun 02 08:13:06 BWestOZ, do you use eclipse? Jun 02 08:13:19 android DDMS has a screencap/screen record button Jun 02 08:13:20 uiautomatorviewer can do that Jun 02 08:13:33 smartl thanks for responding. No, I've built a game using unity Jun 02 08:13:53 so uiautomatorviewer will be good Jun 02 08:14:25 hook you game in eclipse with DDMS, i dont know if that is working by commandline. Jun 02 08:14:59 smart1 Jun 02 08:15:11 this http://pastebin.com/2ZTLChYh makes linear layout 100% of screen Jun 02 08:15:12 gordon_, thanks for responding. I need something that will work just on an android device Jun 02 08:15:21 i want this 50% could you tell me is this possible ? Jun 02 08:15:37 http://stackoverflow.com/questions/20136121/android-how-to-take-screenshot-programatically Jun 02 08:16:06 WEtxx, like i said, use a custom layout, or force this creating the layout manually Jun 02 08:16:11 WEtxx: weight 1 and other item weight 1 Jun 02 08:16:30 gordon_, didn't knwo that this will work too :D Jun 02 08:17:17 i tried weight, it only splits the screen by 2 Jun 02 08:26:30 someone got an idea about sensorchanged + drawing issue? Jun 02 08:33:13 good day people Jun 02 08:33:38 so my animation of an invisible item does not happen the first time it is called only from the second time Jun 02 08:33:43 any reasons? Jun 02 08:35:12 in which method are you calling the animation? Jun 02 08:35:21 on a button press Jun 02 08:35:44 my feeling is that because the visibility was view.GONE it doesn't know how to animate? Jun 02 08:36:20 hmm Jun 02 08:36:32 try setting visibility to invisible before the animation sequence Jun 02 08:36:34 as i was asking the question i had the idea Jun 02 08:36:45 yeah i am testing that now just waiting for it to deploy Jun 02 08:36:46 because if it's gone there's nothing to animate Jun 02 08:37:46 yeah that was it i guess :) its working now .. Jun 02 08:37:51 i am completely new to animations Jun 02 08:37:55 awesome! Jun 02 08:38:04 so i didn't know that GONE and invisible made a diff Jun 02 08:38:13 well i kinda thought of it as i was asking the question Jun 02 08:38:15 stupid me Jun 02 08:39:19 now i know what invisible is used for Jun 02 08:39:27 i never knew why you would want to use invisible Jun 02 08:39:40 inviisble it's still there Jun 02 08:39:43 just not visible Jun 02 08:39:46 why layout something you are not displaying .. but for animations this makes sense. Jun 02 08:39:48 gone it's not even there Jun 02 08:39:55 not just animations Jun 02 08:39:57 yeah i know thats why i am saying Jun 02 08:40:14 soometimes you want some views that have an item and you want other views that don't have tht item Jun 02 08:40:20 what else would you use that for then? if your layout is setup propperly then invisible vs gone makes no difference Jun 02 08:40:24 and setting the visibility takes less memory than inflating new layouts Jun 02 08:40:45 and gone is generaly better in terms of appearance than invisible Jun 02 08:40:59 view reuse on an item that is gone does not mean its re infalted Jun 02 08:41:11 exactly Jun 02 08:41:15 you don't reinflate anything Jun 02 08:41:26 you just change the visibility Jun 02 08:41:34 yeah but what i am saying is even if you set something to gone its not re inflated Jun 02 08:41:34 better performance Jun 02 08:41:39 that is why i allways use gone Jun 02 08:41:43 yeah Jun 02 08:41:58 i never want something to fill space on my display if its not drawn Jun 02 08:42:02 so invisible was never used Jun 02 08:42:11 it makes sense for animations Jun 02 08:42:12 ah i get what you mean now Jun 02 08:42:15 but for nothing else though Jun 02 08:42:17 yes Jun 02 08:53:28 Hi, what kind of animation do I need to have an animation with height 0 to height wrap content (or 50 dp)? Jun 02 09:00:36 Hello, I'm doing a Runnable loop which goes to the next key of a JSONOject each time. It uses keys.next(), how can I go back to the begining of the keys when the loop is on the last key? Jun 02 09:03:22 Hello, I'd like to ask about the best network library that is used for downloading big files on Android, with the ability to priortize and resuming the download Jun 02 09:36:09 am i right in thinking that ACRA kills the process on crash? Jun 02 09:41:38 Hi, is there a way to monitor accelerometer data continuously (for sudden spikes) without completely massacring the battery life of the device? Jun 02 09:55:10 there should be Jun 02 09:55:16 those health apps do that i think Jun 02 09:55:23 the ones that track your steps Jun 02 09:55:27 you should look into how they do it Jun 02 09:58:13 i need help regarding memory leaks. im using this article for implementing lazy loading images in listview - http://androidexample.com/Download_Images_From_Web_And_Lazy_Load_In_ListView_-_Android_Example/index.php?view=article_discription&aid=112&aaid=134 - and i've used viewholder pattern in myadapter Jun 02 09:58:36 the problem is, with every scroll that contains a post with an image, my heap grows. Jun 02 09:58:54 its like its keeping evey bitmap object that contains the images Jun 02 09:59:41 anybody knows why is this happening? any hint to solution? Jun 02 10:00:25 guys im really upset how can i do that this image view's 50% of out of screen Jun 02 10:00:28 here is my paste http://pastebin.com/bvG0P4Kj Jun 02 10:06:08 WEtxx, do you want it to be scrollable? Jun 02 10:07:16 I can now claim someone has gotten genuinely angry at me for suggesting their antivirus wasn't right and that they might be imagining a bug in one thing rather than another. Jun 02 10:07:16 So that's a first. Jun 02 10:08:21 jvrodrigues:no i dont want it scrollable Jun 02 10:08:56 jvrodrigues: i must use half of image Jun 02 10:09:08 but imageview scales it Jun 02 10:09:20 thats why i want 50% of image out of screen Jun 02 10:09:25 have you tried android:scaleY and scaleX Jun 02 10:09:27 ? Jun 02 10:09:32 nope Jun 02 10:09:41 try setting it to 1 Jun 02 10:09:47 see what happens Jun 02 10:09:49 letme Jun 02 10:09:51 okey Jun 02 10:10:21 Can I use weather icons from Google Now for my in-app weather view? Jun 02 10:11:14 I mean is it legal? Jun 02 10:13:23 hi guys Jun 02 10:13:34 I need some help on DevicePolicyManager API Jun 02 10:14:04 jvrodrigues: it didnt work for me :( Jun 02 10:14:18 I want to double check that if I use resetPassword(String, int) method.. is the password input encrypted before stored in Android's memory? Jun 02 10:14:31 WEtxx, what happened? Jun 02 10:14:34 same size? Jun 02 10:14:38 nothing Jun 02 10:14:44 now set it to 2 Jun 02 10:14:48 and see what happens Jun 02 10:17:47 jvrodrigues:it worked good now thanks :p Jun 02 10:22:26 WEtxx, it's ok, but you should consider cropping the image to optimize performance Jun 02 10:22:34 no need to draw the whole thing when you only need half Jun 02 10:23:10 yep you're right but this is small project Jun 02 10:25:46 btw why do i need to use invalidate method ? what does it do ? Jun 02 10:26:06 invalidates a view Jun 02 10:26:07 how can I get the total items in a JSONObject, including sub-arrays, etc, in a generic way? Is there some method for that? Jun 02 10:29:03 ty i found what it does Jun 02 10:47:11 anyone familiar with DevicePolicyManager API? Jun 02 10:50:20 pejt___: is this a survay? Jun 02 10:50:28 survey? Jun 02 10:50:38 what is the question? Jun 02 10:51:25 I am using resetPassword(String, int) method.. where you pass as parameter the password you want to lock the device at LockScreen Jun 02 10:52:03 I want to know if the password is encrypted when stored in memory.. nothing is mentioned in documentation and I got lost whilst looking at the code :( Jun 02 10:57:34 Is it reasonable to try to connect to an endpoint in certain intervals, even if the Network Manager tells us there is no connection? Jun 02 11:06:50 hi all is there anyone here that knows about the NFC HCE API and all about that ? Jun 02 11:17:06 hy all Jun 02 11:17:35 I can write an NFC tag with one phone, and after that I can write that with another phone Jun 02 11:18:59 gregtom6: assuming the tag type is supported by both phones Jun 02 11:20:28 p_l: where can I see that? Jun 02 11:21:02 How can you confirm the identify of the user using the NFC app? Jun 02 11:21:06 but if I write the tag with Sony phone, after that I can write the tag and read with a Samsung phone Jun 02 11:22:12 for approximately 2 times Jun 02 11:22:36 that's the problem Jun 02 11:23:05 I get this errors when writing: http://pastebin.com/YgxS01Ce Jun 02 11:23:07 in the logcat Jun 02 11:24:03 would it be legal to use weather icons from Google Now for my in-app weather details? Jun 02 11:25:09 gregtom6: if they are all standard NDEF tags, they will work. if it's Mifare or other, they might not Jun 02 11:26:16 p_l: but what happens after the Sony phone write the tag? Jun 02 11:27:19 gregtom6: if you used a) standard tags b) NDEF format, then the tag will be usable in all devices Jun 02 11:29:38 I think it's MiFare Classic 1K Jun 02 11:29:58 SOL Jun 02 11:30:06 but the weird thing is if I write the tag with Sony phone, after that I can write the tag and read with a Samsung phone Jun 02 11:30:17 but if I start with Samsung phone, it can't write Jun 02 11:30:38 probably used slightly different tag formats Jun 02 11:31:09 p_l: do you mean the phones use different tag formats? Jun 02 11:31:39 application used incompatible tags Jun 02 11:32:00 you need to use the same tag format when programming the tags Jun 02 11:34:00 p_l: I used the same applications downloaded from Google Play Jun 02 11:34:04 for write the tag Jun 02 11:34:10 no idea Jun 02 11:34:17 this channel is more about writing the applications Jun 02 12:33:46 Could anyone help me clear up fragments and list for me? I had my code working in a pure activity based app, but got troubles getting it to work with fragments. Official docs arent really helping for me. Jun 02 12:39:20 I've got a TakeActivity from which I want to use fragments to handle the sequential steps of picking an item from a list and "taking" it. I had this working in activities, but fragments are giving me trouble. A simple static fragment is working, but now I have a ListFragment that gets its data from Parse.com datastore. Fetching the data isn't the problem. However, TakeActivity.onCreate() calls a AvailableListFragment class, but Jun 02 12:39:29 I don't know how to get the data in stat static class. Jun 02 12:39:45 I've had it working in a seperate class, but somehow I feel like that's not how it's supposed to go. Jun 02 12:56:10 After I run my android app with "run" from within Eclipse, and it shows up in the virtual android device, how do I exit/quit the app from the virtual device? Is there a way to do it easily from the emulator or do I have to code an exit function into my app? Jun 02 13:04:43 I show a Fragment from a library project. Now I need to create an option menu, where should I create this, in the Fragment of the library or in my Activity (inside my app project)? Jun 02 13:15:39 Hey all. I am trying to make an activity that handles Keyboard input specially (used with a Barcode Scanner), the Activity has a RelativeLayout with a Grid inside, and I can not make it *NOT* focusable. The grid constantly picks up keyboard events instead of my activity. Jun 02 13:19:33 how can I detect a card with javax.smartcardio? Jun 02 13:19:51 because everything I found doesn't working Jun 02 13:21:13 gregtom6: Are you sure that *exists* in Android? Jun 02 13:21:31 true Jun 02 13:25:28 Currently I have Fragment A - FragmentB - back button --> home - open app --> fragmentA. How can I go back to FragmentB? Jun 02 13:25:52 exit Jun 02 13:44:18 hi, i have a problem regarding NDK, Eclipse and C++11. Compiling of my project with ndk-build works fine (APP_CPPFLAGS in Application.mk is set to -std=c++0x), but Eclipse (Kepler) brings the error "Symbol not resolved" for e.g. std::thread and aborts compiling. I wanted to add the same std-flag to the eclipse indexer, but in Project properties -> C/C++ General -> Preprecessor Include Paths, Macros etc., everything is greyed out Jun 02 13:44:56 Hi, does anyone use netbeans with android ? Jun 02 13:46:00 Damn. Making focus do something sensible is a futile task. Jun 02 13:46:16 Because I can't add any library to the project, I don't know why and I'm looking for help Jun 02 13:49:36 pawell: No. Jun 02 13:50:07 This grid keeps getting focus, I've set android:focusable="false" and android:focusableInTouchMode="false", and _try_ to request focus for the accompanying text field in onResume(), but it just refuses to work. Jun 02 13:54:16 CodePulsa: Do you mean that nobody uses it or you don't ? I would use android studio but it's extremly slow. Build of empty project with blank activity takes over 1 minute . . . Jun 02 13:56:26 I have a folder in res called raw with a file called rain.mp4. I'm trying to point a mediaPlayer instance at that file. I'm trying " mediaPlayer = MediaPlayer.create(this, R.raw.rain); " but it gives the error "rain cannot be resolved or is not a field" Jun 02 14:15:14 d0de: try with a rain.wav Jun 02 14:22:39 Does Android Studio offer a way to pregenerate a TAG constant for every class beforehand? Jun 02 14:23:20 the best thing I came up with is private static String TAG = ClassName.class.getSimpleName(); Jun 02 14:26:07 I have added my debug and release keystores' SHA1s to the Google APIs Console yesterday to use Google Maps in my app Jun 02 14:26:31 but they only display when I play the app through Eclipse and not when I export it using the release keystore Jun 02 14:27:06 I don't know how to debug the release version in Eclipse so I can't find the exact error, but I guess it's an API issue? Jun 02 14:30:50 so any advice on how to proceed? Jun 02 14:33:45 Hi guys Jun 02 14:34:17 F**k Focus Methods! Made a custom IME: http://www.youtube.com/watch?v=ZmETaajP1qs Jun 02 14:34:17 Is there any way to create variables like this on Android? Like NSDictionary on objective-c? params = { 'email': email, 'password': password, 'country': 'US' } Jun 02 14:34:30 JSONObjects Jun 02 14:34:58 or Java Maps Jun 02 14:43:50 ping? Jun 02 14:43:50 thanks conor_f Jun 02 14:43:58 pong :P Jun 02 14:44:08 np Sepho Jun 02 14:44:36 soz, was just seeing if anyone knew about my question. I asked it 2 minutes before you came Jun 02 14:44:56 Can I initialize a HashMap directly with some values on a return? Something like: retutn new HashMap("key", "value",...) ? Jun 02 14:45:49 nope. Not as far as I know anyways. You have to use .put() Jun 02 14:45:57 yes Jun 02 14:47:06 return new HashMap() { put("key","value"); put("k2","v2"); } Jun 02 14:47:25 ops Jun 02 14:47:28 thanks both! Jun 02 14:47:38 TIL gattuso, thanks :) Jun 02 14:48:58 i don't remember the syntax, maybe was "return new HashMap() {{ put("key","value"); put("k2","v2"); }}" Jun 02 14:49:08 with double curly braces Jun 02 14:50:12 http://stackoverflow.com/questions/10689224/inline-initialization-blocks-in-java double curly seems corrent Jun 02 14:50:15 *correct Jun 02 14:51:38 No love for my Google Maps question? Jun 02 14:56:02 dunno, i'm going AFK Jun 02 15:05:09 i'm trying to build an app based on google maps. I was able to build the app alright . When i try to run, it an error pops up saying "Unfortunately, has stopped".What am i doing wrong? Jun 02 15:06:19 what's the LogCat output? Jun 02 15:13:14 conor_f: http://pastebin.com/embed_js.php?i=ei1wr3MA Jun 02 15:14:58 do you guys prefer a fragment or a simple listview as navigation drawer menu? Jun 02 15:15:04 im not sure what to choose.. Jun 02 15:16:10 ListView Jun 02 15:16:46 is there something convenient I can use for testing that sends ACTION_AUDIO_BECOMING_NOISY on my physical device? Jun 02 15:18:31 http://stackoverflow.com/a/14511239/1229735 Jun 02 15:18:38 Can startActivity(intent) ever be used to go outside of your own application? Jun 02 15:20:58 yiati, are you saying I should use something else and not BECOMING_NOISY? Jun 02 15:29:11 I got: no peer certificate error when doing an api call. Is this mobile (android) or server issue? Jun 02 15:30:06 services: do I intent just 1 time to them, or every time i need to have it do something? Jun 02 15:30:56 Hi, can i create two views and put them below eachother? i'm doing http://errietta.me/paste/view.php?id=424 but they're just falling on top of each other Jun 02 15:33:19 If you want to position views linearly, you should probably use a LinearLayout Jun 02 15:33:27 erry: create a layout to put the two views in (RelativeLayout, LinearLayout, etc.), and setContentView(layout). Or better off modify the activity-main.xml accordingly. Jun 02 15:35:13 Hi, greendao is better than ormlite? Jun 02 15:41:13 How would you pass runnable code around to execute it synchronously? Just with a new Runnable and start it using Thread(runnable).run() (as opposed to start) Jun 02 15:50:45 platzhirsh: have you read about Executor? Jun 02 15:51:27 Lachezar, thanks! Jun 02 16:03:23 Can I use OnAudioFocusChangeListener without requesting audio focus in the first place? Jun 02 16:23:00 I keep getting " The method requestAudioFocus(AudioManager.OnAudioFocusChangeListener, int, int) in the type AudioManager is not applicable for the arguments (MyMediaPlayerService, int, int) " Jun 02 16:23:33 but I don't really understand why. I'm requesting focus with: int result = audioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); Jun 02 16:38:18 d0de: this (an instance of MyMediaPlayerService) must implement AudioManager.OnAudioFocusChangeListener. Jun 02 16:40:01 Can somerone here explain me when a parcel can be usefull? Lets say i want to pass an object to a new activity, why not just create a set method and pass it like that? Jun 02 16:40:15 which btw is the way i usually do it Jun 02 16:41:13 Lachezar, thanks very much! Jun 02 16:42:15 jvrodrigues: Parcel is a method of effectively store/restore and send/receive objects as byte sequences. Aplicability is in the eye of the beholder. Jun 02 16:43:15 Lachezar: when I try to implement that in my Service, I get a hard crash " Unable to instantiate service net.thorbek.mymediaplayer.MyMediaPlayerService: java.lang.NullPointerException " Jun 02 16:43:17 any ideas? Jun 02 16:43:39 jvrodrigues: When an activity is paused (by say an incoming phone call) the activity is allowed to store its state, and mostly Parcelable is the best way to store/restore complex data set. Jun 02 16:44:47 d0de: That's up to you. Check the NPE stack trace, you probably did something wrong, like premature initialisation. Jun 02 16:46:03 I see Jun 02 16:46:52 so what objects would you want to store? Jun 02 16:46:59 i thought android would already do that for you Jun 02 16:47:17 i mean Jun 02 16:47:34 when the application goes on pause, and then comes back, does it reconstruct all objects? Jun 02 16:49:44 http://pastebin.com/jvir6DPQ I get a nullpointer exception in line 23. However I do not understand how that can be since properties, user and sd should all be initialized. Jun 02 16:51:40 could be lots of things Jun 02 16:51:47 have you debugged the thing? Jun 02 16:51:50 is user null? Jun 02 16:52:13 nvm Jun 02 16:52:46 It does not crash relyably. Jun 02 16:53:43 so you don't know which reference is null Jun 02 16:53:43 Anyone have a live stream of today’s event? Jun 02 16:53:51 Or will there be no live streams this time Jun 02 16:53:52 hmmm Jun 02 16:54:05 judging from the code, I can't really tell, no. Jun 02 16:54:11 looking at your code i'd say the problem isn't here Jun 02 16:54:21 Bantalon: I/O isn't for weeks Jun 02 16:54:28 I/O? Jun 02 16:54:33 I agree, but it's crashing on that line. Jun 02 16:54:36 try adding an if statement in case dbHelper is null Jun 02 16:54:51 Leeds: What are you talking about? :) Jun 02 16:55:08 the important live event for #android-dev Jun 02 16:55:30 it's awfully weird that it's crashing in line 23 Jun 02 16:56:42 yeah... Jun 02 16:56:44 hello. I'm writing a voip dialer app and I can't find a way to disable notification vibrations while in call. Is there a propper way to do this? Jun 02 16:57:03 well Jun 02 16:57:07 realisticaly Jun 02 16:57:11 i can't be properties Jun 02 16:57:18 and it can't be the simpledateformat Jun 02 16:57:21 so it can only be the user Jun 02 16:57:36 that doesn't have the property you're trying to get Jun 02 16:57:38 which it can't be because there's a check if user is null right beforehand Jun 02 16:57:56 it can have something, just not the thing you're asking Jun 02 16:58:16 try checking for user.getCreatedAt() exists in the if statement Jun 02 16:58:36 but something is definitly screwed up somewhere else, not here Jun 02 16:58:42 my best guess is that is in the user object Jun 02 16:59:00 hi all. I have a custom build of the SDK and am trying to use apps within the emulator (built from sources). However, as soon as I start an app that needs a network access, the app crashes. Any idea how to debug this? Jun 02 16:59:01 yeah, but then it would return and give new Date(Long) null Jun 02 16:59:20 i don't think you can format a null parameter Jun 02 16:59:24 i might be wrong though Jun 02 16:59:56 jvrodrigues, it would probably cause a nullpointer exception... but in date and not in my class. Jun 02 16:59:58 hi, is it somehow possible to trigger events in another process / activity e.g. from a service or somehow trigger a "global" event (onClick or onTouch etc..) that is "forwarded" into some specific application. i just have this stupid idea of an app that would trigger click/touch events in Tamago until the game is finished:p Jun 02 17:00:29 e.g. start the activity and in a loop trigger events in it or something like that:p Jun 02 17:00:42 then the issue can only be in the getCreatedAt() method Jun 02 17:00:44 flam_, there are testing frameworks like appium that can do stuff like that Jun 02 17:01:09 public Long getCreatedAt() { Jun 02 17:01:09 return createdAt; Jun 02 17:01:09 } Jun 02 17:01:20 whoops, thought that would be single line Jun 02 17:01:27 hmm Jun 02 17:01:33 anyway, it's a Long, so it's either that or null Jun 02 17:01:34 well Jun 02 17:01:43 if it's null Jun 02 17:01:47 wait Jun 02 17:01:48 i need to check Jun 02 17:02:00 then it would crash in new Date(null) Jun 02 17:02:27 hi Jun 02 17:03:33 Leeds: UGh wrong channel my bad! Jun 02 17:03:40 can somebody help me with a little problem? Im relatively new to android programming and trying to scale a drawable which is used in a selector Jun 02 17:03:40 following way used image -> selector -> checkbox Jun 02 17:03:45 as far as I'm aware the only way a nullpointer exception is thrown is if the object you try to call is null, not anything method related. in this case it would be properties, sd or user, neither of which should be null Jun 02 17:03:47 Bantalon: took you a while :P Jun 02 17:03:58 Leeds: brain is running on mhz Jun 02 17:04:00 :p Jun 02 17:04:35 hey, it's 1am here - I'm just trying to do a database dump/restore/clone before going to sleepy-town Jun 02 17:04:36 Syzygy, your null is in multiplying a null variable Jun 02 17:04:57 null * 1234 == null pointer Jun 02 17:05:25 oh, that might actually make sense. thanks Jun 02 17:06:56 would it be legal if I use the Weather images from Google Now in my app? Jun 02 17:08:12 I'm sure they have their terms of use listed somewhere Jun 02 17:09:45 WantToCode: In general, google terms of use for reuse of imagery and other similar content can be really expensive Jun 02 17:09:51 And limited Jun 02 17:10:54 hmm Ok. Thanks for the heads up. I was thinking of using them Jun 02 17:11:06 Is there a way to temporary disable notification vibration while my app is running? Jun 02 17:11:14 WantToCode: rule of thumb - unless something is explicitly licensed for reuse, don't Jun 02 17:11:38 At least colors can be copied, right? Jun 02 17:11:59 the actionbar colors to be precise Jun 02 17:12:10 probably... Jun 02 17:12:20 you want a legal option, ask a lawyer Jun 02 17:12:40 Woops. ok Thanks! Jun 02 17:19:31 what is the difference between activity_main.xml and fragment_main.xml? Jun 02 17:20:15 The Activity_main.xml contains the Layout for the FragmentActivity and the fragment_main.xml is the Layout for the fragment. Jun 02 17:22:15 is it wrong to have a service implement AudioManager.OnAudioFocusChangeListener ? Jun 02 17:22:22 brycelol: Thanks but could you simplify, i'm quite new at this Jun 02 17:22:52 d0de, why would it be Jun 02 17:23:10 just impementing that and initializing the audio manager resulst in my service failing to instantiate with a null pointer exception, but I'm unsure how to proceed with diagnosing the problem Jun 02 17:23:40 Zharf, I don't know, I'm just a bit lost >.< Jun 02 17:24:47 "AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); " results in a crash every time Jun 02 17:25:20 but it's straight from here: https://developer.android.com/guide/topics/media/mediaplayer.html Jun 02 17:25:36 under "Handling audio focus" Jun 02 17:26:48 hil_, well you have your main activity which can house multiple fragments. Jun 02 17:27:11 activity_main.xml is the layout definition of the encapsulating activity Jun 02 17:27:20 fragment_main.xml is the layout of the actual fragment within it Jun 02 17:27:38 let's say you had 3 fragments (top, bottom, middle or tab1, tab2, tab3) Jun 02 17:27:54 fragment_tab1.xml, fragment_tab2.xml etc Jun 02 17:28:55 suggest you read through this http://www.vogella.com/tutorials/AndroidFragments/article.html Jun 02 17:29:37 brycelol: thanks a lot Jun 02 17:30:11 d0de, see http://stackoverflow.com/questions/4422866/exception-on-getsystemservicecontext-audio-service Jun 02 17:31:52 brycelol, thanks very much, will read! Jun 02 17:35:50 brycelol, do you think I could just move the AudioManager stuff to the main activity, to avoid this issue? Jun 02 17:36:43 where is it atm? Jun 02 17:36:50 I'm trying to import a project into my workspace with eclipse but actionbaractivity is not getting resolved and I'm wondering whhy Jun 02 17:37:13 brycelol, in the media player background service Jun 02 17:38:36 pthreat, your likely missing the android support libraries do a quick google search for "actionbaractivity android support libraries" Jun 02 17:39:09 ok thanks Jun 02 17:42:05 d0de, i think your activity should be implementing OnAudioFocusChangeListener Jun 02 17:42:22 I want to implement a Guava treemultimap where Long -> Long -> POJO. Is there a good type or pattern for multilevel multimaps? Jun 02 17:43:15 I’d prefer not to roll my own if there’s a cleaner option. Jun 02 17:46:21 brycelol, yay it works :D :D thanks so much Jun 02 17:46:29 d0de, your welcome Jun 02 17:47:37 how the fuck do you import a project Jun 02 17:49:05 File -> Import -> Android -> Existing Android code into workspace Jun 02 17:49:09 In eclipse Jun 02 17:50:11 brycelol: thats what I do Jun 02 17:50:16 I even tried creating a new project Jun 02 17:50:23 it doesnt works ... shit Jun 02 17:50:25 I hate this Jun 02 17:50:40 what's the issue? just what you mentioned above? Jun 02 17:50:47 Why when I create a new project attempts to create an appcompat_v7_2 Jun 02 17:50:51 try Import -> Existing Projects Into Workspace Jun 02 17:51:00 under General Jun 02 17:52:27 markmarkmark: thank you Jun 02 17:52:35 np :) Jun 02 17:53:22 Having my motorcycle stolen at gun point by three little fuckers makes me a bit uneasy Jun 02 17:53:57 I need help with sqlite transactions, anybody? Jun 02 17:55:13 Rule #1 "Don't ask to ask" - http://programmers.stackexchange.com/a/154678 Jun 02 17:55:44 Just ask :D Jun 02 17:56:27 markmarkmark: do you know how can I regenerate the files under gen Jun 02 17:57:08 project clean project is not working for me :D Jun 02 17:58:00 pthreat: try deleting it Jun 02 17:58:03 perhaps Jun 02 17:58:30 Nope didn't work Jun 02 17:59:54 what did it do when you deleted it? Jun 02 18:00:28 right click delete Jun 02 18:00:34 it regenerated BuildConfig Jun 02 18:00:36 but not R Jun 02 18:01:07 check if there is some xml error Jun 02 18:02:00 http://blog.burnayev.com/2009/11/android-developer-tip-regenerating.html Jun 02 18:05:15 error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. wtf Jun 02 18:35:25 i have a master detail fragment setup. when i rotate into master detail, then rotate back, the options from the detail fragment are still in the action bar. what is the best way to make sure that doesn't happen? Jun 02 19:04:07 Wow, Apple really stepped up their game I must say. Jun 02 19:04:33 We'll see how Google did at Google I/O. Jun 02 19:07:00 hmm, my machine shut itself down (reheated I believe) now on reboot virtualbox doesn't start Jun 02 19:07:20 vboxnetadp fails to load saying "disagrees about version of symbol consume_skb" Jun 02 19:07:36 and unregister_netdev, and ether_setup, and alloc_netdef_mqs, and register_netfed and free_netdev Jun 02 19:07:53 I reinstalled virtualbox-host-modules, what else needs to be reinstalled probably ? Jun 02 19:11:46 Muchoz, yeah I want a new programming language too :P Jun 02 19:12:23 Mavrik, their features fill in the missing things that Android did have imo. Jun 02 19:14:29 Muchoz, mhm, still, modern programming language :) Jun 02 19:14:47 Mavrik, that too. I hope it's a bit easier than Obj-C Jun 02 19:15:23 it look exactly like ObjC Jun 02 19:15:27 just without the C baggage Jun 02 19:17:56 Hi there, New to android and was wondering if someone could point me in the right direction please? Jun 02 19:18:05 what I want to do is when the user starts the app it goes to one screen but if the system starts the app after receiving Boot_Complete it starts a different page. can someone direct me to info on the best way to do this? Eg. everytime the user starts the app I want a configuration screen to show first but if the app starts at boot the app will start as regular application Jun 02 19:19:14 Muchoz: I can't see Google taking a similar leap this year Jun 02 19:20:28 hounge: just have your boot complete launcher run a different activity, or set a flag in the intent extras of launching your main activity. Jun 02 19:21:20 Estel, me neither unfortunately. Jun 02 19:21:36 Estel, this is a huge hit. Jun 02 19:21:49 I really did not expect WWDC to be this big. Jun 02 19:22:32 !books Jun 02 19:22:47 A hit to what? Better competition is better for everyone, maybe. Jun 02 19:22:51 pf Jun 02 19:33:56 hey guys. This is a long-shot, but does anyone have any hints for me in demuxing MPEG2TS streams? I'm unsure what android supports in this regard. I have a video stream and a metadata stream... each of which are encapsulated in separate MPEG2TS streams then sent via RTSP. I'm unsure where to hook in to separate out the media streams Jun 02 19:36:43 you'll almost certanly have to do that yourself Jun 02 19:37:03 Android 3.0+ does support MPEG-TS demuxing in its video player but that functionality is not exposed via API Jun 02 19:43:56 recommend me an Android book Jun 02 19:44:08 Mavrik: interesting. That's lame :-/ But, I cant really complain. Jun 02 19:44:59 Mavrik: side note- I also wish android exposed it's RTP packet receivers... Jun 02 19:45:08 (and demuxers) Jun 02 19:45:18 ac_slater, yeah, they just implemented demuxer support Jun 02 19:45:25 but, sadly, the whole API stack for video is utter crap Jun 02 19:46:07 Mavrik: I agree. I'm not even sure where to start looking at my own renderer. Maybe I'll just use ffmpeg as a demux and opengl (and context) as a render Jun 02 19:46:19 hmm Jun 02 19:46:27 well you still have to decode besides demuxing Jun 02 19:46:48 ah true. Decoders arent exposed? Jun 02 19:47:05 I think I can get to the h264 decoder via tegra Jun 02 19:47:26 ah and MediaCodec exists too Jun 02 19:49:14 Muchoz yeah, our ios guy was telling me about some of the stuff Jun 02 19:49:14 ac_slater, decoders are exposed Jun 02 19:49:21 ac_slater, they can also be wired to surfaces for rendering Jun 02 19:49:43 Mavrik: interesting. I just saw an example. Well thanks for the chat mate. I appreciate the input Jun 02 19:49:57 ac_slater, see grafika Github repository Jun 02 19:50:18 ac_slater, https://github.com/google/grafika Jun 02 19:53:47 if you use a view pager with fragments, is the best way to prevent duplicate menu items to just invalidateoptionsmenu in a lifecycle method for the fragment? Jun 02 19:54:17 Mavrik: ah great. This will help. I guess I'll start working on an RTP client lib and a MPEG2TS demuxer.... Jun 02 19:56:25 the goal is either A) 2 RTP streams (from 1 server): one for h264 and the other for metadata, B) 1 RTP stream with an MPEG2TS container with the streams. Since basically none of that functionality exists ... I should probably create it Jun 02 19:57:20 ac_slater, honestly Jun 02 19:57:25 if you can stuff in a streaming server Jun 02 19:57:32 you should really consider that :) Jun 02 19:57:46 Mavrik: what do you mean? Jun 02 19:57:47 and switch to HLS Jun 02 19:58:02 interesting. Jun 02 19:58:29 HTTP Live Steaming is awesome ... but android is just one of many clients :-/ Jun 02 19:59:16 HLS is awesome Jun 02 19:59:30 ac_slater, well, that's why you stuff a good streaming server inbetween your source and clients Jun 02 19:59:40 we had great success with Wowoza which can pretty much output anything Jun 02 19:59:44 *Woza Jun 02 19:59:47 eh.... Wowza. Jun 02 20:00:00 yea I hate wowza :(. I guess having a proxy isnt a terrible idea... Jun 02 20:00:12 and we used HLS, RTMP, RTMPT, RTMPTE and RTSP :) Jun 02 20:00:29 hmm, Wowza is awesome :) Jun 02 20:00:33 right. I just need RTP and MPEG2TS. Jun 02 20:00:36 compared to some other crap out there. Jun 02 20:00:43 I guess wowza is nice for what it is ... I just dont need RTSP Jun 02 20:01:19 well :) Jun 02 20:01:25 do as you will Jun 02 20:02:44 ;) I would love to use stuff already built. It's not easy finding a streaming protocol that'll play nicely across devices and domains. Jun 02 20:02:54 Mavrik: anyways, thanks for the chat mate. Thanks for the advice too Jun 02 20:03:00 I want to show a login screen anytime I detect that any of my activities get resumed without coming from within the application. Does anyone have any kind of recommendations for that? Jun 02 20:11:49 what is the best way to keep menu items from lingering around when switching between different fragment configurations? Jun 02 20:31:41 im following the master / detail generated example in android studio. it is nice to save the instance state so you keep the fragment and selected item when swapping to portrait then back to landscape, but in portrait the detail fragment is still contributing to the action bar menu Jun 02 20:53:00 is it a problem to read and parse a 160kB JSOn file on an Android phone? Jun 02 20:53:15 is it a problem to read and parse a 160kB JSOn file on an Android phone? ()i dont have it yet so trying to decide if it is the right way to go... Jun 02 20:56:35 ycomb: I'm guessing you want to buffer that file to memory Jun 02 20:56:52 ycomb: best approach is to download the file and process it locally so it can have whatever file size you'd like Jun 02 20:58:04 160k is ALOT of JSON tho Jun 02 20:58:08 it's gonna take awhile. Jun 02 20:58:27 It's a lot of json for sure.. consider splitting some of that out to a binary file? Jun 02 20:58:35 and have the json refer to a location where that file can be accessed? Jun 02 21:03:49 what is the proper way to handle menu items for fragments? im using setHasOptionMenu to allow my list and detail fragment to contribute in a master detail flow. The problem is when I switch back to portrait the detail fragment still contributes to the menu, even though it is no longer visible. Jun 02 21:07:51 Is it 160k pretty printed? Jun 02 21:45:56 Can anyone explain to me what the value returned by MeasureSpec.getSize() actually *is*? Jun 02 21:52:11 Classy, I ask a question and my connection drops Jun 02 21:54:18 Does anyone see the cause of crashing in this stack dump? Jun 02 21:54:18 http://pastebin.com/JR2M8SPH Jun 02 22:04:25 http://lpaste.net/105001 <- is that illformed json? Jun 02 22:07:58 ycomb: It should be wrapped in opening { and closing } Jun 02 22:47:40 If a camera is 'Frozen' is there a way to fix it wihtout rebooting the phone? Jun 02 22:58:20 generally not, something crapped itself Jun 02 23:04:23 I'm doing a lot with it Jun 02 23:04:31 I think it freezes after too many commands Jun 02 23:04:55 I'm gonna put in error handling that will throw the right response instead of giving me a weird one Jun 02 23:07:48 I am making a quiz game, what do you think is better: 1. Store questions in a database on appengine and make a request for a newgame. Pros: No need to store questions on phone, pasing big json takes space. 2. Store on phone. Pros: Dont have to pay for database reads. Cons: Uses a lot of memory (for a short time). Jun 02 23:08:06 Cons for database is that the player neeeds connection to itnernet to plat. Jun 02 23:08:12 plat->play Jun 02 23:12:14 when using android studio on a Mac, is there a way to set ANDROID_HOME in the launchd.conf file to the sdk that comes with Android Studio? Jun 02 23:12:38 it seems to break because of the white space in application name Jun 02 23:16:08 it's just an environment variable, you can set it in your shell rc file Jun 02 23:17:27 will android studio still be able to pick it up? Jun 02 23:24:06 i really need some help on something that seems like it should be realy simple. say you have a master detail setup. i would think that each fragment should contribute to the options menu using setHasOptionsMenu. but what is happening is that the detail fragment I inject when in landscape is still around when I switch to portrait, and it is still contributing to the options menu even though it isn't visible. Jun 03 01:04:04 bah both my phones have crapped out Jun 03 01:04:11 now IG otta launch an emulator Jun 03 01:04:13 this is BS Jun 03 01:04:34 How can two S3's meet their demise in a two week period Jun 03 01:06:01 you're just lucky I guess Jun 03 01:07:16 Thanks .. Jun 03 01:07:31 Can carriers brick phones that are reported missing? Jun 03 01:07:45 did you steal them? Jun 03 01:07:47 I bought this second one off of craigslist cheap because it couldn't be used on its carrier Jun 03 01:07:53 lol Jun 03 01:07:55 don't beleive so Jun 03 01:08:07 I wasn't super happy but i needed the phone at the time Jun 03 01:08:12 i think there's a db of stolen IMEIs somewhere Jun 03 01:08:16 bit no one uses ut Jun 03 01:08:46 hmm how long before emulators should boot up Jun 03 01:08:53 All I see if a black screen an a time code Jun 03 01:10:10 aaaaages Jun 03 01:10:16 5 or 10 mins Jun 03 01:10:32 blah Jun 03 01:21:09 in android studio while working on a fragment in ui editor can I have the preview show it inside a specific frame layout in another layout? Jun 03 01:28:01 why are build times in android studio like 30 seconds, when ios is 10 seconds Jun 03 01:28:49 jonc, there's a little icon at the top of the editor that looks like an activity, acction bar and some tabs, i think it's that one Jun 03 01:29:08 feisell, they're different Jun 03 01:29:40 if anyone here is from Sydney, the monthly Android meetup is tonight: http://www.meetup.com/Android-Australia-User-Group-Sydney/events/182764792/ Jun 03 01:40:10 alex_PP: i agree they're different, but what are the key differences with respect to build tiems Jun 03 02:20:23 feisell, are you building for ios or are you talking running it on the ios simulator? Jun 03 02:21:19 ios emulator* Jun 03 02:21:20 I've always had ios builds take just as long, just the emulator starts up (and performs better) but that's because it emulates not simulates Jun 03 02:22:55 I haven't done Android development in a few years, so I haven't really kept up with the latest developments. I now need to create an Android user interface to a command-line tool (GNU APL if you're interested). I'd like some advice on the general design. Jun 03 02:24:08 Basically, you input commands (commonly statements around 40-50 characters in length). The results are then displayed. The results are vectors of numbers or strings, (which can be recursive). Usually this is rendered using plain character-based layout Jun 03 02:24:51 So my question is: Should I render everything in a HTML view, or should I use a vertical list where each result is a text view? Jun 03 02:25:00 Or is there any other clever way of doing this stuff? Jun 03 02:25:45 I would go with the list personally Jun 03 02:26:05 if a fragment is contributing to the options menu with setHasOptionsMenu, what is the best way to make it stop if the fragment is no longer visible (eg you switch back to portrait from a master / detail) Jun 03 02:26:06 you can do html styling within a textview if I remember right Jun 03 02:26:35 jonc: is there a big overhead if I put a HTML View in each slot in a list view? Jun 03 02:26:46 don't do that Jun 03 02:28:28 theblang, invalidateOptionsMenu, or supportInvalidateOptionsMenu Jun 03 02:28:31 Another issue I have is that APL uses plenty of Unicode characters that are not available in the standard Android fonts. Can I include a TTF file in my package and have the text views use them? Jun 03 02:29:02 loke, see https://developer.android.com/reference/android/graphics/Typeface.html Jun 03 02:29:07 Thanks Jun 03 02:29:51 alex_PP: These support standard OTF or TTF files? Jun 03 02:30:21 both i think Jun 03 02:30:23 not sure Jun 03 02:30:59 alex_PP: Cool. Thanks. Jun 03 02:41:07 loke: that seems like an interesting project. is it primarily a port of the APL interpreter to Android? Jun 03 02:41:29 I don't actually know much about the language itself, but to port something like that sounds fun :) Jun 03 02:44:08 So, what do you guys think of Apple's WWDC? Jun 03 02:44:30 iMessage kicks hangouts ass Jun 03 02:44:42 osx is playing catchup to windows 7 Jun 03 02:52:52 apple have created another shit language to replace their existing shit language -- not sure the reason, but yay ? Jun 03 02:54:13 most of the updates are on the UI/UX. nice strategy though. Jun 03 02:55:38 it's far less shit than objective-c Jun 03 02:56:26 i wonder how long it took them and if google would follow suit ( as the rumours suggest ) Jun 03 02:56:57 bankai_au you mean Go -_- Jun 03 02:57:22 yes... well ... let's just push that aside for the moment :P Jun 03 02:57:29 lol Jun 03 02:57:38 i want iMessage on android Jun 03 02:57:45 or google to get their shit together **** ENDING LOGGING AT Tue Jun 03 02:59:58 2014