kivy android cell network info

118 views
Skip to first unread message

Aaron Curtis

unread,
Jun 3, 2022, 10:50:49 AM6/3/22
to Kivy users support
Is it possible using kivy / plyer to access information about the phone's cellular and mobile data connections? Ideally, I'd like to log signal strength. At a minimum, I need to know if 4G cellular internet is available.

Robert

unread,
Jun 3, 2022, 8:10:43 PM6/3/22
to Kivy users support
Use Pyjnius

A little Android Googling finds the Java. Then you read enough about Pyjnius above to figure out how to encapsulate in Python.
It might be something like this. BUT I didn't test it and I have no idea if it works. 

from android import mActivity, autoclass
Context = autoclass('android.content.Context')

         strength = mActivity.getSystemService(Context.TELEPHONY_SERVICE) .getSignalStrength()
Reply all
Reply to author
Forward
0 new messages