Comments for Python for Dads https://python4dads.wordpress.com ... and other responsible adults Tue, 10 Aug 2021 10:43:56 +0000 hourly 1 http://wordpress.com/ Comment on Kivy – Receiving Android Intents by How to act on android intent in Kivy app? – Ask Android Questions https://python4dads.wordpress.com/2014/07/23/kivy-receiving-android-intents/#comment-1813 Tue, 10 Aug 2021 10:43:56 +0000 http://python4dads.wordpress.com/?p=22#comment-1813 […] far i havent tried anything because i have no idea how to do it. Quick google search revealed this example, but is it from 2014 and i could not found on_new_intent() method in kivy docs. I also found this […]

]]>
Comment on Kivy Android Intent Filters by mohamed alashoor https://python4dads.wordpress.com/2014/07/23/kivy-android-intent-filters/#comment-1802 Fri, 10 Jul 2020 22:36:57 +0000 http://python4dads.wordpress.com/?p=15#comment-1802 In reply to Jari.

hey can you help me with that

how can i read text from nfc tag in my app

]]>
Comment on Resetting a Text Input (Kivy) by surendra babu nallagorla https://python4dads.wordpress.com/2014/08/10/resetting-a-text-input-kivy/#comment-590 Wed, 20 Jul 2016 01:36:20 +0000 http://python4dads.wordpress.com/?p=32#comment-590 I am not able to REFOCUS TextInput after reload of my screen

When I reload the screen, I am able to clear TextInut, but not able to REFOCUS, help me to fix my following code?

from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen
Builder.load_string(”’
:
BoxLayout:
orientation: ‘vertical’
BoxLayout:

BoxLayout:
TextInput:
id: Image_Input
multiline: False
focus: True
on_text_validate: Image_Input.focus=True
Button:
on_press:Image_Input.focus=True
text: ‘RELOAD’
on_press: root.reload(); Image_Input.text=”
”’)

class MainScreen(Screen):
def reload(self):
print(“screen reloaded”)
pass

class TestApp(App):
def build(self):
# Create the screen manager
screenManager = ScreenManager()
screenManager.add_widget(MainScreen(name=’main’))
return screenManager

if __name__ == ‘__main__’:
TestApp().run()

]]>
Comment on Kivy Android Intent Filters by Jari https://python4dads.wordpress.com/2014/07/23/kivy-android-intent-filters/#comment-571 Thu, 30 Jun 2016 10:36:09 +0000 http://python4dads.wordpress.com/?p=15#comment-571 In reply to Camille RUFU.

Here is full working example, http://pastebin.com/8avhuksU . I finally managed solve my problem to read NFC, thanks to Stackoverflow….
I prepared that example from all pieces which was around internet.
In buildozer you don’t need intent filter if you just read NFC when your program is active. Here is modifications for default buildozer file which I have:

source.include_exts = py,png,jpg,kv,atlas,pyc
# (list) Permissions
android.permissions = NFC

# (int) Android API to use
android.api = 19

# (int) Minimum API required
android.minapi = 14

# (int) Android SDK version to use
android.sdk = 24

# (str) Android NDK version to use
android.ndk = 10d

#android.manifest.intent_filters = nfc_filter.xml

]]>
Comment on Kivy Android Intent Filters by Jari https://python4dads.wordpress.com/2014/07/23/kivy-android-intent-filters/#comment-557 Wed, 22 Jun 2016 06:57:15 +0000 http://python4dads.wordpress.com/?p=15#comment-557 Hi, I’m also stuck with python+kivy+buildozer+nfc. I was able to get NFC reading work if tag contains text, but in all other cases it doesn’t work. It would be great to get simple example how to to read NFC with all information (not only NDEF).

]]>
Comment on Kivy Android Intent Filters by Camille RUFU https://python4dads.wordpress.com/2014/07/23/kivy-android-intent-filters/#comment-543 Tue, 31 May 2016 12:59:41 +0000 http://python4dads.wordpress.com/?p=15#comment-543 Hello, I search a simple sample of python/kivy code in order to red NFC tag. Impossible to find a complete sample. I have object as ‘PythonActivity”, “NfcAdapter.getDefaultAdapter()”, “intent”, but after …. the blackhole. PythonActivity.mActivity.startActivity(intent) ? nfcAdapter.enableReaderMode ? Can you hep me ?

]]>
Comment on Resetting a Text Input (Kivy) by joranbeasley https://python4dads.wordpress.com/2014/08/10/resetting-a-text-input-kivy/#comment-229 Wed, 02 Sep 2015 01:56:16 +0000 http://python4dads.wordpress.com/?p=32#comment-229 I think you can do this better with

”’self.scan_entry.bind(focus=on_focus)
def on_focus(textInstance,isFocus):
print self.scan_entry
if not isFocus: self.scan_entry.Focus = True”’

this should also trigger on enter if multiline is false

]]>
Comment on Kivy – Android Life Cycle by brendanscott https://python4dads.wordpress.com/2014/07/23/kivy-android-life-cycle/#comment-35 Sat, 02 May 2015 00:32:43 +0000 http://python4dads.wordpress.com/?p=19#comment-35 uiwidget is a custom widget – what I was using for the user interface. The save and load functions are also custom functions. Assume that there’s an information gap between on_pause and on_resume. Use load and save (or some other functions you name) to bridge this gap – save the data, then load it up again.

]]>
Comment on Kivy – Android Life Cycle by Jeff https://python4dads.wordpress.com/2014/07/23/kivy-android-life-cycle/#comment-34 Fri, 01 May 2015 21:23:52 +0000 http://python4dads.wordpress.com/?p=19#comment-34 Thank you for writing this post was well as your others regarding Kivy. I do have a question however. In your “on_pause” and “on_resume” functions you are making a call to “self.uiwidget.save/load”. I have not been able to find any documentation on the “uiwidget” attribute. Can you provide some additional information on those save and load functions? Maybe you created yourself?

Hopefully I haven’t missed something incredibly simple somewhere, but I did just start using Kivy about a week ago.

Thank you in advance for any information you can share!

]]>
Comment on Fetching a scan from ZXing on Android (Kivy) by Peter https://python4dads.wordpress.com/2014/08/10/fetching-a-scan-from-zxing-on-android-kivy/#comment-28 Tue, 13 Jan 2015 02:46:29 +0000 http://python4dads.wordpress.com/?p=30#comment-28 Thanks! i tries this example but my app doesn’t seem to generate the on_new_intent method. Would be glad if you can give an example for kivy to copy data from android system clipboard. Thanks again !

]]>