• Breaking News

    Friday, April 24, 2020

    Android Dev - Weekly "anything goes" thread!

    Android Dev - Weekly "anything goes" thread!


    Weekly "anything goes" thread!

    Posted: 24 Apr 2020 05:40 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]

    Android 11 DP3 new function summary: automatically cancel application permissions / share recent apps / Ethernet hotspot / ...

    Posted: 24 Apr 2020 02:47 AM PDT

    What was the hardest concept to learn when you started Android?

    Posted: 23 Apr 2020 07:29 PM PDT

    Noob here, just wanted to see what tripped up the veterans in your early days. I think the initial listview, recyclerview adapter thing tripped me up the most

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

    Google Maps SDK Error started popping on last hour

    Posted: 23 Apr 2020 12:34 PM PDT

    :com.google.android.gms.dynamite_mapsdynamite@201216046@20.12.16 (040306-0) line 9 com.google.maps.api.android.lib6.gmm6.vector.ct.<init> 

    This error started happening on random devices. Does anyone have the same issue?

    I didn't release anything, didn't change anything about the app.

    My map fragment XML:

    <fragment android:id="@+id/map_stops" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.comprovei.entregas.fragments.TabTripsMapFragment" /> 

    The fragment code:

    public class TabTripsMapFragment extends Fragment implements OnMapReadyCallback { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.tab_fragment_stops_map, null, false); ChildFragmentManager() .findFragmentById(R.id.map_stops); mapFragment.getMapAsync(this); return view; } @Override public void onMapReady(final GoogleMap googleMap) { ... } } 

    ---

    I'm trying to gather info here:

    https://stackoverflow.com/questions/61395654/google-maps-sdk-error-started-popping-on-last-hour

    https://issuetracker.google.com/issues?q=maps

    --- edit: answer by google

    Our engineering team continues to investigate the issue.We will provide an update by Thursday, 2020-04-23 14:30 US/Pacific with current details.Diagnosis: If you see a stack dump starting with the lines: java.lang.ArrayIndexOutOfBoundsException: length=1; index=12 at com.google.maps.api.android.lib6.gmm6.vector.ct.<init> ... you are affected by this error.Workaround: None at this time

    https://issuetracker.google.com/issues/154855417

    --- update

    ah...@google.com ah...@google.com #5823-04-2020 23:48 Update: We have identified a possible root cause for the crash and are undoing the change. 

    --- "solution" update

    en...@google.com<en...@google.com> #201Apr 23, 2020 10:30PM 10:30PMSummary: Google Maps SDK is crashing; partially resolved Description: We believe the root cause of the crashes of Google Maps SDK has been fixed. The fix is being propagated to the affected applications and it is continuing toward resolution at the expected pace. Full resolution is expected to complete by Thursday, 2020-04-23 19:45 US/Pacific. Customers for whom clearing application data is safe can recommend their users clear data for the applications (not just the cache). If there is uncertainty about the safety of clearing application data, users can wait for new data to be fetched within 3 hours (many users will see resolution of the problem sooner than this). We will provide an update by Thursday, 2020-04-23 19:30 US/Pacific with current details. Workaround: Clear application data (not just the cache). 

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

    32 Design Differences between iOS and Android Apps

    Posted: 24 Apr 2020 05:39 AM PDT

    How do alarm clock apps work?

    Posted: 23 Apr 2020 09:54 PM PDT

    I feel like I've read a thousand posts just like this one or this one. I certainly have tried both AlarmManager.setExactAndAllowWhileIdle and AlarmManager.setAlarmClock after reading the only documentation that exists for setAlarmClock. You may also rest assured that on Android 10 I tried scheduling consecutive alarms that fire a notification with a full screen intent for a full-screen activity and the USE_FULL_SCREEN_INTENT manifest permission, as described by the missing manual to full-screen intent notifications.

    None of that allows subsequent alarms to turn the screen on from a screen-off state after the first alarm within a 9-minute time period.

    All of my test devices ranging from Android 6 to Android 10 have a built-in Clock app that is capable of setting two alarms, one minute apart. Both alarms wake up the screen within milliseconds of the minute I wished it to fire. Both alarms appear to turn the screen on and draw a full-screen activity over the lock screen and gives me a snooze/dismiss affordance, otherwise keeping the phone locked. Amazingly, the alarm I scheduled for a minute after the first one provides the exact same experience as the first one: it too wakes up the phone while the screen is off.

    I don't understand how the clock apps' alarm features could possibly be driven by any of the AlarmManager.set... methods, if there are power restrictions inhibiting wake behavior on subsequent AlarmManager.set... fires within 9 minutes. So what are they doing instead?

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

    Hi. Im trying to convert an android project into a cordova plugin.

    Posted: 24 Apr 2020 05:37 AM PDT

    Hi. I have this project that was given to me by a senior and I kinda have to integrate it into an old Ionic 2 beta project via a cordova plugin.

    Is that possible and how can I achieve it?

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

    How to test my app on my computer

    Posted: 24 Apr 2020 02:41 AM PDT

    Hi all, I'm building an Android app using Python/Kivy (and then pushing it to my phone using Buildozer).

    All my code seems to work fine, however I noticed that when I put the app on my phone, there are a few things that the Android environment does, which don't show up on my laptop. One example is the hidden keyboard that will pop up whenever you try and type something, causing things to move.

    Instead of constantly making one tweak, then loading it to my phone to check, and then doing it again, I was wandering if there was something I can download that mimics my phone on my laptop, so I can run my testing there?

    If it helps, I am pushing my app to my phone using Ubuntu from a virtual box, so I will most likely download this there.

    Thanks all!

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

    Material design in practice - A simplified project to demonstrate the latest guidelines

    Posted: 24 Apr 2020 08:24 AM PDT

    Auto version code for Android: a simple approach

    Posted: 24 Apr 2020 08:20 AM PDT

    The ProtonMail Android app is open source

    Posted: 23 Apr 2020 10:54 AM PDT

    PrivacyBreacher - an app showcasing the privacy issues in Android operating system!

    Posted: 23 Apr 2020 11:24 PM PDT

    This Android app can access the following information from your phone without requesting any permissions:

    1. Figure out at what time your phone screen turned on/off.
    2. Figure out at what time you plugged in or removed your phone charger and wired headphones.
    3. Figure out at what time you switched on/off your phone (i.e., it captures the device uptime and ACTION_SHUTDOWN broadcasts).
    4. Access most of your device related information like your phone model, manufacturer etc.
    5. Keep track of your WiFi/Mobile data usage.
    6. Get a list of all the apps installed on your phone.
    7. Construct a 3D visualization of your body movements.

    Check out more on here: https://github.com/databurn-in/PrivacyBreacher

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

    Seems like Google Maps API is down and causes crashes.

    Posted: 23 Apr 2020 01:54 PM PDT

    apksigner.bat tool no output.

    Posted: 24 Apr 2020 07:19 AM PDT

    Do you know where I should start looking to troubleshoot this issue ?

    I was able to run java -jar apksigner.jar to sign but I'm curious as to why this would be happening.

    Output is similar to what I found in this stackoverflow article
    https://stackoverflow.com/questions/53807173/apksigner-returns-back-with-nothing

    https://i.stack.imgur.com/ME24C.png

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

    google live sports score

    Posted: 24 Apr 2020 01:20 AM PDT

    hey r/androiddev people, I created my first app, which is a sports scoreboard with some cool features.

    I now want to update the game's score live, and google's live sports score thingy seems like a great option.

    I assumed theres some api or something I could use but as far as I can tell by googling the subject, I was wrong.

    Anybody ever worked with that and could help out with doing so, or even tell me if its possible at all or not?

    Thanks!

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

    Using LiveData for emitting multiple events

    Posted: 24 Apr 2020 07:18 AM PDT

    In the LiveData with Coroutines and Flow (Android Dev Summit '19) talk theses two noble gentlemen mentioned that "LiveData was never designed to be a reactive stream of data so it's awkward to use for Repositories and DataSources" and then right after that presented different ways how to transform from Flow into LiveData object. I really want to understand, if it wasn't designed for emission of a sequence of objects, why would I use it with data sources that emit periodically?

    That is, why LiveData is suitable for sequential emission of objects for View consumption, but can't be used in Repositories?

    That's not to say we were ever going to use LiveData anywhere but in ViewModels, but even this scenario is also quite questionable.

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

    What is your FCM delivery ratio?

    Posted: 23 Apr 2020 08:35 PM PDT

    Hey - anybody track their FCM delivery ratio? We've been trying for a couple of years to get it close to 100% but the highest we've had it hit is 89%.

    We randomly get users complaining about not having received a notification, even though we sent it to the FCM server and get an OK response back. It just doesn't seem to make it to the device for those 11%.

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

    How to make an app with notifications

    Posted: 24 Apr 2020 07:01 AM PDT

    Hi there. I was trying to make a new app for my girlfriend and I was wondering how it was able to make an app for android so that it sends me a notification when she presses a button. If you could send me any help that would be greatly appreciated :)

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

    How should I handle the database on a new app?

    Posted: 24 Apr 2020 06:51 AM PDT

    Hi,

    I have a web service for gym training statistics. It's nothing big, it was made with HTML, PHP, CSS and JavaScript just for my own use. It's using a MySQL server as a database. I have been thinking to start learning the basics of Android development all slong with Java and I was thinking about how I should handle the database.

    At this point I would like to state that this whole project is for my own needs, I personally use it at gym but I made it public so others can register and use it aswell, but I`m not marketing it. However, I would like to make it serious in the sense of learning even though it is a hobby project.

    First of all the user has to register and log in. I use PHP password_hash so I guess that is going to be a problem, but I assume I can just pop up a browser and handle them on the website and return in appplication. I guess?

    The main question is the user input, the actual data from training. Im just looking for a somewhat standard method here.

    Should I store the data on the mobile SQLite and maybe update it to the main database server every now and then?

    Or should I perhaps just insert all user input to the server instantly when user saves the data?

    I see pros and cons on both of them but in general, is the other better than the other or are there more efficient ways of doing this?

    The user should be able to use both APK and website, so the SQL server is needed.

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

    TWA and splash screen

    Posted: 24 Apr 2020 06:31 AM PDT

    I have a PWA app, which has a webmanifest that includes a splash screen. When this app is installed through say Chrome, it shows the splash screen. But when installed through an APK/bundle (as a TWA) it does not, and I have to manually implement new splash screen for the TWA. Is there a way to make the TWA use the existing webmanifest for splash screen?

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

    Dagger navigation support in Android Studio - Android Developers - Medium

    Posted: 23 Apr 2020 02:48 PM PDT

    xml not loading properly

    Posted: 24 Apr 2020 12:07 AM PDT

    xml not loading properly

    i booted up android studio this morning to find that my xmls werent loading properly. i already tried to invalidate the caches and restart but it didnt work

    this is what all of my xmls look like, except the main activity

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

    Java or Kotlin as first language

    Posted: 24 Apr 2020 06:01 AM PDT

    I currently work as a data scientist and have some experience with Python and OOP in python. I want to learn android development for fun.

    I guess the questions has been asked, whether to learn Java or Kotlin as first language, but I had more specific questions in mind :

    • Is there one you would recommend generally to start with?

    • Is one easier coming from Python?

    • Is it easier to go from Kotlin to Java or the other way round?

    • As Kotlin is pretty recent, does it still have enough support and libraries? I've learned some Rust and Julia, and while both are pretty new, there is so much more support for Rust than Julia. I've heard there is more support for Java as it's older, but if there is enough answers on stackoverflow for example, it good enough...

    • Do you maybe have some good tutorials/moocs to recommend?

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

    How to open another activity when the slider ends in below code?

    Posted: 24 Apr 2020 05:47 AM PDT

    I am trying to use this library in my android app for its intro, I tried to implement a demo of it to see , but I am bit confuse,

    Actually I want when the intro slides ends Login Activity should open but I don't know how to handle that .

    In it's documentation there is method to override and I also tried that but the login activity does not opens and at the end of slider app closes .

    Any help is highly appreciated!

    package com.pathorgroups.pathorleagues; import android.content.Intent; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; import com.heinrichreimersoftware.materialintro.app.IntroActivity; import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; public class MainIntroActivity extends IntroActivity { public static final int REQUEST_CODE_INTRO = 01; // private static final int REQUEST_CODE_INTRO =9 ; @Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); setFullscreen(true); super.onCreate(savedInstanceState); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); //I am adding the items here in the slider setButtonBackVisible(false); setButtonNextVisible(false); setButtonCtaVisible(false); setButtonCtaTintMode(BUTTON_CTA_TINT_MODE_TEXT); addSlide(new SimpleSlide.Builder() .title("Welcome to PathOr Leagues") .description("my description goes this way") .image(R.drawable.icon_user_) .background(R.color.colorAccent) .backgroundDark(R.color.colorPrimaryDark) .build()); addSlide(new SimpleSlide.Builder() .title("Welcome to PathOr Leagues") .description("my description goes this way") .image(R.drawable.icon_user_) .background(R.color.colorAccent) .backgroundDark(R.color.colorPrimaryDark) .build()); addSlide(new SimpleSlide.Builder() .title("Welcome to PathOr Leagues") .description("my description goes this way") .image(R.drawable.icon_user_) .background(R.color.colorAccent) .backgroundDark(R.color.colorPrimaryDark) .build()); } //Here I am overriding the method as per the docs @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_CODE_INTRO) { if (resultCode == RESULT_OK) { startActivityForResult(new Intent(this,LoginActivity.class),requestCode); } else { // startActivity(new Intent(this,LoginActivity.class)); // // Cancelled the intro. You can then e.g. finish this activity too. // finish(); } } } } 
    submitted by /u/Pranshu_Ranjan17725
    [link] [comments]

    AdMob - Ad Serving Limited - Worst Google Experience - Sad Story

    Posted: 24 Apr 2020 04:36 AM PDT

    So, I released my first app about 2 weeks ago, with AdMob enabled.

    A few days ago, I decided to run a Google Ads campaign since it is sooo recommended by Google Play Console under User Acquisition tab. Note: All Google accounts (Play Console, AdMob and Google Ads) use the same email address and are properly linked.

    It took a few days for the Google Ads campaign to actually start and generate impressions and installs. The moment it did, AdMob limited my ad servings (it's actually zero, not "reduced" as they claim). No, I did not click on my own ads, I don't even have the app on my phone and I only have a debug version with no ads installed on mine to test things.

    The claim is that there is "invalid traffic concern". I happen to find it funny exactly because it is incredibly outrageous.

    Use GOOGLE Play to publish app.

    Use GOOGLE AdMob to monetize app.

    Use GOOGLE Ads to generate installs for said app.

    Written GOOGLE in bold to highlight the fact that these are all services/products offered by the same company, you would think they wouldn't conflict each other especially when only one account is used to manage them all.

    Get Ad Serving Limitation because of invalid traffic concerns - I checked stats and there is a perfect match as in the new installs (based on Play Console report) perfectly matches the Google Ads conversion(installs) number. So all users came from the campaign GOOGLE ads ran.

    Side note: contacted Google Ads support about this matter, told them that the campaign somehow triggered Google Admob's invalid traffic bot or whatever that is. First question from the Support Representative - "What is AdMob, I'm not sure?" - Good jub, support representative have no idea what services and products Google offers.

    How on earth is it possible to get invalid traffic from that, I don't know. I read the forums, seems I am not the only one with this issue and given the comments where it is mentioned that it took MONTHS for the ads to be shown again for some users....I am currently in the process of updating my app with IronSrc SDK and remove AdMob entirely.

    Any similar experiences, or tips? Should I go ahead with IronSrc and not care about AdMob anymore, should I wait ? Oh yeah, best part...there is no support for AdMob.

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

    No comments:

    Post a Comment