register nfc callback in every activity that provides a proper sharable uri
This commit is contained in:
parent
11ecf43da7
commit
b824e55277
|
@ -144,7 +144,7 @@ public class ConferenceDetailsActivity extends XmppActivity {
|
|||
if (conversation!=null) {
|
||||
return "xmpp:"+conversation.getContactJid().split("/")[0]+"?join";
|
||||
} else {
|
||||
return super.getShareableUri();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ public class ContactDetailsActivity extends XmppActivity {
|
|||
if (contact!=null) {
|
||||
return "xmpp:"+contact.getJid();
|
||||
} else {
|
||||
return super.getShareableUri();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ public class ConversationActivity extends XmppActivity implements
|
|||
if (conversation!=null) {
|
||||
return "xmpp:"+conversation.getAccount().getJid();
|
||||
} else {
|
||||
return super.getShareableUri();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -659,18 +659,6 @@ public class ConversationActivity extends XmppActivity implements
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
this.registerNdefPushMessageCallback();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
this.unregisterNdefPushMessageCallback();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
if (xmppConnectionServiceBound) {
|
||||
|
|
|
@ -287,7 +287,7 @@ public class EditAccountActivity extends XmppActivity {
|
|||
if (mAccount!=null) {
|
||||
return "xmpp:"+mAccount.getJid();
|
||||
} else {
|
||||
return super.getShareableUri();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -588,6 +588,20 @@ public abstract class XmppActivity extends Activity {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (this.getShareableUri()!=null) {
|
||||
this.registerNdefPushMessageCallback();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
this.unregisterNdefPushMessageCallback();
|
||||
}
|
||||
|
||||
protected void showQrCode() {
|
||||
String uri = getShareableUri();
|
||||
if (uri!=null) {
|
||||
|
|
Loading…
Reference in New Issue