• Breaking News

    [Android][timeline][#f39c12]

    Monday, November 1, 2021

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

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


    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]

    Announcing Kotlin support for protocol buffers

    Posted: 01 Nov 2021 02:12 PM PDT

    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]

    Compose for Wear OS: Navigation

    Posted: 01 Nov 2021 11:41 AM PDT

    Better tooling to build widgets - Glance abstracts RemoteViews with Compose syntax

    Posted: 01 Nov 2021 01:45 PM PDT

    Retrofit: Null value in Field is dropped on Put / Patch Request

    Posted: 01 Nov 2021 03:56 PM PDT

    Hello there,

    I read everywhere that null values in Fields simply get dropped and that they do not get send in Put / Patch requests.

    But is there actually a way to send null values?

    Thanks for your information.

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

    I want to apply for "Designed for Families" program but app have a link button to my playstore page which have +18 apps about lotto game predictions. Would that be a problem ?

    Posted: 01 Nov 2021 01:48 PM PDT

    Question in title.

    submitted by /u/unholy182000
    [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. Btw it works perfectly in emulators, this issue is only in real devices. How can i understand where is my error? If you want to see my code:
    (I am giving permissions to my app)

    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]

    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]

    High school android development.

    Posted: 01 Nov 2021 09:18 AM PDT

    Hi, I'm currently trying to get the proper language for my highschool students for cross system library, but with focus on Android, so more like mobile development than desktop. There are tons of possibilities... My students starts object oriented programming two months ago, that's why I have a little concerns about best language choise.

    My first choose was to to get into Kivy, but later I found out about Flutter/Dart. There are also a Apache Cordova, and of course React (which looks like more complicated because You have to know html/CSS/JS).

    What lib/language You can recommend for totally beginners?

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

    App developers and publish help

    Posted: 01 Nov 2021 08:40 AM PDT

    So I just finished developing a chat app so what is next step I'm confused at this point Do I need to rent a server Do I need lawyers to right down my app privacy and policy Please I'm confused.com I done few research but nothing The app is nearly finished thank you.

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

    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]

    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]

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel