• Breaking News

    Wednesday, December 8, 2021

    Android Dev - Weekly Questions Thread - December 07, 2021

    Android Dev - Weekly Questions Thread - December 07, 2021


    Weekly Questions Thread - December 07, 2021

    Posted: 07 Dec 2021 06:00 AM PST

    This thread is for simple questions that don't warrant their own thread (although we suggest checking the sidebar, the wiki, our Discord, or Stack Overflow before posting). Examples of questions:

    • How do I pass data between my Activities?
    • Does anyone have a link to the source for the AOSP messaging app?
    • Is it possible to programmatically change the color of the status bar without targeting API 21?

    Large code snippets don't read well on reddit and take up a lot of space, so please don't paste them in your comments. Consider linking Gists instead.

    Have a question about the subreddit or otherwise for /r/androiddev mods? We welcome your mod mail!

    Also, please don't link to Play Store pages or ask for feedback on this thread. Save those for the App Feedback threads we host on Saturdays.

    Looking for all the Questions threads? Want an easy way to locate this week's thread? Click this link!

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

    If you're collecting analytics data using Firebase, you should connect it to BigQuery right now!

    Posted: 08 Dec 2021 12:22 AM PST

    I wish I had known this before - Firebase does not allow exporting detailed analytics data for your projects which it has been collecting for years. The export option that you see on the events page exports a csv only with event-names and event-counts which does not help in the least to study the data.

    However, if you connect your project to BigQuery, the complete analytics data is exported to it on a daily basis. From there you can export the data in JSON, CSV or AVRO format and run your own scripts and queries on it as you want.

    Note here that the data from Firebase is only exported from the date you connect it to BigQuery. No historical data is exported. So you should connect your Firebase project to BigQuery right now so that the data keeps exporting and you can then download and own your data and process it.

    Edit - You can use this guide to connect https://firebase.google.com/docs/projects/bigquery-export

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

    Reverse engineering Android apps

    Posted: 07 Dec 2021 04:58 PM PST

    I'm wondering if there are any communities around reverse engineering Android apps? I've noticed there seems to be some that are more security focused but I'm primarily interested in ones that are more focused on reverse engineering for performance analysis/benchmarking.

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

    App rejected due to lack of information in app access section

    Posted: 08 Dec 2021 02:10 AM PST

    The app have OTP based authentication. I have clearly mentioned it in app access section. But Google Play keep rejecting for same reason.

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

    How to securely use Google Maps API Key in Android, iOS, or Flutter Project

    Posted: 08 Dec 2021 01:23 AM PST

    Are you using Google Maps Api Key securely ? 🤔

    If you're not sure or just want to learn more about the topic, be sure to give our latest blog a read 👀

    Damian Kasperski expands on this topic with his professional knowledge, explaining how to keep API keys secure in Android, IOS and Flutter projects whilst being able to use them in local development as well as on CI 🤯

    📷 Link to blog (8min read)

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

    Nullable !! practice

    Posted: 07 Dec 2021 02:59 PM PST

    If a piece of code expect a nullable to be none null, would you prefer to use !! to enforce invariant and let it crash or handle it safely?

    The thing is this. I want to do safety check but

    1. it could cause bugs to creep through silently.
    2. If there is crash, it is very noticeable and people will jump on it to fix it.
    3. Firebase can catch crash and we can easily see what caused it. (most of time)
    4. By using safety check, the app state could be corrupted, and it might crash later or cause unexpected behaviours. Which sometimes is impossible to fix without ability to reproduce. Often times, you cannot even reproduce these issues.
    5. The assumption here is if we get to this call, the data must be valid. If it is not valid, something else is wrong. By putting safety check I will never notice any issue and never fix it.

    Update: one strong argument against using !! Is if server return null or bad data. Instead of crashing entire app for every user in extreme cases. It's better to have a semi usable app that could make you some revenue instead of 100% loss of revenue.

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

    Styles and themes in xml are hard to work with

    Posted: 07 Dec 2021 04:40 AM PST

    Hi everyone, for context i come from a web background, and i find styles and theming overly complicated in Android. They're hard to work with compared to css, which i know has its own challenges as well. to be clear i dont mean working with views like constraintview, ... etc and their attributes (i.e width, height, alignment), in fact this part is clear and works pretty much like css, but rather the structure of styles and themes in the res directory that makes styling these views reusable and organized. but then again i don't haven't much experience on android so it might just need getting used to. and what makes matters worse, is that there aren't many resources explaining this stuff. so what do you think?

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

    Switch button on android wear too big

    Posted: 08 Dec 2021 02:07 AM PST

    I am creating app that should work with casual Android phones and Android wear too. Switch buttons look amazing on casual Android phones. However, switch buttons are too large on wear devices. What can I do to make switch buttons smaller on wear?

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

    When does the view model call onCleared() when it’s connected with two fragments?

    Posted: 07 Dec 2021 03:44 PM PST

    Imagine I have a view model and I'm using it for two or more fragments. So does the viewModel call onCleared() when all of the fragments are destroyed? Or when a single fragment is destroyed?

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

    WebView not found? Time to crash everything!

    Posted: 07 Dec 2021 10:33 AM PST

    WebView's distribution has been decoupled from the OS which leads to issues such as:

    "Failed to load WebView provider: No WebView installed"

    Have you ever come up against this, and if so, how do you handle it?

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

    Android 12 and Notification Trampolines

    Posted: 07 Dec 2021 08:15 AM PST

    As a new Android developer, I never realized I was using an anti-pattern with a broadcast receiver to start a third-party app/activity and perform some internal operations when a user selects an action button in my app's notification. I thought this was the preferred method to do this.

    Fast forward to Android 12 and this is forbidden per https://developer.android.com/about/versions/12/behavior-changes-12#notification-trampolines.

    If I was starting my app's activity from a notification, I can easily address this, but I'm uncertain of the best way to handle this when starting a third-party app/activity.

    In perusing Stack Overflow, the accepted answer at https://stackoverflow.com/questions/69238026/android-12-notification-trampoline-restrictions is to use a "transparent" activity, which just seems like another anti-pattern to me (and someone else mentioned this in the comments there).

    How is everyone else handling this in the third-party app/activity case? What am I missing?

    I'd love to get my targetSdkVersion up without investing in yet another anti-pattern.

    Cheers.

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

    What are some cheap aso tools for app developers?

    Posted: 07 Dec 2021 10:43 AM PST

    please advise me some affordable aso tools that give good results

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

    Having issues connecting to an API to display search results to the user in an app.

    Posted: 07 Dec 2021 10:12 AM PST

    I am trying to create an app that will link to this api "https://api.covid19tracker.ca/reports?after=" which store an array "data" with objects in it for various information in int. However, I am currently getting a "org.json.JSONException: Value unsuccessful of type java.lang.String cannot be converted to JSONArray" just trying to display the results into a RecyclerView. I will be using an event click listener to link the search to a button but I just want the API to work and display everything first.

    I appreciate any help that anybody can offer.

    MainActivity.java

    public class MainActivity extends AppCompatActivity {

    public static final int CONNECTION_TIMEOUT = 10000;
    public static final int READ_TIMEOUT = 15000;
    private RecyclerView mCovid;
    private AdapterCovid mAdapter;
    u/Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    //Make call to AsyncTask
    new AsyncFetch().execute();
    }

    private class AsyncFetch extends AsyncTask<String, String, String> {
    ProgressDialog pdLoading = new ProgressDialog(MainActivity.this);
    HttpURLConnection conn;
    URL url = null;
    u/Override
    protected void onPreExecute() {
    super.onPreExecute();
    //this method will be running on UI thread
    pdLoading.setMessage("\tLoading...");
    pdLoading.setCancelable(false);
    pdLoading.show();
    }

    u/Override
    protected String doInBackground(String... params) {
    try {

    // Enter URL address where your json file resides
    // Even you can make call to php file which returns json data
    url = new URL("https://api.covid19tracker.ca/reports?after=");
    } catch (MalformedURLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    return e.toString();
    }
    try {

    // Setup HttpURLConnection class to send and receive data from php and mysql
    conn = (HttpURLConnection) url.openConnection();
    conn.setReadTimeout(READ_TIMEOUT);
    conn.setConnectTimeout(CONNECTION_TIMEOUT);
    conn.setRequestMethod("GET");
    // setDoOutput to true as we recieve data from json file
    conn.setDoOutput(true);
    } catch (IOException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    return e1.toString();
    }

    try {

    int response_code = conn.getResponseCode();
    // Check if successful connection made
    if (response_code == HttpURLConnection.HTTP_OK) {

    // Read data sent from server
    InputStream input = conn.getInputStream();
    BufferedReader reader = new BufferedReader(new InputStreamReader(input));
    StringBuilder result = new StringBuilder();
    String line;
    while ((line = reader.readLine()) != null) {
    result.append(line);
    }

    // Pass data to onPostExecute method
    return (result.toString());
    } else {

    return ("unsuccessful");
    }

    } catch (IOException e) {
    e.printStackTrace();
    return e.toString();
    } finally {
    conn.disconnect();
    }

    }

    u/Override
    protected void onPostExecute(String result) {

    //this method will be running on UI thread
    pdLoading.dismiss();
    List<DataCovid> data = new ArrayList<>();
    pdLoading.dismiss();
    try {

    JSONObject obj = new JSONObject(result);
    JSONArray jArray = obj.getJSONArray("data");
    // Extract data from json and store into ArrayList as class objects
    for (int i = 0; i < jArray.length(); i++) {
    JSONObject json_data = jArray.getJSONObject(i);
    DataCovid covidData = new DataCovid();
    covidData.date = json_data.getString("date");
    covidData.change_cases = json_data.getInt("change_cases");
    covidData.change_fatalities = json_data.getInt("change_fatalities");
    covidData.change_tests = json_data.getInt("change_tests");
    covidData.change_hospitalizations = json_data.getInt("change_hospitalizations");
    covidData.change_criticals = json_data.getInt("change_criticals");
    covidData.change_recoveries = json_data.getInt("change_recoveries");
    covidData.change_vaccinations = json_data.getInt("change_vaccinations");
    covidData.change_vaccinated = json_data.getInt("change_vaccinated");
    covidData.change_boosters_1 = json_data.getInt("change_boosters_1");
    covidData.change_vaccines_distributed = json_data.getInt("change_vaccines_distributed");
    covidData.total_cases = json_data.getInt("total_cases");
    covidData.total_fatalities = json_data.getInt("total_fatalities");
    covidData.total_tests = json_data.getInt("total_tests");
    covidData.total_hospitalizations = json_data.getInt("total_hospitalizations");
    covidData.total_criticals = json_data.getInt("total_criticals");
    covidData.total_recoveries = json_data.getInt("total_recoveries");
    covidData.total_vaccinations = json_data.getInt("total_vaccinations");
    covidData.total_vaccinated = json_data.getInt("total_vaccinated");
    covidData.total_boosters_1 = json_data.getInt("total_boosters_1");
    covidData.total_vaccines_distributed = json_data.getInt("total_vaccines_distributed");
    data.add(covidData);
    }

    // Setup and Handover data to recyclerview
    mCovid = (RecyclerView) findViewById(R.id.recycler_view);
    mAdapter = new AdapterCovid(MainActivity.this, data);
    mCovid.setAdapter(mAdapter);
    mCovid.setLayoutManager(new LinearLayoutManager(MainActivity.this));
    } catch (JSONException e) {
    Toast.makeText(MainActivity.this, e.toString(), Toast.LENGTH_LONG).show();
    }

    }

    }
    }

    DataCovid.java
    public class DataCovid {
    public String date;
    public int change_cases;
    public int change_fatalities;
    public int change_tests;
    public int change_hospitalizations;
    public int change_criticals;
    public int change_recoveries;
    public int change_vaccinations;
    public int change_vaccinated;
    public int change_boosters_1;
    public int change_vaccines_distributed;
    public int total_cases;
    public int total_fatalities;
    public int total_tests;
    public int total_hospitalizations;
    public int total_criticals;
    public int total_recoveries;
    public int total_vaccinations;
    public int total_vaccinated;
    public int total_boosters_1;
    public int total_vaccines_distributed;
    }

    AdapterCovid.java

    public class AdapterCovid extends RecyclerView.Adapter<RecyclerView.ViewHolder> {

    private Context context;
    private LayoutInflater inflater;
    List<DataCovid> data = Collections.emptyList();
    DataCovid current;
    int currentPos = 0;
    public AdapterCovid(Context context, List<DataCovid> data) {
    this.context=context;
    inflater = LayoutInflater.from(context);
    this.data=data;
    }
    // Inflate the layout when viewholder created
    u/Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view=inflater.inflate(R.layout.container_covid, parent,false);
    MyHolder holder=new MyHolder(view);
    return holder;
    }

    // Bind data
    u/Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    // Get current position of item in recyclerview to bind data and assign values from list
    MyHolder myHolder= (MyHolder) holder;
    DataCovid current=data.get(position);
    myHolder.date.setText(current.date);
    myHolder.change_cases.setText("change_cases: " + current.change_cases);
    myHolder.change_fatalities.setText("change_fatalities: " + current.change_fatalities);
    myHolder.change_tests.setText("change_tests: " + current.change_tests);
    myHolder.change_hospitalizations.setText("change_hospitalizations: " + current.change_hospitalizations);
    myHolder.change_criticals.setText("change_criticals: " + current.change_criticals);
    myHolder.change_recoveries.setText("change_cases: " + current.change_recoveries);
    myHolder.change_vaccinations.setText("change_cases: " + current.change_vaccinations);
    myHolder.change_vaccinated.setText("change_cases: " + current.change_vaccinated);
    myHolder.change_boosters_1.setText("change_cases: " + current.change_boosters_1);
    myHolder.change_vaccines_distributed.setText("change_cases: " + current.change_vaccines_distributed);
    myHolder.total_cases.setText("change_cases: " + current.total_cases);
    myHolder.total_fatalities.setText("change_cases: " + current.total_fatalities);
    myHolder.total_tests.setText("change_cases: " + current.total_tests);
    myHolder.total_hospitalizations.setText("change_cases: " + current.total_hospitalizations);
    myHolder.total_criticals.setText("change_cases: " + current.total_criticals);
    myHolder.total_recoveries.setText("change_cases: " + current.total_recoveries);
    myHolder.total_vaccinations.setText("change_cases: " + current.total_vaccinations);
    myHolder.total_vaccinated.setText("change_cases: " + current.total_vaccinated);
    myHolder.total_boosters_1.setText("change_cases: " + current.total_boosters_1);
    myHolder.total_vaccines_distributed.setText("change_cases: " + current.total_vaccines_distributed);
    }

    // return total item from List
    u/Override
    public int getItemCount() {
    return data.size();
    }

    class MyHolder extends RecyclerView.ViewHolder{

    TextView date;
    TextView change_cases;
    TextView change_fatalities;
    TextView change_tests;
    TextView change_hospitalizations;
    TextView change_criticals;
    TextView change_recoveries;
    TextView change_vaccinations;
    TextView change_vaccinated;
    TextView change_boosters_1;
    TextView change_vaccines_distributed;
    TextView total_cases;
    TextView total_fatalities;
    TextView total_tests;
    TextView total_hospitalizations;
    TextView total_criticals;
    TextView total_recoveries;
    TextView total_vaccinations;
    TextView total_vaccinated;
    TextView total_boosters_1;
    TextView total_vaccines_distributed;
    // create constructor to get widget reference
    public MyHolder(View itemView) {
    super(itemView);
    date= (TextView) itemView.findViewById(R.id.date);
    change_cases= (TextView) itemView.findViewById(R.id.change_cases);
    change_fatalities= (TextView) itemView.findViewById(R.id.change_fatalities);
    change_tests= (TextView) itemView.findViewById(R.id.change_tests);
    change_hospitalizations= (TextView) itemView.findViewById(R.id.change_hospitalizations);
    change_criticals= (TextView) itemView.findViewById(R.id.change_criticals);
    change_recoveries= (TextView) itemView.findViewById(R.id.change_recoveries);
    change_vaccinations= (TextView) itemView.findViewById(R.id.change_vaccinations);
    change_vaccinated= (TextView) itemView.findViewById(R.id.change_vaccinated);
    change_boosters_1= (TextView) itemView.findViewById(R.id.change_boosters_1);
    change_vaccines_distributed= (TextView) itemView.findViewById(R.id.change_vaccines_distributed);
    total_cases= (TextView) itemView.findViewById(R.id.total_cases);
    total_fatalities= (TextView) itemView.findViewById(R.id.total_fatalities);
    total_tests= (TextView) itemView.findViewById(R.id.total_tests);
    total_hospitalizations= (TextView) itemView.findViewById(R.id.total_hospitalizations);
    total_criticals= (TextView) itemView.findViewById(R.id.total_criticals);
    total_recoveries= (TextView) itemView.findViewById(R.id.total_recoveries);
    total_vaccinations= (TextView) itemView.findViewById(R.id.total_vaccinations);
    total_vaccinated= (TextView) itemView.findViewById(R.id.total_vaccinated);
    total_boosters_1= (TextView) itemView.findViewById(R.id.total_boosters_1);
    total_vaccines_distributed= (TextView) itemView.findViewById(R.id.total_vaccines_distributed);
    }

    }

    }

    activity_main Layout File
    <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
    <TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:fontFamily="sans-serif-black"
    android:text="@string/covid_19_information_tracker"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintHorizontal_bias="0.0"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintVertical_bias="0.0" />
    <TextView
    android:id="@+id/textView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="32dp"
    android:text="@string/please_enter_a_date"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintHorizontal_bias="0.017"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/textView2"
    app:layout_constraintVertical_bias="0.0" />
    <EditText
    android:id="@+id/searchDateField"
    android:layout_width="264dp"
    android:layout_height="43dp"
    android:layout_marginStart="4dp"
    android:ems="10"
    android:hint="YYYY-MM-DD"
    android:inputType="date"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/textView" />
    <Button
    android:id="@+id/searchBtn"
    android:layout_width="401dp"
    android:layout_height="48dp"
    android:layout_marginTop="8dp"
    android:text="Search"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/searchDateField" />
    <androidx.recyclerview.widget.RecyclerView
    android:id="@+id/recycler_view"
    android:layout_width="409dp"
    android:layout_height="551dp"
    android:scrollbars="vertical"
    app:layoutManager="LinearLayoutManager"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/searchBtn"
    app:layout_constraintVertical_bias="0.0"
    tools:listitem="@layout/covid_item" />
    </androidx.constraintlayout.widget.ConstraintLayout>

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

    Best way to pass data to a fragment and prevent Transaction Too Large exceptions?

    Posted: 07 Dec 2021 01:45 AM PST

    I think this is a common issue I'm seeing with code at work.

    Commonly, there's some sort of object we parse from a network API, then pass this object around.

    For example, let's say we have a typical master detail list. On the master list screen, we fetch the objects and display it in a list. On the detail screen, we pass the the object clicked to display.

    I'm finding some users then get Transaction Too Large exceptions, which I think are from bundles that are too big. Sometimes the objects we parse from the JSON may have long Strings and I think the bundles with restoreInstanceState or something in the main activity seems to be growing larger over time.

    What are some of the ways to pass data?

    My thoughts:

    1. Simply through a bundle
    2. Saved State Handle (basically seems to be the same thing as grabbing things from a bundle?)
    3. Shared View Models - okay, but I don't like giving other screens access to a view model with stuff they don't use or need

    These are the ones I'm most familiar with. But I've also heard of perhaps using a repository to somehow do this? Would it be some sort of shared flow? Or maybe saving it to a Room database and retrieving it?

    Any thoughts on passing JSON objects which can be potentially too big?

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

    Communication between UI and Logic

    Posted: 07 Dec 2021 04:38 AM PST

    Hey devs, I would like to know, how you guys implement the communication between the UI and the Logic. Let's say we use MVVM (View as the UI and ViewModel as the Logic) and there is a scenario where the user clicks on a button, an AlertDialog pops up and the user can click on further actions on the Dialog. I was wondering, how detailed the communication should be:

    Option 1:
    User clicks on Button -> inform ViewModel und trigger the View to show a Dialog -> View shows the Dialog, user clicks on a Button on the Dialog -> inform the ViewModel and do something.

    Options 2:
    User clicks on Button, View shows the Dialog independently, user clicks on a Button of the Dialog -> now inform the ViewModel and do something

    Option 1 seems a little more consistent, because every single action from the user goes to the ViewModel. But at the same time, it seems a little bit too much. Especially if you have more Dialogs in a feature and there is a big ping pong between View and ViewModel.

    Options 2 could be not really consistent, but maybe the View is able to handle "UI-Logic" by itself and can trigger the ViewModel, when its really necessary. This would help to avoid a lot of code.

    What do you think?

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

    Device wont switch on programatically

    Posted: 07 Dec 2021 04:12 AM PST

    I am working on a app, a part of which allows the user to specify a off/on time for the device.

    The app works fine of the emulator, and my Samsung S7 Note, but I also have a large screen interactive whiteboard that has a Android on-board system. On this system, the app switches the display off OK, but for switching on we hear the 'click' sound the device makes when turning on, but the display remains off.

    We think there might be a Android system setting affecting this, but if so which one?

    The code to turn the device back on is:

    public void wakeupTimer(){

    new CountDownTimer(wakeupTime * 1000, 1000) {

    public void onTick(long millisUntilFinished) {

    textTimer.setText("0:"+checkDigit(wakeupTime));

    wakeupTime--;

    }

    public void onFinish() {

    PowerManager pm = (PowerManager) getApplicationContext().getSystemService(Context.POWER_SERVICE);

    PowerManager.WakeLock wakeLock = pm.newWakeLock(( PowerManager.FULL_WAKE_LOCK

    | PowerManager.ON_AFTER_RELEASE

    | PowerManager.ACQUIRE_CAUSES_WAKEUP), "commandandcontrol:TAG");

    wakeLock.acquire();

    finish();

    }

    }.start();

    }

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

    How to achieve this Z-Axis animation

    Posted: 07 Dec 2021 03:49 AM PST

    I noticed this effect in Bundled Notes (note taking app for Android)

    https://imgur.com/a/zrOdTBt

    When opening a BottomSheetDialogFragment, the activity/fragment behind it gets animated up/down based on the bottom dialog's offset. Getting the offset of the dialog is quite easy, but then using that value to change the view behind it is proving difficult. I've tried messing with the window/decorView, modifying the translationZ and also the X/Y scale, but nothing works. Does anyone know how to achieve this? Thanks.

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

    Best way to manage a fleet of Android devices and push app updates (without prompting Google login challenges)?

    Posted: 06 Dec 2021 12:07 PM PST

    Hi there, here is my use case:

    I am an app developer who ships my app pre-deployed on Android devices to various customers (the device is used only to run this app). These devices are logged in to a specific Google Workspace account and updates are pushed through Google Firebase App Distribution (tied to that Google account). I recognize this is not the intended purpose of Firebase App Distribution. I have turned off 2FA for this Google Workspace account.

    The problem I am encountering is that after some time if the session expires, or if Google detects a "suspicious login", when they try to access Firebase App Distribution it will force the user to re-authenticate the Google account which then prompts a Google "verify it's you" login challenge showing on all other logged in users' Android devices which is a very poor experience.

    Q: Is there any kind of provisioning I could perform on the Android devices before shipping them out that would enable me to continue to be logged in to a Google account and still use Firebase app distribution, but would never prompt the user for a login challenge? Does Google Workspace MDM allow for this (indefinite session)?

    If not, what is my best alternative? Using a third party MDM provider such as Scalefusion instead of Firebase App Distribution that doesn't depend on Google account sessions? Thank you.

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

    Building a library for Jetpack Compose UI and screenshot testing

    Posted: 06 Dec 2021 12:29 PM PST

    Alternatives to Pendo

    Posted: 06 Dec 2021 04:48 PM PST

    Hi everyone! I currently use pendo to gain insight into customer usage of a web client. I was looking into adding an Android license, but found out it was going to cost 5k per application. While this isn't unfeasible, I was wondering if any of ya'll knew of any free/cheaper alternatives. Thanks!

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

    What's the best no code tool for publishing an MVP/beta ?

    Posted: 06 Dec 2021 11:00 PM PST

    Hi,

    I'm a backend python developer (I do some frontend dev in vueJS too) and I have a few mobile apps ideas. I don't have a lot of time lately but I still want to be able to dev MVPs on weekends and publish them to see if it's worth spending more time on a project.

    So I started looking at some no code tools, but there are so many of them ...I saw for example : appgyver, Adalo, glide that seem to do front and back end, things like xano for back end but no front, and bravo that transforms figma designs into apps.

    The best tool for me would have a variety of templates to work from and would help deploying the app to android (ios would be a nice to have) playstore. The best tool should also be the fastest one getting you from idea to deployed app with a clean result.

    Do you have any experience with this kind of tools ? What do you recommend ?

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

    The problem with mobile development, in one image

    Posted: 07 Dec 2021 03:08 AM PST

    Room Database | Android Jetpack

    Posted: 06 Dec 2021 10:15 PM PST

    No comments:

    Post a Comment