PC > 모바일로 알람을 보내는것중에 딱히 없는데 예전에 다른언어 개발환경에서 사용한 Pushbullet이 떠올랐습니다.
찾아보니까 깃허브가 있네요.(https://github.com/adamyeager/PushbulletSharp)
먼저 두 개의 Dll 파일이 필요로 합니다.
파일
Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
두 개를 프로젝트에 추가하세요. (UnitTestFramework찾는다고 고생했습니다.)
1 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; using PushbulletSharp; | cs |
using 추가해주시고
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | public void MsgPush(string Token,string title,string Msg) { PushbulletClient Client = new PushbulletClient(Token); try { var currentUserInformation = Client.CurrentUsersInformation(); Assert.IsNotNull(currentUserInformation); PushNoteRequest reqeust = new PushNoteRequest() { Email = currentUserInformation.Email, Title = title, Body = Msg }; var response = Client.PushNote(reqeust); } catch (Exception ex) { Assert.Fail(ex.Message); } } | cs |
이 함수를 추가합니다.
사용 방법
1 | MsgPush("키","테스트","안녕하세요."); | cs |
정말 간단합니다. 감사합니다.
'프로그래밍 > C#' 카테고리의 다른 글
[C#]크로스 스레드 작업이 잘못되었습니다.InvalidOperationException (0) | 2017.10.17 |
---|---|
[C#]윈도우 창 존재 여부 함수 (1) | 2017.10.16 |
[C#]PushBullet API를 이용하여 알림 보내기 (0) | 2017.10.15 |
[C#]프로그램 실행기준 경로 가져오기 (0) | 2017.10.14 |
[C#]CPU ID,하드 파티션 고유번호 등 얻을수있는 DLL (2) | 2017.10.13 |
[C#]프로그램 종료 #2 (0) | 2017.10.12 |
최근댓글