latestversionplugin
latestversionplugin copied to clipboard
fix to get android latest version #47
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
@edsnider @Jerome-Liger can you merge this one please so no clone nuget is needed again ?
@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 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.
@edsnider @Jerome-Liger can you merge this one so no fork or clone nuget is needed again ?
@edsnider @Jerome-Liger can you merge this one so no fork or clone nuget is needed again ?
Merged.
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.
@Jerome-Liger could you take in your "Xam.Plugin.LatestVersion.Forked" this change please? Else i will have to create "Xam.Plugin.LatestVersion.Forked2".
I'm getting error call IsUsingLatestVersion() even using the beta version
The PR is merged but there is no new package published.
Do you have a date on when the package will come out?
did any version come out?
Any update on when a [beta] NuGet package will be available with this fix?
hi any update on that fix? @Jerome-Liger @edsnider thanks
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 ;-)
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... ;-)
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: https://github.com/edsnider/latestversionplugin/issues/50#issuecomment-1485006507