It is currently Sun May 28, 2017 7:21 am



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  [ 1 post ] 
Author Message
 Post subject: Console.ToFront fails after phone state = 2
Unread postPosted: Tue May 02, 2017 12:20 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 327
Console.ToFront fails after phone state = 2

Code:
p=1 % If Console.front fails you get a syntax error with the first line

a$ ="World.mp3" % Or your mp3 file in the data folder

PHONE.RCV.INIT
PHONE.RCV.NEXT e,r$
phone_state = e
? "Start"

DO
PAUSE 1
PHONE.RCV.NEXT e,r$
IF e <> phone_state
  phone_state = e
  POPUP "PhoneState has changed \nto: " + INT$(e) + "\n " + r$

  IF e <> 0
   AUDIO.STOP
  ELSE
   CONSOLE.FRONT % Fails if phone_state = 2 with syntax error
   AUDIO.STOP: AUDIO.LOAD n,a$: AUDIO.PLAY n
  ENDIF

ENDIF

UNTIL 0

ONCONSOLETOUCH:
CONSOLE.LINE.TOUCHED t
AUDIO.STOP: AUDIO.LOAD n,a$: AUDIO.PLAY n   
CONSOLETOUCH.RESUME


It can be, that gr.front in this case also fails :!:

Has somebody an issue and example after answering an incoming call, too?

Happy coding
Gregor


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 1 guest


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