Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix to get android latest version #47 #49

Merged

Conversation

markmcavoy
Copy link
Contributor

Fixes #47

Changes proposed in this pull request:

Simple change to get the correct script from the html page to then get the version number for Android devices

@gsgou
Copy link

gsgou commented Sep 13, 2022

@edsnider @Jerome-Liger can you merge this one please so no clone nuget is needed again ?

@gsgou
Copy link

gsgou commented Sep 19, 2022

@markmcavoy did you created by chance any package such as nuget with this PR for personal use? If not i ll create a new project that will address abandoned PRs and issues as this one.

@markmcavoy
Copy link
Contributor Author

@markmcavoy did you created by chance any package such as nuget with this PR for personal use? If not i ll create a new project that will address abandoned PRs and issues as this one.

@gsgou no we just did a build locally and referenced the DLLs in our project. I was hoping that by the time our project is released this project would have accepted the pull request and generated a new nuget package which we could just reference and move forward with.

@gsgou
Copy link

gsgou commented Oct 14, 2022

@edsnider @Jerome-Liger can you merge this one so no fork or clone nuget is needed again ?

@edsnider edsnider merged commit 75fcb0f into edsnider:master Oct 14, 2022
@edsnider
Copy link
Owner

@edsnider @Jerome-Liger can you merge this one so no fork or clone nuget is needed again ?

Merged.

@gsgou
Copy link

gsgou commented Oct 15, 2022

Everybody here is a developer and appreciates you time and effort you put. Seems like the Google Play Store changes settle down and this fix works for a while. @edsnider can you upload also a new beta nuget too with this change. Tks a lot.

@gsgou
Copy link

gsgou commented Oct 21, 2022

@Jerome-Liger could you take in your "Xam.Plugin.LatestVersion.Forked" this change please?
Else i will have to create "Xam.Plugin.LatestVersion.Forked2".

@cesarmenchao
Copy link

I'm getting error call IsUsingLatestVersion() even using the beta version

@gsgou
Copy link

gsgou commented Oct 26, 2022

The PR is merged but there is no new package published.

@cesarmenchao
Copy link

Do you have a date on when the package will come out?

@cesarmenchao
Copy link

did any version come out?

@idenardi
Copy link

idenardi commented Nov 9, 2022

Any update on when a [beta] NuGet package will be available with this fix?

@grounch
Copy link

grounch commented Dec 15, 2022

hi any update on that fix? @Jerome-Liger @edsnider thanks

@Jerome-Liger
Copy link
Contributor

Sorry, I'm really busy these days... I didn't look at the Google website changes... I'll try to take a look this WE...
And maybe if I have enough time, I'll try to use a better approach (with GooglePlay API better than scrolling the website that can change any time again...). This may be my next "ChatGPT" pair-programming test ;-)

@Jerome-Liger
Copy link
Contributor

But if you're too much impatient, just ask ChatGPT "show me C# code sample to get any published application versioncode and versionname from the packagename with Google Play API... it will answer in just couples of seconds (I'm so impressed... GooglePlay API documentation is so big/unreadable/awfull to search for a human...) :

using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

namespace GooglePlayAPIExample
{
    class Program
    {
        static async Task Main(string[] args)
        {
            string apiKey = "YOUR_API_KEY";
            string packageName = "com.example.app";

            HttpClient client = new HttpClient();
            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
            HttpResponseMessage response = await client.GetAsync($"https://www.googleapis.com/androidpublisher/v3/applications/{packageName}");

            if (response.IsSuccessStatusCode)
            {
                string responseJson = await response.Content.ReadAsStringAsync();
                Console.WriteLine(responseJson);
            }
            else
            {
                Console.WriteLine($"Erreur : {response.StatusCode} - {response.ReasonPhrase}");
            }
        }
    }
}

And it can guide you to obtain the Apikey or whatever you didn't undertand in the process... if you didn't test ChatGPT, just think about it seriously... ;-)

@ivgomezarnedo
Copy link

But if you're too much impatient, just ask ChatGPT "show me C# code sample to get any published application versioncode and versionname from the packagename with Google Play API... it will answer in just couples of seconds (I'm so impressed... GooglePlay API documentation is so big/unreadable/awfull to search for a human...) :

using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

namespace GooglePlayAPIExample
{
    class Program
    {
        static async Task Main(string[] args)
        {
            string apiKey = "YOUR_API_KEY";
            string packageName = "com.example.app";

            HttpClient client = new HttpClient();
            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
            HttpResponseMessage response = await client.GetAsync($"https://www.googleapis.com/androidpublisher/v3/applications/{packageName}");

            if (response.IsSuccessStatusCode)
            {
                string responseJson = await response.Content.ReadAsStringAsync();
                Console.WriteLine(responseJson);
            }
            else
            {
                Console.WriteLine($"Erreur : {response.StatusCode} - {response.ReasonPhrase}");
            }
        }
    }
}

And it can guide you to obtain the Apikey or whatever you didn't undertand in the process... if you didn't test ChatGPT, just think about it seriously... ;-)

@Jerome-Liger sorry but that's not working. It seems that is not possible to get the latest version of an app using the Google Play API.
I have described a workaround in: #50 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change version number place in AF_initDataCallback
8 participants