• Breaking News

    [Android][timeline][#f39c12]

    Sunday, August 4, 2019

    [From Android dev] Flutter looks good, but is painful. Here are my frustrations with it. Android Dev

    [From Android dev] Flutter looks good, but is painful. Here are my frustrations with it. Android Dev


    [From Android dev] Flutter looks good, but is painful. Here are my frustrations with it.

    Posted: 04 Aug 2019 02:10 PM PDT

    InlineDimens: Android dimension types as inline classes with built-in conversions

    Posted: 04 Aug 2019 12:58 PM PDT

    Easy Android Preferences with Bulldog. No more boilerplate code !

    Posted: 04 Aug 2019 05:59 AM PDT

    Android widget using JavaScript?

    Posted: 04 Aug 2019 03:19 PM PDT

    Hi, Im learning html, css and JavaScript for web development and I just have an idea for good android widget.

    I was wondering if I can make android app with widget using html, css and JavaScript.

    I know it's possible to make android app but I don't know about widget which is crucial for this idea.

    Can you tell me if it's possible and what to use?

    Thanx!

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

    Android Encoding and Decoding

    Posted: 04 Aug 2019 10:31 AM PDT

    Android Encoding and Decoding

    I am trying to understand, How android device (using FFmpeg library) actually encodes and decodes in the lowest level possible.

    Here is a diagram that I drew down below.

    Figure 1.1

    Basically as far as I understand This is how it works on my case:

    1. on Top layer is Application Layer (using FFmpeg library (eg; taking video application that encodes)
    2. While Application is running and is trying to encode, it calls precompiled ffmpeg library which packaged within application (e.g; https://github.com/tanersener/mobile-ffmpeg)
    3. then FFmpeg Library sends parameter(?) to system library (hardware I guess?) to do actual encoding.

    Now the question is that If I am correct about What I am saying above (instructions)

    1. I heard FFmpeg is software encoding rather than hardware decoding but is it possible to manipulate how android system library encodes/decodes video within ffmpeg library?
    2. If so, How can i achieve this goal?
    submitted by /u/ekstrah
    [link] [comments]

    New Library: Barcode scanner View/DialogFragment/BottomSheet/AlertDialog with AndroidX+Camera2 API

    Posted: 04 Aug 2019 12:01 PM PDT

    I just released a new library. It contains a special View and some ready to use Dialogs. It's a combination of a preview and an overlay which marks the detected Barcodes.

    If anyone wants to try it out or has ideas for improvements, feel free to answer here or create a pull request :)

    You'll find screenshots and the library itself here: Barcode Kaiteki

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

    What is the correct way to handle user roles in Android?

    Posted: 04 Aug 2019 11:46 AM PDT

    What is the correct way to display information for users and guests, should I have slightly different activities to redirect users based on user authentication, or programmatically change things inside activities based on user authentication?

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

    ViewGardiumLeviosa, a small kotlin library to make a view fluctuate.

    Posted: 04 Aug 2019 02:51 AM PDT

    AdMob using Unity

    Posted: 04 Aug 2019 01:54 PM PDT

    if this is the wrong place to ask this, please point me in the right direction.

    In previous versions of my game, the AdMob ads showed correctly on my personal device.

    Test ads show correctly, but when i put my actual app and banner ids in, i get nothing. when i download my game from the app store i get no ads on my device, but i'm registering normal activity in my AdMob account from the other users.

    In the Android Studio emulator, everything shows up as test ads with my normal ids (yes i know the emulator is supposed to be a test device) so its working there.

    So its gotta be my device? I've been trying to figure this out all weekend. I don't have any ad blockers, its driving me crazy. I guess the only other question is is AdMob smart enough to know its my device?

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

    Dagger Module.subcomponents example without dagger.android

    Posted: 04 Aug 2019 01:52 PM PDT

    I am looking for a valid example of using the Module.subcomponents attribute but without android.dagger (it is a theoretical question).

    I have the following (simplified) setup of 1 Application and 1 Activity, 1 Parent Component and 1 Subcomponent:

    Application:

    public class ExampleApp extends Application { private AppComponent component; @Override public void onCreate() { super.onCreate(); component = DaggerAppComponent.create(); } public AppComponent getAppComponent() { return component; } } 

    AppComponent:

    @Singleton @Component(modules = AppModule.class) public interface AppComponent { ActivityComponent.Builder getActivityComponentBuilder(); } 

    Activity Subcomponent:

    @PerActivity @Subcomponent(modules = {ActivityModule1.class, ActivityModule2.class}) public interface ActivityComponent { void inject(MainActivity mainActivity); @Subcomponent.Builder interface Builder { @BindsInstance Builder binding1(@Named("binding1") int binding1); @BindsInstance Builder binding2(@Named("binding2") int binding2); ActivityComponent build(); } } 

    MainActivity:

    public class MainActivity extends AppCompatActivity { @Inject TheObjectIWant theObjectIWant1, theObjectIWant2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ActivityComponent component = ((ExampleApp) getApplication()).getAppComponent() .getActivityComponentBuilder() .binding1(100) .binding2(200) .build(); component.inject(this); theObjectIWant1.doStuff(); theObjectIWant2.doStuff(); } } 

    I would now like to refactor this same example to use the Module.subcomponents attribute instead of the Subcomponent.Builder factory method. For this, I remove getActivityComponentBuilder() from the AppComponent and add the Module.subcomponents attribute to the AppModule:

    AppComponent (new):

    @Singleton @Component(modules = AppModule.class) public interface AppComponent { } 

    AppModule (new):

    @Module(subcomponents = ActivityComponent.class) public abstract class AppModule { [...] } 

    My question is pretty simple. How do I now get the ActivityComponent.Builder into the MainActivity? I can't constructor inject the MainActivity, so there's only really field injection left:

    MainActivity (new, theory):

    public class MainActivity extends AppCompatActivity { @Inject ActivityComponent.Builder activityComponentBuilder @Inject TheObjectIWant theObjectIWant1, theObjectIWant2; ((ExampleApp) getApplication()).getAppComponent().inject(this) [...] } 

    But this will not work, since the AppComponent can't inject theObjectIWant1 and theObjectIWant1. They only come from the ActivityComponent.

    So is this approach just not suitable here?

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

    My first Android Open source Project (theParker(Based on the concept of Shared parking))

    Posted: 04 Aug 2019 10:54 AM PDT

    [Help] I want to start learning android app dev with absolutely no experience.

    Posted: 04 Aug 2019 02:30 PM PDT

    Never programmed before and but i really want to learn android app dev. Where do i start?

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

    How to programmatically intercept all network requests from third-party libraries?

    Posted: 04 Aug 2019 10:16 AM PDT

    Is there any way to intercept all network requests made by our app, programmatically, independent if it is initiated directly by us or indirectly by some integrated library?

    Something like https://github.com/jgilfelt/chuck , but that also intercepts network requests made by libraries (e.g. Firebase, Crashlytics)?

    I ask this because recently we integrated in our iOS app this library https://github.com/kasketis/netfox , which is able to log these kind of requests. But I could not find anyway to mimic this behavior in Android.

    I have tried to use "URLStreamHandlerFactory" as stated here: https://stackoverflow.com/questions/7496378/how-to-intercept-http-requests-made-by-a-3rd-party-library-on-android?rq=1 . But I can only see the endpoints being requested, not the actual data transferred.

    Another question suggested implementing a custom "SSLSocketFactory" https://stackoverflow.com/questions/1445919/how-to-enable-wire-logging-for-a-java-httpurlconnection-traffic , but I have not being able to intercept any communication with this.

    So, is it possible?

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

    Answer: how to update widget every minute on Android 8+

    Posted: 03 Aug 2019 11:41 PM PDT

    A week ago I asked this question here and got some advices. Today I'm ready to share the only approach that works for me — hope this information will be helpful for someone :)

    A little context: I have an app with clock widget, and the problem is to update widget exactly every minute to show actual time. My approach was killed by background service restrictions of Android 8, and then killed again by Google Play restrictions for min targetSdkVersion.

    So here are results of my exploration:

    Approach Verdict
    0. Original approach. AppWidgetProvider starts background Service, which registers BroadcastReceiver for Intent.ACTION_TIME_TICK events. Each event triggers widget updates. ❌Incompatible with background service restrictions of Android 8+, can't be solved by making targetSdkVersion lower due to Google Play restrictions. Works well: always updates widget synchronously with system clock, don't drain battery.
    1. WorkManager ❌Min repeat interval is 15 minutes. Clock have to be updated every minute.
    2. ForegroundService 🤔Forces you to constantly show Notification for user just to update your widget every minute. But allows to reimplement well-working original approach.
    3. AlarmManager + setExactRepeating(AlarmManager.RTC, ...) 🤔First alarm triggered exactly at xx:xx:00, but next ones are going at xx:xx:25 or any other second — not good for clock widget, huh?
    4. AlarmManager + setExact(AlarmManager.RTC, ...) with manual rescheduling ✅Works well, all alarms triggered exactly at xx:xx:00. When phone goes to doze mode updates are stopped, but immediately after waking up alarm is triggered and widget got its update. Approach need system boot event receiver to reschedule AlarmManager after reboot.

    And a little more details for 4-th approach:

    1. AppWidgetProvider
      1. in onEnabled() start your ticks with AlarmManager.setExact(...)
      2. in onDisabled() stop your ticks with AlarmManager.cancel(...)
      3. specify some YOUR_TICK_ACTION string for Intent, that goes into AlarmManager wrapped with PendingIntent
      4. don't forget to make Intent explicit by calling intent.setClass(context, TickReceiver::class.java)
    2. TickReceiver
      1. register in manifest for YOUR_TICK_ACTION intent filter
      2. on receive intents reschedule alarm by calling AlarmManager.setExact(...) again and do some update work (I just send widget-update intent and AppWidgetProvider make all the work by itself)
    3. BootReceiver
      1. register in manifest for system boot intent filter
      2. reschedule AlarmManager if needed
    submitted by /u/alexeyterekhov
    [link] [comments]

    How do I send image to a local server on my pc?

    Posted: 04 Aug 2019 06:17 AM PDT

    I was planning to make a project a part of it is to get images from a remote device every 2 seconds and save it to my pc (which is connected to the local server)

    The app should take an image every 2 seconds and upload it to the server, how do I upload the image? Will I need to make a java app on my pc to receive the images? What is the easiest way to do this?

    I'm pretty new to android dev so I'm confused on what to use and how I need to do this, any advice would be really helpful!

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

    Intersitial Ad Earnings

    Posted: 04 Aug 2019 09:21 AM PDT

    Hey guys, I wanted to know a bunch of stuff about ads:

    If I've got it right, Intersitial ads are the ones who get you most profit, right?

    But like banner ads, do they have to be clicked and opened to get me some bread, or is the intersitial enough?

    What's the best way to get the most out of ads?

    Thank you!

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

    Cannot test Room Transactions + LiveData

    Posted: 04 Aug 2019 01:58 AM PDT

    I posted this in the questions thread but that has been removed for some reason and also this seems like an important issue without a solution so I am creating this thread.

    The issue is basically room transactions refusing to work with the InstantTaskExecutor rule in tests. This stackoverflow thread explains it nicely. I tried creating a separate test-only DAO method that directly returns the data instead of livedata in order to remove the rule but then my suspend calls fail with some weird job not complete exception. So it seems that rule is required to test both coroutines and livedata but I cannot also test transactions if it is present. Does anyone have any ideas to solve this?

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

    New android dev

    Posted: 04 Aug 2019 01:54 PM PDT

    Well i thought after years now that i would try some android dev. Just start out will a little hello world app and get the ball rolling, just like any other platform/language ive used. HOLY SHIT I WAS WORNG.

    • Had to download a 1gig IDE
    • it auto downloaded more shit just to run
    • default project auto generated a million fkn files.
    • then some piece of shit program called gradle was taking forever to download yet more shit for no fken reason.
    • then to run a program on a android "emulator" it had to download 800mg emulator!

    since when do you have to be connected to the internet to compile a god dam program.

    my god what the fuck were google thinking ? all this bullshit just to make a hello world pop up on the screen. fuck.

    why cant your just compile and run from the command line like a normal person. i mean "javac helloworld.java" to compile and "java helloworld" to run

    how the hell do you people live with this shit. I cant even use my fav text editor. or my fav java IDE netbeans.

    I cant be the only one who thinks this, surely

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

    What's it like trying to get a refund from chartboost?

    Posted: 03 Aug 2019 04:24 PM PDT

    I'm trying to get a refund from chartboost. I gave up on putting ads in my apps as it just seemed like a waste of time, and annoying for my users. I've been trying for about a month to get a refund on my balance in chartboost (it's around $400), but they're totally silent on the subject. Has anyone else had any experience trying to do this? Do they just take a long time, or is there some other avenue I need to pursue?

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

    What's wrong with the android studio bs??

    Posted: 04 Aug 2019 07:33 AM PDT

    What's wrong with the android studio bs??

    Iam trying to learn React Native throguh a udemy course, and I cannot even run the basic first init project, I have i5 4460 and 12gb ram, chrome and all closed, and it eats it like nothing, and the app doesn't even finish loading in the emulator,,, wth??

    https://i.redd.it/pfypvog60ge31.jpg

    https://i.redd.it/ia4bm7ed0ge31.png

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

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel