Codota Logo
IMDemoApplication.getApplicationContext
Code IndexAdd Codota to your IDE (free)

How to use
getApplicationContext
method
in
io.gobelieve.im.demo.IMDemoApplication

Best Java code snippets using io.gobelieve.im.demo.IMDemoApplication.getApplicationContext (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: GoBelieveIO/im_android

  @Override
  public void onCreate() {
    super.onCreate();

    IMService mIMService = IMService.getInstance();
    //app可以单独部署服务器,给予第三方应用更多的灵活性
    mIMService.setHost("imnode2.gobelieve.io");
    IMHttpAPI.setAPIURL("http://api.gobelieve.io");

    String androidID = Settings.Secure.getString(this.getContentResolver(),
        Settings.Secure.ANDROID_ID);

    //设置设备唯一标识,用于多点登录时设备校验
    mIMService.setDeviceID(androidID);

    //监听网路状态变更
    IMService.getInstance().registerConnectivityChangeReceiver(getApplicationContext());
  }
}
origin: GoBelieveIO/im_android

@Override
public void onCreate() {
  super.onCreate();
  sApplication = this;
  IMService mIMService = IMService.getInstance();
  //app可以单独部署服务器,给予第三方应用更多的灵活性
  mIMService.setHost("imnode2.gobelieve.io");
  IMHttpAPI.setAPIURL("http://api.gobelieve.io");
  String androidID = Settings.Secure.getString(this.getContentResolver(),
      Settings.Secure.ANDROID_ID);
  //设置设备唯一标识,用于多点登录时设备校验
  mIMService.setDeviceID(androidID);
  //监听网路状态变更
  IMService.getInstance().registerConnectivityChangeReceiver(getApplicationContext());
  //可以在登录成功后,设置每个用户不同的消息存储目录
  FileCache fc = FileCache.getInstance();
  fc.setDir(this.getDir("cache", MODE_PRIVATE));
  mIMService.setPeerMessageHandler(PeerMessageHandler.getInstance());
  mIMService.setGroupMessageHandler(GroupMessageHandler.getInstance());
  //预先做dns查询
  refreshHost();
}
origin: GoBelieveIO/im_android

@Override
public void onCreate() {
  super.onCreate();
  sApplication = this;
  IMService mIMService = IMService.getInstance();
  //app可以单独部署服务器,给予第三方应用更多的灵活性
  mIMService.setHost("imnode2.gobelieve.io");
  IMHttpAPI.setAPIURL("http://api.gobelieve.io");
  String androidID = Settings.Secure.getString(this.getContentResolver(),
      Settings.Secure.ANDROID_ID);
  //设置设备唯一标识,用于多点登录时设备校验
  mIMService.setDeviceID(androidID);
  //监听网路状态变更
  IMService.getInstance().registerConnectivityChangeReceiver(getApplicationContext());
  //可以在登录成功后,设置每个用户不同的消息存储目录
  FileCache fc = FileCache.getInstance();
  fc.setDir(this.getDir("cache", MODE_PRIVATE));
  mIMService.setPeerMessageHandler(PeerMessageHandler.getInstance());
  mIMService.setGroupMessageHandler(GroupMessageHandler.getInstance());
  mIMService.setCustomerMessageHandler(CustomerMessageHandler.getInstance());
  //预先做dns查询
  refreshHost();
}
io.gobelieve.im.demoIMDemoApplicationgetApplicationContext

Popular methods of IMDemoApplication

  • getContentResolver
  • getAssets
  • getDir
  • refreshHost
  • getDeviceToken

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Collectors (java.util.stream)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now