• Breaking News

    Monday, January 6, 2020

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

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


    Weekly "who's hiring" thread!

    Posted: 06 Jan 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 - January 06, 2020

    Posted: 06 Jan 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]

    AppLovin as ad network?

    Posted: 06 Jan 2020 01:05 AM PST

    What are your thoughts on AppLovin?

    I am looking to implement them in my apps since they seem to be very popular ad network, but some things like lack of ad filters(only mature 17+ and dating ads) and poor website design/UI kind of make me uneasy.
    Also the fact that my apps are mostly set for 13+ and I am not sure if ads they serve would put my app at risk.

    So, do you use AppLovin? How do you make sure that ads served in your app are according to your app rating? How does AppLovin perform for you? Is it comparable to AdMob?

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

    New draft of SharedPreferences replacement in AOSP

    Posted: 05 Jan 2020 07:30 PM PST

    Why some people dislike EventBus?

    Posted: 06 Jan 2020 02:36 AM PST

    Hi! Happy New Year yall!

    I currently working on a small project mostly based around usage of WebView. There is no any architecture or some specific design patterns in my mind, but looks like I'm using a lot of Singletons. The application it self is simply a WebView in an activity and most of the logic is around singleton classes. Also I'm using JavaScriptInterface annotation and "evaluateJavascript" to achieve something like "bridge". The thing that is really bothering me is that the only activity(where WebView is used) is getting really big.

    Recently found that GreenRobot EventBus library. I did little research around that concept of EventBus and kinda liked it. It might organize my project a bit. But there are some negative opinions around it. Is there a good reason to not try it?

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

    Android version adaptation statistics

    Posted: 05 Jan 2020 10:41 AM PST

    Question regarding Firebase ML kit for android

    Posted: 06 Jan 2020 06:26 AM PST

    I am working on an android app that uses a machine learning model. I trained that model in Keras and converted it into .tflite format for using as a custom model for ML kit on firebase. Now, the features of the model are not the raw data received by the android app, but requires certain preprocessing. That level of preprocessing is too time-consuming to be done in Java, but is much feasible on python. Is there any way of preprocessing the input data using a python script to later use as a feature in the ML kit model? I am using android studio.

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

    Android Q Connect to a Wi-Fi from code

    Posted: 06 Jan 2020 05:57 AM PST

    So after seeing that old APIs that handled WiFi offloading are gone, I was wondering what works right now, I've tested a lot of code, even Google's examples and they won't work. Google's example doesn't want to even consider connecting to my AP, and some random StackOverflow examples got me by far, the furthest... and after hitting a brick wall ( when I connect to AP I have no internet because I don't know )

    The code right now that I have is this:
    void addNetworkWithSSID( Context context, String ssid, String password, ConnectivityManager.NetworkCallback networkCallback ) {
    WifiNetworkSpecifier specifier = new WifiNetworkSpecifier.Builder()
    .setWpa2Passphrase( password )
    .setSsid( ssid )
    .build();
    final NetworkRequest request = new NetworkRequest.Builder()
    .addTransportType( NetworkCapabilities.TRANSPORT_WIFI )
    .setNetworkSpecifier( specifier )
    .build();
    final ConnectivityManager connectivityManager = (ConnectivityManager)
    context.getSystemService( Context.CONNECTIVITY_SERVICE );
    connectivityManager.requestNetwork( request, networkCallback );
    }

    The problem is when I get a prompt and when I connect to the SSID... I have no internet, how can I fix that, when I connect to my AP manually I have internet, and when I connect to it by code I don't...

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

    Lambda design patterns

    Posted: 06 Jan 2020 07:26 AM PST

    Can you "Brick" a 4G Android Tablet that gets stolen?

    Posted: 06 Jan 2020 07:22 AM PST

    Sorry if this isn't the right subreddit for this question - please let me know if there's a more suitable one :)

    Basically some of our reps are going to be given android tablets whilst working out in the field.

    The question is just whether you can brick / lock these tablets beyond the pin code - we don't really care about the tablets themselves, but just in case we ended up putting any sensitive data on them.

    Thanks :)

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

    It's Rewind Time !!

    Posted: 06 Jan 2020 06:07 AM PST

    There's never a dull moment in the world of Android Development.

    So, here's an effort at an Android Rewind to encapsulate all the major announcements in the Android world in 2019.

    Let me know if I missed something 😛

    https://ayusch.com/android-development-rewind-year-2019/

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

    Database Application

    Posted: 06 Jan 2020 02:15 AM PST

    Hey, im new to Android development as well as Databases but i have learned about the basics. I just wanted to ask how would you set up an app, where users can add data to a list, which should then be synced with other users and displayed in a list view? What database is the easiest to get this working? Im really just curious about how you would approach that and interested in general hints into the right direction.

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

    Will I get my app banned if I register to GitHub Sponsors?

    Posted: 06 Jan 2020 05:59 AM PST

    Hi Android devs. Do you guys have any experience with Android apps that link to a github repo that I signed up for GitHub Sponsors on?

    I'm hoping to get some supporters for my open-source OnlineGo App (https://github.com/acristescu/OnlineGo) but I am concerned I will get my arse banned off PlayStore because it may be interpreted as me circumventing their 30% cut from if I use their fine services. I know that you're not allowed to link to a website that has stuff such as a "donate" button and this sounds similar.

    Any advice would be welcome.

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

    Need help debugging NDK amidi using gradle, jni

    Posted: 06 Jan 2020 05:53 AM PST

    Hello everyone,

    I've been a dev all my life. But I just started to get into android development because I'm using the app "Synthesia" and I'm not too happy with some of its functions. And so I wanted to do it better. I have quite some experience with Java but little to none with C++. For starters, the idea is basically to have an app that can read the input of a midi device (musical instrument) and analyze the chords that are being played.

    Now, I'm working my way through the official docs of the native midi api (part of NDK) and the official example project as well.

    I have to say that both of them kinda suck but with a lot of research and a little bit of guess work, I finally got the amidi lib to work by copying the pre-compiled .so files into a jniLibs directory.

    My project closely resembles the example project but is still a little smaller because I only need to read the data, not write it.

    I now have an app that successfully recognizes my MIDI device. But I can't seem to get it to read the data from the device. Essentially, everything that's c++ doesn't seem to work. Or, more specifically, my equivalent of the MainActivity.showReceivedMessage() from the example isn't getting called. Though, the c++/gradle/cmake stuff compiles nicely and the app runs without any errors. Of course, I did change the cpp function names to match my java architecture.

    So, my questions would be:

    1.) What would be a good way to debug that when I need the USB port for my midi device? Or, alternatively, can I simulate midi input with the emulator?

    The C++ scripts do provide some log functions, using this thing which seems to be using the "`logcat` utility" which, again, I can't use with my usb port being busy.

    2.) If you do have an idea right away of why this isn't working, I'm all ears ^^

    I'm totally stuck right now, so any help is really much appreciated.

    Thank you guys in advance! :)

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

    Noob needs help adding permissions on app init

    Posted: 06 Jan 2020 05:50 AM PST

    Hi guys,

    Along my studying process, I am trying to create an app that once initiated immediately requests permissions from the user, what I have done so far is this.. As the permission dialogue box doesn't appear after launching this app, I guess something does not work, yet I receive no errors from the compiler.

    I was able to create another app successfully that requests permissions upon a user triggering an event, in this case a click.

    Any direction how to check the logs and/or figure this out?

    TX.

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

    USB debugging pixel 2 xl

    Posted: 06 Jan 2020 04:46 AM PST

    I need to use USB debugging on my pixel 2 xl but it's not working I've enabled it in dev settings and I've tried all the USB modes, turned dev mode on and off and reset my phone heaps. Any idea on how to get it to work

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

    Does anyone how to request to increase test duration for Samsung Remote Test Lab?

    Posted: 05 Jan 2020 06:51 PM PST

    Currently, we want to test an edge case. When user upgrade Samsung Galaxy S10e, from Android 9 to Android 10, he can no longer launch our app anymore.

    We came across Samsung Remote Test Lab.

    However, for Samsung Galaxy S10e device, we only have 30 minutes test time - https://i.imgur.com/VwQmmSi.png

    But, in order to test the edge case, we need to perform update from Android 9 to Android 10, within the test device. That will take more than 30 minutes - https://i.imgur.com/750gBRD.png

    Is there a way for us, to request Samsung support, to allow us to use test device more than 30 minutes? We had emailed to rtl.support@samsung.com . But, haven't heard anything back from them yet.

    Does anyone know a better channel, for us to make such request? Thanks.

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

    Handling Clicks in Jetpack Compose

    Posted: 06 Jan 2020 03:05 AM PST

    Best practice for activity with similar UI

    Posted: 06 Jan 2020 02:18 AM PST

    Hi guys,

    I just want to know your opinion. Here is my case, I need to implement activity that is similar to my existing activity. For this case, do you guys create new activity or just use the existing one?

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

    How do I prevent Android Studio from ruining XML files?

    Posted: 06 Jan 2020 02:07 AM PST

    It has been a few months, and I still see this behavior that Android Studio decides to mess XML files each time I start it and choose to format the files.

    What I prefer in XML code style is having max of 120 characters per line, and have "wrap if long" for the "Android" settings.

    Every now and then, when I start the IDE, the code style setting gets reset all the time to "Default" scheme which has these settings, but also messes up the XML file. In case of manifest file, it puts the permissions at the bottom. In case of layout files, it randomly moves views into completely different places.

    Not only that, but each time I create a new project, instead of using the settings I've set, it always gets reset to "project".

    I've reported this issue a long time ago (here), but it still occurs.

    Currently, my workaround is to set the code style to "project" and set those settings there again, but those settings don't get saved for next sessions.

    Is there any workaround for these issues?

    Maybe there is a way to let "project" scheme remember the setting, and yet also make it stick to the actual project?

    submitted by /u/AD-LB
    [link] [comments]

    Prepopulate Room with data.

    Posted: 06 Jan 2020 12:07 AM PST

    Having a socket.io server running on the Android device

    Posted: 05 Jan 2020 11:31 PM PST

    I have a BlocklyApp that allows to program different robots. Until now, the robots I used were running some sort of Unix distro.

    So, what I was doing was: the robot serve the HTML page directly, and runs a socket.io server to receive commands from the HTML page.

    Now I have a robot running Android, and can't find how to setup the socket.io server to receive the commands.

    I tried the official Engine.io library, but can't figure out how to set it up. It mentions using Javax @Webservlet, but looking at different examples, I can't find how to actually start a server to begin with.

    Anyone tried to do this before?

    As for why I am trying to run it all locally? Schools here often provide a wifi router not connected to the Internet, or we sometimes even use the robot as AP. Running everything locally makes it much more flexible for the client.

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

    I received an email from Google "migrate to play install referrer API to track your app installs"

    Posted: 05 Jan 2020 09:17 PM PST

    What is this about? What i need to do? Kindly help me here. Thanks in advance

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

    How to get notified when other app is launched- app locker kind of implementation

    Posted: 05 Jan 2020 09:58 PM PST

    I want to perform certain tasks when other app gets launched by the user. Very similar to app locker. But i have searched through the activity manager. I couldn't find any useful hooks. But i would like to know how app to hook when other app is launched similar to app lockers that does the same thing.

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

    How to verify purchases on the server using GPD API

    Posted: 05 Jan 2020 12:47 PM PST

    Hey! I just finished implementing IAP in my app for the first time ever and it was the worst thing i had to go through so far. However, after reaching the "Verifying purchases on the server side" portion of the docs i got completely lost on the 2nd step of that portion. The documentation says that i should use the Subscriptions & Purchases part of the GPD API but when i follow the link provided i get here. After reading through those docs too, i read various things about service accounts, OAuth accounts etc. and i have absolutely no idea what all of these things are or what and how i should use them and each doc sends me to another doc and so on. I saw something about enabling the API in the console but i'm too scared to select a service or OAuth account. Does anybody have any tutorials and/or resources that may help make this part easier ?

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

    No comments:

    Post a Comment