Here's some of my favorite resources to learn Kotlin, and keep learning. It's by no means a complete list. I'd love to hear what some of your favorites are!
- Huge, awesome list of more resources and projects
- Try out Kotlin right from the browser
@file:Suppress("unused", "FunctionName", "IllegalIdentifier") | |
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.content.Context | |
import android.content.Intent | |
import android.os.Bundle | |
/** | |
* The best way to launch yourself an activity. Your implementation should enable the following api: |
package me.seebrock3r.utils | |
import android.os.Build.VERSION_CODES.JELLY_BEAN_MR1 | |
import android.os.Build.VERSION_CODES.JELLY_BEAN_MR2 | |
import android.os.Build.VERSION_CODES.KITKAT | |
import android.os.Build.VERSION_CODES.LOLLIPOP | |
import android.os.Build.VERSION_CODES.LOLLIPOP_MR1 | |
import android.os.Build.VERSION_CODES.M | |
import android.os.Build.VERSION_CODES.N | |
import org.assertj.core.api.Assertions.assertThat |
import android.content.ClipData | |
import android.graphics.Paint | |
import android.os.Build | |
import android.os.Bundle | |
import android.support.v4.view.* | |
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat | |
import android.support.v4.view.accessibility.AccessibilityNodeProviderCompat | |
import android.view.* | |
/** |
// Dagger 1 example | |
@Module( | |
complete = false, | |
library = true | |
) | |
public final class ApiModule { | |
@Provides | |
@Singleton | |
Retrofit provideRetrofit(Gson gson, Application app) { | |
return new Retrofit.Builder() |
package com.example.yourapp; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.os.Build; | |
import android.security.KeyPairGeneratorSpec; | |
import android.security.keystore.KeyGenParameterSpec; | |
import android.security.keystore.KeyProperties; | |
import android.support.annotation.RequiresApi; |
Here's some of my favorite resources to learn Kotlin, and keep learning. It's by no means a complete list. I'd love to hear what some of your favorites are!
import android.os.Handler; | |
import android.os.Looper; | |
import com.google.inject.Inject; | |
import com.google.inject.Singleton; | |
import rx.Subscription; | |
import rx.functions.Action1; | |
import rx.functions.Func1; | |
import rx.internal.util.SubscriptionList; |
package com.tneciv.blueprint.widget; | |
import android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; | |
/** | |
* Created by Tneciv | |
* on 2016-08-20 01:13 . |
/* | |
* Copyright 2013 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
https://stackoverflow.com/a/18003462/348146
None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:
Determine the package name of the app, e.g.
com.example.someapp
. Skip this step if you already know the package name.
adb shell pm list packages
Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.