[android-developers] Shared Preferences

2012-10-11 Thread Mario Bat
Hi, what is the difference betweent PreferenceManager.getDefaultSharedPreferences and getSahredPreferences(String name, int mode) ? I thought that the defaultSharedPreferences are someting like global preferences that every application can manipulate. So lets say that I can call a preference

[android-developers] Re: Passing Numeric value from one activity to another through shered preference

2012-08-08 Thread Mario Bat
If you want to pass it through Sahred Preference then do something like this. In activity A put your value in the shared preference: SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); Editor editor = prefs.edit(); editor.putString(key, value);

[android-developers] Android memory allocation and static variables

2012-08-06 Thread Mario Bat
Hi everyone, I am writing on an Android application where i am registering to GCM. When I click the cehckbox to register i want to set a static variable isRegistered to true/false. Now when i receive the message I want to check this variable and if it is true I make an notification. So when i

Re: [android-developers] Android memory allocation and static variables

2012-08-06 Thread Mario Bat
message (or when the user launches your activity, or whatever), at which point your static data members will have their default values. On Mon, Aug 6, 2012 at 7:03 AM, Mario Bat batfudba...@gmail.com wrote: Hi everyone, I am writing on an Android application where i am registering

[android-developers] Re: how to store the data in cache/temp memory

2012-08-06 Thread Mario Bat
not sure what you mean, but try looking up startyActivityForResult. Thats how you can get the data from B back to A. in the onActivityResult method.. Dana ponedjeljak, 6. kolovoza 2012. 11:39:10 UTC+2, korisnik vamshi ch napisao je: Hi, I have an App that i want to store the data in

[android-developers] Tokens

2012-07-14 Thread Mario Bat
Hi, I have to make an app where i send my device token to a server. The server is a Push server that will push notifications to the mobile device later. My question is; What are tokens and how do you create them? Does the server create my token or who? I know that for the Facebook API

[android-developers] Tokens

2012-07-14 Thread Mario Bat
Hi, I'm not really familiar with tokens in general. I searched and couldnt find any definitions nor explanations. So what are tokens exactly, and how do you create them, and for what are they? Im trying to make an app where i will send my Android device token to a notification push server. The