linphone-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-users] Linphone-Android: Where to Store SIP Account progra


From: Winona Kwok
Subject: Re: [Linphone-users] Linphone-Android: Where to Store SIP Account programmatically
Date: Thu, 19 Apr 2012 16:51:14 +0800

Hi,

Sorry! I meant that I do not want the back button to return to my loginPageActivity. I want the back button to exit the app while it keeps the app running in the background. Any idea on this? Thanks a lot for your help!

On Thu, Apr 19, 2012 at 3:05 PM, Erhan Tepe <address@hidden> wrote:
You need to reimplement the key press method, so in your DialerActivity class, add;

public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {

    

        //Listen to the Back key press events

    if(keyCode == android.view.KeyEvent.KEYCODE_BACK) {

    Intent intent = new Intent(ACTION_MAIN);

    intent.setClass(this, LoginPageActivity.class);

    startActivity(intent);

    return true;

    }

    return false;

    }

            


2012/4/19 Winona Kwok <address@hidden>
Hi!

Thanks for your reply once again! I have managed to pass the login credentials using SharedPreferences! However, after users have been logged in and directed to the dialerTab class (after starting linphoneService class), when they click the back button of the android device, it will return them to my LoginPageActivity. Any idea how to solve this? Thanks a lot!

On Wed, Apr 18, 2012 at 8:15 PM, Erhan Tepe <address@hidden> wrote:
Winona,

Let's say your login page comes with an activity class "LoginPageActivity". You can define a SharedPreferences object;

private SharedPreferences pref;


Inside onCreate() method, you can initiate it as;


pref = PreferenceManager.getDefaultSharedPreferences(this);


You can then access those values;


String lUserName = pref.getString(getString(R.string.pref_username_key), null);


Keep in mind that I haven't tested any of these. 


2012/4/18 Winona Kwok <address@hidden>
Hi Developers,

I have a login page for my linphone-android app, and this login page is called before starting the linphoneService class, I would like to store the user's credentials (username, password) so that whenever the user exit or force stop the app, they will still be logged in into their SIP account. Thus they will only be logged out of their SIP account if they call the logout class. May I know where and how to store SIP account credentials (username, password)? I know I would have to use SharedPreferences, but I am not really sure how to apply it here. Please guide me & thanks for your help in advance!

--
Best Regards,
Winona Kwok

_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users



_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users




--
Best Regards,
Winona Kwok

_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users



_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users




--
Best Regards,
Winona Kwok

reply via email to

[Prev in Thread] Current Thread [Next in Thread]