×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    22

    Angry SkyDrive Login not working on my submitted beta app but works in emulator

    I use latest Live SDK 5.3 to connect SkyDrive via SignInButton, it works fine in emulator and my phone. But after I submitted my app as a beta, I install from market to my phone but SkyDrive can't sign in. Black screen comes with progress bar and can't redirect me to login page. I also tried it with different phone, problem continues.

    I don't understand there is some kind of restriction or bug. Here what I done to SkyDrive;

    I added "ID_CAP_WEBBROWSERCOMPONENT" to manifest.
    SignIn button
    Code:
     <Controls:SignInButton Grid.Column="0" Content="SignInButton" SessionChanged="skydrive_SessionChanged" 
                                                   Scopes="wl.offline_access wl.skydrive_update" ClientId="my client id" />
    In my opion these are enough to login SkyDrive, or am I wrong? Have any ideas bout that?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    475

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    Quote Originally Posted by Engin Kırmacı View Post
    I use latest Live SDK 5.3 to connect SkyDrive via SignInButton, it works fine in emulator and my phone. But after I submitted my app as a beta, I install from market to my phone but SkyDrive can't sign in. Black screen comes with progress bar and can't redirect me to login page. I also tried it with different phone, problem continues.
    Are you saying that your app works in Debug mode but not Release?

    Also, is there a sample app your SkyDrive code is taken from (something I can compare the code to) ?

  3. #3
    Registered User
    Join Date
    Mar 2013
    Posts
    22

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    App works both Debug and Release mode. And also works in emulator and run on my phone. But I submitted to store as a beta and installed to phone, the problem occurs.
    I followed this article and also set "ID_CAP_WEBBROWSERCOMPONENT" permission in WMAppManifest.xml

    Here what I exactly done;

    WMAppManifest.xml
    Code:
    <Capabilities>
          <Capability Name="ID_CAP_ISV_CAMERA" />
          <Capability Name="ID_CAP_MEDIALIB_PHOTO" />
          <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
        </Capabilities>
    SettingsPage.xaml
    Code:
    <phone:PhoneApplicationPage
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
        xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
        xmlns:live="clr-namespace:Microsoft.Live.Controls;assembly=Microsoft.Live.Controls"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
        x:Class="QuickScan.WP8.Pages.SettingsPage"
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}"
        SupportedOrientations="Portrait" Orientation="Portrait"
        mc:Ignorable="d"
        shell:SystemTray.IsVisible="True"
        shell:SystemTray.Opacity="0">
    
     <Grid x:Name="LayoutRoot" Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
    
            <StackPanel Grid.Row="0" Margin="12,17,0,28">
                <TextBlock Text="Settings" Margin="9,-7,0,14" Style="{StaticResource PhoneTextTitle1Style}"/>
                <ScrollViewer>
                    <StackPanel>
                        <TextBlock Text="SkyDrive" Style="{StaticResource PhoneTextLargeStyle}"/>
                        <Grid Margin="20,0,0,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="200"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <live:SignInButton Grid.Column="0" Content="SignInButton" SessionChanged="skydrive_SessionChanged" 
                                                   Scopes="wl.offline_access wl.skydrive_update" ClientId="00000000******" Branding="Skydrive"/>
                            <TextBlock x:Name="SkyDriveName" Grid.Column="1" VerticalAlignment="Center" TextWrapping="Wrap"/>
                        </Grid>
                    </StackPanel>
                </ScrollViewer>
            </StackPanel>
        </Grid>
    
    </phone:PhoneApplicationPage>
    SettingsPage.xaml.cs
    Code:
    using System;
    
    using Microsoft.Live;
    using Microsoft.Live.Controls;
    using Microsoft.Phone.Controls; 
    
    namespace QuickScan.WP8.Pages
    {
        public partial class SettingsPage : PhoneApplicationPage
        {
            LiveConnectClient client;
            Settings settings;
    
            public SettingsPage()
            {
                InitializeComponent();
            }
    
            private void skydrive_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
            {
    
                if (e != null && e.Status == LiveConnectSessionStatus.Connected)
                {
                    this.client = new LiveConnectClient(e.Session);
                    this.GetAccountInformations();
                }
                else
                {
                    this.client = null;
                    SkyDriveName.Text = e.Error != null ? e.Error.Message : string.Empty;
                }
    
            }
    
            private async void GetAccountInformations()
            {
                try
                {
                    LiveOperationResult operationResult = await this.client.GetAsync("me");
                    var jsonResult = operationResult.Result as dynamic;
                    string firstName = jsonResult.first_name ?? string.Empty;
                    string lastName = jsonResult.last_name ?? string.Empty;
                    SkyDriveName.Text = "Signed as " + firstName + " " + lastName;
                }
                catch
                {
                    SkyDriveName.Text = "Failure sign in to SkyDrive";
                }
            } 
        }
    }

  4. #4
    Registered User
    Join Date
    Mar 2013
    Posts
    22

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    I found the solution. Adding following capabilities to WMAppManifest.xml solves the problem. It's confusing that without "ID_CAP_NETWORKING", it runs on emulator and test device.

    Code:
    <Capabilities>
         	.
    	.
          <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
          <Capability Name="ID_CAP_NETWORKING" />
    </Capabilities>

  5. #5
    Registered User
    Join Date
    May 2013
    Posts
    2

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    I have successfully gotten SkyDrive uploading working on a beta app on my phone. Comparing what I have vs your published settings:

    WMAppManifest.xml
    Code:
    <Capabilities>
          <Capability Name="ID_CAP_IDENTITY_USER" />
          .
          .
          <Capability Name="ID_CAP_NETWORKING" />
          <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
    </Capabilities>
    I did not see any other significant differences.

    best luck,
    -mike

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    475

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    I'm glad you found a solution to your issue.

    Out of curiosity, had you ever run the 'Store Test Kit' on the app? and are you targeting WP7, WP8 or both?

  7. #7
    Registered User
    Join Date
    Mar 2013
    Posts
    22

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    Quote Originally Posted by theothernt View Post
    I'm glad you found a solution to your issue.

    Out of curiosity, had you ever run the 'Store Test Kit' on the app? and are you targeting WP7, WP8 or both?
    I ran after my application submitted I didn't know it before, also "Performance Analiysis".

    Right know I'm working on threads to increase visual performance.

    About my program, it is targeting to WP8 because It's using camera lenses and other things. You can see my app here. I'm planning both WP7 and also Windows 8 in future.

    There is lot of work to do but I don't have much time, because I started to looking for a job in Turkey. Still, I'm planning to support my app with a weekly updates.

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    475

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    Quote Originally Posted by Engin Kırmacı View Post
    I ran after my application submitted I didn't know it before, also "Performance Analiysis".

    Right know I'm working on threads to increase visual performance.

    About my program, it is targeting to WP8 because It's using camera lenses and other things. You can see my app here. I'm planning both WP7 and also Windows 8 in future.

    There is lot of work to do but I don't have much time, because I started to looking for a job in Turkey. Still, I'm planning to support my app with a weekly updates.
    Ah, I was just curious to see if the Store Test Kit would catch the missing 'capability' or not.

    Great app btw, it looks really good - I hope you're using analytics of some sort to track usage

  9. #9
    Registered User
    Join Date
    Mar 2013
    Posts
    22

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    Quote Originally Posted by theothernt View Post
    Ah, I was just curious to see if the Store Test Kit would catch the missing 'capability' or not.

    Great app btw, it looks really good - I hope you're using analytics of some sort to track usage
    Thx, I don't use any analytics, can you recommend one?

  10. #10
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    475

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    Quote Originally Posted by Engin Kırmacı View Post
    Thx, I don't use any analytics, can you recommend one?
    I've used Flurry since last year and it works well. I've added lots of event logging to keep track of a) what features work and b) how long certain features take to run.

    Also, if you deploy a WP7 app, it's interesting to see the device breakdown over time (different makes vs WP7 vs WP8 devices)

  11. #11
    Super Contributor
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    2,578

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    Quote Originally Posted by theothernt View Post
    I've used Flurry since last year and it works well. I've added lots of event logging to keep track of a) what features work and b) how long certain features take to run.

    Also, if you deploy a WP7 app, it's interesting to see the device breakdown over time (different makes vs WP7 vs WP8 devices)
    Hi Neil, If you think Flurry is good (and I presume you do or you wouldn't have mentioned it), can you add a reference in Toolkits_and_Libraries_for_Windows_Phone.

    See, thats what comes of being useful :-0

    Regards
    H

  12. #12
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    475

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    Quote Originally Posted by hamishwillee View Post
    Hi Neil, If you think Flurry is good (and I presume you do or you wouldn't have mentioned it), can you add a reference in Toolkits_and_Libraries_for_Windows_Phone.

    See, thats what comes of being useful :-0
    Done!

    ... now only 2 or 3 wiki guides left to write

  13. #13
    Super Contributor
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    2,578

    Re: SkyDrive Login not working on my submitted beta app but works in emulator

    Quote Originally Posted by theothernt View Post
    Done!

    ... now only 2 or 3 wiki guides left to write
    Thanks, change looks good to me.

Similar Threads

  1. Replies: 3
    Last Post: 2010-03-17, 19:36
  2. SocketConnection not working in nokia emulator, works fine with sun emulator
    By ashish.e71 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2009-11-11, 11:51
  3. [moved] Widget works on emulator but not works on Real machine
    By alicenan88 in forum Symbian Web Runtime
    Replies: 1
    Last Post: 2009-11-04, 21:38
  4. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •