It is currently Fri May 26, 2017 7:26 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: "low memory" solution please
Unread postPosted: Fri Dec 09, 2016 3:43 pm 
Offline

Joined: Wed Feb 20, 2013 3:25 pm
Posts: 423
Location: Italy
Hi,

I think Quick APK downloads BASIC! source independently (Nicolas can confirm).
LowMem warning doesn't terminate the BASIC! program, but Android can decide to kill BASIC! in case of low memory, warning or no warning.
Anyway to avoid Low memory warnings it's enough:
Code:
ONLOWMEMORY:
LOWMEMORY.RESUME


/ L


Report this post
Top
 Profile  
 
 Post subject: Re: "low memory" solution please
Unread postPosted: Fri Dec 09, 2016 8:47 pm 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
Hi Jan,

The low memory and termination are issued by the Android OS itself.

Your solution of removing the warning is not a good one, you do not solve a problem by hiding it ;)

You could try to set the largeHeap setting of AndroidManifest.xml to "true", this is a natural fix supported by Android to avoid low memory.
See https://developer.android.com/guide/topics/manifest/application-element.html#largeHeap

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: "low memory" solution please
Unread postPosted: Sun Dec 11, 2016 7:04 am 
Offline

Joined: Mon Nov 14, 2016 6:49 am
Posts: 39
Super Nicolas. I will set this specific manifest value to avoid this message. I will recompile latest Rfo-basic from github. Fortunately, Rfo basic quick apk allow user to put his own variant of basic.apk. I will test The system stability when I will use android:largeHeap=["true". It is perfect, because I will do not have to remove low memory warning from run.java or I will not have to use onLowMemory interrupt. It is amazing.


Report this post
Top
 Profile  
 
 Post subject: Re: "low memory" solution please
Unread postPosted: Sun Dec 11, 2016 8:30 am 
Offline

Joined: Mon Nov 14, 2016 6:49 am
Posts: 39
My conclusions are as follows:
Low memory warning is indicator of Android operating system and RFO-BASIC inform developer about this operating system event so The developer can or should receive appropriate development measures to reduce possible extreme or high memory allocations. Ignoring this may lead to application auto kill, especially if Basic run at The background. android:largeHeap="true"
situated at The <application androidmanifest.xml session do its best to enforce maximum of free memory from Dalvik. But it do not guarantee, that Android will not create low memory event so I have made The following thinks.
I have set
android:largeHeap="true"
I have used
OnLowMemory:
LOWMEMORY.RESUME
I have added this code as my last two lines of my program. And before I will turn my screen off, I will not put my Rfo-basic app to The background. And I will do my best to have mobile phone with 1,5 GB of free RAM if possible.


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred