You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2015/02/03 23:50:38 UTC

[1/2] cordova-plugin-device git commit: Support for Windows Phone 8 ANID2 ANID is only supported up to Windows Phone 7.5

Repository: cordova-plugin-device
Updated Branches:
  refs/heads/master c801048a5 -> c7cec5d0e


Support for Windows Phone 8 ANID2
ANID is only supported up to Windows Phone 7.5


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/c5c08ee4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/c5c08ee4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/c5c08ee4

Branch: refs/heads/master
Commit: c5c08ee4747bc94bf70836b0b9868cf3ecd0a46a
Parents: bf923a0
Author: Oliver Salzburg <ol...@gmail.com>
Authored: Mon Nov 24 17:00:31 2014 +0100
Committer: Oliver Salzburg <ol...@gmail.com>
Committed: Mon Nov 24 17:00:31 2014 +0100

----------------------------------------------------------------------
 src/wp/Device.cs | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/c5c08ee4/src/wp/Device.cs
----------------------------------------------------------------------
diff --git a/src/wp/Device.cs b/src/wp/Device.cs
index b8a8045..306b807 100644
--- a/src/wp/Device.cs
+++ b/src/wp/Device.cs
@@ -77,34 +77,37 @@ namespace WPCordovaClassLib.Cordova.Commands
         {
             get
             {
-                string returnVal = "";
                 object id;
-                UserExtendedProperties.TryGetValue("ANID", out id);
 
+                UserExtendedProperties.TryGetValue("ANID", out id);
                 if (id != null)
                 {
-                    returnVal = id.ToString().Substring(2, 32);
+                    return id.ToString().Substring(2, 32);
                 }
-                else
+
+                UserExtendedProperties.TryGetValue("ANID2", out id);
+                if (id != null)
                 {
-                    returnVal = "???unknown???";
+                    return id.ToString();
+                }
+
+                string returnVal = "???unknown???";
 
-                    using (IsolatedStorageFile appStorage = IsolatedStorageFile.GetUserStoreForApplication())
+                using (IsolatedStorageFile appStorage = IsolatedStorageFile.GetUserStoreForApplication())
+                {
+                    try
                     {
-                        try
-                        {
-                            IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream("DeviceID.txt", FileMode.Open, FileAccess.Read, appStorage);
+                        IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream("DeviceID.txt", FileMode.Open, FileAccess.Read, appStorage);
 
-                            using (StreamReader reader = new StreamReader(fileStream))
-                            {
-                                returnVal = reader.ReadLine();
-                            }
-                        }
-                        catch (Exception /*ex*/)
+                        using (StreamReader reader = new StreamReader(fileStream))
                         {
-
+                            returnVal = reader.ReadLine();
                         }
                     }
+                    catch (Exception /*ex*/)
+                    {
+
+                    }
                 }
 
                 return returnVal;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/2] cordova-plugin-device git commit: Merge branch 'feature/wp8-anid2' of https://github.com/oliversalzburg/cordova-plugin-device

Posted by pu...@apache.org.
Merge branch 'feature/wp8-anid2' of https://github.com/oliversalzburg/cordova-plugin-device


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/c7cec5d0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/c7cec5d0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/c7cec5d0

Branch: refs/heads/master
Commit: c7cec5d0e916f7df6460d0ce0101a861ef73323e
Parents: c801048 c5c08ee
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Feb 3 14:50:11 2015 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Feb 3 14:50:11 2015 -0800

----------------------------------------------------------------------
 src/wp/Device.cs | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org