Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: login as android tablet client instead of Windows client #109

Closed
ha1fstack opened this issue Jan 26, 2021 · 6 comments
Closed

request: login as android tablet client instead of Windows client #109

ha1fstack opened this issue Jan 26, 2021 · 6 comments
Labels
approved Issue approved and have plan to fix or enhancement documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested

Comments

@ha1fstack
Copy link

ha1fstack commented Jan 26, 2021

Kakaotalk update which supports android tablet multi device was released today.
If node-kakao client virtually login as tablet, it should be much convenient since you can now use real PC client simultaneously.
Configurable client login argument option (whether login as tablet or Windows) would be useful.

@ha1fstack ha1fstack changed the title request: login as android tablet client instead of Windos client request: login as android tablet client instead of Windows client Jan 26, 2021
@storycraft
Copy link
Owner

I don't know how tablet device login. Connecting loco server may not have big difference if you obtain access token somehow. Customzing client config is already available but may not work if there are difference with pc. Check default configuration from src/config/client-config.ts. You can override some config value like this.

new TalkClient('name', 'deviceUUID', {
    'agent': 'android'
});

^ This doesn't work due to difference between mobile and pc.

Note: NodeKakao v4 complete rewrite is currently being actively developed. Check dev branch for more information. You may request as feature when pull request draft is available.

@storycraft storycraft added the question Further information is requested label Jan 26, 2021
storycraft added a commit that referenced this issue Feb 17, 2021
Separated xvc calculation to xvc module.
getUserAgent android support.
Added Win32XVCProvider, AndroidSubXVCProvider.
randomDeviceUUID -> randomWin32DeviceUUID in util module.
Added randomAndroidSubDeviceUUID in util module.
Removed xvcSeedList from config.
Fixed default config not being overridden.
Added android tablet login support #109
Update to rc.2
@storycraft storycraft added approved Issue approved and have plan to fix or enhancement documentation Improvements or additions to documentation good first issue Good for newcomers labels Feb 17, 2021
@storycraft
Copy link
Owner

storycraft commented Feb 17, 2021

From v4, to login as android tablet, you should change several config values.

Sample code below

import { util, xvc, AuthApiClient, TalkClient } from 'node-kakao';

const config = {
  agent: 'android',

  // Network operator (999 if unknown)
  mccmnc: '999',

  // This should be valid tablet device model or server will refuse request.
  deviceModel: 'SM-T976N',

  // PC version append build number in appVersion, android uses only version number.
  appVersion: '9.2.1',
  version: '9.2.1',

  // 0 == WIFI, 3 == Cellular
  netType: 0,

  subDevice: true
}

// Generate random device uuid.
// If you specify already registered pc uuid, you will login as pc.
const tabletUUID = util.randomAndroidSubDeviceUUID();

// Override default config,  uses AndroidSubXVCProvider for xvc calculating.
const api = await AuthApiClient.create('NAME', tabletUUID, config, xvc.AndroidSubXVCProvider);
const client = new TalkClient(config);

@storycraft storycraft pinned this issue Feb 17, 2021
@nunnu1028
Copy link

tenor

@nunnu1028
Copy link

nunnu1028 commented Feb 17, 2021

4.0.0-rc.2에서 태블릿으로 로그인을 해본 결과 로그인에 성공하였다고 나오나 대부분의 이벤트가 오지 않고 얼마 뒤에 아무런 에러도 없이 연결이 끊깁니다. 🤔

확인결과 문법상 오류로 확인

@storycraft
Copy link
Owner

해당 문제는 로그, 오류 내용과 함께 이슈를 작성해주세요

@nunnu1028
Copy link

해당 문제는 로그, 오류 내용과 함께 이슈를 작성해주세요

#149

Repository owner locked and limited conversation to collaborators Feb 18, 2021
@storycraft storycraft unpinned this issue Feb 19, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
approved Issue approved and have plan to fix or enhancement documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants