Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
im-common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈永峰
im-common
Commits
456d3cca
Commit
456d3cca
authored
Oct 31, 2021
by
yanglbme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: update readme document
parent
0b262aa9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
25 deletions
+20
-25
README.md
README.md
+20
-25
No files found.
README.md
View file @
456d3cca
...
...
@@ -31,32 +31,27 @@ Add the Maven dependency:
Here is a quick teaser of an application using IM SDK in Java:
```
java
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
// type your sdkAppId here
long
appId
=
1400554812
;
// type your adminUserId here
String
identifier
=
"test"
;
// type your applicationKey here
String
key
=
"60c6c5925f3ae52c7325ac5a8ec78e44c056d1dd84d54e12ffa39911267a2a70"
;
// create ImClient instance
IMClient
client
=
IMClient
.
getInstance
(
appId
,
identifier
,
key
);
// import account
AccountImportRequest
request
=
new
AccountImportRequest
();
request
.
setFaceUrl
(
"https://avatars.githubusercontent.com/u/43716716?s=200&v=4"
);
request
.
setIdentifier
(
"doocs"
);
request
.
setNick
(
"Doocs Community"
);
try
{
// sdk appId
long
appId
=
1400554812
;
// admin userId
String
identifier
=
"test"
;
// application key
String
key
=
"60c6c5925f3ae52c7325ac5a8ec78e44c056d1dd84d54e12ffa39911267a2a70"
;
// create ImClient instance
IMClient
client
=
IMClient
.
getInstance
(
appId
,
identifier
,
key
);
// import account
AccountImportRequest
request
=
new
AccountImportRequest
(
"doocs"
);
request
.
setFaceUrl
(
"https://avatars.githubusercontent.com/u/43716716?s=200&v=4"
);
request
.
setNick
(
"Doocs Community"
);
try
{
AccountImportResult
result
=
client
.
account
.
accountImport
(
request
);
System
.
out
.
println
(
result
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
// handle result
}
catch
(
IOException
e
)
{
// handle exception
}
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment