Android Smack MessageEventManager not compiling

786 views Asked by At

I am using smack API with openfire server to make an android app. I am trying to implement a MessageEventManager and MessageEventProvider to my app so it will tell me if the message was delivered or not though when i try to declare it a MessageEventManager, it is not compiling and tells me to create that class, What can i do? i have the following dependencies in my gradle:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:22.1.1'
    compile 'org.igniterealtime.smack:smack-android:4.1.0-rc1'
    compile 'org.igniterealtime.smack:smack-tcp:4.1.0-rc1'
    compile 'org.igniterealtime.smack:smack-im:4.1.0-rc1'
    compile 'org.igniterealtime.smack:smack-extensions:4.1.0-rc1'
    compile 'org.igniterealtime.smack:smack-android-extensions:4.1.0-rc1'
}

Do i need an extra for it? I would appreciate any help Thanks.

IMG:

enter image description here enter image description here

2

There are 2 answers

4
TommySM On BEST ANSWER

Well, I might be wrong, but it seems it's not included in Smack4.1, I can't tell if it's deprecated or not since I haven't seen it on the deprecated lists, and the documentation exists here and here for the parent class.

But... what I did find is this SO answer by the Author of Smack, that clearly states that

Message events in SMACK are done via the now obsolete XEP-22. There is a good chance that the other side does not implement this out-dated mechanism.

Since this is dated 3 years back, it might be a good idea to look for another solution, or (depending on your needs, might not be recommended) use an older version Smack or aSmack.

0
Glend Maatita On

Message event manager (XEP-22) are obsolete now, but smack team still maintain it. You can use smack legacy library throgh gradle

compile "org.igniterealtime.smack:smack-legacy:4.1.3"