• Breaking News

    Friday, April 30, 2021

    Android Dev - Weekly Anything Goes Thread - April 30, 2021

    Android Dev - Weekly Anything Goes Thread - April 30, 2021


    Weekly Anything Goes Thread - April 30, 2021

    Posted: 30 Apr 2021 06:00 AM PDT

    Here's your chance to talk about whatever!

    Although if you're thinking about getting feedback on an app, you should wait until tomorrow's App Feedback thread.

    Remember that while you can talk about any topic, being a jerk is still not allowed.

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

    Google is cracking down on scammy Play Store app listings

    Posted: 30 Apr 2021 04:42 AM PDT

    How to save pictures after the new policy changes?

    Posted: 30 Apr 2021 02:42 AM PDT

    My app offers a feature that let the user to choose pictures from your local device and shown them.

    Since now Android is obligating to point to the 30 SDK before August 2021, and this SDK deprecates the permission WRITE_EXTERNAL_STORAGE it will not be possible to read/save pictures in the "old way" using the File class.

    So I refactored the app to use MediaStore API and I removed android:requestLegacyExternalStorage="true" from the AndroidManifest . I also removed all the logic regarding the WRITE_EXTERNAL_STORAGE permission because I understood that for MediaStore is not needed anymore and I changed for READ_EXTERNAL_STORAGE. Which is (still) permitted to use.

    After this change, it works fine in Android Q devices, I can read and write without any more permissions. But is not working with devices with android version lower than Android Q, even using MediaStore I receive Permission Denial: writing com.android.providers.media.MediaProvider uri requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission().

    At this point I don't understand anymore how I have to do to be able to save pictures in lower versions than Q because I see that I still need this permission.

    My questions are: This changes that I need to do regarding the WRITE_EXTERNAL_STORAGE
    and the use of MediaStore are only affecting to the Android Q or above devices?

    Should I leave the old logic (File class and WRITE_EXTERNAL_STORAGE permission) for versions lower than Android Q? If yes, android:requestLegacyExternalStorage="true" will still work for these versions?

    If not, how can I save pictures using MediaStore
    without using WRITE_EXTERNAL_STORAGE?

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

    Android Studio Arctic Fox Canary 15 available

    Posted: 29 Apr 2021 03:08 PM PDT

    Initial support for Apple Silicon (arm64) in Android Studio Arctic Fox

    Posted: 29 Apr 2021 04:08 PM PDT

    Salaries

    Posted: 30 Apr 2021 06:42 AM PDT

    Hi guys,

    I'm an Android Dev based in Wales, UK. I have a salary review in 4 months time at which time I will have 3 years commercial experience. I'm currently on 32k and just wondering what peoples opinions are on what I should be expecting / asking for in terms of salary? Also, interested to know what you guys are on if you're up for sharing ;)

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

    A dev news telegram channel for Android devs

    Posted: 30 Apr 2021 06:27 AM PDT

    Mail notificationfor every sms i got on my android device with its content

    Posted: 30 Apr 2021 09:09 AM PDT

    I would like to understand how can i make something like an app for my android phone, that will send me a mail every time i get a new SMS on my device.

    Is an app the right way to do it? can i create an app that will have access to my unread SMS messages that will be able to pull their text content and send it via mail?

    Ive searched for a solution online but couldnt find anything that doing exactly what im trying to do here.

    Im a novice coder and this idea popped out to my head and i would like to learn how i can implement such thing if its even possible.

    Thanks!

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

    KMMT : Kotlin Multiplatform Mobile Template ( Kotlin Multiplatform Mobile Development Simplified )

    Posted: 30 Apr 2021 09:07 AM PDT

    KMMT : Kotlin Multiplatform Mobile Template ( Kotlin Multiplatform Mobile Development Simplified )

    KMMT is a KMM based project template designed to simplify the KMM development. It uses a simplified MVVM approach that can be shared both in android and iOS easily.

    Primary objective of this project is to help KMM Developers & promote KMM technology

    https://github.com/jittya/KMMT

    https://preview.redd.it/apt74s334cw61.png?width=1280&format=png&auto=webp&s=99ef3236a789ccc2da980295b8c7b1287eaacdc5

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

    The Reason for Admob Ad Serving Limit

    Posted: 30 Apr 2021 02:20 AM PDT

    Hi,

    After a lot of testing and a few accounts limited I found out what the reason is. For example, my app gets very little organic traffic, however, I advertise it through Google Ads and Facebook Ads. I test out different countries every 3-4 days or so. For the past 4 days, I was running £100 a day in the UK, US, and AU. However, I didn't see any good results there so I decided to test other parts of the world but to exclude some Tier 3 countries such as India, Pakistan, Bangladesh, etc.

    Today when I started the new campaign which included most countries in the world and of course I get much cheaper and higher traffic from there and so more ad requests and impressions, boom my account is limited again.

    There you go the algorithm is bugged and probably is going to be fixed soon I hope. Somehow, someway Admob devs decided that this is a good reason for the limitation :D. I don't know what kind of a retard you must be to do it like this.

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

    Passwordless Mobile Authentication with Android using the tru.ID Mobile Authentication Platform

    Posted: 30 Apr 2021 02:15 AM PDT

    Is there any free API to read the current price of currencies?

    Posted: 30 Apr 2021 06:24 AM PDT

    Hey there, I wanted to know if there is any API to read prices from currencies.

    From money like USD or EUR to BTC.

    Thank you very much!

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

    Tool to get overview of released versions/markets? Play Store doesn't cut it

    Posted: 30 Apr 2021 02:12 AM PDT

    Hello there! We have multiple apps that share the same codebase. We sometimes need to hotfix them or add a market. Usually this works out, but in 2% of the cases there are small issues, for example I only add the market but forget to push the alpha release to production.

    In order to make these issues very apparent, I would like to have a tool which shows me the x apps I have, which markets it has enabled and which releases are in which track. Does something like this exist, or do I have to code it myself? :D

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

    Optimizing Android app startup time

    Posted: 30 Apr 2021 05:13 AM PDT

    I we can use It natively in mac m1

    Posted: 29 Apr 2021 04:14 PM PDT

    Upcoming Play Store listing policy changes. I like them for once.

    Posted: 29 Apr 2021 12:00 PM PDT

    Can someone explain context to me

    Posted: 30 Apr 2021 04:32 AM PDT

    Let's say I am writing code for the main activity. The code for the main activity has gotten too large. So, I make some java class files and I move some code out of the java file for the main activity and into those other files.

    Now, in all that previous code that I just moved out, I needed the context. Before, when all the code was in one java file, I would pass 'this' as an argument for context. Now, in those other files, I pass getApplicationContext() instead. Is this the right way to do this?

    Also, in order to use the getApplicationContext() function, I had to make those other java classes extend the AppCompatActivity should I pass the context as an argument from the java file of my main activity? Meaning that whenever I call functions from those other java files, should I also pass the context as an argument or should I just use getApplicationContext() inside those other files?

    Here is an example:

    AppStateHelper.java

    public class AppStateHelper extends AppCompatActivity { public void handleAppState() { Context context = getApplicationContext(); switch(currAppState) { case RECORDING: recordBtn.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.green))); break; case PAUSED: // each continuous recording sequence must have a unique id if (prevAppState == AppState.RECORDING) { recordingId += 1; } pauseBtn.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.green))); break; } } 

    MainActivity.java

    // a bunch of code AppStateHelper appStateHelper = new AppStateHelper(); appStateHelper.handleAppState() 

    OR

    AppStateHelper.java

    public class AppStateHelper extends AppCompatActivity { public void handleAppState(Context context) { Context context = getApplicationContext(); switch(currAppState) { case RECORDING: recordBtn.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.green))); break; case PAUSED: // each continuous recording sequence must have a unique id if (prevAppState == AppState.RECORDING) { recordingId += 1; } pauseBtn.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.green))); break; } } 

    MainActivity.java

    // a bunch of code AppStateHelper appStateHelper = new AppStateHelper(); appStateHelper.handleAppState(this) 

    Do both give the same result or is one the correct way?

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

    Android Emulator “Allow USB Debugging” dialog closing right after showing

    Posted: 30 Apr 2021 12:37 AM PDT

    It does not happen on all emulator configurations, in my case it is on Nexus 10 API 30, with Google Play enabled (that's another story), both x86 and x86_64 CPU/ABI.

    "Allow USB Debugging" dialog is shown just for a short time, not long enough to allow the debugging and for that reason Android Studio doesn't see device coming on-line.

    I tried to slow the emulator down by changing settings and setting CPU as a single core, but it didn't help. Wipe data, cold boot helps (not every time) and I can't do this each time I need this emulator.

    Anyone has a solution?

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

    Did you ever think how would your UI behave when there is an e҉a҉r҉t҉h҉q҉u҉a҉k҉e҉? Well, I can show you. ��

    Posted: 29 Apr 2021 01:42 PM PDT

    https://link.medium.com/C2NpadMlRfb

    Inspired on game development Camera Shake effect.

    This was my first story being published on ProAndroidDev publication, so I'm proud for it.

    Hope you enjoy it!

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

    How to lock bootloader from a Chromebook...

    Posted: 29 Apr 2021 05:35 PM PDT

    An attempt to install Android 12 DP3 corrupted my phone today. For the last 4 or 5 hours I've managed to get it back to Android 11, restore my apps & data and begin to change all the settings to what they were before the problem.

    However, any reboot of the phone shows that the bootloader is unlocked. Can this be re-locked with a Chromebook or must I be using a PC with Windows? Thanks.

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

    Looking for an easy way to view a 3d model in Android Studio with Kotlin

    Posted: 29 Apr 2021 08:03 PM PDT

    CS Student here working on a mobile dev project. We're using most current version of Android Studio with Kotlin.

    Does anyone have a good source for an up to date library that views 3d models. I've tried so many different libraries (Filament, Sceneform, OpenGL etc) that are 2 to 3 years old and seem to run into problems that I can not resolve. I don't care to use it with AR or anything fancy. I literally just want the user to be able view a 3d model.

    Or if someone has/knows a github repo that's recently used any of the 3d libraries for model viewing within the last year or so, that I could use as an example.

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

    Scene depth map using android smartphone

    Posted: 29 Apr 2021 03:29 PM PDT

    Hello guys, I am trying to get the depth map of a scene using a smartphone. In order to do that I need to acces the depth sensor of the phone or use both cameras. Any ideas how to do that using android sdk or other api please ?

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

    No comments:

    Post a Comment