开发者

add/delete/modify values in "default.properties"

How can I add/delete/modify values in "default.properties" for Android.

开发者_StackOverflow社区

Any examples?

Thanks, Sana.


what i read from your comment is that you want to check if an Application was run for the first time.

Use Android preferences for that:

Check if some value occurs in SharedPreferences

    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
    int value = prefs.getInt("FirstRun"), -1); 

If it first run do what you want:

if(value == -1){
  // do sth
  SharedPreferences.Editor editor = prefs.edit();
  editor.putInt("FirstRun", 1);
  editor.commit();
 }


How can I add/delete/modify values in "default.properties" for Android.

I use a text editor.

This answer was probably obvious to you, suggesting that your real question is not the one I quoted above, but rather something else you did not include here. If you find that your StackOverflow question is less than, say, 150 words, your question is probably too short. Give us more context, such as what you are trying to achieve.


Why do you want to modify those values? If you're trying to change what version of the API you're building against, that can be done in the "android" section of the project properties in Eclipse...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜