• Breaking News

    Monday, November 1, 2021

    Android Dev - Weekly Who's Hiring Thread - November 01, 2021

    Android Dev - Weekly Who's Hiring Thread - November 01, 2021


    Weekly Who's Hiring Thread - November 01, 2021

    Posted: 01 Nov 2021 07:00 AM PDT

    Looking for Android developers? Heard about a cool job posting? Let people know!

    Here is a suggested posting template:

    Company: <Best Company Ever>
    Job: [<Title>](https://example.com/job)
    Location: <City, State, Country>
    Allows remote: <Yes/No>
    Visa: <Yes/No>

    Feel free to include any other information about the job.

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

    Open-source is eating the world: Ex-Firebase investor co-leads a $10m seed round for the open-source alternative

    Posted: 01 Nov 2021 12:11 AM PDT

    Appwrite is an open-source, self-hosted alternative to Firebase that provides developers with all the core APIs and services required to build any kind of modern software no matter the platform. Appwrite aims to make software development fast, simple and most importantly, enjoyable. Appwrite integrates with Web, Android iOS, Flutter and any server-side language.

    In essence, Appwrite takes care of all the things you would typically need to build from scratch, saving you the complexity and time to focus on your application.

    You can read more about the recent funding round here https://hazardlights.net/2021/10/26/our-investment-in-appwrite/

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

    PSA: Android 12 breaks setPlaybackToRemote and support for volume keys outside of apps for "Legal" reason

    Posted: 01 Nov 2021 04:20 AM PDT

    I have not seen this posted here, and since I've just lost a lot of time trying to understand what they changed it might help others.

    See https://issuetracker.google.com/issues/201546605#comment6

    Unbelievable that it's not clearly stated in the behavior change page https://developer.android.com/about/versions/12/behavior-changes-all as it's a major impact on all casting apps.

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

    Getting apk hash?

    Posted: 01 Nov 2021 01:13 AM PDT

    Hi there! I'd like to know if there is way (app / command line) to get an apk hash, for instance, I have an hash for an apk which looks like : 4.18.3-0b70a81e060163b472b445ba93a0c2ca489aa26ea02e9a2acb05f00df35093cb

    How can I generate the last part right after the app version => "0b70a81e060163b472b445ba93a0c2ca489aa26ea02e9a2acb05f00df35093cb"?

    Thanks for reading, have a nice day everyone!

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

    Does using a xml attribute that is not backward compatible will crash the app on older versions or just the effect of that attribute will be missing?

    Posted: 01 Nov 2021 03:42 AM PDT

    for example using

    android:foreground="?attr/selectableItemBackgroundBorderless" 

    this attribute for Imageview is supported from sdk 23 so on sdk 22 will this crash my app or just the ripple effect will not be there?

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

    My broadcast receiver doesnt work properly

    Posted: 01 Nov 2021 07:50 AM PDT

    Hello. I want to detect incoming calls and show a dialog on screen even app is killed. So far i detect incoming call and show a dialog. But sometimes receiver cannot detect incoming call. Or even if it detects call, it doesnt show dialog. But it is totally random. In logcat, i didnt see any errors about it. How can i understand where is my error? If you want to see my code:

    package com.example.flutterbroadcast import android.R.* import android.app.Dialog import android.app.KeyguardManager import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.graphics.drawable.Drawable import android.os.* import android.telephony.TelephonyManager import android.util.Log import android.view.View import android.view.WindowManager import android.widget.ImageView import android.widget.TextView import org.json.JSONObject import java.io.InputStream import java.net.URL import kotlin.concurrent.thread import android.os.AsyncTask var dialog: Dialog? = null //var handler: Handler = Handler(Looper.getMainLooper()) public class InterceptCall : BroadcastReceiver() { fun isDeviceLocked(context: Context): Boolean { var isLocked = false // First we check the locked state val keyguardManager = context.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager val inKeyguardRestrictedInputMode = keyguardManager.inKeyguardRestrictedInputMode() isLocked = if (inKeyguardRestrictedInputMode) { true } else { // If password is not set in the settings, the inKeyguardRestrictedInputMode() returns false, // so we need to check if screen on for this case val powerManager = context.getSystemService(Context.POWER_SERVICE) as PowerManager if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) { !powerManager.isInteractive } else { !powerManager.isScreenOn } } return isLocked } override fun onReceive(context: Context?, intent: Intent?) { var handler: Handler = Handler(Looper.getMainLooper()) if (dialog != null && intent?.extras?.get("state") == "IDLE" && dialog!!.isShowing) { dialog!!.dismiss() } if (intent?.extras?.get("state") == "RINGING") { val phoneNumber = intent.extras?.getString(TelephonyManager.EXTRA_INCOMING_NUMBER) Log.i("InterceptCall", "PHONE NUMBER : $phoneNumber") Log.i("InterceptCall", "state: ${intent.extras?.get("state")}") if (phoneNumber != null) { try { handler.postDelayed(Runnable { run { dialog = Dialog(context!!) dialog!!.setContentView(R.layout.custom_dialog) val content = dialog!!.findViewById<View>(R.id.content) as TextView val header = dialog!!.findViewById<View>(R.id.header) as TextView val useravatar: ImageView = dialog!!.findViewById<View>(R.id.user_avatar) as ImageView content.setText("Call From ?") header.setText("Incoming Call") val isLocked = isDeviceLocked(context) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { dialog!!.window!!.setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY) if (isLocked) { dialog!!.window!!.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED) } } else { dialog!!.window!!.setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT) } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { dialog!!.create() } //if phone state == 1 dialog!!.show() Log.i( "InterceptCall", "DIALOG ONRECEIVE" ) } }, 100) } catch (exception: Exception) { Log.i("InterceptCall", "ERROR : + $exception") } } } } } 

    And my androidmanifest

    <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.example.flutterbroadcast"> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.READ_CALL_LOG" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> <uses-permission android:name="android.permission.CALL_PHONE"/> <uses-permission android:name="android.permission.BIND_SCREENING_SERVICE" tools:ignore="ProtectedPermissions" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <uses-permission android:name="android.permission.SYSTEM_OVERLAY_WINDOW" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_CONTACTS"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" tools:ignore="ProtectedPermissions" /> <application android:label="flutterbroadcast" android:icon="@mipmap/ic_launcher" android:usesCleartextTraffic="true" > <activity android:name=".MainActivity" android:launchMode="singleTask" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <meta-data android:name="flutter_deeplinking_enabled" android:value="true" /> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" android:host="callhandle.com" /> <data android:scheme="app" android:host="com.example.flutterbroadcast" /> <data android:scheme="https" /> </intent-filter> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> <!-- <intent-filter>--> <!-- <action android:name="android.intent.action.VIEW" />--> <!-- <category android:name="android.intent.category.DEFAULT" />--> <!-- <category android:name="android.intent.category.BROWSABLE" />--> <!-- <data--> <!-- android:scheme="poc"--> <!-- android:host="deeplink.flutter.dev" />--> <!-- </intent-filter>--> <!-- Displays an Android View that continues showing the launch screen Drawable until Flutter paints its first frame, then this splash screen fades out. A splash screen is useful to avoid any visual gap between the end of Android's launch screen and the painting of Flutter's first frame. --> <meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data android:name="flutterEmbedding" android:value="2" /> <receiver android:name="InterceptCall" android:exported="true" android:enabled="true" > <intent-filter android:priority="999"> <action android:name="android.intent.action.PHONE_STATE"/> <action android:name="android.intent.action.BOOT_COMPLETED"/> </intent-filter> </receiver> </application> </manifest> 
    submitted by /u/Different_Sugar_8747
    [link] [comments]

    Implementation of a dynamic List in Jetpack Compose

    Posted: 31 Oct 2021 03:34 PM PDT

    Using ViewModels in custom views

    Posted: 01 Nov 2021 06:09 AM PDT

    What are the common causes for a wearable app to be considered "Incompatible" with a device?

    Posted: 01 Nov 2021 03:40 AM PDT

    To elaborate, my standalone wearable app states that none of the connected devices via PC are compatible with it. What I mean is I am attempting to download from the Store on the PC to the Watch connected to it.

    The app itself has a targetSDK of 31 and minimumSDK of 26. When I used the app for internal testing it was downloadable but when set to publishing it's on the store but not installable. This has been going on for months I initially thought the problem was the app not being accepted for the WearOS release but then again they've stated that even if it it doesn't it's still downloadable from the store from the computer or if the app is available on other platforms it will be visible for them. The device in question is on the Device Catalogue and the other devices that were used in the Internal testing were on it too. So what might be the root cause of the problem? The statement on the store page of the app is this: "This app is not available for any of your devices"

    So any ideas? The support team hasn't been helpful and I'm stuck and unable to proceed.

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

    How to decompile and recompile apk

    Posted: 01 Nov 2021 06:19 AM PDT

    I need to change a value in the Manifest, I decompiled the app using apktool but when trying apktool b app it doesen't create an apk file in the dist folder. Any solution? I also tried Android Studio, but the compiled file is 3 mb and the original apk is 90 mb, so most of the resources are removed and the app is not usable.

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

    Developing a Risk Game

    Posted: 01 Nov 2021 01:44 AM PDT

    Hi. I want to make a risk type game of my own design. what tools and programming course should I take?

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

    In this video, I show you how to use the free and open source mitmproxy for debugging and changing an Android app API requests and responses on the fly!

    Posted: 01 Nov 2021 12:25 AM PDT

    Impact of using repeatOnLifecycle/flowWithLifecycle on cold Flows

    Posted: 31 Oct 2021 01:07 PM PDT

    As version 2.4.0 of lifecycle-runtime-ktx went stable, it appears that the official recommendation is to use repeatOnLifecycle or flowWithLifecycle on every Flow collection from the UI layer (source). When those APIs were introduced, I thought that will be recommended only for long-living Flows (periodical checks of API, database observation...), since the cancellation/recollection will cause a full restart of the whole Flow chain, with all the intermediate operators, which would result in refreshing data when we don't need it. Let's say for example we have the following code in our ViewModel

    val state = flow { val result = api.call() emit(result) } ... // multiple intermediate operators .stateIn( scope = viewModelScope, started = SharingStarted.WhileSubscribed(5000L), // official recommendation initialValue = initialResult ) 

    If we collect the above Flow on the Fragment layer using repeatOnLifecycle, each time the apps go to the background for longer than 5 seconds, then we come back, even though the flow will re-emit the last value, it will also restart the whole Flow, and re-execute the API call + all the intermediate operators, and re-emit the calculated value if it's different than the last one. So using the new API resulted in more wasted CPU cycles, instead of saving them. What do you think about this? I know the impact might be small for most cases, but for others, it will cause a lot of issues, and this is totally different from what we expect from the liveData builder, and the extension asLiveData, as even if they use the same 5 seconds timeout by default, they are not restarted unless they were canceled before finishing (as stated in the docs and from their source code)

    I also published a blog post suggesting a more flexible solution that allows making upstream Flows lifecycle-aware, by having an extension function whenAtLeast(state: State) that allows stopping/restarting flows when the state goes below the required one, this allows stopping the root Flows (for example: location updates, database updated...), while keep using a normal collection on the UI layer, which would keep the last cache, and avoid any re-calculation, the post is here: https://dev.to/hichamboushaba/making-callback-flows-lifecycle-aware-2dai, let me know what you think :)

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

    What's the minimal requirement to make a native front-end and back-end?

    Posted: 31 Oct 2021 07:23 PM PDT

    Hi, I'm pretty much a beginner but I can't help to think ahead in the sense of what it would take to create a full app that connects to a backend for data retrieval and clod saving purposes. Would the most efficient/ minimal requirements to achieve this be by linking your app in android studio to a service like firebase; would this be all you need?

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

    API for peer-to-peer payment requests?

    Posted: 31 Oct 2021 03:30 PM PDT

    I'm looking for an API that allows a user to send another user a payment request through a service like Venmo or PayPal. The Venmo API is no longer supported and Braintree's API seems to only allow for transactions from users to merchants, which is not my use case (I don't want to handle money as an intermediary).

    Are there any APIs supporting requests between two users? Thanks in advance.

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

    rooting samsung galaxy s10 plus

    Posted: 01 Nov 2021 02:48 AM PDT

    Last time I called the number for checking oem unlocked it said my phone didnt have that feature. How can I root my galaxy s10 plus model gm-g975u without the oem unlock feature in developer options available? I want to root and install custom recovery

    submitted by /u/Apprehensive-Cut-711
    [link] [comments]

    Has Anyone been a victim of Google Play account being terminated

    Posted: 31 Oct 2021 02:03 PM PDT

    Hi Guys,

    Do any one knows if google terminates your account, what options are we left with?

    I have started a petition, if you would like to support as I am the victim of it.

    https://chng.it/wJbNg2PQ

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

    How's Android Studio on Macbook Air M1

    Posted: 31 Oct 2021 12:45 PM PDT

    I want to buy a personal machine and I want to make sure that it does run android studio smoothly. My budget would be perfect for MacBook Air M1 right now, I just wanted to make sure if it does run it smoothly or should I look for a used Macbook pro?

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

    FAN Placements failing Admob Limiting Ads

    Posted: 31 Oct 2021 10:57 AM PDT

    What is going on? Things work perfect for months then all goes to shit. It is clear their AI is not intelligent at all and it is not working properly. Which mobile network to use? I have been developing my app for a year and I just shit on when I am following all policies.

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

    No comments:

    Post a Comment