**** BEGIN LOGGING AT Sat Sep 06 02:59:57 2008 Sep 06 03:06:14 lol i knew that was too good to be true :P Sep 06 03:25:37 OHHHH Sep 06 03:25:43 you're supposed to make your OWN adapter Sep 06 04:22:54 * squeakypants cries Sep 06 04:23:31 anyone have experience with multi-variable lists? Sep 06 04:23:36 ListViews, that is Sep 06 04:23:37 yes Sep 06 04:23:45 you can use the SimpleAdapter to do it Sep 06 04:23:47 or write your own Sep 06 04:23:51 romainguy: well Sep 06 04:24:00 i've been going nuts for the past 2 hrs about this :P Sep 06 04:24:16 i really just have 2 textviews in it Sep 06 04:24:24 and any time you hit a button i want to add another item to the list Sep 06 04:24:50 with custom text on each textview Sep 06 04:25:21 i messed around with simpleadapter for awhile and couldn't get that working, so now i've made my own adapter and it's just crashing the program Sep 06 04:27:22 romainguy: heh, wanna see my adapter? Sep 06 04:31:15 what's the crash? Sep 06 04:31:57 i don't know Sep 06 04:32:11 why don't you start by looking at the logs to see why your application crashes? Sep 06 04:32:14 it doesn't even traceback to my code! it's in the middle of like Threads when it crashes Sep 06 04:32:31 what do you see in the logs? Sep 06 04:32:41 what logs? Sep 06 04:32:46 LogCat ? Sep 06 04:32:54 the logs where you can see what the crash is Sep 06 04:33:00 aha Sep 06 04:33:19 switch to DDMS Perspective Sep 06 04:33:25 (if you are using eclipse= Sep 06 04:33:30 public MyDataStateChangedWatcher(final Context ctx, final DataStateChangedListener lis){ this.mLis = lis; final TelephonyManager tm = TelephonyManager.getDefault(); assert(tm != null); tm.listen(this, PhoneStateListener.LISTEN_DATA_CONNECTION_STATE); } Sep 06 04:33:34 damn Sep 06 04:33:50 public MyDataStateChangedWatcher(final Context ctx, final DataStateChangedListener lis){ Sep 06 04:33:56 final TelephonyManager tm = TelephonyManager.getDefault(); Sep 06 04:33:58 i am in ddms Sep 06 04:34:00 assert(tm != null); Sep 06 04:34:05 tm.listen(this, PhoneStateListener.LISTEN_DATA_CONNECTION_STATE); Sep 06 04:34:18 the last results in an internal nullpointerException :( Sep 06 04:34:36 is it not possible to call it inside of the constructor ? Sep 06 04:35:12 btw (MyDataStateChangedWatcher extends PhoneStateListener) Sep 06 04:35:24 how do i copy from logcat? Sep 06 04:35:31 CTRL+C Sep 06 04:36:14 http://dpaste.com/76293/ hmm... nullpointer? Sep 06 04:36:45 yep Sep 06 04:36:46 at the.android.DiceRoller.RollAdapter.getCount(RollAdapter.java:33) Sep 06 04:36:52 have a look at it Sep 06 04:36:56 its your code Sep 06 04:37:01 ahhh i got it Sep 06 04:37:07 i didn't initialize em :P Sep 06 04:37:15 romainguy you got an idea on my issue ? Sep 06 04:37:38 I don't even know what you're doing :) Sep 06 04:37:46 squeakypants: here you go :)) Sep 06 04:37:56 I posted the code Sep 06 04:38:05 hmm, no crash Sep 06 04:38:09 public MyDataStateChangedWatcher(final Context ctx, final DataStateChangedListener lis){ Sep 06 04:38:12 but the button doesn't seem to do anything :P at least not visually Sep 06 04:38:13 final TelephonyManager tm = TelephonyManager.getDefault(); Sep 06 04:38:19 assert(tm != null); Sep 06 04:38:19 yes but I don't know what this does Sep 06 04:38:23 is there something I need to do to update the listview? Sep 06 04:38:24 tm.listen(this, PhoneStateListener.LISTEN_DATA_CONNECTION_STATE); Sep 06 04:38:48 "this" should be notified of DataState Changes Sep 06 04:39:00 09-06 04:30:32.109: ERROR/AndroidRuntime(403): Caused by: java.lang.NullPointerException Sep 06 04:39:04 09-06 04:30:32.109: ERROR/AndroidRuntime(403): at android.telephony.TelephonyManager.listen(TelephonyManager.java:408) Sep 06 04:39:22 I have no idea what I could have done wrong Sep 06 04:39:38 so it looks liek a bug to me.. Sep 06 04:40:53 looks like TelephonyManager.getDefault() is not a public API Sep 06 04:40:56 Do you have the right permission to get the telephonymanager? Sep 06 04:41:00 so you should not be using it Sep 06 04:41:36 ahhh Sep 06 04:41:46 you suggested somewhere else: (TelephonyManager) getSystemService("phone") Sep 06 04:41:50 as a replacement Sep 06 04:42:13 the getDefault() method returns a telephony manager with no Context associated with it Sep 06 04:42:20 that's why it crashes with an NPE Sep 06 04:42:36 Don'y use the string, btw, use TELEPHONY_SERVICE Sep 06 04:42:48 yes Sep 06 04:42:52 I was about to say that too Sep 06 04:42:57 use getSystemService(TELEPHONY_SERVICE) Sep 06 04:43:24 works (just wanted to wait with the Constant-Question until it worked ;) ) Sep 06 04:44:25 thx guys :) Sep 06 04:44:32 you make my day Sep 06 04:47:18 Welcome Sep 06 04:48:03 romainguy_: if i want to add to a ListView, i assume i need an add method in the adapter? Sep 06 04:49:19 it depends on your adapter Sep 06 04:49:29 damnit, thought i had it that time :P Sep 06 04:50:05 well my adapter basically just has a Vector of objects with my data Sep 06 04:52:28 hmm Sep 06 04:53:02 romainguy: how would you make a getView method using xml layouts? View.inflate? Sep 06 05:06:47 FUCK YES Sep 06 05:06:55 I GOT THAT BITCH Sep 06 05:06:59 OMG FINALLY Sep 06 05:42:05 mmm Sep 06 05:57:14 gmm Sep 06 06:22:43 xml or json? Sep 06 06:23:59 which one is preferred for sending data back in httpresponse? Sep 06 06:25:58 and what's easier to work with from android? Sep 06 06:29:38 xml seem to be the preferred way Sep 06 06:33:44 json seem to be lightweight Sep 06 06:34:29 yo jasta Sep 06 07:08:16 xml looks like the default data format for googlee Sep 06 07:08:58 http://www.google.com/search?q=Gogle&num=100&start=990 Sep 06 07:09:30 google becomes gogle.. hehe Sep 06 15:46:34 Hello Muthu Sep 06 15:47:07 JSON worked great for my projects. Sep 06 16:43:15 hey guys Sep 06 16:44:11 is there any possibility to rotate a TextView, that its text appears vertical Sep 06 19:45:11 hey Sep 06 19:52:42 where does System.out.println print to? Sep 06 19:53:14 in the logcat Sep 06 19:53:21 mmk, thanks Sep 06 19:53:22 but you should be using android.util.Log.* instead Sep 06 19:53:31 well this is just for debugging Sep 06 19:53:32 for instance Log.d("MyTag", "My log") Sep 06 19:54:20 i'm trying to find a nullpointer and logcat doesn't say anything about my code... Sep 06 19:54:56 http://dpaste.com/76382/ Sep 06 19:54:57 Log.d == system.out.println bu t better Sep 06 19:54:59 use it Sep 06 19:55:07 mmk Sep 06 19:55:08 and if you have a null pointer exception, logcat will tell you where Sep 06 19:55:48 looks like you passed the wrong layout id to the array adapter Sep 06 19:56:15 i didn't change anything about the layout though, i'm working with openRawResource right now Sep 06 19:57:21 taht code was working before? Sep 06 19:57:32 the layout and everything was, yeah Sep 06 19:57:39 then you changed something :) Sep 06 19:57:44 lol Sep 06 19:59:23 hmm, it seems to be reading and decoding the file fine Sep 06 20:04:21 AHA, no it's not :P Sep 06 20:08:21 there we go :) Sep 06 20:18:37 hi, I was wondering whether the android platform allows the sharing of gps data over bluetooth? in other words can you use it to act as a gps dongle Sep 06 20:19:45 unfortunately for the version 1.0, applications won't have access to the bluetooth API Sep 06 20:19:53 this is for security reasons and future versions should fix this Sep 06 20:20:41 hmmm.... that kind of sucks... saving up for an msi wind and htc dream for college :D Sep 06 20:22:40 would be nice to have android play nice with gnome :D Sep 06 20:23:03 how about how synchronization is handled? Sep 06 20:51:31 is there any like Sep 06 20:51:34 "keypad" view? Sep 06 20:51:48 so the user doesn't have to open the keyboard to enter numbers? Sep 06 20:52:09 or will that happen automatically on touch phones? Sep 06 20:53:34 http://www.blogsmithmedia.com/www.engadget.com/media/2008/08/android_sdk_0902.jpg ? Sep 06 21:59:20 Miek: right, that's only in the Dialer though Sep 06 21:59:55 i want to know if there's a way for that to popup when you hit a number-only edittext (or include it in the UI) Sep 06 22:17:07 wtf Sep 06 22:18:03 i'm getting UnsupportedOperationException from ArrayAdapter.add Sep 06 22:22:37 same with ArrayAdapter.insert **** ENDING LOGGING AT Sun Sep 07 02:59:57 2008