It is currently Mon Mar 27, 2017 11:18 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  [ 11 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Timer
Unread postPosted: Tue Feb 21, 2017 1:23 pm 
Online
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1289
Hi All

A very easy to use timer. No bell and whistles, just type in the time you want, press start, and the countdown
begins.

Your device will vibrate and play a tone sound when the alarm counts down to zero.
The Start button toggles Start/Pause.

http://laughton.com/basic/programs/utilities/Timer_Roy/


This app was created with:
Gregor's OilBasic
hot-summer-of-code-t4408.html

The APK was made with:
Emile's New ROF2APK
post35417.html#p35417

Regards Roy

Attachment:
TimeSnap.PNG
TimeSnap.PNG [ 80.99 KiB | Viewed 365 times ]


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Wed Feb 22, 2017 4:08 am 
Offline
User avatar

Joined: Tue Sep 13, 2011 4:58 am
Posts: 718
Location: Sao Paulo, Brasil
Haven't tested it yet, but does it run on background?

_________________
Alfredo Peine

-------------

Hisense Sero 7 Pro (Tegra 3 7" rooted tablet - Android 4.4.4) / Moto G 3rd Gen (5" quad core rooted phone - Android 6.0).


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Wed Feb 22, 2017 5:16 am 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 614
Hi Alfredo,

My quick test:
It works correctly under Android 4.4.2
It does not work correctly under Android 5.1 (Hisense)
This Android 5.1 (Hisense) also does not work correctly when touching the BACKGROUND key.
When you return it to foreground it loses orientation (Landscape/Portrait) and is out of scale.
This happens with APK's made with QuickAPK and RFO2APK.
I have reported this early January to Nicolas per email but he never responded.
So this is a bit of a problem which I can not fix. Is this the reason that I do not see Nicolas and Marc around ?

Alfredo if you have an Android 5.0 or 5.1 that is not a Hisense can you test please?
This orientation thing is serious.

Regards
Emile

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Wed Feb 22, 2017 6:21 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 282
RSA wrote:
Hi Alfredo,

My quick test:
It works correctly under Android 4.4.2
It does not work correctly under Android 5.1 (Hisense)
This Android 5.1 (Hisense) also does not work correctly when touching the BACKGROUND key.
When you return it to foreground it loses orientation (Landscape/Portrait) and is out of scale.
This happens with APK's made with QuickAPK and RFO2APK.
I have reported this early January to Nicolas per email but he never responded.
So this is a bit of a problem which I can not fix. Is this the reason that I do not see Nicolas and Marc around ?

Alfredo if you have an Android 5.0 or 5.1 that is not a Hisense can you test please?
This orientation thing is serious.

Regards
Emile


On all of my four devices (4.1.2 to 6.0.1) the app runs fine.

Emile, please try with my test version:
Code:
!------------------------------------------------
! BackKey interrupt. Double tap back key to end
!------------------------------------------------
onBackKey:
   locals.on
    backKeyHit = BackKey(backKeyHit)
   locals.off
back.resume

!------------------------------------------------
! Touch interrupt
!------------------------------------------------
OnGrTouch:
   locals.on
    call TouchButton()
   locals.off
gr.onGrTouch.resume

!------------------------------------------------
! Timer interrupt
!------------------------------------------------
onTimer:
   locals.on
   call CountDown()
   locals.off
timer.resume


Happy coding
Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Wed Feb 22, 2017 9:46 am 
Online
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1289
Hi Alfredo

Thanks for the enquirer.
I tested on my 2 devices. Phone Android 5.2 and Tablet 4.2.2 and it work fine in foreground or background.

Regards Roy


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Wed Feb 22, 2017 10:00 am 
Online
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1289
Hi Gregor

I know you wanted Emile to do the test, but I have tested with your above modifications and it doesn't work because my functions can no longer see the global variables.

Regards Roy
Attachment:
ErrorSnap.PNG
ErrorSnap.PNG [ 24.6 KiB | Viewed 282 times ]


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Wed Feb 22, 2017 6:39 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 282
roy wrote:
Hi Gregor

I know you wanted Emile to do the test, but I have tested with your above modifications and it doesn't work because my functions can no longer see the global variables.

Regards Roy
Attachment:
ErrorSnap.PNG


AHA, using undocumented GLOBALS :twisted: :twisted:

Should I close this option and instead no controll about that implement GLOBALS.ON and GLOBALS.OFF?

Please try
Code:
OnBackground:%vv2017-02-22gt   
IF !background() THEN
   GR.RENDER
else
   ! GR.MODIFY Screen1[TxtBtn1], "text", "Come from Bgrd."
Background.resume%^^2017-02-22gt


Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Wed Feb 22, 2017 10:43 pm 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 614
Roy,

Roy to Gregor wrote:
I know you wanted Emile to do the test

I did test and reported to Gregor on PM on this one.
The result is it still does not work on an Android 5.1 Hisense.
Gregor's devices works but I do not know if he have a 5.1 specifically?

Gregor wrote:
OnBackground:%vv2017-02-22gt
IF !background() THEN
GR.RENDER
else
! GR.MODIFY Screen1[TxtBtn1], "text", "Come from Bgrd."
Background.resume%^^2017-02-22gt


Gregor accidentally left out the END IF if you did not come right though.
If Alfredo can check/test on his Hisense then we could come to a conclusion.
My 5.1 Hisense is only a spare test device specially aquired for testing Basic! and it is new.

Emile

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Thu Feb 23, 2017 6:02 am 
Offline
User avatar

Joined: Tue Sep 13, 2011 4:58 am
Posts: 718
Location: Sao Paulo, Brasil
My hisense runs 4.4 kitkat. If it helps at all, I'll try during lunch hour.

_________________
Alfredo Peine

-------------

Hisense Sero 7 Pro (Tegra 3 7" rooted tablet - Android 4.4.4) / Moto G 3rd Gen (5" quad core rooted phone - Android 6.0).


Report this post
Top
 Profile  
 
 Post subject: Re: Timer
Unread postPosted: Thu Feb 23, 2017 9:31 am 
Offline
User avatar

Joined: Tue Sep 13, 2011 4:58 am
Posts: 718
Location: Sao Paulo, Brasil
Worked well, even on background. Problem seems to be the interaction between the tablet and OS version.

_________________
Alfredo Peine

-------------

Hisense Sero 7 Pro (Tegra 3 7" rooted tablet - Android 4.4.4) / Moto G 3rd Gen (5" quad core rooted phone - Android 6.0).


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


Who is online

Users browsing this forum: No registered users and 2 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