Android Question How to wake up from ** Activity (main) Pause, UserClosed = true **

Diego Marcelo Croatto

Member
Licensed User
Longtime User
Hi to all.... I need continue an app when a new serial data is incomming from bluetooth if the phone is Paused (Screen off)

My data is comming in the Starter service right, but I cant exit from pause ....I cant execute code with the incomming data.

We can help me with the code to wake up an Resume the activity?... thank's a lot.
 

Diego Marcelo Croatto

Member
Licensed User
Longtime User
Well.... I read a lot of posts and... I don't find the solution..... the example closets one is this post "Android Bluetooth / BluetoothAdmin Tutorial"

This is a clear example of what I need ..... when one of the two devices connected enter in the ** Activity (chatactivity) Pause, UserClosed = true **
the thevice in this mode is lost all the data sended form the other device.

I need (in the Activity Pause state) recive the data decode it and wake up the phone like if I push the button turn on the screen and continue running the program normally.

Thank's a lot for any sugestion

 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
@Diego Marcelo Croatto,
You really do have to learn the concept of what B4XPages actually is. Pages are not Activities, they are pages that are basically stacked one on top of another. Pages can run in the background whilst the screen is off.

Here is an example for you to look at, all you have to do is watch the logs. You don't need a full example at all, just learn the basic concept of the attached example and use your imagination to create your own Bluetooth solution for your app.

As Erel said,
Switch to B4XPages and forget from such issues.

Enjoy...
 

Attachments

  • Project.zip
    14.5 KB · Views: 257
Last edited:
Upvote 0

Diego Marcelo Croatto

Member
Licensed User
Longtime User
Peter Simpson!!!!!! ? you are the man!!!!!!!
I understand the concept but with you example .... it's clear!

Thank's a Lot!!!!!! ;)
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
How come you found the old tutorial (https://www.b4x.com/android/forum/threads/android-bluetooth-bluetoothadmin-tutorial.14768/#content) and not the B4XPages one?

1615964198982.png


 
Upvote 0
Top