Changeset 5611


Ignore:
Timestamp:
Jun 30, 2017 9:24:50 AM (7 years ago)
Author:
nanang
Message:

Misc (re #1994): Updated Android pjsua2 sample app:

  • print call statistics when call is disconnected
  • add template for writing log to file
  • change STUN setting, now it is disabled by default
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/java/android/app/src/main/java/org/pjsip/pjsua2/app/MyApp.java

    r5531 r5611  
    6767                    pjsip_inv_state.PJSIP_INV_STATE_DISCONNECTED) 
    6868                { 
     69                    MyApp.ep.utilLogWrite(3, "MyCall", this.dump(true, "")); 
    6970                    this.delete(); 
    7071                } 
     
    353354                         pj_log_decoration.PJ_LOG_HAS_NEWLINE.swigValue())); 
    354355 
     356        /* Write log to file (just uncomment whenever needed) */ 
     357        //String log_path = android.os.Environment.getExternalStorageDirectory().toString(); 
     358        //log_cfg.setFilename(log_path + "/pjsip.log"); 
     359 
    355360        /* Set ua config. */ 
    356361        UaConfig ua_cfg = epConfig.getUaConfig(); 
    357362        ua_cfg.setUserAgent("Pjsua2 Android " + ep.libVersion().getFull()); 
    358         StringVector stun_servers = new StringVector(); 
    359         stun_servers.add("stun.pjsip.org"); 
    360         ua_cfg.setStunServer(stun_servers); 
     363 
     364        /* STUN server. */ 
     365        //StringVector stun_servers = new StringVector(); 
     366        //stun_servers.add("stun.pjsip.org"); 
     367        //ua_cfg.setStunServer(stun_servers); 
     368 
     369        /* No worker thread */ 
    361370        if (own_worker_thread) { 
    362371            ua_cfg.setThreadCnt(0); 
Note: See TracChangeset for help on using the changeset viewer.