• Breaking News

    [Android][timeline][#f39c12]

    Tuesday, March 31, 2020

    Android Studio 3.6.2 available Android Dev

    Android Studio 3.6.2 available Android Dev


    Android Studio 3.6.2 available

    Posted: 31 Mar 2020 12:42 PM PDT

    DarkSky API is getting revoked in 2021 and DarkSky android app will shutdown on the 1st of July 2020

    Posted: 31 Mar 2020 06:17 PM PDT

    google admob in app

    Posted: 31 Mar 2020 09:09 PM PDT

    I have implemented rewarded video ads on my app.

    I also set up a mediation with AppLovin.

    However, now it seems most of my ads served are from AppLovin.

    I do not want this because applovin ads does not show the "X" close button and indicator of duration of video.

    I would like to use Google Admob as main source of ads, and use only applovin if they can't fulfil an ad request

    How do I do this?

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

    I didn't receive my payment this month

    Posted: 31 Mar 2020 03:28 PM PDT

    Hey, just a quick question, did you all get your payment this month, I dont even mean in my bank account but in the payment section, it's just the same amount as the last month, which is bad since march was my best earning month since yea, ever

    View Poll

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

    Android reusable component

    Posted: 31 Mar 2020 05:53 PM PDT

    I have a activity in a android project that is getting pretty big, I'm using MVC as architecture.

    One of the reasons this activity is getting big, is that there are lot's of hidden components that are dynamically added and removed from the layout during it's usage.

    What would be the best approach to break it in little UI components? Fragments? ViewHolders? any other?

    (changing the architecture is not a option)

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

    How would I update an app so android recognizes it as a sms app?

    Posted: 31 Mar 2020 09:31 PM PDT

    Title. Side note I am not experienced in this. I have found myself an app that has been dropped by the devs and my current version of android won't recognize it as an sms app so I thought I could try my hand at fixing it myself but I am a bit stuck. Any help would be appreciated.

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

    Is it worth it to follow the Android Kotlin course by Google on Udacity?

    Posted: 31 Mar 2020 04:28 AM PDT

    I'm a beginner here trying to learn different Jetpack packages such as Architecture and Navigation.

    I have taken the Android Kotlin Udacity by Google course and I have noticed in their examples that they have used android arch libraries and on the documentation page it has been mentioned androidx.

    I know what AndroidX is but is it okay to replace those examples but using the versions mentioned in the docs?

    Thanks in advance!

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

    Read raw fingerprint from device

    Posted: 31 Mar 2020 08:26 PM PDT

    Is there any way, I can read raw input from fingerprint sensor in android, instead of authenticating, I want to read fingerprint from my app.

    It will be fine even I get solution in root.

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

    LiveData-CombineTuple-KT: A library that lets you combine multiple LiveData into a single LiveData on each change made to any of the source LiveDatas

    Posted: 31 Mar 2020 10:55 AM PDT

    Do companies hire Java-only developers?

    Posted: 31 Mar 2020 07:00 PM PDT

    Most of the recruiters reaching out to me ask if I know Kotlin or if I can help them migrate their apps from Java to Kotlin. I'm still learning Java and don't want to start with Kotlin until after I've gotten a lot of familiarity with Java. But I also really want to enter the industry as a junior dev, and I worry not knowing Kotlin can cost me not finding work. Should I start with Kotlin now? Or do I have a chance for now to get hired as someone who only knows Java?

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

    How to Build your first Android app in RxJava and Dagger

    Posted: 31 Mar 2020 12:06 PM PDT

    Using MVC in Android App today will be good idea, specially when testability is important for an app?

    Posted: 31 Mar 2020 02:10 PM PDT

    Introducing dual-screen layouts for Android | Surface Duo Blog

    Posted: 30 Mar 2020 05:59 PM PDT

    Why is the emoji on Gboard became inconsistent recently. Before, it was uniform Samsung Emoji across apps. Now it differs per app.

    Posted: 31 Mar 2020 06:05 AM PDT

    [Tech] Do some processing on Captured Image before saving on CameraX API

    Posted: 31 Mar 2020 03:51 PM PDT

    How to do some processing and then save the image using camerax api. I just followed the codelab and i cant understand how to do some operations on image before saving. In camera2 api i could do this.

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

    [HELP] Retrofit Login with API

    Posted: 31 Mar 2020 03:43 PM PDT

    I'm trying to get this login to work, but for some reason it always return a 422 code, when trying to send the data to get a api token. I'm unsure of the process of the login and saving the token for further use.

    This is the retrofit setup

    Gson gson = new GsonBuilder().serializeNulls().create(); HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); OkHttpClient okHttpClient = new OkHttpClient.Builder() .addInterceptor(new Interceptor() { @NotNull @Override public okhttp3.Response intercept(@NotNull Chain chain) throws IOException { Request originalRequest = chain.request(); Request newRequest = originalRequest.newBuilder() .build(); return chain.proceed(newRequest); } }) .addInterceptor(loggingInterceptor) .build(); Retrofit retrofit = new Retrofit.Builder() .baseUrl("http://192.168.0.4:8000/api/") .addConverterFactory(GsonConverterFactory.create()) .client(okHttpClient) .build(); jsonPlaceHolderApi = retrofit.create(JsonPlaceHolderApi.class); 

    This is the code I have so far, this is Api Interface, the Login model only has those three fields with the usual model setup

     @FormUrlEncoded @Headers({"Accept: application/json", "Content-Type: multipart/form-data"}) @POST("sanctum/token") Call<Login> LoginUser( @Field("scard") String scard, @Field("password") String password, @Field("device_name") String device_name ); 

    This is the code where I'm trying to do the login and retrieve the token, the api route returns this

    { "user": { "id": 1, "name": "ny", "lastname": "gz", "maidenname": "ua", "card": "1192", "scard": "134", "email": "ny@gmail.com", "created_at": "2020-03-25 15:47:44", "updated_at": "2020-03-25 15:47:44" }, "token": "M5VoP..." } 

    Attempted login, the response is always 422

    scardText = (EditText) findViewById(R.id.scardET); passwordText = (EditText) findViewById(R.id.passwordET); Button loginbtn = (Button) findViewById(R.id.loginbtn); loginbtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String scardI = scardText.getText().toString(); String passwordI = passwordText.getText().toString(); String device_name = Settings.Secure.getString(getContentResolver(), "bluetooth_name"); Login loginnew = new Login(scardI, passwordI, device_name); Call<Login> call = jsonPlaceHolderApi.LoginUser(scardI, passwordI, device_name); call.enqueue(new Callback<Login>() { @Override public void onResponse(Call<Login> call, Response<Login> response) { if (!response.isSuccessful()) { textViewResult.append("Code: " + response.code() + "\n"); return; } } @Override public void onFailure(Call<Login> call, Throwable t) { textViewResult.setText(t.getMessage()); } }); } }); 

    This is in the logcat in AndroidStudio

    D/OkHttp: Content-Type: multipart/form-data D/OkHttp: Content-Length: 57 D/OkHttp: Accept: application/json D/OkHttp: scard=134&password=password&device_name=Galaxy%20Note8 D/OkHttp: --> END POST (57-byte body) D/TcpOptimizer: TcpOptimizer-ON D/OkHttp: <-- 422 Unprocessable Entity http://192.168.0.4:8000/api/sanctum/token (841ms) D/OkHttp: Host: 192.168.0.4:8000 D/OkHttp: Date: Tue, 31 Mar 2020 18:27:47 GMT D/OkHttp: Connection: close D/OkHttp: X-Powered-By: PHP/7.3.10 D/OkHttp: Cache-Control: no-cache, private D/OkHttp: Date: Tue, 31 Mar 2020 18:27:47 GMT D/OkHttp: Content-Type: application/json D/OkHttp: X-RateLimit-Limit: 60 D/OkHttp: X-RateLimit-Remaining: 59 D/OkHttp: <br /> D/OkHttp: <b>Warning</b>: Missing boundary in multipart/form-data POST data in <b>Unknown</b> on line <b>0</b><br /> D/OkHttp: {"message":"The given data was invalid.","errors":{"scard":["The scard field is required."],"password":["The password field is required."],"device_name":["The device name field is required."]}} D/OkHttp: <-- END HTTP (308-byte body) 
    submitted by /u/msslgomez
    [link] [comments]

    Is initializing a new RecyclerView Adapter an asynchronous call?

    Posted: 31 Mar 2020 03:06 PM PDT

    How accurate is this answer?

    I've been getting conflicting answers of Yes and No.

    https://stackoverflow.com/a/60957110/11110509

    Are RecyclerView adapters automatically initialized on a background thread?

    No, they are not.

    Is the initialization of a new RecyclerView adapter an asynchronous call?

    No, it is not.

    The layout creation and attachment to window is async.

    What this means? Assume we have following code:

    override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... val adapter = MyAdapter() recyclerView.adapter = adapter adapter.list.add("1") } 

    In this case we will see the "1" being displayed on the screen, because at the point when adapter.list.add("1") was executed RecyclerView hasn't yet passed through its measure-layout-draw cycle.

    Now let's consider following code:

    override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... val adapter = MyAdapter() recyclerView.adapter = adapter Handler().postDelayed({ adapter.list.add("AAA") }, 2000) } 

    In this case adapter.list.add("AAA") will be executed in roughly 2 seconds. As long as RecyclerView will already be laid out by that time, then mutating the adapter dataset won't make the RecyclerView show the item, because RecyclerView doesn't know if dataset has suffered a change.

    Let's consider following case:

    override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... val adapter = MyAdapter() recyclerView.adapter = adapter recyclerView.doOnPreDraw { adapter.list.add("preDraw") } recyclerView.doOnLayout { adapter.list.add("layout") } adapter.list.add("onCreate") } 

    In this case still only "onCreate" will be displayed on screen.

    To sum up: as soon as RecyclerView has passed its measure step (i.e. View#onMeasure) then mutating adapter won't be reflected unless adapter explicitly notifies RecyclerView.

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

    Handling Orientation changes in Native Activity EGL

    Posted: 31 Mar 2020 02:11 PM PDT

    Hey All,

    I have a EGL native activity where I want to handle orientation changes. Currently, when the orientation changes, I delete the current EGLSurface and create a new one that I pass to the display via eglMakeCurrent (I requery a EGLConfig to match the current displays). The problem is that this new surface seems to be the same dimensions as the old even tho the orientation changed and I requeried the windows dimensions, and so half of my display is black and the display never updates.

    Is there something else I have to do to correctly handle portrait and landscape displaying in my app? I want to avoid having to recreate the EGLContext since that means having to reupload all the assets to GPU memory every time the user changes orientation (which kills perf, power and is in general wasteful). If I start my app in portraint mode or in landscape mode, then it displays correctly btw. Its only when I change the orientation that it fails. Does anyone else have any pointers on how to correctly do this?

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

    Need help with coding something

    Posted: 31 Mar 2020 02:06 PM PDT

    In my android studio progam, I have already created a basic google maps functionality in it. My goal now is to create possibly 4 different traffic lights for an intersection along with a integer value "x=___" appear on screen at each of the 4 different intersections. I was curious as to how i should exactly do this in android studio? Any help is much appreciated :)

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

    How to test api calls from android app to localhost service?

    Posted: 31 Mar 2020 02:58 AM PDT

    I'm trying to understand how to test http calls from my app (which is running in an emulator) to my backend service, which is running in debug on my pc on https://localhost:8080.

    I get that talking to https://localhost:8080 directly from android won't work because it means "emulator's localhost", so I'm talking to my pc local ip, but I got CERTIFICATE_VERIFY_FAILED because of course https://192.168.1.123:8080 doesn't have a signed cert.

    What is the correct way to handle this situation?

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

    Social Media App in kotlin and Sqlit ?

    Posted: 31 Mar 2020 09:29 AM PDT

    Is it possible to create a social media app using SQLITE and Koltin ?

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

    Clean Architecture Data Layer.

    Posted: 31 Mar 2020 08:34 AM PDT

    Is there any way to avoid redundant model classes for my domain layer and data layer? In domain layer i have usecases that produce results represented by my model classes of domain layer. Now i want to use those models and store them in my local db (Room) . Do i have to create the same entities in my data layer? I feel that this is a bad practice. I know that i can't use the entities of my domain layer, cause in that case i will have to use room annotations outside of data layer.

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

    Read/write limits for Firebase's Realtime Database

    Posted: 31 Mar 2020 06:44 AM PDT

    What is the limit on how many read/writes you can make on the Realtime Database?

    I found the on the Cloud Database, but not the Realtime Database, is it limited by storage capacity instead? How much would that be?

    Thank you.

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

    Where do you guys find good svgs and image assets for your apps?

    Posted: 30 Mar 2020 09:51 PM PDT

    I want to make a simple app as my first, however I'm looking for some crisp images assets I can use. Is there a better alternative than using non copyrighted google images?

    Edit: Thanks! I'll check these out

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

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel