Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block ThrowJojo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ThrowJojo / Share.m
Created Apr 23, 2018
Sharing on LINE.
View Share.m
- (void) shareOnLine: (NSString*) text {
NSString *encodedText = [text stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"line://msg/text/%@", encodedText];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
// Do something on completion
ThrowJojo / ExampleFragment.kt
Created Apr 13, 2018
Example of RecyclerView + onScrollListener
View ExampleFragment.kt
class ExampleFragment : Fragment() {
var loading = false
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_example, container, false)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
View component.js
ThrowJojo / component.js
Created Apr 6, 2018
Go back once again.
View component.js
View component.js
ThrowJojo / Service.kt
Created Apr 2, 2018
findViewById Kotlin
View Service.kt
val textView = overlay?.findViewById<TextView>(
ThrowJojo / Service.kt
Created Apr 2, 2018
deprecated findViewById
View Service.kt
val textView = overlay?.findViewById( as TextView
ThrowJojo / MainActivity.kt
Created Mar 23, 2018
Example MainActivity
View MainActivity.kt
package testing.jobdispatcher
import android.os.Bundle
import com.firebase.jobdispatcher.FirebaseJobDispatcher
import com.firebase.jobdispatcher.GooglePlayDriver
import com.firebase.jobdispatcher.Lifetime
import com.firebase.jobdispatcher.Trigger
class MainActivity : AppCompatActivity() {
ThrowJojo / AndroidManifest.xml
Created Mar 23, 2018
Example manifest file
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
View TaskService.kt
package testing.jobdispatcher
import android.util.Log
import com.firebase.jobdispatcher.JobParameters
import com.firebase.jobdispatcher.JobService
class TaskService : JobService() {
override fun onStartJob(job: JobParameters?): Boolean {
Log.e(, "START JOB")
You can’t perform that action at this time.