Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Failed to read the device model, manufacturer information

$
0
0

Hi,

I recently I have an transient problem on reading the device model, manufacturer and user information from the Android.OS.Build library as below,

` public string DeviceName { get { // read and return current device name return string.IsNullOrEmpty(Android.OS.Build.User) ? string.Empty : Android.OS.Build.User; } }

    public string DeviceModal
    {
        get
        { 
            // read and return current device model
            return string.IsNullOrEmpty(Android.OS.Build.Model) ? 
                string.Empty : 
                    Android.OS.Build.Model.StartsWith(Android.OS.Build.Manufacturer) ? 
                        Android.OS.Build.Model : 
                        string.Format("{0} {1}", Android.OS.Build.Manufacturer, Android.OS.Build.Model);
        }
    }

`

Does anyone having the same problem? The same code used to work when I compiled my code with MonoDevelop. Now the same code no longer work in the latest sdk with Xamarin Studio.

Regards, Hackzai


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>