• Breaking News

    Monday, February 17, 2020

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

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


    Weekly "who's hiring" thread!

    Posted: 17 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 17, 2020

    Posted: 17 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]

    Looking to grab onto something when creating your first app? Here is a free source code!

    Posted: 17 Feb 2020 12:57 AM PST

    Like most developers, I use my own projects as a sandbox for exploring new stuff.I would like to open source my app, which has more than 50.000 downloads.It does use generic abstractions of architecture components, Room, Koin, LiveData, Fragments, Kotlin Coroutines, AndroidX and more. Hopefully it might be a helpful material for new devs. Source code can be found here: https://github.com/edgar-zigis/Paleontologas

    (Say thanks by starring repository :)))

    submitted by /u/biomatic-1992
    [link] [comments]

    Security implications of OkHttp ConnectionSpec.allEnabledCipherSuites and ConnectionSpec.allEnabledTlsVersions

    Posted: 17 Feb 2020 05:55 AM PST

    Hi there,

    my starting point is I want to use Retrofit with OkHttp and support Android >= 4.4.
    Since OkHttp dropped support for Android < 5.0 I'm forcing Retofit to use an older version of OkHttp (3.11).
    Making a network call to https://jsonplaceholder.typicode.com/todos/1 on an emulator with sdk level 19 (Android 4.4) yields:
    java.net.ConnectException: Failed to connect to jsonplaceholder.typicode.com

    Caused by: java.net.ConnectException: failed to connect to jsonplaceholder.typicode.com/2606:4700:3035::681b:99d1 (port 443) after 10000ms: isConnected failed: ENETUNREACH (Network is unreachable)

    Some resources on the internet suggest to do the following when building your OkHttp client:

    val specs = ConnectionSpec.Builder(ConnectionSpec.COMPATIBLE_TLS)
    .allEnabledCipherSuites()
    .allEnabledTlsVersions()
    .build()

    val client = OkHttpClient.Builder()
    .connectionSpecs(listOf(specs))
    .build()

    Applying this, the network call now works fine on sdk level 19.

    I'm assuming the server uses an encryption method that is not supported by either Android 4.4 or the older OkHttp version? What does the aforementioned workaround do, does it drop encryption alltogether? Or does it accept an encryption method that is not considered secure anymore?

    Can someone give me a little rundown on what exactly is happening here and what the security implications are for my app when using allEnabledCipherSuites and allEnabledTlsVersions?

    PS: I've created a small test project for anyone to check out or play around with.

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

    Session - A Signal protocol fork with decentralized servers and no need for a phone number

    Posted: 16 Feb 2020 03:17 PM PST

    r/androidapps suggest I cross-post this...

    Session is a cross-platform, anonymous and decentralized messaging application. You don't need a phone number or email address to make an account.

    Session uses the Loki Service Node network to route the data, for which the nodes are rewarded with $LOKI. The Loki Network itself is made up of some ~1000 community operated Service Nodes where 44% of the supply is held in the SNs - about US$7.5 million at the moment.

    I love Signal, but I don't love the attached phone numbers or central servers, but I know there's a challenge in allowing an altruistic intention over a financial incentive for the node operators - Sybil resistance. By using Loki's Service Node network, the crypto-economics is designed in a way that a bad actor would drive the price exponentially up while trying to accumulate enough Loki to be able to perform any traffic analysis on the routed data.

    Think of it as a Signal fork meets a Monero fork meets an incentivized TOR network.

    Web: getsession.org

    Whitepaper: https://getsession.org/wp-content/uploads/2020/02/Session-Whitepaper.pdf

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

    30-35% impression rate, even with 80% fill rate

    Posted: 17 Feb 2020 08:23 AM PST

    Yeah, so as the title says, impression rate for my interstitials have never gone beyond 40%. A month or two before I added the logic to display the content only after the ad loaded listener was fired, but the impression rate was still around 30%.

    What might be the reason for that? I can see that the fill rate is around 80% for the ads. Is it because of ad blockers? Did anyone face the same thing before?

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

    How would I go about supporting admin features in my app?

    Posted: 17 Feb 2020 02:06 AM PST

    So I have an app that I want to make available for users but that also needs to be able to give admin privileges to some users, maybe only me.

    I know that in web dev you could just have an account with Admin privileges show a custom dashboard, so would something similar to that work in Android? Maybe It'd be better to create 2 apps for the purpose (one for users and one for admins)? Or would back-end dashboards(WordPress/Azure/Firebase Console) management be the best way?

    What would be the most proper way to accomplish this as per best practices and flexibility in Android? I am using Kotlin, AAC and MVVM.

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

    Introducing Requests, yet another HTTP client library

    Posted: 17 Feb 2020 07:43 AM PST

    There are a number of HTTP client libraries for Android, they work quite well. Being a Python developer, I have always missed requests alike HTTP client library in Android. So I wrote requestsj a simple library that brings in the simplicity from Python over to Android/Java. It's a wrapper on top of HttpURLConnection

    The API is clean, non-blocking, so developers don't have to do multithreading in their code. Below I share a sample GET request example

    HttpRequest request = new HttpRequest(); request.setOnResponseListener(new HttpRequest.OnResponseListener() { @Override public void onResponse(HttpResponse response) { if (response.code == HttpResponse.HTTP_OK) { System.out.println(response.toJSONObject()); } } }); request.setOnErrorListener(new HttpRequest.OnErrorListener() { @Override public void onError(HttpError error) { // There was an error, deal with it } }); request.get("https://httpbin.org/get"); 

    More examples and installation instructions could be found on project's GitHub page https://github.com/codebasepk/requestsj/

    In future I also plan to write a variant of this library that uses Java8's CompletableFuture instead of callbacks.

    You are welcome to test, fork and propose any improvements or features and I'll make sure to respond to those.

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

    Trying to use Espresso test for onActivityResult for a TextView but the test fails.

    Posted: 17 Feb 2020 07:24 AM PST

    This is the test that I'm wanting to run:

     @Rule @JvmField val activityMain = ActivityTestRule(ActivityMain::class.java) @Rule @JvmField val activityPickName = ActivityTestRule(ActivityPickName::class.java) @Before fun start() { Intents.init() } @After fun tearDown() { Intents.release() } @Test fun testChooseNameActivityResult() { val resultData = Intent().apply { this.putExtras(bundleOf( "key_name" to "something" )) } val activityResult = Instrumentation.ActivityResult(Activity.RESULT_OK, resultData) intending(toPackage(ActivityPickName::class.java.name)).respondWith(activityResult) onView(withId(R.id.btn_choose_name)).perform(click()) activityPickName.finishActivity() onView(withId(R.id.tv_name)).check(matches(withText("something"))) } 

    From the ActivityMain on button press R.id.btn_choose_name a new activity is launched ActivityPickName and it should return a selected name. In the ActivityMain the selected name should be placed on the TextView (R.id.tv_name).

    Now the problem is that the test fails with the following error:

    androidx.test.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError: 'with text: is "something"' doesn't match the selected view. Expected: with text: is "something" Got: "AppCompatTextView{id=2131297213, res-name=tv_name, visibility=VISIBLE, width=984, height=132, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@ded0041, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=null, hint=Choose a name, input-type=0, ime-target=false, has-links=false}" 
    submitted by /u/leontin91
    [link] [comments]

    Generate Kotlin Docs using Dokka

    Posted: 17 Feb 2020 06:54 AM PST

    Dynamic locale change not working on Bundle release. Can anyone explain why?

    Posted: 17 Feb 2020 05:48 AM PST

    I have a feature for user to change locale dynamically. During internal tests, I've come to the realization that if the bundle is being on the store, user can not change locale dynamically in the app, while if I push APK, the user can change locale dynamically.

    Bundle bug or feature? :D

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

    I'm designing an app for a school project. The assignment says it has to be culturally friendly/divers. Besides multiple languages options, what can there be done ?

    Posted: 17 Feb 2020 01:37 AM PST

    Flutter Might Be Your Technology of Choice for Mobile in 2020 – Here Is Why

    Posted: 17 Feb 2020 04:57 AM PST

    Can we use the S20/Ultra depth sensors with ARCore?

    Posted: 16 Feb 2020 11:40 PM PST

    Just saw that the S20+ and S20Ultra will have a dedicated depth sensors. Would love to develop utilizing this.

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

    Now in Android: January 23, 2020

    Posted: 17 Feb 2020 03:14 AM PST

    What's your AdMob fill rate ?

    Posted: 16 Feb 2020 11:08 PM PST

    I am making a survey to benchmark my fill rate. I'm with my banners close to 100 percent, but with my interstitials around 70-80 percent. Seems there is a lot of unused potential for monetization.

    submitted by /u/m10r-vc
    [link] [comments]

    How to properly handle this IOException

    Posted: 16 Feb 2020 10:49 AM PST

    I am trying to follow an online tutorial to see how okhttp works for requests in android studio using kotlin.

    I have managed to implement it successfully for when the request is good.

    However when the request is unsuccessful (invalid search by the user, api not working properly, too many requests etc.) My app just crashes and closes down.

    How can I edit my code so the error is handled properly and the app doesn't have to shut down.

    example:

    The user enters a key that is not valid so the api request fails.

    I don't want the app to close but a toast to pop up saying "check your input is valid".

    How can I do this?

    val url = "www.google.com" val request = Request.Builder().url(url).build() val client = OkHttpClient() client.newCall(request).enqueue(object : Callback { override fun onResponse(call: Call, response: Response) { //code if request is successful. } override fun onFailure(call: Call, e: IOException) { //code if request was unsuccessful } }) 
    submitted by /u/ikihsin2
    [link] [comments]

    Can't get data binding to work.

    Posted: 16 Feb 2020 05:31 PM PST

    I get this error java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

    I have used both JDK 8 and 11 and I still receive this message. If I disable data binding the app runs.

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

    Developing your own Dynamic Feature

    Posted: 16 Feb 2020 12:42 PM PST

    App rejected using SEND_SMS, HELP!

    Posted: 16 Feb 2020 09:11 PM PST

    First of all, I am aware of the restrictions. But what I don't know is how to put my app on play store because it is rejected.

    The application is for enterprise organization and this is what the app does ( and nothing more ):

    1. You start a web-server by clicking the app.
    2. A desktop application will call an api. example 192.168.100.2:85475/myapi?number=+123456789&msg=this_message
    3. The app then sends the msg to the specified number.

    What can I do to make sure play console publishes my application. It has already been rejected once. I need helps ASAP from experienced publishers.

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

    Facebook Developer Individual Verification Limitations

    Posted: 16 Feb 2020 11:41 AM PST

    Hello, I am trying to create an Android app for school that creates an aggregated timeline of users social medias. I have recently applied for individual verification to access the old Instagram api but just read this article detailing limitations for individual devs (https://developers.facebook.com/docs/apps/review/#individual-verification)

    It says I won't be able to ask users for permission to access user_posts . Am I pretty much done for or is there I way to be able to use these parts of the API if I am not a business?

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

    Are there any worthwhile android courses online?

    Posted: 16 Feb 2020 11:10 AM PST

    Hi I have been trying to learn android development for the past month.

    In this time I have learnt the basics of Kotlin (I had studied some java in college a while ago but was recommended to try kotlin so I did).

    And even have built a few very small beginner apps as I learn best by doing.

    However I have noticed that I don't know good practises, my code is not very good and I don't have a good grasp on a lot of technical things (I don't know what a fragment is, I don't know how best to manage the lifestyle of an activity).

    Are there any good online course that will give me this in a more structured way whilst still giving me ample opportunity to practise coding. I am really struggling at the moment.

    Thanks!

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

    How to setup a server to blackbox apps?

    Posted: 16 Feb 2020 11:59 AM PST

    Trying to blackbox test a few applications. I want to setup a cleanroom environment where I proxy app connections to a server that I control. I can get the proxy working but there are several services the app expects... Any way to fake these services to better understand how the app communicates?

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

    No comments:

    Post a Comment