GithubHelp home page GithubHelp logo

local vs internet ws server about jawampa HOT 5 CLOSED

dmtrlbdv1 avatar dmtrlbdv1 commented on June 24, 2024
local vs internet ws server

from jawampa.

Comments (5)

dmtrlbdv1 avatar dmtrlbdv1 commented on June 24, 2024

I am sorry - I forget to add... I try to connect from the android (device and emulator), if it important

from jawampa.

Matthias247 avatar Matthias247 commented on June 24, 2024

Your code is correct. Does your android app have the internet permission?

from jawampa.

dmtrlbdv1 avatar dmtrlbdv1 commented on June 24, 2024

Yes, internet permission is set ( as I said my localhost is available form my app ). May be I do not set some dependencies in gradle ? ( maven repository have set in another gradle file ) Or may be I need make some steps to connect to wss server ? I tried withSslContext(SslContext.newClientContext(InsecureTrustManagerFactory.INSTANCE)) - but nothing changed.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '21.1.2'

    defaultConfig {
        applicationId "...."
        minSdkVersion 10
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    android {
        packagingOptions {
            exclude 'META-INF/io.netty.versions.properties'
            exclude 'META-INF/INDEX.LIST'
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/NOTICE'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.0'
    compile 'com.android.support:support-v4:22.1.0'
    compile 'ws.wamp.jawampa:jawampa:0.2.0'
}

from jawampa.

Matthias247 avatar Matthias247 commented on June 24, 2024

Sorry, can't help you regarding Android configuration as I have no experience with that. In #21 there was a discussion about the correct settings for Proguard, maybe you have a problem with that. @jrogers also build an example for android, maybe this helps: https://github.com/jrogers/AndroidWampExample

If you want to debug why the connection fails you could put breakpoints in the associated Netty Channel Handlers for the connection (e.g. in WampClientWebsocketHandler, WebSocketClientProtocolHandler, WebSocketClientProtocolHandshakeHandler, WebSocketClientHandshaker08). Sorry - currently don't have time to investigate that deeper myself.

from jawampa.

dmtrlbdv1 avatar dmtrlbdv1 commented on June 24, 2024

Thank you. I found nexus 7 (5.0) and tried to start my app on it - all working! I do not understand why samsung galaxy s not allow me to connect. I hope it is just certificates issue or something and my server will be working without problems.

from jawampa.

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.