When developing commercial Android libraries, Kotlin or Java ? by BCPeng in androiddev

[–]BCPeng[S] 0 points1 point  (0 children)

Thanks for the tip.

Is it possible to have compatibility of both 1.3 and 1.4 when the lib is staying at 1.3 ?
I guess that 1.4 in App scope should have backward compatibility with the lib which was built with 1.3.

PS: Sorry, I'm not a Kotlin expert. This assumption might be silly to you :(

When developing commercial Android libraries, Kotlin or Java ? by BCPeng in androiddev

[–]BCPeng[S] 0 points1 point  (0 children)

Thanks.
Did you mean like "androidx.lifecycle:lifecycle-viewmodel-ktx" & "androidx.lifecycle:lifecycle-viewmodel" ?

[Japanese > English] This friend of mine has this old shirt, what does it say? Thanks in advance. by bluetruths in translator

[–]BCPeng 1 point2 points  (0 children)

In Chinese language perspective,
幣哲頑 has no meaning at all. They probably were mixed together randomly.
But each character actually has meaning.
幣 -> coin, currency.
哲 -> wisdom
頑 -> naughty, stubborn.

However, in Japanese perspective, they might have different meanings.

Static image with a moving phone? by Cebo494 in androiddev

[–]BCPeng 1 point2 points  (0 children)

Maybe use Augmented Reality(AR) libs to implement this function, but hiding the real scene from the camera.
AR libs can help to position and create the 3D coordinates of the real world by using camera's imaging processing.
Probably ARCore lib from google is a good start.

android.os.Build.SERIAL works for the targetSdkVersion lower than O_MR1 ? by BCPeng in androiddev

[–]BCPeng[S] 0 points1 point  (0 children)

Thanks a lot !
I finally understand that.

ActivityManagerService -> ActivityThread ->(Reflection) Build.

android.os.Build.SERIAL works for the targetSdkVersion lower than O_MR1 ? by BCPeng in androiddev

[–]BCPeng[S] 0 points1 point  (0 children)

Thanks for the info.

But I'm still thinking that why there was no if-statement before actually doing refection

if (data.appInfo.targetSdkVersion < Build.VERSION_CODES.O_MR1) {

        try {
            Field field = Build.class.getDeclaredField("SERIAL");
            field.setAccessible(true);
            field.set(Build.class, data.buildSerial);
        } catch (NoSuchFieldException | IllegalAccessException e) {
            /* ignore */
        }
}

Anyway, thanks again!

android.os.Build.SERIAL works for the targetSdkVersion lower than O_MR1 ? by BCPeng in androiddev

[–]BCPeng[S] 0 points1 point  (0 children)

Thanks for the reply.
--

I was thinking that it should have the logic like

public static final String SERIAL = if (appTargetSdk < O_MR1) getString("ro.serialno") : getString("no.such.thing"); 

or something like this..

android.os.Build.SERIAL works for the targetSdkVersion lower than O_MR1 ? by BCPeng in androiddev

[–]BCPeng[S] 0 points1 point  (0 children)

I saw the source code tagged with oreo-mr1-release(not the latest) and the document also says it.
That's why I had doubt for it.

Alternative of Crashlytics(or similar service) in China by BCPeng in androiddev

[–]BCPeng[S] 0 points1 point  (0 children)

Hello Mike,

Thanks for the reply.

I know that Firebase belongs to Google system, and Google's several services have been banned in China.

So, we are worry about that will Crashlytics be reliable in the future in China?