コード例 #1
0
ファイル: dialogs.go プロジェクト: janimo/textsecure-qml
func getPhoneNumber() string {
	n := getTextFromDialog("getPhoneNumber", "signInPage", "numberEntered")

	num, _ := libphonenumber.Parse(n, "")
	c := libphonenumber.GetRegionCodeForCountryCode(int(num.GetCountryCode()))
	s := libphonenumber.GetNationalSignificantNumber(num)
	f := formatE164(s, c)
	return f
}
コード例 #2
0
ファイル: contacts.go プロジェクト: janimo/textsecure-qml
func defaultCountry() string {
	num, _ := libphonenumber.Parse(config.Tel, "")
	return libphonenumber.GetRegionCodeForCountryCode(int(num.GetCountryCode()))
}