Z
Z
Zerg2019-12-17 02:02:50
Java
Zerg, 2019-12-17 02:02:50

How to get values ​​from Android context?

Hello. I am rewriting some methods from the android application to implement them purely in java. There was a question about getting data from application methods:

context.getPackageName();
context.getPackageManager().getPackageInfo(packageName, 0).versionName;
context.getPackageManager().getPackageInfo(context.getPackageName(), 64).signatures[0].

Is it possible to somehow pull them out purely as a string for substitution already in my java methods?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Developer, 2019-12-17
@bes3d

The Android app is written in Java, not Android.
Are you translating from Java to Java?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question