Correction bug multi ajout meme user.
--- a/.classpath Fri Oct 09 16:10:50 2009 +0200
+++ b/.classpath Sun Oct 11 18:39:16 2009 +0200
@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="lib" path="libs/smackx-debug.jar"/>
- <classpathentry kind="lib" path="libs/smackx-jingle.jar">
- <attributes>
- <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="lib" path="libs/security.jar"/>
- <classpathentry kind="lib" path="libs/smack.jar" sourcepath="/home/marseille/smack_src_3_1_0/source">
- <attributes>
- <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/org/"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="lib" path="libs/smackx.jar" sourcepath="/home/nikita/devel/smack">
- <attributes>
- <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="lib" path="libs/jlibrtp.jar">
- <attributes>
- <attribute name="javadoc_location" value="file:/home/nikita/android/docs/reference/"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="com/beem/project/beem/ui/pref.java" kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="lib" path="libs/smackx-debug.jar"/>
+ <classpathentry kind="lib" path="libs/smackx-jingle.jar" sourcepath="/home/marseille/smack_src_3_1_0/">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="libs/security.jar"/>
+ <classpathentry kind="lib" path="libs/smack.jar" sourcepath="/home/marseille/smack_src_3_1_0/source">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/org/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="libs/smackx.jar" sourcepath="/home/nikita/devel/smack">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="libs/jlibrtp.jar">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/home/nikita/android/docs/reference/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="com/beem/project/beem/ui/pref.java" kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- a/res/layout/jingle_call_activity.xml Fri Oct 09 16:10:50 2009 +0200
+++ b/res/layout/jingle_call_activity.xml Sun Oct 11 18:39:16 2009 +0200
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content" android:layout_height="wrap_content"
+ android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:text="Jid:" android:id="@+id/jingledemocalljidlabel"
android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
--- a/res/values-en/strings.xml Fri Oct 09 16:10:50 2009 +0200
+++ b/res/values-en/strings.xml Sun Oct 11 18:39:16 2009 +0200
@@ -48,6 +48,7 @@
<string name="AddCContactAddedError">Error Contact not added</string>
<string name="AddCContactAddedLoginError">Error Login</string>
<string name="AddCBadForm">Bad form</string>
+ <string name="AddCContactAlready">Contact already exist</string>
<!-- SendIM class -->
<string name="SendIMActTitle">Beem - Chat</string>
--- a/res/values-fr/strings.xml Fri Oct 09 16:10:50 2009 +0200
+++ b/res/values-fr/strings.xml Sun Oct 11 18:39:16 2009 +0200
@@ -48,6 +48,7 @@
<string name="AddCContactAddedError">Erreur Contact pas ajouté</string>
<string name="AddCContactAddedLoginError">Error Nom d\'utilisateur</string>
<string name="AddCBadForm">Mauvais formulaire</string>
+ <string name="AddCContactAlready">Contact déjà ajouté</string>
<!-- SendIM class -->
<string name="SendIMActTitle">Beem - Chat</string>
@@ -224,6 +225,7 @@
<string name="contact_list_all_contact">Tous les contacts</string>
<string name="contact_list_no_group">Aucun groupe</string>
+
<!--
UserInfo Activity
-->
--- a/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Fri Oct 09 16:10:50 2009 +0200
+++ b/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Sun Oct 11 18:39:16 2009 +0200
@@ -47,8 +47,8 @@
java.security.Security.addProvider(new com.sun.security.sasl.Provider());
super.onCreate(savedInstanceState);
setContentView(R.layout.jingle_call_activity);
- // localhost mConf = new ConnectionConfiguration("10.0.2.2", 5222);
- mConf = new ConnectionConfiguration("elyzion.net", DEFAULT_XMPP_PORT);
+ mConf = new ConnectionConfiguration("10.0.2.2", 5222);
+ //mConf = new ConnectionConfiguration("elyzion.net", DEFAULT_XMPP_PORT);
mConf.setSecurityMode(SecurityMode.required);
mEdJID = (EditText) findViewById(R.id.jingledemocalljid);
mEdPassword = (EditText) findViewById(R.id.jingledemocallpassword);
--- a/src/com/beem/project/beem/ui/AddContact.java Fri Oct 09 16:10:50 2009 +0200
+++ b/src/com/beem/project/beem/ui/AddContact.java Sun Oct 11 18:39:16 2009 +0200
@@ -136,10 +136,16 @@
if (mXmppFacade != null) {
if (mXmppFacade.getRoster().getContact(login) != null)
mGroup.addAll(mXmppFacade.getRoster().getContact(login).getGroups());
+ if (mXmppFacade.getRoster().getContact(login) != null) {
+ Toast.makeText(AddContact.this, getString(R.string.AddCContactAlready), Toast.LENGTH_SHORT)
+ .show();
+ return;
+ }
if (mXmppFacade.getRoster().addContact(login, alias, mGroup.toArray(new String[mGroup.size()])) == null) {
Toast.makeText(AddContact.this, getString(R.string.AddCContactAddedError), Toast.LENGTH_SHORT)
.show();
return;
+
} else {
Toast.makeText(AddContact.this, getString(R.string.AddCContactAdded), Toast.LENGTH_SHORT)
.show();
--- a/src/com/beem/project/beem/ui/ContactDialog.java Fri Oct 09 16:10:50 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactDialog.java Sun Oct 11 18:39:16 2009 +0200
@@ -9,6 +9,7 @@
import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.RemoteException;
+import android.util.Log;
import android.view.View;
import android.widget.Button;
@@ -76,7 +77,7 @@
try {
// TODO permettre a l'user de choisir a quel ressource il veut
// faire le call.
- mXmppFacade.call(mContact.getJID() + "/BEEM");
+ mXmppFacade.call(mContact.getJID() + "/psi");
} catch (RemoteException e) {
e.printStackTrace();
}
@@ -120,6 +121,7 @@
public void onClick(View v) {
Activity a = ContactDialog.this.getOwnerActivity();
Intent i = new Intent(mContext, UserInfo.class);
+ Log.i("OOO", mContact.getJID());
i.putExtra("contact_contactdialog", mContact.getJID());
a.startActivity(i);
dismiss();
--- a/src/com/beem/project/beem/ui/UserInfo.java Fri Oct 09 16:10:50 2009 +0200
+++ b/src/com/beem/project/beem/ui/UserInfo.java Sun Oct 11 18:39:16 2009 +0200
@@ -341,7 +341,10 @@
mRoster = mXmppFacade.getRoster();
mJID = getIntent().getStringExtra("contact_contactdialog");
mContact = mRoster.getContact(mJID);
- mTextAlias.setText(mContact.getName());
+ if (mContact.getName() != null)
+ mTextAlias.setText(mContact.getName());
+ else
+ mTextAlias.setText(mContact.getJID());
mGalleryGroups.setAdapter(new BeemGroups(UserInfo.this, mContact.getGroups()));
setTitle(mJID);
} catch (RemoteException e) {