1. I'm not sure what permission that would be.  This is what's being
logged:

 

E/DroidAgent: 7/30/2011 4:18:37 PM [ERROR GetCpuInfo:](  303):
getifaddrs

E/DroidAgent: 7/30/2011 4:18:37 PM [ERROR GetCpuInfo:](  303):   at
(wrapper managed-to-native)
System.Net.NetworkInformation.LinuxNetworkInterface:getifaddrs (intptr&)

E/DroidAgent: 7/30/2011 4:18:37 PM [ERROR GetCpuInfo:](  303):   at
System.Net.NetworkInformation.LinuxNetworkInterface.ImplGetAllNetworkInt
erfaces () [0x00006] in
/home/mkestner/monogit/mono/mcs/class/System/System.Net.NetworkInformati
on/NetworkInterface.cs:249 

E/DroidAgent: 7/30/2011 4:18:37 PM [ERROR GetCpuInfo:](  303):   at
System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces
() [0x00052] in
/home/mkestner/monogit/mono/mcs/class/System/System.Net.NetworkInformati
on/NetworkInterface.cs:72

 

here's the manifest:

<uses-permission android:name="android.permission.INTERNET" />

  <uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

  <uses-permission android:name="android.permission.BLUETOOTH" />

  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"
/>

  <uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />

 

Here's the code:

 

#region "Private Declarations"

          private String getMacAddress()

        {

            String macAddress = String.Empty;

            try

            {

                foreach (System.Net.NetworkInformation.NetworkInterface
networkInterface in
System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
)

                {

                    try

                    {

                        if
(!String.IsNullOrEmpty(networkInterface.GetPhysicalAddress().ToString())
&& 

 
!networkInterface.GetPhysicalAddress().ToString().StartsWith("0000"))

                        {

                            macAddress +=
(networkInterface.GetPhysicalAddress().ToString()) + "-";

                        }

                    }

                    catch { }

                }

                if (!String.IsNullOrEmpty(macAddress))

                {

                    if (macAddress.EndsWith("-"))

                    {

                        macAddress = macAddress.Substring(0,
macAddress.Length - 2);

                    }

                }

            }

            catch (Exception ex)

            {

                System.Diagnostics.StackTrace stackTrace = new
System.Diagnostics.StackTrace();

                String method = stackTrace.GetFrame(0).GetMethod().Name;

                log.writeLogInfo("ERROR " + method + ":", ex.Message +
System.Environment.NewLine + ex.StackTrace.ToString());

            }

            if (string.IsNullOrEmpty (macAddress)) 

            {

                macAddress = "none";

            }

            return macAddress;

        }

        #endregion

 

 

 

 

________________________________

From: monodroid-boun...@lists.ximian.com
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Mario Kovac
Sent: Saturday, July 30, 2011 4:00 PM
To: Discussions related to Mono for Android
Subject: Re: [mono-android] Five questions, if some kind sole would
help?

 

1. probalby permissions

 

3. When you build it as release it will work.

 

On Sat, Jul 30, 2011 at 9:36 PM, Tim Kelly <tim.ke...@designerware.com>
wrote:

I've been using Mono for Android now for a week because our current code
base is in .Net. However. I've come up with a couple of issues, if
someone could please help answer.

1. I'm trying to get the MacAddress using the .net
System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
)

and it errors, according to the log. Does this work? The code logic
works on my PC but not on the Android.

2. Is there a way to see logging continuously like when using Eclipse? I
cannot seem to get the log monitor to tail the contents, I have to click
refresh, refresh, fresh? Or is it that way?

3. Auto start when powered on crashes when trying to set an application
to auto start. At least in my application and the simple 'hello world'
application I used to prove power on doesn't work. Is this a known
issue, or is it me?

4. Is there a Windows emulator for Apple iOS? I really don't want to buy
a MAC nor do I have desire to tackle that learning curve. I'd just like
to test in an emulator on my PC for Apple and then figure out how to
deploy. 

5. Has anyone had any issues on certain devices, meaning Samsung,
Motorola, etc. What I looking for is a document of known hardware issues
which can be avoided between different manufactures. Anything like that
around?

a. Tablet units. Our application will really be used more on tablets
than say a phone. So any issues on tablets I should be aware of? 


_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

 

_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to