如何在Phonegap应用程序中存储值,数据库之外的任何方式 [英] how to store a value in Phonegap apps, any way other than database

查看:185
本文介绍了如何在Phonegap应用程序中存储值,数据库之外的任何方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi friends我是一个移动开发人员。到目前为止我已经在iPhone应用程序和Android应用程序工作。现在我在iPhone和Android手机的电话差距应用程序工作。

hi friends i am a mobile developer. So far i have worked in iPhone apps and android apps. Now i am working in Phone gap based apps for iPhone and Android mobiles.

现在我的问题是在我的应用程序我有一个登录页面,我必须输入用户名和密码,我返回我使用得到一个唯一的是和令牌,我必须使用的整个应用程序。

Now my problem is in my app i have a log in page where i have to enter the username and password and i return i use to get a unique is and token which i have to use for the whole app. If the app gets closed and opened after a long time i want this to be remained same.

在ios应用中,我们使用一个名为 UserDefault 的方法, strong>方法,而在Android应用中,我们有一个默认方法 SharedPreference 。在这种方式是有任何默认方法Phonegap或我只能使用数据库。

For this in ios apps we use a method called UserDefault method and whereas in Android apps we have a default method called SharedPreference. In that way is there any default method for Phonegap or i have to use only database.

目前我正在写一个 javascript

推荐答案

一个选择是本地存储。 这里是有关使用PhoneGap使用本地存储的教程。

One option is local storage. Here is a tutorial on using local storage with PhoneGap.

这篇关于如何在Phonegap应用程序中存储值,数据库之外的任何方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆