Jump to content
  • 1

Is there a way to detect android version in lua script?


Question

Posted

I search ed a little bit in the forum but i found nothing. So my question is: is there a way to detect running android version with gg/lua?!
Thank you!! 

Recommended Posts

  • 0
  • Administrators
Posted

Find another difference by which you can determine which case it is. For example, a list of loaded libraries.
Tomorrow, developers can apply the approach with 10 android, for older versions. And this will break your script if it relies on the version of android.

You can make a lazy double search mechanism.
The script looks for the presence of the saved search type in the config.
If it isn’t empty, use this type. If the search is unsuccessful, it switches to another type.
If it is empty there, it first conducts one search, and if it is unsuccessful, then the second.
In any case, the type is saved in the config.
This allows you to completely solve the problem.

  • 0
Posted

You  Can  Detect  Android  Version  With  Android  SDK  Version 

⟱ For  Example ⟱

gg.alert("Your Android SDK Version :"..gg.ANDROID_SDK_INT,"OK")

You  can  try script

andsdk = (gg.ANDROID_SDK_INT)

if andsdk == 19 then
gg.alert("( 4.4.4 )   K I T   K A T 🍫,"OK")
end----if 
if andsdk == 21 then
gg.alert("( 5.0.0 )    L O L I P O P   🍭,"OK")
end----if
if andsdk == 22 then
gg.alert("( 5.1.0 )   L O L I P O P   🍭,"OK")
end----if
if andsdk == 23 then
gg.alert("( 6.0.0 )   M A R S H M A L L O W ,"OK")
end----if
if andsdk == 24 then
gg.alert("( 7.0.0 )   N O G U A T ,"OK")
end----if
if andsdk == 25 then
gg.alert("( 7.1.0 )  ( 7.1.1 )  ( 7.1.2 )     N O G U A T ,"OK")
end----if
if andsdk == 26 then
gg.alert("( 8.0.0 )    O R E O ,"OK")
end----if
if andsdk == 27 then
gg.alert("( 8.1.0 )   O R E O ,"OK")
end----if
if andsdk == 28 then
gg.alert("( 9.0.0 )   P I E ,"OK")
end----if
if andsdk == 29 then
gg.alert("( 10 )   T E N ,"OK")
end----if
if andsdk == 30 then
gg.alert("( 11 )   E L E V E N ,"OK")
end----if
if andsdk == 31 then
gg.alert("( 12 )   T W E L V E ,"OK")
end----if
if andsdk == 32 then
gg.alert("( 12 )   T W E L V E ,"OK")
end----if

♥️ I Love To Help ♥️

Show Android Version.lua

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.