Last active
May 27, 2017 08:07
-
-
Save akbarsha03/045efdb019409da9bb4fd5bbaed6e13f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val contact = ContactModel() | |
val isSuccess = contact.run { | |
var isSuccess = false | |
try { | |
ActiveAndroid.beginTransaction() | |
groupName = "GROUP NAME" | |
type "PRIVATE" | |
subject = "PHYSICS GROUP" | |
save() | |
isSuccess = true | |
ActiveAndroid.setTransactionSuccessful() | |
} catch (ignored: Exception) { | |
isSuccess = false | |
} finally { | |
ActiveAndroid.endTransaction() | |
} | |
isSuccess | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment