【问题标题】:Identify whether the app is installed for the first time using Titanium识别应用程序是否是第一次使用 Titanium 安装
【发布时间】:2014-11-06 10:35:48
【问题描述】:

我正在使用 Titanium Appcelerator 开发跨平台应用程序。

我希望我的应用了解该应用是否首次安装在该特定设备上。

如何使用 Ti.App.Properties 来做到这一点?

谁能告诉我该怎么做?

提前致谢!

【问题讨论】:

    标签: android ios titanium titanium-mobile titanium-alloy


    【解决方案1】:

    是的,例如:

    if( !Titanium.App.Properties.hasProperty( 'firstTime' ) ) {           
            // set the property for next time
            Ti.App.Properties.setBool( 'firstTime' , false );
            // do something
    }
    

    如果用户卸载应用程序,属性将被清除。

    【讨论】:

    • 会更好,比如if( !Titanium.App.Properties.hasProperty('firstTime') )
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-05
    • 2011-09-02
    • 1970-01-01
    • 1970-01-01
    • 2013-05-31
    相关资源
    最近更新 更多