2

我有一个客户想要在安装日期之后建立一个定时到期。

不管这是否是一个好主意,除此之外,我知道我可以通过在安装后一段时间后禁用功能来使应用程序基本上无用。

我的问题是,苹果商店的评论者和安卓评论者可以接受这样的想法吗?

4

1 回答 1

0

没有 Android 评论者。如果应用程序编译成功,您可以将其发布到 Google Play。至于禁用,您可以在应用程序首次启动时简单地创建某种 Date 对象,然后将表示该 Date 的 long 保存到 SharedPreferences。然后,当您想禁用该应用程序的时间过去后,只需让该应用程序显示一个对话框,说明其已禁用,并基本上以这种方式切断所有功能。换句话说,此时使整个应用程序的功能只是显示该应用程序已被禁用......只是切断对任何其他功能的访问。或者只是将应用程序定向到显示此信息的 Acitivity,而不是实际可用的应用程序。

快速样机:

 SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
        long time = sharedPreferences.getLong("install_date", 0);
        if(time!=0) {
            Date installDate = new Date(time);
            Date now = new Date();
            int secondsBetween = (int) (installDate.getTime() - now.getTime()); //gives you seconds between
            if(secondsBetween==???) {
                startActivity(new Intent(this, AppDisabled.class));
            }

        }
于 2012-11-18T02:08:45.510 回答