• Breaking News

    Wednesday, June 30, 2021

    Android Dev - Share your Gradle configuration with the Gradle Kotlin DSL — A guide for Android projects

    Android Dev - Share your Gradle configuration with the Gradle Kotlin DSL — A guide for Android projects


    Share your Gradle configuration with the Gradle Kotlin DSL — A guide for Android projects

    Posted: 29 Jun 2021 11:38 PM PDT

    Why simple app with Jetpack Compose is 5x times slower than without?

    Posted: 30 Jun 2021 02:16 AM PDT

    I'm just learning android-dev and have created a very simple app using Jetpack Compose. It contains only one activity with a few simple composable:

    class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { val authState = AuthState(remember { mutableStateOf(false)}, remember { mutableStateOf("Momo")}) val navController = rememberNavController() MegaTheme { NavHost(navController = navController, startDestination = "home") { composable("home") { HomeScreen(authState, navController) } composable("mega") { MegaScreen(authState, navController) } } } } } } data class AuthState(var authed: MutableState<Boolean>, var name: MutableState<String>) 

    and those screens look like that:

    @Composable fun HomeScreen(authState: AuthState, navController: NavHostController) { Surface(color = MaterialTheme.colors.background) { Column() { if (authState.authed.value) { Greeting(authState.name.value) } else { Shmeetings(authState.name.value) } AuthButton(authState) Button( onClick = { navController.navigate("mega") } ) { Text("go to Mega screen") } } } } @Composable fun Greeting(name: String) { Text(text = "Hello $name!") } @Composable fun Shmeetings(name: String) { Text(text = "Bye $name!") } @Composable fun AuthButton(authState: AuthState) { Button( onClick = { authState.authed.value = !authState.authed.value authState.name.value = UUID.randomUUID().toString() } ) { Text("toggle auth " + authState.authed.value) } } 

    But despite how simple it is, the app takes 5s to launch. My other experimental app without Compose and with much more fragments and components takes only 1.1s.

    Am I'm doing something wrong? Is it possible to speed up the launch time? Will this always be like that or after leaving beta Compose would not have this issue?

    submitted by /u/anshazor
    [link] [comments]

    Google Play developers will need to enable 2-Step Verification and meet identity requirements

    Posted: 29 Jun 2021 04:04 PM PDT

    Is there a way to have an animated launch / splash screen using SVGs

    Posted: 30 Jun 2021 04:18 AM PDT

    My designer is suggesting a launch screen that consists of 4 SVGs. I believe the intention is to have the splash screen first show one, then the next and so on. I believe this may be something that is not possible to do before the app is initialized, but I would like to ask advice here. Does anyone have any advice to offer on this. Thank you

    submitted by /u/dotnetmaui
    [link] [comments]

    Signing a previously signed application with a new keystore file?

    Posted: 30 Jun 2021 08:55 AM PDT

    Context:

    • Working on a friend's React Native app
    • Had some minor issues with Apple, but resolved that.
    • App was previously signed by an external developer with their own keystore (.jks) file.
    • Releases are signed by Google Play

    So:

    • Do I need to generate my own keystore (.jks) file and have my friend handle the request over with Google?
    • What happens when my friend hires a developer or another or another?
    • I guess my question is, shouldn't multiple developers be able to sign an app or am I confused?
      • The previously signing developer indicated that they would send him the keystore file.
      • In larger scale software companies, do developers just share the same keystore file?
    submitted by /u/divjbobo
    [link] [comments]

    SUGGEST A COURSE!

    Posted: 30 Jun 2021 07:24 AM PDT

    Can someone plz suggest me a good android development course I took one on udemy and its super outdated

    submitted by /u/prathammittal17
    [link] [comments]

    Why are colorControlNormal and colorButtonNormal not working with MaterialComponents?

    Posted: 30 Jun 2021 01:07 AM PDT

    Why are `colorControlNormal and colorButtonNormal` not working with MaterialComponents?

    <style name="Theme.Test" parent="Theme.MaterialComponents.Light.DarkActionBar">

    <item name="colorPrimary">#EC407A</item> <!-- I'm using this attribute to change the action bar color but is there a specific attribute to change the action bar color? -->

    <item name="colorControlNormal">#FF7043</item> <!-- This is not working and still gray color -->

    <item name="colorButtonNormal">#FFCA28</item> <!-- This takes color from the colorPrimary attribute why? -->

    <item name="colorControlActivated">#29B6F6</item>

    <item name="android:statusBarColor">#66BB6A</item><item

    name="android:navigationBarColor">#AB47BC</item></style>

    I don't face any problem with AppCompat but I want to move to MaterialComponents

    submitted by /u/DismalCall5534
    [link] [comments]

    Help needed in integrating tflite models.

    Posted: 30 Jun 2021 01:02 AM PDT

    Hi , I am developing an android application with Kotlin where I am integrating four different tflite models. Till this time, I have integrated two of them and on running the application with both these models, I am getting the same error, it being as 'The size of byte buffer and the shape do not match.' I have searched for this error on the internet multiple times and tried many solutions but all in vain. If anyone is willing to help me with this, I would be grateful :)

    submitted by /u/jayesh-srivastava
    [link] [comments]

    Kotlin Features Survey Edition #2

    Posted: 29 Jun 2021 02:26 PM PDT

    Whatsapp image picker replica on Github

    Posted: 29 Jun 2021 08:28 AM PDT

    Am I being too paranoid about the whole separate personal and developer account thing?

    Posted: 29 Jun 2021 12:21 PM PDT

    Disclaimer this is a throwaway account.

    So I've been reading about the whole separating personal and developer account, the reason, etc. But it still worries me, and honestly it's giving me anxiety about the safety of my personal account.

    For some background, I'm a mobile developer (I do both Android and iOS), my personal account is not a developer account and I always use company account (my company account have limited access for developer, so not owner or admin) for accessing the Google Play Console. By company account, I mean my company uses Google Suite.

    But it still worries me, that after I move out to another company, and for some reason Google decide to nuke my old company account (I mean the main one), that my old company account (employee/developer account) would be affected and it would also affect my personal account. The reason I'm worried is because currently,

    • I did have to use my personal mobile phone number to verify/2FA my company email account, but I've remove my number since, and replace it with Authenticator app.
    • I use both personal and company account in my mobile phone and my laptop/PC browser (though on the browser I use separate container tab). Especially during WFH like right now.

    So am I being too paranoid and overthinking this stuff?

    submitted by /u/paleguemopecah
    [link] [comments]

    Suggestion to handle translations

    Posted: 29 Jun 2021 09:43 AM PDT

    Hi all,

    How do you manage translations in your team, so that it's convenient for the project manager, translators and devs to add new languages and make sure translations stay up to date ?

    Do you use a particular collaborative tool ? Does it play nice with Android ?

    Thanks a lot for your advice.

    submitted by /u/thismustbetaken
    [link] [comments]

    Threejs site won't work on android chrome?

    Posted: 29 Jun 2021 08:08 PM PDT

    I am trying to display a simple GLTF 3d model in my website. It works on desktop Mac and windows as well as on iOS in safari and Firefox. But it does not work on Android's chrome?

    Following is my code sample. It is in ReactJS

    import React from 'react'import { useCallback } from 'react';import * as THREE from "three";import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader"; const MyCanvas = ({source}) => { const canvasRef = useCallback((node) => { if(node !== null){ const scene = new THREE.Scene(); const gltfLoader = new GLTFLoader(); gltfLoader.load( source, (gltf) => { console.log("success") // gltf.scene.scale.set(0.5, 0.5, 0.5); scene.add(gltf.scene); }, () => { console.log("progress"); }, () => { console.log("error"); } ); const floor = new THREE.Mesh( new THREE.PlaneBufferGeometry(10, 10), new THREE.MeshStandardMaterial({ color: "#444444", metalness: 0, roughness: 0.5, }) ); floor.receiveShadow = true; floor.rotation.x = -Math.PI * 0.5; scene.add(floor); /** * Lights */ const ambientLight = new THREE.AmbientLight(0xffffff, 0.8); scene.add(ambientLight); const directionalLight = new THREE.DirectionalLight(0xffffff, 0.6); directionalLight.castShadow = true; directionalLight.shadow.mapSize.set(1024, 1024); directionalLight.shadow.camera.far = 15; directionalLight.shadow.camera.left = -7; directionalLight.shadow.camera.top = 7; directionalLight.shadow.camera.right = 7; directionalLight.shadow.camera.bottom = -7; directionalLight.position.set(5, 5, 5); scene.add(directionalLight); const sizes = { width: window.innerWidth - 20, height: 200, }; const camera = new THREE.PerspectiveCamera( 75, sizes.width / sizes.height, 0.1, 100 ); camera.position.set(2, 2, 2); scene.add(camera); // Controls const controls = new OrbitControls(camera, node); controls.target.set(0, 0.75, 0); controls.enableDamping = true; const renderer = new THREE.WebGLRenderer({ canvas: node, }); renderer.shadowMap.enabled = true; renderer.shadowMap.type = THREE.PCFSoftShadowMap; renderer.setSize(sizes.width, sizes.height); renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); // renderer.render(scene, camera); const tick = () => { // Update controls controls.update(); // Render renderer.render(scene, camera); // Call tick again on the next frame window.requestAnimationFrame(tick); }; tick(); } },[]); return ( <canvas ref={canvasRef} className="webgl"></canvas> )} export default MyCanvas

    For full sample you can refer my GitHub repo https://github.com/PritishSawant/MyFirstAttemptThreejsDisplay3dmodelsGltf

    submitted by /u/BraveEvidence
    [link] [comments]

    Beginning to work on Android game/app that grabs wearable data from Samsung health and gamifies metrics. As a new developer who just downloaded the Android dev kit from Google, what is a good place to learn on making my app? Solid documentation?

    Posted: 29 Jun 2021 10:33 AM PDT

    Continue Kotlin or start React Native?

    Posted: 29 Jun 2021 02:28 PM PDT

    Hello everyone! I have a hard time deciding what to do: continue learning Kotlin or switch to React Native. So basically I started learning kotlin few months ago but didnt take it too seriously. Now I can build my own mini projects and I would like to start freelancing so I can monetize my skill. But here comes the problem. Almost everyone who needs an app wants cross platform so they need someone who uses react native. The only kotlin jobs I found are long term jobs and for experts and they do not fit me well. What I search is a way to make some money as a beginner/intermediate. So here comes the question : should I continue learning Kotlin or start React Native? And also, would it be difficult to make the change?

    submitted by /u/casiann10
    [link] [comments]

    No comments:

    Post a Comment