Git Product home page Git Product logo

Comments (12)

DrissTM avatar DrissTM commented on September 7, 2024

Hi @karimkod according to the error message you're trying to setup the Dimelo instance with an invalid domain name.

What domain name did you pass to initWithApiSecret ? (the domain name is the second parameter)

from engage-digital-messaging-android.

karimkod avatar karimkod commented on September 7, 2024

Hi @DrissTM it's the default mobilemessaging domain name => "mobilemessaging.engagement.dimelo.com"

from engage-digital-messaging-android.

DrissTM avatar DrissTM commented on September 7, 2024

mobilemessaging.engagement.dimelo.com is the API hostname and cannot be changed.

As explained in the documentation initWithApiSecret now requires you to pass your domain name as parameter.
Your domain name can be found in your Dimelo url: your-domain-name.engagement.dimelo.com

Let me know if you have any other questions

from engage-digital-messaging-android.

karimkod avatar karimkod commented on September 7, 2024

I'm still using the 1.6.9, is it deprecated now?

from engage-digital-messaging-android.

karimkod avatar karimkod commented on September 7, 2024

@DrissTM When I did that now I can't send messages they keep loading and they are not sent, any idea why ?

from engage-digital-messaging-android.

waelba avatar waelba commented on September 7, 2024

Hello @karimkod,

Can you synchronize your app (app -> synchronize app)
then test, if the problem persist can you give me a snippet of the code for dimelo and gradle configuration

from engage-digital-messaging-android.

waelba avatar waelba commented on September 7, 2024

Hi @karimkod,
Did you manage to resolve your issue ?

from engage-digital-messaging-android.

karimkod avatar karimkod commented on September 7, 2024

Hi @waelbenabdallah Is the synchronization you mentioned the same as gradle sync or another type because I can't find it anyway!?

from engage-digital-messaging-android.

waelba avatar waelba commented on September 7, 2024

Hi @karimkod ,

Yes it's the same and please clean project and rebuild it because you always use to the old version of version 1.6.9 this ticket

Let me know if you have any other questions

from engage-digital-messaging-android.

karimkod avatar karimkod commented on September 7, 2024

It's not working. here are the snippets:
` fun setupDimelo(context: Context, dimeloListener: Dimelo.DimeloListener): Dimelo {
val secret = BuildConfig.DIMELO_SDK_SECRET //edit in gradle.properties
Dimelo.setup(context)
val dimelo = Dimelo.getInstance()

    dimelo.deviceToken = this.getSharedPreferences(
            getString(R.string.user_pref),
            Context.MODE_PRIVATE)
            ?.getString("FirebaseToken","")

    Log.d("MainActivity", dimelo.deviceToken)

    dimelo.initWithApiSecret(
            secret,
            "brenco.engagement.dimelo.com",
            dimeloListener
    )

    Injection.getUserRepository.getUserInfo(FirebaseAuth.getInstance().currentUser?.uid!!,
            object :UserInfoAccessor.ResponseCallback{
                override fun onSuccess(info: SignUpInfo?) {
                    dimelo.userName = "Citylocker User | ${(info?.name)?:"Uknown"} ${(info?.lastName)?:""}"
                }

                override fun onFaillure() {
                        return
                }

            })

    val authInfo = JSONObject()
    try {
        authInfo.put("Citylocker/Numéro_telephone", FirebaseAuth.getInstance().currentUser!!.phoneNumber)
    } catch (e: JSONException) {
        Log.d("MainActivity",e.toString())
    }

    dimelo.authenticationInfo = authInfo
    return dimelo
}`

Gradle

`
repositories {

maven {
    url "https://raw.github.com/dimelo/Dimelo-Android/master"
}
maven { url 'https://maven.fabric.io/public' }

}

....
dependencies {

implementation 'com.dimelo.dimelosdk:dimelosdk:1.7.0'
//implementation 'com.google.android.gms:play-services-gcm:16.0.0'
implementation "com.google.firebase:firebase-messaging:17.3.4"

implementation 'com.google.gms:google-services:3.2.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.google.firebase:firebase-storage:16.0.4'

...

}

apply plugin: 'com.google.gms.google-services' `

from engage-digital-messaging-android.

waelba avatar waelba commented on September 7, 2024

As explained by @DrissTM here: #42 (comment), you only have to pass the first part (not brenco.engagement.dimelo.com but only brenco)

from engage-digital-messaging-android.

karimkod avatar karimkod commented on September 7, 2024

Fixed, thanks.

from engage-digital-messaging-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.