GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2017-Jun-23

Title: Android 6 Crashing
Post by: MrPlow on 2017-Jun-23
recently a lot of my apps have had increases in crashes...Not sure if this a Google update issue for certain models or devices or its down it my version v12 no longer compatible for certain phones??!


On ione app had suddendly 77 issues of this error...previously it occurred 1 time every few days.

java.lang.UnsatisfiedLinkError:
  at java.lang.Runtime.loadLibrary0(Runtime.java:996)
  at java.lang.System.loadLibrary(System.java:1530)
  at org.libsdl.app.SDLActivity.<clinit>(SDLActivity.java:235)
  at java.lang.Class.newInstance(Native Method:0)
  at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2297)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2456)
  at android.app.ActivityThread.-wrap11(ActivityThread.java:0)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:148)
  at android.app.ActivityThread.main(ActivityThread.java:5485)
  at java.lang.reflect.Method.invoke(Native Method:0)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)


Another common error is

backtrace:
  native: pc 000000000033464c  /system/lib/libart.so (_ZN3art22CountStackDepthVisitor10VisitFrameEv+15)
  native: pc 000000000032bddd  /system/lib/libart.so (_ZN3art12StackVisitor9WalkStackEb+204)
  native: pc 000000000033ce69  /system/lib/libart.so (_ZNK3art6Thread24CreateInternalStackTraceILb0EEEP8_jobjectRKNS_33ScopedObjectAccessAlreadyRunnableE+48)
  native: pc 00000000002cba97  /system/lib/libart.so (_ZN3artL32Throwable_nativeFillInStackTraceEP7_JNIEnvP7_jclass+18)
  native: pc 0000000002f7bc0d  /system/framework/arm/boot.oat


Anyone having similar issues?


Title: Re: Android 6
Post by: MrPlow on 2017-Jun-23
My issue looks to be simular to msx's issues in this post...was this issue resolved?

http://www.glbasic.com/forum/index.php?topic=10771.15 (http://www.glbasic.com/forum/index.php?topic=10771.15)

Also my SDLActivity.java file is using a lot of log commands - should these be commented out for the production release?


One error points to line 238 or my SDLactivity file which shown in bold below.

    // Load the .so
    static {
        System.loadLibrary("SDL2");
        // System.loadLibrary("SDL2_image");
        System.loadLibrary("mikmod");
        System.loadLibrary("SDL2_mixer");
        // System.loadLibrary("SDL2_ttf");
        System.loadLibrary("main");
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Jul-09
have been away a lots here. do you uses DOESFILEEXIST? Its mightbeen required for Android 6. Im have not checked that since (im have not coded in quite of time now).
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-24
Anyone know if the mikmod library can be located to make sure it exists :)
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-25
Try to remove it line if you not using mods. Not sure why they crash. Could been a conflict.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-26
Hi SF

Should DOESFILEEXIST belong in the check_asset function of AE or before?

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-26
yes DOESFILEEXIST does same thing today as the old check_asset function. its should have do that automatic, but might fails for sound files, where you should uses it.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-27
Is Doesfileexist the same in v12 as in v14 or are they different?
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-27
It's also make sure it go copied into internal memory. Some crashes could due some low internal memory, but should not been issue today at all. It'd should have called for all file operation, but it's seens it's might fail on some systems for some odd reason. Better include it as safe.

You could done that in a function for image loading.....
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-27
Hi Sf,

You mean like this?
Code (glbasic) Select
  LOCAL ok
        Android.Check_Asset(File$) // copy assest file from APK to Memory
        ok = DOESFILEEXIST(GETCURRENTDIR$()+File$)
         IF ok THEN LOADSOUND GETCURRENTDIR$()+File$, ID,BUF


Something I do not use - cause it deletes my source Media assets is this...

Code (glbasic) Select
FUNCTION Check_AndroidMem: File$
LOCAL Memory=JavaCall$("memory:check")
IF Memory<100
// KILLFILE File$
// KILLFILE GETCURRENTDIR$()+"/"+File$
// KILLFILE GETCURRENTDIR$()+File$
ENDIF
ENDFUNCTION
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-28
Checkassest() was removed since I'm got the source code from gernot and I'm implementated it into DOESFILEEXISTS command instead. Don't use full path to that with that command. If it'd still crash, do a CREATEDIR("Media") and eventually sub folders you might use top or your code. This shall have done automatic and I'm should check the glbasic startup code why it's does not do correct. I'm take a look, but this should been a fixable work around by now.

Also don't use setcurrentdir() far than "Media".

This is why I'm don't want to support old android versions.......
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-28
Hi SF

On GLB v12.304 - DOESFILEEXIST seems to work fine with Getcurrentdir command and Media - so far at least -
:)
Gonna see if the crashes decrease...

Still getting Mousecount issue crashing - but could that be screen touches not keeping up with LIMITFPS 50 ?
Anyhow - its a process of elimination - thanks for the tips...
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-28
Mousecount is im a aware allways set to 16, but property its should allways returns 4 or such? Its a static number that have been set to that. But for now dont use more inputs than required.

50 fps use a wierd frameskipipng and would not fell like a smooth game for some players, since screens is often updated to 60fps. Im do thinks this is something due virtual screen, which im have newer ever used for speed.

Now im or gernot should checks why that load thing fails, which should have done automatic. Only im can see its its might not have created the internal directories correctly and its tried to copy a media to a folder that did not exists under a startup.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-29
Another crash that occurs a bit is the null pointer exception

   String ext_storage = getExternalFilesDir(null).toString();
      if (ext_storage==null)
      {   ext_storage = android.os.Environment.getExternalStoragePublicDirectory(android.os.Environment.DIRECTORY_DOWNLOADS).toString();
      }
      
      if (Build.VERSION.SDK_INT>18)
      {   ext_storage = android.os.Environment.getExternalStoragePublicDirectory(android.os.Environment.DIRECTORY_DOCUMENTS).toString();
      }
      
Is there anything I can put into SDL activity to help avoid this crash?
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-29
version? and which line?

DIRECTORY_DOWNLOADS did crashed on SOME Android version 4.0 as well. So crazy is Android some times. ext_storage is that internal path the game should copy the media files too.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-29
which line?

if you also use a older SDK version as well, then im cant help. you need a least API 19 installed as well. The newest SDK the actuelly Android Extras using is API 22.

You might need to change you manifest to a least use that API as well. You should use this in your manifest.xml:

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" />

Recently im tested Greedy Mouse on a Samsung S8, which the game actuelly worked fine (im do not sure its crashed internally once?). Howover wide screen was not supported. Here im make sure we need a higher SDK version and few new lines to the manifest.

Also use PLATFORMINFO$("APPDATA") and not PLATFORMINFO$("DOCUMENTS") for saving data. And if the below fails, then its should now give a empty result:

Code (glbasic) Select

try
{

boolean ReadPermission = (getContext().checkCallingOrSelfPermission("android.permission.READ_EXTERNAL_STORAGE") == PackageManager.PERMISSION_GRANTED);           
boolean WritePermission = (getContext().checkCallingOrSelfPermission("android.permission.WRITE_EXTERNAL_STORAGE") == PackageManager.PERMISSION_GRANTED);
String ext_storage = "";
if (ReadPermission==true && WritePermission==true)
{ if (Build.VERSION.SDK_INT>18)
{ ext_storage = android.os.Environment.getExternalStoragePublicDirectory(android.os.Environment.DIRECTORY_DOCUMENTS).toString();
}
else
{ ext_storage = android.os.Environment.getExternalStoragePublicDirectory(android.os. Environment.DIRECTORY_DOWNLOADS).toString();
}
}
}
catch(Exception e)
{ ext_storage="";
}


But you might not could write with hiscore on some devices.....

Property because its now so far in Android versions im property will set DOCUMENTS to been same as APP_DATA. Android is simply just strange sometimes.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-29
Thanks SF

I am using 19 SDK at present but my min="9" so I might change to 10.
That might help?
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-29
Hi SF

My app crashes with the new try catch code - is it correct?
Spotted error with a gap below - will retry now

Code (glbasic) Select
android.os.      Environment.DIRECTORY_DOWNLOADS

Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-29
Hi

Still crashing with the new code - is there something I am missing?

I replaced the old code with this.

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-29
You should uses api-22, or its might crash on newer platforms. And also im wont reallt want to support mixed version of old and news, which can also cause to crash, if the newest version dosent.

DIRECTORY_DOWNLOADS is very dumb, its might crash on SOME devices, such as Ouya (when they updated it, then its crashed Greedy Mouse out too as im remember), while DIRECTORY_DOCUMENTS is more future proff, but is only exists from API-19 (Android 4.4) and up. But that require you have installed SDK 19 and is present that api in the Android SDK to get working. If you dont have that sdk.... then its will fails and you get a null pointer issue under compiling or code (etc that api present under \android-sdk-windows\platforms, you can have more than one api installed).

Also make sure the SDK using is also present, or you might get a null pointer issue under compiling. Is its Java issue you get from compiling or by runtime? If by compliing, its a too old SDK you using. Here im cant support you. The changes was happens since the issues on Ouya.

Also current target is Android 5.1 (Api-22) for Android Extras. Api 21 was required to get full screen support, which require some code as well. You should still could use Api 22 with a older Android Extras Versions as long you compile against Android 22 api. This to make sure DIRECTORY_DOCUMENTS works as intended.

You should also not use TRY, its was just a blind test.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-29
Ahh good. Without the try part is code works.

Will it still avoid crashing or less likely?
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-30
If you uses 18 or older,  then it's might crash. Currently newest android extras uses 22. I'm shall uses newer version.... Mostly to support widescreen on newer android devices.

Android is sometimes also very strange and annoying.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-30
Also.... Ads might also crash out glbasic when resumed on some devices. This was why I'm gave up that, removed it and newer got er implemented to newest android again..... If ever? I'm don't have time yet to do that. I'm simply just got uninspired by now when I'm no longer uses android.

What I'm should have done is It's should have use the glbasic loop function really to avoid this kind of issues, example if you try to draw graphics while display a ads or such. Also it's would been more automatically too. But it's did newer happens.

But again I'm simply just not like that android anymore, due all those constantly issues. :-(. Now I know have succes with steam.....
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-30
Hi SF,

I found your Admob implementation very stable and never get an feedback about crashing (when used with pause routine)
I mean that - its been working great!

here is the sdl and manifest.

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-30
It's not happens on all devices, but on some devices and some cases and not sure what happens. It's was happens here example due I ads. Soon I'm removed it, then it's worked nicely.

I'm also newer got Karma Miwa back to Google Play again due that and forgot all about it. Only Greedy Mouse. But for me I'm not using Android anymore (currently). Windows is the best platform. I'm also still using ios. Ios has a very great debugger.... Android.... You have none with glbasic and then hard to fix thing. I'm need a debugger some times.

Again I'm should reimplemented using the main loop function and not invoke it manually. Then it's would make sure nothing is draw in meantime.... I'm did few code, but got uninspired.

Property you can try out the newest version of Android extras and then copy back the I ads part back again?
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-30
look like im did not really removed iads, but just dropped it. All code in  SDLActivity.java is still present in the newest Android Extras (but do more checking the service is used or not). So its the glbasic part that need recoded completly..... not the Java part. Its would been untouched.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-30
also... im also did indeeded fixed a crash issue when Ouya SDK is not used in 3.0.1 back in 2015. The Ouya code is simply just not used when the Ouya shop not used (its could crash if Ouya Shop could not find a key). You used 2.9.

Please note: Im have NOT removed iAds as im throught im did (dur crashed, im just leaved it)! Nor im have changed it. Only you can use more than one ads system and eventuelly the ads system will got removed when not used. So im have just slightly changed it. So you should been SAFE to use the newest version, even with glbasic 12.

Most thing was happens with improvement game controller support with better support to KEY() which was borked totally out. Etc to example get KEY(1) working and more.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-30
I will definitely think out up-ing my AE version.
I could create side folder for my GLB maybe in case it goes wrong.

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-30
but for me its no longer works with v14, due a compile error, but works with v12. Im need to talk with Gernot with that issue. Im have no clue here.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-30
Just noticed an error I never usually see

native: pc 000000000009463c  /data/app/com.gazzappergames.centiplode.centipedeshooter-1/lib/arm/libmain.so (_ZN14OpenGLRainbows8DrawRectEiiiim+208)
  native: pc 0000000000072390  /data/app/com.gazzappergames.centiplode.centipedeshooter-1/lib/arm/libmain.so (_ZN11__GLBASIC__8DRAWRECTEiiiii+80)

Seems to caused when doing a Drawrect?
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-30
DrawRect and other draw fill commands does not supports on some devices, and on some devices its might only color them white. Howover this is something that should been implented a test, if its possible to use them or not.

But in the end, nothing that can been fixed, since its a SDL/Android issue.

But instead, uses POLYVECTOR to draw them with a filled texture.

Im did such a rutine in CatchOut to avoid it. But im could only use palette of 4096 palette througt (palette done drawed in the png file).

http://www.glbasic.com/forum/index.php?topic=11073.msg97344#msg97344 (im thinks im share some code from CatchOut).
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Aug-30
Cool thanks!
Its not a big issue as crash rate seems very low for that issue...will keep an eye on it!
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-30
not here too, often its dosent paint in correct color, mostly normally white as im have seen. You cant trust DRAW_RECT on Android. Hence im did my own...

Currectly im are reuploading android platform again with few changes. Im also havent updated Google Play service, which require a manual version number change in manifest.xml. Im should do a automatic change on that when that happens.... Both API and Google Play so fails is lesser.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-31
look like im need to change a bits in the next version in admob, since Google Play services is no longer part of own sdk, but is now integrated. that means in the future Android 4.0 would been required for Glbasic apps, which means api-14 would been minimum. Android 2 and 3 is also that insanly old so im wont support them anyway.

So there is some clean ups required.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Aug-31
look like its impossible to avoid Android Studio completly and need to revoke this platform completly as same way required with iOS and xCode. :-(

More more libs is simply.... just integrated to that now. We im use is version 23 of Google Play Service, but is around version 45 now. Quite old, and nothing as im can do for this point.

Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-01
Hi SF

I dont use the Google Play Services much (but I do use Inapp purchasing) and have my own high score saving.

I think is inapp part of it?

I do see more new apps starting with 4.0 support alright.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-01
Something Occurred with GLB stability with Google at the start of April 2017 (Google new changes etc.)

My crash rate for one of my popular apps went from 2 - 4 crashes per day to 290+ per day!!!

Wow. With majority of those crashes coming from Android 6.0 and 7.0 and was not related to any update that I did.

Literally overnight 6 and 7 started to crash more frequently for my apps.


I am staging out a new compile of one of my apps to see if a new build fixes some of the crashing issues...as my recent app builds do not have such large crash rates under the new Android 6.

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-01
I'm no idea why. You should normally use the most recent version. I'm did fixed one crash after version 2.9. It's might crash due using ouya sdk when not used. The code would simply just got removed when not using it.

Also again. I'm Cannot guarantee anything with old versions, because few things might have been fixed since then.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-01
can you write about crashes here. since the other was offtypic stuff.

Can you pm me your project (so im can download it), so im can checking out how you do loading your stuff and using GLB_ON_LOOP etc or not. That one that crash most. Of course im will newer release/pirate it. But im want to have something to checking what happens.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-01
Hi SF

I need an email to send a link to you.
Basically the same errors are occuring in my other apps too - I myself never see them anyway...roughly same codebase as 3 other apps...so I will give you one of those - same types of errors.

The reason the large amount of crashes is the number of users on one of the apps is far larger.

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-04
Look like greedy mouse do have crashes too. I'm do not know it startup, ingame, but could even happens on quit (etc crash on quit, which might have giving a report too).

This is something I'm should cheking since I'm mean I'm have see crash on quit or in idle. Those kind of crash give report too.

Reports of crash on quit (which also can happens), you should not been worred about that. I'm remember it's a know issue and property newer got fixed. But....

I'm this week update android extras with Android 6 which all Google service Play removed. This sucker is too much a pain and is deprecated from android 6 as external sdk. We need move tio android studio and nothing om an do. So I'm cease all this kind of support now. Sorry. I'm even lost a tablet due that.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-04
Yes, I can see it must be frustrating to get it to work.

Happy to help and try to resolve some of the issues...
I wrote a more detailed reply on the other post...I think don't aim for 100% just an acceptable crash rate is good enough!

There will be devices that may need to excluded - thats no biggie!

Is all your play services support within the SDL activity and the other jar files for google play?

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-04
I'm tried both. Now I'm remove all Google play service stuff, include admob, inapp and downloads. I'm do not remove ouya shop of course.

Bear in mind as some of the crash report you see could been happens on quit, which im also have that. Etc the app does not close down correctly. It's might not happens in runtime. Some phone can crash all apps, where nothing I'm can do.

So next version of Android extras would been clean one without Google sevice play. Stabilty come first and newer api come first.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-04
Quote from: spacefractal on 2017-Sep-04
I'm tried both. Now I'm remove all Google play service stuff, include admob, inapp and downloads. I'm do not remove ouya shop of course.

Bear in mind as some of the crash report you see could been happens on quit, which im also have that. Etc the app does not close down correctly. It's might not happens in runtime. Some phone can crash all apps, where nothing I'm can do.

So next version of Android extras would been clean one without Google sevice play. Stabilty come first and newer api come first.

No problem SF!
I have long avoided the Exit App crashing - does not occur in my apps.
Generally I do not see crashes myself...(wish I did!)

I find it strange that Ouya is a remaining, its such a small platform...just my thoughts...perhaps Ouya doesnt affect crashing?


Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-04
its did also crash after they updated it, which was im was used the DOWNLOAD directory. Its was here its got changed to use the DOCUMENTS. Ouya uses own SDK and does not use Google Play Service at all (which is skipped here). but howover its might require GameInput API throught, which a least require version 3.0. But there is no ads system working on Ouya and Android TV anyway.

Howover im do not get any sale at all, but its a great test platform. Etc, if you can get it running on Ouya, then its would been pretty easy to adapt it for Android TV.

But also.... The Ouya SDK could also crash out on some devices as well, which im fixed by removed it completly when not using the Ouya SDK. But if you released on Ouya and use it on Google Play (etc you ahve a dev key from Ouya), then its was not a issue.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-04
except one case, its seen all crashes for me seens to been in idle status. not while playing.

Also after May 2017, you will get much more crash report from all users that have enabled sending crash reports to google. They share to us. This is why you see higher rate of crash rate.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-04
Yes, probably the case alright.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-04
that means HIBERNATE might not working correctly. So im should take a look why. This kind of crash is hover a more minor issue, not major really. Startup crashes is the worst one or crash midgame. not so much from idle or shutdown cases, which also can happens.

You can see that if you have a lots of crahses with point to lib.so (or such).
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-04
HIBERNATE seens to works correctly when onPause() and OnResume() is called. But OnDestroy() is newer called for some reasons. Here nothing im can do. So im will do no changes to that command. So eventuelly crash on quit is nothing im can do. Here its also not that major at all. Its minor. People can still play the game.

Howover this was on a Android 5 device, since im can do nothing with Android 6, but with Android 6 SDK was used.

What im will look on before release (here sadly with all Google Service Play stuff removed) is the auto backup system that came in Android 6.0. There is a folder im need to get it excluded for backup (the files dir, so the devices not backup up medias for no reason).

Also.... Rather using Admob. We should checking out other ads service we can use instead of Admob. There is exists other services as well. Amazon remember worked fine, but limited to some countries throught.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-05
I'm only need to checking out the auto backup feature, so it's don't backup media files for Android 6.0 Pi.

For Android 7.0 api I'm need to check out NDK libraries I'd glbasic uses private system libraries. That is not longer allowed. But it's might not been a issue. Just want to checking it's don't do that.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-05
Hi SF,

Just on the Ads - not all frameworks are worth implementing - even if they work - they might not be any good if the revenue and fillrates are bad.

Admob is the leader, but Amazon is not the next best...they are way down...and probably not worth implementing for someone to make money with ads.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-05
But admob sdk is integrated to Android Studio, so I'm can't do anything without it. I'm won't use more time about that crap after they changed the system after version 29 (it's is in about version 45 or around). But there exists other than admob and Amazon. Also some network can use multiple networks as well.

But next version of Android extras is diffensivt newer use Google play service anymore... Not with without Android Studio......
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-05
Sorry SF,
:)
I just got a bit confused - I thought you said you were changing to Android Studio - but that has changed again?
Google are getting tricky to deal with alright.
The prob want to upset system a bit...even Admob revenues are down of late...partly they want Analytics from Apps too...and Firebase integration etc etc.

A bit awkward alright.

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-05
You can compare xcode for ios with Android Studio for Android.

All thier service have been moved and integrated into Android Studio with no external sdk anymore. This was happens since android 4 really.

That cause all those issues when I'm updating android sdk to newer api, then the old sdk seens nor longer working..... Not for me. So without a such a project, then no Google play service. It's a Stabilty release.

Im have no TBA yet for the android studio glbasic project. But the standalone android extras is as I'm wrote remove and ceased all Google play service support that changes they did. Nothing I'm can do with that. So I'm will soon release android 6.0 standard version release.

They I'm might move it to Android Studio after that release.... But currently I'm won't do that. I'm need take some breath here.

This is why I'm tired about it.....

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-06
Just purchased a android 7.0 tablet and will get it on some days. Then I'm will cheking out again. First backup thing in android 6.0 and ndk thing in android 7.0 about private a library system calls.

As I'm aware glbasic does not used android system calls from c++, pretty much all this kind of calls is in Java. But I'm might also update NDK, but I'm thinks we still are on Android 2.x NDK here.....

Hibernate did I'm tested fine. But it's might have crashed on some devices. That device that crashed most seens to been a bad device (to short in memory).

Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-08
im have got the new Android 7.0 games. My own games (Greedy Mouse and CatchOut) ran fine without crash. Same with MrPlow Galaxy and Centipede game. Both ran fine without crashes (im do not checked if its crashed on quit or such, but gameplay was fully playable, than that is the point. Ads did indeeded ran fine.

That means im can countinie in this week, update the Android Extras SDK to being using Android 7.0 instead of Android 5.0. But the old google service SDK seens depreacted with newer API, so im cant use that anymore.

Due Android Studio requirements for newer Google Play Service versions, im can no longer support admob, inapp and such service using that SDK in the standalone version, until the Android Extras project is moved into a Android Studios Project (no TBA here). Yes while the old SDK run fine with old version of API, im cant work that way anyway. Newer devices is simply just more important.

So im will defensivt remove all Google Service Play services for now.... But for crashes for old version, remove the OUYA based code. This is howover happens in newer version with AndroidIcons.exe, when you dont use the shop (its remove all lines with #SHOP). That OUYA SDK >can< crash on some devices for some odd reasons. The code is in Oncreate() after Ouya Innapp & Button Init (required to been here). You should not need to remove rest of the ouya bits as long its dont init the SDK without a Ouya shop key.

Im do happy to implement other ads service than google play of course. im havent checked out, and some service can even fall back to other service (etc if its fails to download a ads). Amazon example do that with a nice fall back feature. Its might been a blit less renvue here, but that is best alternative.


Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-20
Thanks SF!

I can still side load my older projects and keep them using inapp and admob with older framework.

But if I am doing any stuff for free or a paid app I could do that in the new version :)

TBH - Although Google reports crashing - i do not get many bad reviews about crashing - i would expect I would be getting a few every week....but none at all...so not sure I fully trust the Google crash stats are accurate. :)

P.s. If you get a chance try my new app in Beta Test section.
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-21
the crash bug in the Ios 64 bit was fixed in glbasic compression file, which was not there the debugger was pointed, so its was a nice fix by HeadKaze.

Im have not yet and still to update to newer Android SDK. But im will been sure to remove all Google Play Service, until im a day get it updated to use Android Studio. You should also remove eventuelly OUYA stuff in OnCreate() for better compatible, which also can crash out on some devices. That stuff was added before v2.9. Its was fixed in v3 by simple remove Ouya stuff shop when not used.

the older stuff might work, but can been depreacted in newer devices, and sometimes Android is very pisky and crappy annoying to do work with. For me Android is quite worse than iOS. Yes really. Im could not get the older google play SDK to work with newer SDK example (the newest separated SDK im could find), the ads was loaded, but then nothing then was happens at all (the callback did nothing at all as its should). That hence im remove it instead, due Google's requirements.

But.... im will also look to possible to open a webpage inside the app (as a dialog), which can been used for ads and news purpose instead, which can been a nice alternative. Since its open a webpage inside the app, then you could use pretty much anything really. The best alternative im will do when im went back again. That seens to been possible, but might require a newer Android for some features.

So lso Im will also no longer support Android 2.x and Android 3.x devices at all in the future.... even its might work. also im hate to support older versions. Remember on Ios, im cannot even support iOS 7 and below..... Apple wont accept that at all anymore.

Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-21
hi Sf,

An Ad Platform that allow Reward Ads is an interesting option.

I was contacted by a crowd called Adscend Advertising...maybe one of those reward advert sdks is worth looking into :)
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-21
Can been nice alternative and they still supply Jar files so hope fully should been possible without Android Studio. The only down side is it's require api-15 to get working...... But small price to pay.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-21
Also I'd say they aren't the only show in town...
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Sep-21
I'm do diffensivt take a look when possible and time. It's a 35kb sdk.
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-22
:)

Great stuff!
Title: Re: Android 6 Crashing
Post by: MrPlow on 2017-Sep-22
Hi SF,

Another idea that I thought might be possible is to use the methods of another dev environment and learn how they get round the Android Studio issue...

Maybe copying what game maker yoyo does...?

https://help.yoyogames.com/hc/en-us/articles/216754558-Ads-Google-Mobile-Advertising-v1-3-

Maybe it helps you, maybe not?

:)


Also here is a list of the best incentivised networks...

http://topnetworks.com/best-incentive-networks (http://topnetworks.com/best-incentive-networks)
Title: Re: Android 6 Crashing
Post by: spacefractal on 2017-Oct-02
It's still require a newer sdk that is only included in android studio. Google play service won't been included or fixed. I'm will remove it until then.

But om yet have so that and is delay through.