locked
Fine in Simulator, Bug in full license.

    Question

  • void MainPage::ConvertTrial_Click(Platform::Object^ sender,

    Windows::UI::Xaml::RoutedEventArgs^ e) { #ifdef SIMULATOR auto licenseInformation = CurrentAppSimulator::LicenseInformation; #else auto licenseInformation = CurrentApp::LicenseInformation; #endif txTitle->Text = L"Buying the full license ..."; if (licenseInformation->IsTrial) { #ifdef SIMULATOR create_task(CurrentAppSimulator::RequestAppPurchaseAsync(false)).then(

    [this](task<Platform::String^> currentTask) { try { currentTask.get(); auto licenseInformation = CurrentAppSimulator::LicenseInformation; if (licenseInformation->IsActive && !licenseInformation->IsTrial) { txTitle->Text = L"You successfully upgraded to full version."; txName->Text = L"My App Title"; txLeft->Visibility = Windows::UI::Xaml::Visibility::Collapsed; txRight->Visibility = Windows::UI::Xaml::Visibility::Collapsed; txUp->Visibility = Windows::UI::Xaml::Visibility::Collapsed; txDown->Visibility = Windows::UI::Xaml::Visibility::Collapsed; } else { txTitle->Text = L"You still run a trial version."; } } catch(Platform::Exception^ exception) { txTitle->Text = L"The transaction failed. It is still a trial version."; } }); #else create_task(CurrentApp::RequestAppPurchaseAsync(false)).then([this](task<Platform::String^> currentTask) { try { currentTask.get(); auto licenseInformation = CurrentApp::LicenseInformation; if (licenseInformation->IsActive && !licenseInformation->IsTrial) { txTitle->Text = L"You successfully upgraded to full version."; txName->Text = L"My App Title"; txLeft->Visibility = Windows::UI::Xaml::Visibility::Collapsed; txRight->Visibility = Windows::UI::Xaml::Visibility::Collapsed; txUp->Visibility = Windows::UI::Xaml::Visibility::Collapsed; txDown->Visibility = Windows::UI::Xaml::Visibility::Collapsed; } else { txTitle->Text = L"You still run a trial version."; } } catch(Platform::Exception^ exception) { txTitle->Text = L"The transaction failed. It is still a trial version."; } }); #endif } else { txTitle->Text = L"You already bought this app and have a full version."; txName->Text = L"Snaml Theatre"; } }

    I tried to hide the text prompt in full license but show them in trial version. Simulator worked fine but real purchased version did not hide the text prompt. What is wrong?

    Tuesday, August 26, 2014 2:10 PM

All replies

  • Hi Charlie,

    Which line is shown in the full license when you publish it to the store? If the Simulator works fine, the real purchase should be fine too.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, August 28, 2014 9:51 AM
    Moderator
  • Here is the line. The txUP->Visibility will hide the text. But not. It is weird.

                    currentTask.get();
                    auto licenseInformation = CurrentApp::LicenseInformation;
                    if (licenseInformation->IsActive && !licenseInformation->IsTrial)
                    {
                        txTitle->Text = L"You successfully upgraded to full version.";
    			txName->Text = L"My App Title";
    
    			txLeft->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
    			txRight->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
    			txUp->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
    			txDown->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
    
                    }


    Thursday, August 28, 2014 12:06 PM
  • The another three works fine? If yes, you should really check your code if somewhere else re-set the txUP visibility.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 08, 2014 7:06 AM
    Moderator