Hi, I am a newbie and need help!!
How can I get the package name so I can use it when creating connection to sqlite db like "Data Source=/data/data/" + GetPackageName() +"/databases/" + DB_NAME; Thanks, Jose -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Friday, May 13, 2011 10:35 AM To: [email protected] Subject: Monodroid Digest, Vol 10, Issue 64 Send Monodroid mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://lists.ximian.com/mailman/listinfo/monodroid or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Monodroid digest..." Today's Topics: 1. Re: Honeycomb 3.1 and mono for android (Nikolai Sander) 2. Re: checking wifi or mobile connection (John Murray) 3. Re: Honeycomb 3.1 and mono for android (Jonathan Pryor) 4. android:installLocation via attribute? (Brian Long) 5. Re: Slow/poor performance (Jon Dick) 6. Re: (aresgen) Finding Layout xml errors (subsembly) ---------------------------------------------------------------------- Message: 1 Date: Fri, 13 May 2011 00:58:01 -0700 From: Nikolai Sander <[email protected]> Subject: Re: [mono-android] Honeycomb 3.1 and mono for android To: Discussions related to Mono for Android <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="us-ascii" Yes, he did say that on his twitter feed. Nikolai On May 13, 2011, at 12:14 AM, Matteo Polito wrote: > Is this true? > > 2011/5/13 Jason Awbrey <[email protected]> I believe that Miguel > acknowledged this rumor on Twitter earlier today > > On Thu, May 12, 2011 at 9:57 PM, Wally McClure <[email protected]> wrote: > I am hearing a rumor that Honeycomb 3.1 includes mono for android. Is there any truth to this rumor? I don't know because my Xoom already had m4a on it when I got the Honeycomb 3.1 update this morning. > > Wally > > _______________________________________________ > Monodroid mailing list > [email protected] > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > > > > _______________________________________________ > Monodroid mailing list > [email protected] > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > > > _______________________________________________ > Monodroid mailing list > [email protected] > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110513/1eb9e 757/attachment-0001.html ------------------------------ Message: 2 Date: Fri, 13 May 2011 08:58:24 +0100 From: "John Murray" <[email protected]> Subject: Re: [mono-android] checking wifi or mobile connection To: "'Discussions related to Mono for Android'" <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="iso-8859-1" Many thanks Brian - worked a treat Just had to change Android.Content.Context.WifiService for Android.Content.Context.ConnectivityService In my old code and it would have worked The wonders of programming API's :-) Thanks again John Murray -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Brian Long Sent: 13 May 2011 01:06 To: [email protected] Subject: Re: [mono-android] checking wifi or mobile connection John With the first bit, you are requesting a WifiManager, and are casting it to a ConnectivityManager - if you want one of those, specify Android.Content.Context.ConnectivityService The second one, I'm not sure why you'd get a typecast problem Code as below I'd expect to work, however I can't test it thanks to being unable to successfully require the ACCESS_WIFI_STATE and ACCESS_NETWORK_STATE permissions (as per other message in this list). Covers wifi and mobile in the first case, just wifi in the second. private string GetNetStateDescription(bool mobile) { ConnectivityManager connectivityManager = (ConnectivityManager)GetSystemService(Android.Content.Context.ConnectivitySe rvice); //Requires ACCESS_NETWORK_STATE and ACCESS_WIFI_STATE to avoid security exception NetworkInfo networkInfo = connectivityManager.GetNetworkInfo(mobile ? Android.Net.ConnectivityType.Mobile : Android.Net.ConnectivityType.Wifi); if (networkInfo.IsConnected) return "Connected"; else if (networkInfo.IsConnectedOrConnecting) return "Connecting"; else return "Disconnected"; } private string GetWiFiStateDescription() { //Requires ACCESS_WIFI_STATE permission to avoid security exception WifiManager wifiManager = (WifiManager)GetSystemService(Android.Content.Context.WifiService); switch (wifiManager.WifiState) { case WifiState.Disabled: return "Disabled"; case WifiState.Disabling: return "Disabling"; case WifiState.Enabled: return "Enabled"; case WifiState.Enabling: return "Enabling"; default: return "Unknown"; } } - Brian > I am sure it must be me but I cant get past this one > > I? am trying to check the wifi state > > I have lifted two bits of code from the net (each slightly different ) > but both give an unhadled excpetion ?to do with invalid cast exception > > > > Version 1 > > > > ConnectivityManager connManager = (ConnectivityManager)GetSystemService(Android.Content.Context.WifiService); > > ????????????? ????????????????? NetworkInfo mWifi = connManager.GetNetworkInfo(Android.Net.ConnectivityType.Wifi); > > ??????????????????????????????????????????????????????????????? if (mWifi.IsConnectedOrConnecting) > > { > > ??? ??????????????????????????????????????????????????????????????????????????? // Do whatever > > ???????????????????????????????????????????????????????????????????????????? ??? Toast.MakeText(this,"wifif is connecting",ToastLength.Long).Show(); > > ??????????????????????????????????????????????????????????????? } > > Version 2 > > > > SupplicantState supState; > > ??????????? var wifiManager = (WifiManager)GetSystemService(Android.Content.Context.WifiService); > > ??????????? WifiInfo wifiInfo = wifiManager.ConnectionInfo; > > ??????????? supState = wifiInfo.SupplicantState; > > > > > > Both have the same system exception or more or less ? referring to a > type cast > > > > Yes I have enabled Access_Wifi in the manifest > > > > Any ideas anyone ? > > Also I want to the same for mobile connection ? is the same approach appropriate? > > > > Best regards > > John Murray > > > > > > > > > > _______________________________________________ > Monodroid mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monodroid > > _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid ------------------------------ Message: 3 Date: Fri, 13 May 2011 06:18:10 -0400 From: Jonathan Pryor <[email protected]> Subject: Re: [mono-android] Honeycomb 3.1 and mono for android To: Discussions related to Mono for Android <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="us-ascii" Not quite. Miguel said that it had libmomo.so, which is the JIT/GC side if things, but we haven't heard anything about assemblies on the device, nor how big libmomo is (e.g. what all does it contain). - Jon On May 13, 2011, at 3:58 AM, Nikolai Sander <[email protected]> wrote: > Yes, he did say that on his twitter feed. > > Nikolai > > On May 13, 2011, at 12:14 AM, Matteo Polito wrote: > >> Is this true? >> >> 2011/5/13 Jason Awbrey <[email protected]> I believe that Miguel >> acknowledged this rumor on Twitter earlier today >> >> On Thu, May 12, 2011 at 9:57 PM, Wally McClure <[email protected]> wrote: >> I am hearing a rumor that Honeycomb 3.1 includes mono for android. Is there any truth to this rumor? I don't know because my Xoom already had m4a on it when I got the Honeycomb 3.1 update this morning. >> >> Wally >> >> _______________________________________________ >> Monodroid mailing list >> [email protected] >> >> UNSUBSCRIBE INFORMATION: >> http://lists.ximian.com/mailman/listinfo/monodroid >> >> >> >> _______________________________________________ >> Monodroid mailing list >> [email protected] >> >> UNSUBSCRIBE INFORMATION: >> http://lists.ximian.com/mailman/listinfo/monodroid >> >> >> _______________________________________________ >> Monodroid mailing list >> [email protected] >> >> UNSUBSCRIBE INFORMATION: >> http://lists.ximian.com/mailman/listinfo/monodroid > > _______________________________________________ > Monodroid mailing list > [email protected] > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110513/7926f 4f6/attachment-0001.html ------------------------------ Message: 4 Date: Fri, 13 May 2011 13:17:17 +0100 From: Brian Long <[email protected]> Subject: [mono-android] android:installLocation via attribute? To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1 I've looked and failed to find a way of controlling the manifest node's android:installLocation value via attribute Did I miss it, or must this be done through adding a manifest file and doing it manually (well, y'know, via the combo on the manifest project properties page)? Thanks - Brian ------------------------------ Message: 5 Date: Fri, 13 May 2011 08:47:17 -0400 From: Jon Dick <[email protected]> Subject: Re: [mono-android] Slow/poor performance To: Discussions related to Mono for Android <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="iso-8859-1" It would be nice to see this somehow incorporated into Mono for Android so that the app author could choose a few settings: 1) Yes/No Enable Splash Screen a) If Enabled, path to image to use Could go so far as to also have a check box to show or not show an activity indicator, as well as the co-ordinates of it, and the size. But just having a simple yes/no splash screen with the image would go a long way to helping out most devs here. --- Jon (aka Redth) http://redth.info On Thu, May 12, 2011 at 6:30 PM, Brian Long <[email protected]>wrote: > >>if there are any instructions/help that anyone can provide to > >>document > the splash screen process, that would be great. > > Wally, I may be able to help on this one > > The sample Mono for Android app at > http://blong.com/Downloads/MonoAndroidJavaSplashScreenApp.zip uses a > Java splash screen, which appears pretty promptly. > > Of course once it invokes the main Mono for Android activity, there > can be a delay, but since the user has already seen a part of the app > on screen, psychologically this isn't so bad. > > It's pretty much the template project with a splash screen on the > front, implemented in Java. > > - Brian > _______________________________________________ > Monodroid mailing list > [email protected] > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110513/0266d c47/attachment-0001.html ------------------------------ Message: 6 Date: Fri, 13 May 2011 07:34:49 -0700 (PDT) From: subsembly <[email protected]> Subject: Re: [mono-android] (aresgen) Finding Layout xml errors To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=us-ascii Hi, this exception happens whenever a referenced resource id could not be resolved. In particular it happens whenever using upper case characters in color names, or many other resource ids. To avoid this problem it is best to only use lower case characters for any and all resource file names and ids. -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/aresgen-Finding-Layout-xml-err ors-tp4391528p4393297.html Sent from the Mono for Android mailing list archive at Nabble.com. ------------------------------ _______________________________________________ Monodroid mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monodroid End of Monodroid Digest, Vol 10, Issue 64 ***************************************** _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
