File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
android/src/main/java/com/freeraspreactnative/utils Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ internal object Utils {
1616 val byteArrayOutputStream = ByteArrayOutputStream ()
1717 bitmap.compress(Bitmap .CompressFormat .PNG , 10 , byteArrayOutputStream)
1818 val byteArray = byteArrayOutputStream.toByteArray()
19- return Base64 .encodeToString(byteArray, Base64 .DEFAULT )
19+ return Base64 .encodeToString(byteArray, Base64 .NO_WRAP )
2020 }
2121
2222 /* *
2323 * Retrieves human-readable application name
2424 */
25- internal fun getAppName (context : ReactContext , applicationInfo : ApplicationInfo ): String {
26- return context.packageManager.getApplicationLabel(applicationInfo ) as String
25+ internal fun getAppName (context : ReactContext , applicationInfo : ApplicationInfo ? ): String? {
26+ return applicationInfo?. let { context.packageManager.getApplicationLabel(it ) as String }
2727 }
2828
2929 /* *
You can’t perform that action at this time.
0 commit comments