Skip to content

Instantly share code, notes, and snippets.

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
void setup() {
int cnt = 0;
// set for STA mode
WiFi.mode(WIFI_STA);
// put your setup code here, to run once:
@s90304a123
s90304a123 / gist:f4db821eec5afe41247c
Created August 28, 2015 03:16
android直接關閉來電 必須要用sdk api level 8才可以正常使用
/**
*
* 直接關閉來電
*
* @throws NoSuchMethodException
* @throws InvocationTargetException
* @throws IllegalAccessException
* @throws ClassNotFoundException
*/
private void endCallIfBlocked( ) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ClassNotFoundException
@s90304a123
s90304a123 / GMailSender.java
Last active August 29, 2015 13:58
android app利用javax.mail.Authenticator與java.security.Provider完成google gmail寄信的功能!
package com.example.mail;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.Message;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;