Textview email;


email.setPaintFlags(email.getPaintFlags() or Paint.UNDERLINE_TEXT_FLAG)


email.setOnClickListener {
val it = Intent(Intent.ACTION_SEND)
val tos = arrayOf("email@gmail.com")

it.putExtra(Intent.EXTRA_SUBJECT, "subject")
it.putExtra(Intent.EXTRA_EMAIL, tos)
it.type = "message/rfc822"

startActivity(Intent.createChooser(it, ""))
}

I was also facing the same issueremote: Repository not found fatal: repository 'https://github.com/MyRepo/project.git/' not found

I uninstalled the git credentials manager and reinstalled it and then I could easily pull and push to the repository. Here are the commands

 

$ git credential-manager uninstall

$ git credential-manager install

let image = UIImage(named: "image_name")?.withRenderingMode(.alwaysTemplate)

button.setImage(image, for: .normal)

button.tintColor = UIColor.red


'IOS' 카테고리의 다른 글

[ios]firebase auth token mismatch error(release)  (0) 2019.08.05

이전에 GCM은 상당히 복잡했지만 지금은 너무나 간편해졌다.

 

- 2019.8.21 최신 업데이트


gradle(app) 추가

implementation 'com.google.firebase:firebase-messaging:19.0.1'

 

Menifest 추가

<service
android:name=".java.MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
 

Service Class 생성

 

class MyFirebaseMessagingService : FirebaseMessagingService() {

override fun onNewToken(token: String?) {
// Get updated InstanceID token.
val refreshedToken = FirebaseInstanceId.getInstance().token
Log.d(TAG, "Refreshed token: " + refreshedToken!!)

//관리하는 DB Token 추가
}


override fun onMessageReceived(remoteMessage: RemoteMessage?) {
Log.d(TAG, "From: " + remoteMessage!!.from!!)
}

companion object {
private val TAG = "MyFirebaseMsgService"
}
}

 

     끝!


'Android > Tech' 카테고리의 다른 글

Android에서 S3 이미지 업로드 (Image upload Android to S3)  (0) 2018.06.26

Android -> S3



get Android key

https://console.aws.amazon.com/cognito/home 


Manage identity -> insert identity pool name -> enable access to unauthorized identities -> get aws credentials


Policy setting

http://awspolicygen.s3.amazonaws.com/policygen.html


select type: S3 bucket policy


Principal: *


Actions: get object


Arn:aws:s3:::(bucketname)/*


Statement 복사 S3 setting -> 붙여넣기





Android pro guard


# Class names are needed in reflection

-keepnames class com.amazonaws.**

-keepnames class com.amazon.**

# Request handlers defined in request.handlers

-keep class com.amazonaws.services.**.*Handler

# The following are referenced but aren't required to run

-dontwarn com.fasterxml.jackson.**

-dontwarn org.apache.commons.logging.**

# Android 6.0 release removes support for the Apache HTTP client

-dontwarn org.apache.http.**

# The SDK has several references of Apache HTTP client

-dontwarn com.amazonaws.http.**

-dontwarn com.amazonaws.metrics.**


'Android > Tech' 카테고리의 다른 글

Android FCM 10분만에 끝내기  (0) 2018.06.27

로그아웃 버튼 클릭 시 LoginManager.getInstance().logOut();


이전 Fragment에서 전환할때 fragmentTransaction.addToBackStack(null) 추가

해석을 하면 null 아닌 파라미터가 null이다…. 뭔말이니? 찾아보니 파라미터 값이 null 일수도 있기 때문에 파라미터 뒤에 ? 붙여줘야한다



'Android > Tip' 카테고리의 다른 글

[Android]textview 밑줄, 이메일 보내기  (0) 2019.07.28
[Android]facebook logout  (1) 2018.06.25
[Android]Fragment 뒤로가기 시 이전 Fragment 로  (0) 2018.06.25

+ Recent posts