Show text at OnEnteredRegion-function

Hello everybody,

in the AndroidSDK Tutorial is the fuction “OnEnteredRegion”.
In this function they use showNotification, but I just want to change an edittextview in the opened app.

Hope somebody can help me

You can put your own code in the onEnteredRegion, and there’s nothing stopping you from that code being something that changes a text view.

If you don’t know how to manipulate the UI yet, check out the Android tutorial from Google:

https://developer.android.com/training/index.html

But if I change the code and try to set a text in the textview. If the beacon is in range an the programm starts this function, there is a nullpointerexception and the app closes. I tired it with a setter-methode in the MainActivity but only after the OnEnteredRegion-function tries to use my setter-methode, then this error appears.