使用库维护的免费/付费的应用程序版本 [英] Using a library to maintain free/paid for app versions

查看:96
本文介绍了使用库维护的免费/付费的应用程序版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是维护自由的共识/付费应用程序的版本是使用图书馆,并从每个活动设置一个标志,得到不同的功能出了code基地。

It would seem that the consensus for maintaining free/paid for app versions is to use a Library, and to set a flag from each activity to get different functionality out of the code base.

如何安全的,这是?这是我understaninding,一个人能根除他们的电话,得到的APK和,这是可以反编译。即使code的混淆它不会太难看,该应用程序是一个标志的包装,并修复标志。这是可以接受的?我认识到,有总是将周围的事物的方式,但是这一次似乎很容易。

How secure is this? It is my understaninding that a person could root their phone, obtain the APK and that this can be decompiled. Even if the code was obfuscated it wouldn't be too difficult to see that the application was a wrapper with a flag, and to fix the flag. Is this acceptable? I realise that there are always going to be ways around things, but this one seems quite easy.

有没有办法在Eclipse在那里建立标志可用于编译不同版本的code使之充分code不被在免费版本送人?

Is there not a way in Eclipse where build flags can be used to compile different versions of code so that the full code isn't being given away in the free version?

在Android的<一个href="http://developer.android.com/resources/samples/TicTacToeMain/src/com/example/android/tictactoe/MainActivity.html"相对=nofollow>井字样本code ,活动启动另一个活动。在我的应用程序,有独立的照明和Pro包工作过的图书馆,如果我实现这个方法的基本视图被加载,然后子视图,并打算从子视图后显示空白父视图。解决这个方式延长主要活动在图书馆和不在基本活动的setContentView?

In the Android TicTacToe sample code, the Activity launches another Activity. In my application, with separate Light and Pro packages working off the library, if I implement this method a base view is loaded and then the child view, and going back from the child view reveals the blank parent view. Is the way around this to extend the Main Activity in the library and not to setContentView in the base activities?

推荐答案

我不建议你保持只有一个单一的APK项目。相反,我会建议你创建三个项目总;一个是库本身,一个是自由的APK,另一个是有偿的APK。使用这个计划,你的自由APK项目会做一点自己;这实际上是为图书馆的载体(虽然你当然可以酌情增加自己的code)。而支付APK将提供额外的功能,并告诉库使用它(通过回调,反思,无论对你有意义)的一种手段。这解决了您的承载code,你不打算在该版本使用的关注,它不需要任何特殊的Eclipse或任何其他构建环境。

I would not suggest you to maintain only a single APK project. Instead, I would suggest you create three projects total; one is the Library itself, one is the free APK, and the other is the paid APK. Using this plan, your "free APK" project would do little on its own; it would effectively be a carrier for the library (though you can of course add its own code if appropriate). The "paid APK" would provide the additional functionality, and a means of telling the library to use it (through callbacks, reflection, whatever makes sense to you). This solves your concern of carrying code that you don't plan to use in that version and it doesn't require anything special of Eclipse or any other build environment.

这篇关于使用库维护的免费/付费的应用程序版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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