Skip to content

woodemi/notepad-sdk-uwp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

Usage

  • Scan notepad
  • Connect notepad
  • Sync notepen pointer

Scan notepad

NotepadScanner notepadScanner = new NotepadScanner();
notepadScanner.Found += (sender, args) => Debug.WriteLine($"OnNotepadFound {args}");

notepadScanner.StartScan()
// ...
notepadScanner.StopScan()

Connect notepad

Connect to result, received from NotepadScanner.Found

NotepadConnector notepadConnector = new NotepadConnector();
notepadConnector.ConnectionChanged += (sender, args) => Debug.WriteLine($"OnConnectionChanged {sender} {args}");

notepadConnector.Connect(result);
// ...
notepadConnector.Disconnect();

Sync notepen pointer

NotePadClient#setMode

  • NotepadMode.Common
    The device only saves NotePenPointer (with time stamp) of pressure >0 to offline handwriting
  • NotepadMode.Sync
    The device sends all NotePenPointer (without timestamp) to the connected phone /Pad

The device defaults to NotepadMode.Common (connected/unconnected), and setMode only changes after the connection

NotepadClient notepadClient;
notepadClient.SetMode(NotepadMode.Sync);

NotePadClient.SyncPointerReceived#handlePointer

When notepadmode.sync, receive NotePenPointer

notepadClient.SyncPointerReceived += OnSyncPointerReceived;
private void OnSyncPointerReceived(NotepadClient sender, List<NotePenPointer> args)
{
    foreach (var pointer in args)
        Debug.WriteLine($"OnSyncPointerReceived {pointer}");
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages