• Breaking News

    [Android][timeline][#f39c12]

    Wednesday, June 15, 2022

    Anyone in this sub worried about layoffs at all? Curious on peoples thoughts Android Dev

    Anyone in this sub worried about layoffs at all? Curious on peoples thoughts Android Dev


    Anyone in this sub worried about layoffs at all? Curious on peoples thoughts

    Posted: 14 Jun 2022 06:46 PM PDT

    If you're from the US, I'm sure you've seen some news about layoffs in "tech" companies across multiple different industries. I'm sure there are layoffs in other countries as well, I'm just not aware of the amount or severity comparatively. Mostly getting my data though layoffs.fyi

    Either way, what's everyone's thoughts on Android Devs when it comes to the layoffs? Worried? Not worried? Not sure what to think? How's your country/company doing? Any personal experiences?

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

    Free online list manager with APIs

    Posted: 15 Jun 2022 03:14 AM PDT

    I'll try and keep this question short: is there a service that let's you keep a list (say a groceries list) saved online and provides you the APIs to push, edit and pull the list?

    I'm developing a quick and simple app for personal use (it's an app that me and my family will use to organize our two weeks vacation with features like a bulletin board, weather forecasts, GPS navigation, shopping list etc) and the last piece of the puzzle is the shopping list/bulletin board (the mechanisms at the base are the same). Since I'm not hosting the app anywhere (I'm just passing the built apk) I need something that hosts the shopping lists and lets me push, edit and pull it with APIs (preferably APIs usable in kotlin).

    The only key point is the final use (the list) so the "form" of the service could be anything: shopping list hosting service, json hosting service, general txt hosting service (pasteBin doesn't have an API to edit a bin) etc.

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

    BindsAdapter - Auto-gerneate your Adapters

    Posted: 15 Jun 2022 03:44 AM PDT

    I've create another ksp side project, but this time it's more related to our daily work as an Android developer - Auto generated Adapter related code.

    Repo : https://github.com/Jintin/BindsAdapter

    The goal of this lib is to get rid of writing onCreateViewHolder, onBindViewHolder etc.

    Generally, you just need to create your ViewHolder and lable annotation to which function is used for onBindViewHolder and create aabstract Adapter which link to those ViewHolders via annotation.

    The ViewType const will automatically create and be used in onCreateViewHolder and onBindViewHolder .

    And if you want to pass data from Adapter to ViewHolder, label the same annotation for both side and that's it.

    Check the readme for more information, there's an app module can try more use case too.

    p.s. Last time I share https://github.com/Jintin/KFactory in reddit and got many feedback (including rename the project from Kactory XD), and the discussion also inspire me to build this :).

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

    Kotlin Illustrated Guide - Receivers and Extensions

    Posted: 15 Jun 2022 05:40 AM PDT

    When I capture image output from default front camera of my developing app the size gets large and mirrored in left side as you can see from the photo.the original photo is taken from my mobile camera app which is correct and the exact result that i want. what's the solution for this pblm ?

    Posted: 15 Jun 2022 08:59 AM PDT

    Building an app for Finding location quiz app on android

    Posted: 15 Jun 2022 06:15 AM PDT

    Hello, genius developers here, I'm a student and I want to build an app on an android studio in which, in a given map quiz I can find different locations or rivers or mountains, etc by taping on that region particular region as the same appears of that location.

    In case I tapped the right location it displays Right in green color and if I tapped at the wrong location it displayed the wrong location.

    Can someone help me with the source code for the same? Many thanks

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

    how do i find out how long active users spend on my apps?

    Posted: 15 Jun 2022 05:37 AM PDT

    i have an app on playstore and i want to know how much time does users spent on my app how do i know that.

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

    Have a device in Dedicated Managed Mode / Kiosk mode. Have an application purchased both via serviceworker and enterprise-owner's accounts. App doesn't recognize the purchase and still displays advertisements.

    Posted: 15 Jun 2022 05:33 AM PDT

    When the policy is updated to not be in kiosk mode, and the enterprise-owner account is added to the device, the app still does not recognize the purchase. I'm at a loss, at this point.

    What am I missing?

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

    What Factors Contribute To Successful Software Development Services in 2022?

    Posted: 15 Jun 2022 05:07 AM PDT

    How did the giants rise? Episode I!

    Posted: 15 Jun 2022 04:22 AM PDT

    Get frames from the camera (Java)

    Posted: 15 Jun 2022 01:02 AM PDT

    Actually, I'm writing an Android library for Godot Engine.

    Which steps do I envision?

    1- Get the frames from the camera.

    2- Convert frames to Bitmap.

    3- Resize Bitmap if required (optional).

    4- Send to Godot Engine.

    I'm currently stuck on step one, can anyone give me a simple example of getting the frames from the camera?

    I don't want to display frames in Android Studio I just want to get them from the code

    Note:

    I am using Java version 11.

    Edit:

    I tried this code:

    public class MainActivity extends AppCompatActivity { private ListenableFuture<ProcessCameraProvider> cameraProviderFuture; private ImageCapture imageCapture; private Button bCapture; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); bCapture = findViewById(R.id.bCapture); bCapture.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { capturePhoto(); } }); cameraProviderFuture = ProcessCameraProvider.getInstance(this); cameraProviderFuture.addListener(() -> { try { ProcessCameraProvider cameraProvider = cameraProviderFuture.get(); startCameraX(cameraProvider); } catch (ExecutionException | InterruptedException e) { e.printStackTrace(); } }, getExecutor()); } Executor getExecutor() { return ContextCompat.getMainExecutor(this); } private void startCameraX(ProcessCameraProvider cameraProvider) { cameraProvider.unbindAll(); CameraSelector cameraSelector = new CameraSelector.Builder() .requireLensFacing(CameraSelector.LENS_FACING_BACK) .build(); imageCapture = new ImageCapture.Builder() .setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY) .build(); ImageAnalysis imageAnalysis = new ImageAnalysis.Builder() .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST) .build(); imageAnalysis.setAnalyzer(getExecutor(), new ImageAnalysis.Analyzer() { @Override public void analyze(@NonNull ImageProxy image) { Log.d("TAG", "analyze: got the frame at: " + image.getImageInfo().getTimestamp()); image.close(); } }); cameraProvider.bindToLifecycle((LifecycleOwner) this, cameraSelector, imageCapture); } private void capturePhoto() { imageCapture.takePicture(getExecutor(), new ImageCapture.OnImageCapturedCallback() { @Override public void onCaptureSuccess(@NonNull ImageProxy image) { Log.d("Test"," one success capture"); super.onCaptureSuccess(image); Bitmap bitmap = getBitmap(image); Log.d("Test"," Capture Success "); } @Override public void onError(@NonNull ImageCaptureException exception) { super.onError(exception); Log.d("Test"," Error capture"); } }); } //convert to Bitmap private Bitmap getBitmap(ImageProxy image) { ByteBuffer buffer = image.getPlanes()[0].getBuffer(); buffer.rewind(); byte[] bytes = new byte[buffer.capacity()]; buffer.get(bytes); byte[] clonedBytes = bytes.clone(); return BitmapFactory.decodeByteArray(clonedBytes, 0, clonedBytes.length); } } 

    But it failed because the app was closing abruptly when it started.

    build.gradle (Module: MyApplication3.app)

    plugins { id 'com.android.application' } android { namespace 'com.example.myapplication3' compileSdk 32 defaultConfig { applicationId "com.example.myapplication3" minSdk 21 targetSdk 32 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } } dependencies { implementation 'androidx.appcompat:appcompat:1.4.2' implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.camera:camera-core:1.0.2' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' def cameraxVersion = "1.1.0-alpha05" implementation "androidx.camera:camera-core:${cameraxVersion}" implementation "androidx.camera:camera-camera2:${cameraxVersion}" implementation "androidx.camera:camera-lifecycle:${cameraxVersion}" // CameraX View class implementation 'androidx.camera:camera-view:1.0.0-alpha25' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' } 

    AndroidManifest.xml

    <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <application android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules" android:fullBackupContent="@xml/backup_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" tools:targetApi="32"> <activity android:name=".MainActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> 

    Edit:

    As for closing the app when it started, it was because this line was missing:

    android:theme="@style/Theme.MyApplication3" 

    As for capturing the image I tried to print the exception here:

    public void onError(@NonNull ImageCaptureException exception) { super.onError(exception); Log.d("Test"," Error capture " + exception.getMessage()); } 

    Output:

    Error capture Camera is closed.

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

    Can I show interstitial ads after a certain number of button clicks?

    Posted: 14 Jun 2022 09:49 PM PDT

    I am trying to show an interstitial ad after a certain number of clicks but I am not able to do so, I know there are some answers already there but they don't much help me.

    Here is a list of onClick methods I want to use to implement an interstitial ad after certain clicks

    Here is the SO question https://stackoverflow.com/questions/72604597/can-i-show-interstitial-ads-after-a-certain-number-of-button-clicks

    Here is the short code https://pastebin.com/tdAk25Bc

    Here is the eniter file code https://pastebin.com/tdAk25Bc

    There are five methods: latestQuote, firstQuote, back, next, and random. The confusion I have is with the onClick methods, since I'm getting a text, rather than getting a new activity/fragment whenever a button is clicked, so basically what I want is to show a text after the interstitial ad, but within the same activity., but, as I understand it, you have to get a new intent after an interstitial ad.

    However, I also want to show interstitial ads on copy() and share() too. I tried to add a counter to the share() first, but that did not work for me.

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

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel