简体   繁体   English

将用户输入数据保存在 kivy 中并存储以供以后使用/分析 python

[英]save user input data in kivy and store for later use/analysis python

I am a kivy n00b, using python, and am not sure if this is the right place to ask.我是 kivy n00b,使用 python,不确定这是否是正确的地方。

Can someone please explain how a user can input data in an Android app, and how/where it is stored (SQL table, csv, xml?).有人可以解释一下用户如何在 Android 应用程序中输入数据,以及数据的存储方式/存储位置(SQL 表、csv、xml?)。 I am also confused as to how it can be extended/used for further analysis.我也对如何扩展/用于进一步分析感到困惑。

I think it should be held as a SQL table, but do not understand how to save/set up a SQL table in an android app, nor how to access it.我认为它应该被保存为 SQL 表,但不明白如何在 android 应用程序中保存/设置 SQL 表,也不了解如何访问它。 Similarly, how to save/append/access a csv/xml document, nor how if these are made, how they are secure from accidental deletion, overwriting, etc类似地,如何保存/附加/访问 csv/xml 文档,或者如何制作,如何防止意外删除、覆盖等

In essence, I want to save only the timestamp a user enters some data, and the corresponding values (max 4).本质上,我只想保存用户输入一些数据的时间戳和相应的值(最多 4 个)。

User input would consist of 4 variables, x1, x2, x3, x4 , and I would write a SQL statement along the lines: insert into data.table timestamp, x1, x2, x3, x4 , and then to access the data something along the lines of select * from data.table and then do/show stuff.用户输入将包含 4 个变量, x1, x2, x3, x4 ,我将编写一个 SQL 语句: insert into data.table timestamp, x1, x2, x3, x4 ,然后访问数据。 select * from data.table然后做/展示东西。

Can someone offer suggestions on what resources to read?有人可以就阅读哪些资源提供建议吗? How to set up a SQL Server table in an android app?如何在 android 应用程序中设置 SQL 服务器表?

This works basically the same way on android as on the desktop: you have access to the local filesystem to create/edit files (at least within the app directory), so you can read and write whatever data storage format you like.这在 android 上的工作方式与桌面上的基本相同:您可以访问本地文件系统来创建/编辑文件(至少在 app 目录中),因此您可以读取和写入您喜欢的任何数据存储格式。

If you want to use a database, sqlite is the simplest and most obvious option.如果要使用数据库,sqlite 是最简单、最明显的选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM