• Breaking News

    Monday, February 10, 2020

    Android Dev - Weekly "who's hiring" thread!

    Android Dev - Weekly "who's hiring" thread!


    Weekly "who's hiring" thread!

    Posted: 10 Feb 2020 04:44 AM PST

    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]

    Weekly Questions Thread - February 10, 2020

    Posted: 10 Feb 2020 02:56 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?

    Important: Downvotes are strongly discouraged in this thread. Sorting by new is strongly encouraged.

    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]

    Me: So what's wrong? Google: Yes.

    Posted: 09 Feb 2020 04:04 PM PST

    Build a WhatsApp style chat app using Kotlin - Part 1

    Posted: 10 Feb 2020 07:24 AM PST

    Better ways of using Room Database

    Posted: 09 Feb 2020 11:31 PM PST

    LPT : If your minSdk is too low to enable "apply changes", add a new flavour with a higher minSdk and do all the development on it.

    Posted: 10 Feb 2020 07:39 AM PST

    Load Android Fragments Asynchronously

    Posted: 10 Feb 2020 07:12 AM PST

    Android ViewModels: Saving State across Process Death

    Posted: 10 Feb 2020 06:41 AM PST

    New ViewBinding sample in the Architecture Components Samples github repo

    Posted: 09 Feb 2020 04:39 PM PST

    How do I make an app with Java+Python

    Posted: 10 Feb 2020 06:15 AM PST

    Hi I'm making a project for college,a personal safety app module. There are lots of these apps on the app store and I want to either create my own app or add features to existing ones. Basically my idea of an app is: 1. It will detect 2-3 consecutive power button presses

    1. Immediately switch on Location and obtain Lat&Long.

    2. Call emergency helpline

    3. Use the above data and text-to-speech to relay the data when the call is picked up.

    I know nothing about app development and I don't know Java (But I know basic Python) so I'm hoping to just modify existing source code. I've heard of things like Kivy etc. but I have no idea how to use it and also I don't know terminologies like API etc.

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

    Kotlin Census 2019: Call for Respondents

    Posted: 10 Feb 2020 05:57 AM PST

    Need help with app removed from Play Store

    Posted: 10 Feb 2020 04:13 AM PST

    My app was removed from Play Store , for not filling out Target Audience and Content form ,

    Now my app is an informative app , so it has not particular age group that it specifically targets , So generally it is an app for Adults and Children , So while filling Target Audience form , I am selecting all age groups , but I am serving ads in my app via Facebook Ads network , and I have found that Google requires to use only Google Certified Ad network for serving ads to children , now I cant see Facebook Ads network as Google Certified

    I have removed Facebook Ads (Right Now , I don't show any ads at all) and made fixes to comply with Google Play Policies , but I cant release my app to rollout or even resubmit my app since first I have to fill Target Audience and Content Form.

    So , my question is what should I do while filling Target Audience and Content form , because If I select all age groups (Adults and Children ) , and If I submit my app then I will be violating ads via Facebook Ads Network

    Please help !

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

    Is there any image morphing transition library available that i can use in android studio?

    Posted: 10 Feb 2020 04:10 AM PST

    So when i switch from one image to another, the picture should morph itself to the next image by keeping the constant features of the image unchanged and rest of the image just warping to the new one. The two images are pretty much similar to one another (i.e they have mostly have same background or 80% remains same). If it's not available then what's the best way to achieve this?

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

    Android sensors don't gather data when phone is idle

    Posted: 10 Feb 2020 03:30 AM PST

    I'm trying to develop an app for Android in which I pick up data from several sensors (if available on the device) and write it down to a file which will later be analyzed for certain uses.

    I'm facing several problems, a minor one which I can kind of ignore and a major one that I haven't been able to solve and makes the app not work properly.

    - Minor problem

    I'm gathering data from: Accelerometer, Linear Accelerometer, Gyroscope and Magnetometer and also from the GPS but that works quite differently and can only be sampled at much lower frequencies, so I'll ignore it for now.

    I gather the data by implementing a listener for each sensor:

    public class AccelerometerWatcher implements SensorEventListener { private SensorManager sm; private Sensor accelerometer; AccelerometerWatcher(Context context) { sm = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); assert sm != null; if (sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null) { accelerometer = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); } } } 

    And I'm setting the frequency to ~50Hz by using:

    sm.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_GAME); 

    When gathering data, I understand the frequency can't be 100% stable, but the weird thing is it stays more or less stable on every sensor (at around 50Hz) except on the Accelerometer, where most of the time it samples at 100Hz and sometimes drops down to 50Hz.

    Is there something I might be doing wrong or any way to control this? So far it's happened in every device I tried, although they don't all behave in exactly the same way.

    - Major problem

    I'm writing down the info to a file by first writing everything I pick up from the sensors to a string and then every X seconds, writing what's on the string to a file and clearing it so the sensor listeners can keep on writing on it but it doesn't become infinitely long.

    I write on the string like this:

    @Override public void onSensorChanged(SensorEvent event) { if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER) return; if(initTime == -1) initTime = event.timestamp; MyConfig.SENSOR_ACCEL_READINGS += ((event.timestamp - initTime) / 1000000L) + MyConfig.DELIMITER + event.values[0] + MyConfig.DELIMITER + event.values[1] + MyConfig.DELIMITER + event.values[2] + "\n"; } 

    And then save it to a file using this:

    public class Utils { private static Timer timer; private static TimerTask timerTask; public static void startRecording() { timer = new Timer(); timerTask = new TimerTask() { @Override public void run() { // THIS CODE RUNS EVERY x SECONDS writeDataToFile(); } }; timer.scheduleAtFixedRate(timerTask, 0, MyConfig.SAVE_TIMER_PERIOD); } public static void stopRecording() { if(timer != null) timer.cancel(); if(timerTask != null) timerTask.cancel(); writeDataToFile(); } private static void writeDataToFile() { String temp_accel = String.copyValueOf(MyConfig.SENSOR_ACCEL_READINGS.toCharArray()); WriteData.write(MyConfig.RECORDING_FOLDER, MyConfig.FILENAME_ACCEL, temp_accel); MyConfig.SENSOR_ACCEL_READINGS = MyConfig.SENSOR_ACCEL_READINGS.replaceFirst(temp_accel, ""); } 

    In the listener, every time I stop listening, I set "initTime" to -1 so the samples always start at 0 and go up to the duration of the listening period in miliseconds. (Ignore the DELIMITER it's just a matter of formatting).

    My main app-breaking problem, is the following:

    In most phones (a few lucky ones work flawlessly) 1 or 2 things fail.

    In some, after being idle for a while (locked and in your pocket for example) the sensors stop recording data so the app just writes blank values until I wake the phone up again.

    In others, it's even worse, not only do the sensors stop recording data, but the timer / writing to file, seems to stop working too, and when the phone wakes up again, it tries to write what it should've written while it wasn't working and messes up all the timestamps, writing the same samples at different points "in the past" until it catches up to the current time. (If you visualize it as a graph, it basically looks as if the data gathering travelled back in time).

    Is there any way in which I can make sure that the app keeps on working no matter what, whether the phone is locked, dozing, the app is minimized, on the background, foreground, etc.?

    I tried a method I googled that consists of setting and alarm to "wake up the process" every X seconds (no matter what time I set to it, it only worked max once per minute).

    I saw how for a few miliseconds every time the alarm went off, it captured samples again but then went to sleep right away, it didn't keep the phone "awake" for a longer period of time.

    It solved nothing and even for the brief period it forced the sensors to gather data, it only helped wake up the sensors, the problem with the timer / writing to file still persisted.

    Hope someone can shed some light on how to keep the phone gathering data no matter what, I've been trying everything I could think of and I'm not getting anywhere. Sorry for the brick of text, but I didn't really know how to explain it in a shorter way.

    P.S: I saw that having the Battery Saver ON made it even worse, even on the phones where it usually worked properly, it started messing things up. So another question would be... How can I stop it from interfering?

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

    How many downloads / users did you get when you launched your app (stories please).

    Posted: 09 Feb 2020 10:48 AM PST

    I'm trying to decide how we should prioritize shipping our app in the Android app store.

    I think part of the challenge is that some apps explode, but other apps sort of don't really get much distribution.

    I'd like to figure out WHY some apps explode and others don't.

    I have some theories:

    • some apps leverage trends (either deliberately or accidentally) and then they show up #1 for some key search terms.

    • some apps already have a large user base, just not an app, so when they email their users they get a HUGE explosion of initial downloads.

    • some people just PPC their app to the top and then they end up showing up in the trending section. I think this would work but probably costs a fair amount of $$... just not sure how much.

    Would love to hear some real world stories of how you got your app to take off.

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

    Hardware acceleration for the ARM Android Emulator

    Posted: 10 Feb 2020 02:16 AM PST

    I need to run the app I'm developing on an ARM device and my workflow would be so much easier if I could use a virtual device. I.e. an Android Emulator.

    Is it possible to achieve graphics hardware acceleration on any emulated ARM Android?

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

    How can I fix this?

    Posted: 10 Feb 2020 01:50 AM PST

    Best way to explain required permissions to users so they don't get freaked out?

    Posted: 09 Feb 2020 09:39 AM PST

    I have an app that needs notification access so I explain why to the user and then navigate them to the permissions page to activate it. But based on my analytics only about 80-85% of people grant the permission. I assume its because they are paranoid of spying on their data. Whats the best way to explain to the users that its safe?

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

    An app to display data in a structured manner

    Posted: 09 Feb 2020 08:14 PM PST

    Imagine being homeless and panhandling all day long and no one gives you enough for a Subway sandwich. You remembered that there were places that serve food to homeless people... It was typed on a sheet of paper you were given; sadly though, it's been lost and all you have is a shopping cart full of junk and a cell phone. If there was only an app that had that information you could walk on over to Operation Nightwatch at 1432 SW 13th Ave. for a sandwich and games.

    That's an exaggeration of a problem I'm trying to solve.

    I've never made a cellphone app before so I started looking for business directory app templates or tutorials that describe how to display the data; but I'm not having much luck. I'd like to have around 22 sections (Clothing, food boxes, domestic violence, assault...etc) each section displaying a list of cards with information on charities for that section.

    I thought about Salesforce and and I think it would probably be very doable in Salesforce... I got three badges already. But publishing would probably cost too much. I tried looking at a couple other CRMs like Joforce but I'm a bit confused on how to install it. I also tried React Native which I installed and was able to display the awesome project demo app and it updated from my computer... But I don't understand how to use it yet.

    Does anyone have any recommendations on how I should proceed? Any free or easy to use opensource platforms that would make this development easy... Easier? Am I in over my head here?

    Edited for clarity

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

    has anyone made a game recently? i have question about OAuth consent

    Posted: 09 Feb 2020 01:21 PM PST

    Has anyone here made an android game recently? My game uses google play services (for leaderboard), and i've made 2 games before no problem. But i just updated one of my games and now its telling me i need to do this OAuth consent screen verification. i'm filling out the page, but it requires me to have a homepage URL, and a privacy policy URL, wtf ? What if i don't have a website? It won't let me continue submitting the form without entering a url.

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

    How do I hook the physical buttons of a phone with the camera?

    Posted: 09 Feb 2020 11:38 PM PST

    I'm learning android app programming and I want to learn how to hook the physical buttons, for e.g., the volume up/down buttons, with the camera, and, whenever I press a combination of the physical button, the camera should start.

    Can anyone please tell me how do I go about doing that?

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

    What's the difference between button.findViewById() & button= findViewById()

    Posted: 10 Feb 2020 02:42 AM PST

    I was working on a small app for my own and i faced crashes i didn't know from what later on i realized it was because i was using button.findViewById() instead off button = findViewById() so what are the deference between those two, i searched for it but couldn't find answers.

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

    Dealing With Production Code In Tests

    Posted: 09 Feb 2020 10:49 PM PST

    Authentication

    Posted: 09 Feb 2020 01:43 PM PST

    I'm supposed to do authentication for an app which relies on a rest api. I don't have any info about the authentication, I will be speaking to the api guys tomorrow. Are they supposed to hand me an architecture where they generate a user token? What can I expect? The resources got from the api are meant to be "checked for user permission", which would lead me to believe there should be a jwt? Never did token auth before

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

    No comments:

    Post a Comment