• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Best way to protect phone camera lens?

I got the Galaxy S20 Ultra specifically for its beastly camera but over a couple years it got dings and scratches that eventually made it unusable.

I recently got the Pixel 8 Pro and although I prefer the Galaxy cameras (I'm a sucker for zoom), I have lots of features to still explore. I want the lenses on this thing to last longer than my last devices!

I can't imagine that putting a protective anything over the camera would be a good idea since it would inherently obstruct the view. Surely there must be SOME solution aside from being less clumsy?

Any products or tips you can suggest for protecting phone camera lenses without hindering photo and video quality?

And some photos I took kayaking today! Loving the fall colors starting to come in.

PXL_20231020_185655381.jpg

PXL_20231020_192324847.jpg


PXL_20231020_191252642.jpg

PXL_20231020_191745376.jpg

What is the correct thread-safe way to access shared resource?

We are developing on Samsung Tab Active 4 Pro using Android Studio, kotlin and java. We are getting constant at random times app deadlocks. I am not new to developing with threads and synchronization methods however I am very new to Android development. I assume I am doing something wrong and will share what I am doing. But to set up the situation, we are using OSMDroid for the map viewing and are using layers of the map for draw icons that represent aircraft flying over the map. The main android app is done in kotlin and the UDP over ethernet is written in java files. Aircraft telemetry is received at about 1 hz over ethernet inside protobuf packets. The protobuf is received and parsed in a Listener java class using a thread and implemented in the run() method. In the udp handler where we receive and parse protobuf we call a kotlin object "class" (unfortunate use of terms with kotlin) that has a method UpdateEntity(). Here is a snippet of this code that handles a proto message type called Entity. EntityClass is the java wrapper created. This part is working fine, no issues here, just showing for context.

Code:
             if (msg.getMessageTypeEnum() == MessageWrapperClass.MessageWrapper.MessageTypeEnum.MESSAGE_TYPE_ENTITY) {
                    EntityClass.Entity entity = msg.getMessageEntity();
                    Log.d(TAG, "Listener:run (thread): Entity received\"" + entity.toString());

                    // 0 deg points north, vertically in map
                    double heading = Math.atan2(
                            entity.getKinematics().getEastSpeed(),
                            entity.getKinematics().getNorthSpeed()) * 180.0 / Math.PI;
                    // Put to [0,360] range
                    if (heading < 0) {
                        heading += 360.0;
                    }

                    Position position = new Position(
                            heading,
                            entity.getKinematics().getPosition().getLatitudeDeg(),
                            entity.getKinematics().getPosition().getLongitudeDeg(),
                            entity.getKinematics().getPosition().getAltitudeHaeMeters(),
                            0.0);

                    HostileEntity unit = new HostileEntity(
                            Utils.TrimUUID(entity.getEntityID().getValue().toString()),
                            //todo: we need callsign here
                            "red",  //entity.getEntityID().getValue().toString(),
                            position, false);

                    Datasource.INSTANCE.UpdateEntity(unit);   // <---------- This accesses the shared list

                }

Datasource.INSTANCE.UpdateEntity(unit); call accesses the share list. Here is that method in total. Note Datasource is that singleton-like object construct that has all public "static" methods. (I'm a C++ guy mostly :) New to kotlin)

Java:
/**
 * [Datasource] holds the data that is utilized by the UI
 */
object Datasource {

    var currentStatus = ""
    var currentMode = Modes.Nav
    var Settings:SettingsClass = SettingsClass()

    //This is the list of automations
    var AutomationList = mutableListOf<AutomationClass>(
        WTP(),
        EW()
    )

    var TabPages = mutableListOf<String>()
    var TabPageContents = mutableListOf<TabPage>()
    var KillPairs = mutableListOf<KillPair>()
    var SelectedTab:Int = 0
    var newTab:String = ""
    var locklineschanged = false

    val entityUnitListMutex  = Mutex(false)
    val killPairsMutex = Mutex(false)

    /*
    This is the list of units. Any unit added to this list will get added to the map.
     */
    val entityUnitList =  mutableStateListOf<EntityUnit>()

    fun UpdateEntity(entity:EntityUnit)
    {
        if (!entity.isPositionValid()) {
            Log.e(ContentValues.TAG, "Datasource::UpdateEntity " + "Invalid entity passed:")
            return
        }
        entity.lifeTime_ms = System.currentTimeMillis() // update its life time

        try {
            // NOTE - FindEntity() call must remain OUTSIDE of runblocking and mutex because
            // FindEntity also has mutex and we do not want to nest mutex calls. Deadlock may occur
            val existingEntity = FindEntity(entity.id)

            runBlocking {
                entityUnitListMutex.withLock {
                    if (existingEntity != null) {
                        entity.status = existingEntity.status
                        entity.missionCount = existingEntity.missionCount
                        val index = entityUnitList.indexOf(existingEntity)

                        entityUnitList[index] = entity

                    } else {
                        entityUnitList.add(entity)
                    }
                }// end mutex
            }
        }
        catch(e:Exception)
        {
            Log.e(ContentValues.TAG, "Datasource::UpdateEntity " + e.toString())
        }
    }
/*
Find the entity in the list of active entities
 */
fun FindEntity(entityName: String): EntityUnit? {
try {
var returnval: EntityUnit? = null
        runBlocking {
            entityUnitListMutex.withLock {
                for (i in entityUnitList.indices) {
                     if (entityUnitList[i].id == entityName) {
                       returnval = entityUnitList[i]
                       break
                    }
                }
            }// end mutex
        }

        return returnval
} catch (e: Exception) {
Log.e(ContentValues.TAG, "Datasource::FindEntity " + e.toString())

return null
    }
}

My understanding of kotlin and android is that you need to use a coroutine if you want to use a mutex. I used a mutex to protect the shared resource, the entityUnitList of type mutableStateListOf<EntityUnit>

The Listener is started up on the main, UI thread however it uses its own thread to receive udp packets. The call to Datasource::UpdateEntity() is done in that thread, not the UI thread. Datasource is used by the UI thread as well and it needs access to the entityUnitLst to read from. The UI thread does not write to any of the elements in the list nor does it add or subtract elements from that list.

So the problem is the app will lock (not crash and disappear) and be non-responsive or frozen. This happens at various times but typically within a minute or two. My best guess is a thead race condition.
There was someone else developing the UI portions of this app and they said the UI only updates when a data element of it changes. So in UpdateEntity() these two lines do cause a UI refresh.

Code:
entityUnitList[index] = entity
...
entityUnitList.add(entity)

Here is another place accessing that list and is in the UI thread

Code:
fun PutStuffOnMap(
    uiState: FOXUiState, mapView: MapView, onEntityClicked: (entityClicked: String) -> Unit
) {
    try {
        val items = ArrayList<OverlayItem>()

        runBlocking {
            Datasource.entityUnitListMutex.withLock {
                for (i in entityUnitList.indices) {
                    val entity = entityUnitList[i]
                    PlotEntity(mapView, entity)?.let { items.add(it) }
                }
            }// end mutex
        }
. . .

There is more to that function but that function is called from here in a global method tha tis used in the map drawing code.
Java:
@Composable
fun MapRow(
    uiState: FOXUiState,
    onEntityClicked: (entityClicked: String) -> Unit,
    modifier: Modifier = Modifier){
    Row(modifier = modifier) {
        AndroidView(
            factory = { context ->

                MapView(context).apply {
                    SetUpMap( uiState, this, onEntityClicked)
                }
            },
            update = {
                    mapView ->
                PutStuffOnMap( uiState, mapView, onEntityClicked)
            }
        )
    }
}

I am thinking we have a mutex locking unlocking issue where it stays locked and the UI blocks with that runBlocking{ } block waiting for the unlock. The Listener gets in and gets out when updating the entity pretty quick. The only link to the UI thread is Datasource::UpdateEntity(). When we comment out UpdateEntity() we never deaklock or freeze the app. We can even pre-load entityUnitList with entity class elements and interact with them again with no app freeze. Its only when we enable getting movement updates over ethernet (using USB/Ethernet adapter plugged into the tablet) when we freeze the app eventually.

So I think using runBlocking is wrong so what is the correct way to share that entityUnitList over multiple threads safely? We do not have to use a mutex and we could consider other list types that are better with thread synchronization.

-Steve
EDIT wow this post is long, I apologize! Just wanted to give enough details.

"Device Explorer" missing on Android Studio "Giraffe" (M1 Mac)

Android Studio Giraffe | 2022.3.1 Patch 2
MacBook Pro 16" 2021 (Apple Silicon)
Mac OS X Ventura 13.4.1 (c) (22F770820d)

Hello,

Sorry if this is a "stupid" question but I recently installed (just the other day actually) Android Studio on my PC and was able to browse my AVDs filesystem using "Device Explorer" in Android Studio.

However when trying to do the same on my Mac the "folder"-icon is greyed out in "Device Manager" and I can't find "Device Explorer" in the menubar under "Tools".

Attaching printscreen.

Screenshot 2023-10-20 at 20.47.36.png


Am I missing something?

Best Regards - TheSwede86

App for subtitles

Hi.How are you??We are looking for a good application for subtitles on videos we have saved.Just like it is on YouTube.We want subtitles from English to Greek. That's all. We don't want anything more than the application. Two or three we tried didn't do a good job.We don't want screen recording for example etc.That's what we wanted to ask you.
Friendly greetings.

Speech to Text

Speech to Text - offline support

We are looking for a google supported language model that helps in Speech-to-Text recognition for Xamarin MAUI/.NET Style mobile application, which targets both Android and iOS platforms. One of our critical requirements is to ensure this functionality is available in offline mode, as many of our applications cater to offline scenarios.Additionally, our application aims to support a variety of international languages, including English, Russian, Chinese, Portuguese, around 45 languages. Therefore, we are seeking a solution that offers multilingual support, preferably supporting different accents as well.
We would also like to know if google offers any customize services to support the requirements stated above.

type II diabetes

so i just was told that i might have type II diabetes. my doctor needs more lab work to fully determine this. but i have i high sugar levels in my blood. i am to see him in a month from now.

this explains why I have been drinking a lot of liquids. i was always thirsty....which in turns i was peeing a lot as well.

the doc gave me Mitformin which helps reduce the sugars in my blood. i also have to drastically adjust my diet as well. so i am gonna try a low carb diet. with little to no sugars as well......no carb diet is out of the question.......i love my bread too much....lol

so far the medicine and low carbs have reduced the constant peeing back to what seems normal for me.

anybody here is diabetic?
does anybody have any tips you would like to share?

Implementation of Runtime Resource Overlay from Vendor Directory , For my Learning Purpose.

How to Implement Both Static and Dynamic Runtime Resource Overlay for an Android Automotive Product from Vendor Directory of AOSP 12L ?

Using Runtime Resource Overlay, How to change the whole appearance of that Automotive Product, Like the overall Appearance of SystemUI and other Applications.

Can someone please help me with this?

Android 13 fonts

I've just changed to a Motorola g84 5G phone running Android 13 and I
use dark mode wherever possible. I use the Microsoft launcher. I carried
everything forward from my old phone using Google and Microsoft launcher
cloud backups. I've just spent the usual long time setting up the apps
again and my old eyes are taking a hammering from reading settings,
particularly trying to find settings which will enable changing existing
fonts - I can change some of the sizes, but not the font.

One of the fonts used by the new phone (particularly for popup warnings
and instructions) has what I can only describe as "double" and/or
"hollow" letters - the only one I could find to illustrate it is the
Windows font Colonna MT regular. At the tiny sizes on the phone and
particularly as it is often used all in upper case, it is all but
unreadable to me. I didn't see it on my old phone (Android 11 and
Microsoft launcher) at all.

Can anyone tell me a) (out of curiosity) what font it is and b) how the
hell I get rid of it?

Place to download mainstream apps other than Google Play?

I had to change country on my phone to download important apps to use in the country I was living in for a couple of months.

I'm back home now but Google won't let me change back to my original country for a year!

I have important apps to download and use but Google Play states they're not available in my country, which of course is the country I was in.

I think this is absolutely nuts and I'm assuming there was a way to avoid this while downloading the needed apps but it's too late now.

I'm also assuming there's no way around this with Google, other than maybe registering everything under a new Gmail account.

Therefore, is there a website where I can download well known apps without using Google Play?

For example, I'm in the UK and I need to download the EasyJet app.

Thanks very much and hope you can help.

Fire TV Power On proble

Have had Fire TV for months..worked properly. Recently, when I power on the TV, it would not open to the Home Page but to the last app I had used, If I had shut it off without returning to the Home page, it would power-on to that app, and it would be running a movie, tv show that I had never selected. I checked the Power-on setting, and it was set to Open Home Page. I did resets, checked for updates, etc., no difference. I called was on the line with a CR who was apparently new, and had difficulty understanding my problem. After being on hold forever, he suggested resetting to factory, but said he doubted that would solve the problem, and I would have to re-download and set up everything. There were several posts about this on another forum, but the thread was closed, and there was no solution. I have Fire Sticks, and they all work fine. This is, at the very least, an annoyance, altho otherwise things are working properly.

Mouse for games - fails to work in some

I plugged a USB corded mouse into an OTG adapter into my Android's USB. It works fine in the OS, in the game Merge Mansion, and in the shopping app AliExpress. But the two games within the AliExpress app, the mouse is ignored. Is there a way games can access the touchscreen input directly so they don't see a USB mouse? Can this be corrected somehow? Would a bluetooth mouse work better?

I tried the emulator Octopus (an Android app which makes the mouse behave as the touchscreen in the game), but Aliexpress closes quickly within it, just as it closes quickly within Bluestacks on the PC, it seems to hate being fiddled with.

Samsung Fold5-One UI 6.0 Beta 3 is up!

Seven days after Samsung's release of their second Fold5 Beta test firmware for Android 14, One UI 6.0, they are rolling out their third Beta test release, ZWJ8, to enrolled users.


Build = F946BXXU1ZWJ8

Download = 711.97 MB

Build date = 16 October 2023

Camera version = 14.0.00.30

Security patch = 01 October 2023


It is a FOTA, (Firmware Over The Air), update and you can check... Settings > Software update... to see if it is available for you. Alternatively, you can connect to the Samsung PC suite, Smart Switch and check via that.



Software information

FOLD5 BETA 3 ZWJ8 Screenshot_20231019_045252_Settings.jpg

Combined roll-out to eligible international, F946B, and U.S.A. unlocked, F946U1, devices.

See, also... Wipe Cache Partition, Repair apps & Galaxy App Booster

Cybertruck Launch on November 30th, 2023! [OFFICIAL]

It's officially official: the Tesla Cybertruck is set to launch on November 30th!

Further details released by Tesla to investors:

It's technically a "delivery event" which means orders would need to come prior to November 30th, however, it's likely those deliveries will be limited to insiders and VIPs. I'm thinking that the official Cybertruck specs and pricing will be announced on November 30th to the public while the VIPs pick up their Cybertrucks.

As it turns out, I pre-ordered more than 1 Cybertruck accidentally, so I guess it's time for me to make a decision very, very soon.... hmmmm.

The event will be at Giga Texas at Tesla HQ in Austin, Texas:
1 Tesla Rd, Austin, TX 78725

Based on Tesla's financial reporting the company is set to deliver 125,000+ Cybertrucks in 2024 but the waitlist for pre-orders is rumored to be in the millions. So for those not yet signed up to buy a Cybertruck, you could be waiting years to get a brand new vehicle. However, given many of those signups have occured over several years, it's likely a good number will opt for a refund rather than to fill their pre-order.

Did you pre-order a Cybertruck? Interested in buying one?

Is Fitbit Premium worth it?

The Pixel 8 and Pixel 8 Pro came with a few great promos:
  • 6 months of Google One
  • 3 months of YouTube Premium
  • 6 months of Fitbit Premium
I got the Pixel Watch 2 so the Fitbit Premium concept intrigued me.

The subscription model is largely about "offer it free and hope they forget to cancel". If I don't cancel Fitbit Premium, it's about $100/year for something that's actually geared towards my health and wellness. So I'm giving it a shot.

Does anyone have Fitbit Premium that particularly loves it? Hates it? Suggests something else?

Now what I really need to do is sift through any other subscriptions to cancel! Netflix, Disney+, etc... I have too many for sure.

samsung galaxy ace style

help! I downloaded any firmware for Samsung Galaxy Ace Style (the firmware I downloaded is "SM-G310HNXXU0ANI2") with Odin and maybe even in the wrong way and when the operation was finished the phone restarted in bootloop (at this moment the firmware that is on the phone is still the same "SM-G310HNXXU0ANI2") and now I'm trying to download the latest firmware for that device again with odin only that once the operation is over odin says pass (the operation was successful) (the new firmware I downloaded is the most recent "SM-G310HNXXU0APA1") but after that the phone continues to restart in bootloop so I send the device into recovery mode and above it says that the firmware has always remained the same as before (the firmware is the previous one "SM-G310HNXXU0ANI2"). what should I do now? help!

  • Question Question
Accessing learned words in Samsung Galaxy keyboard

Hi! I'm currently sharing a phone with someone who's being pretty shifty and I just need some help.
I was typing an email address in the search bar of a browser on the Samsung Galaxy a12 we share when a whole bunch of suggestions popped up. They were all usernames ( @username ) in the suggestion part of the keyboard and when I hit the ... to view more, a whole lot of others showed up as well. I went to write them down but the problem is I only got to click on two of them before they ALL stopped showing as suggestions in the keyboard.
I'm not sure if it was an accidental glitch and I was never supposed to see those suggestions pop up at all, but the fact that they did means they've got to be stored SOMEWHERE in the phone... Right? Is there any way to access that data- anything I can try? Is there a way to hide the "learned words" that I don't know about? Could they have installed and hidden a whole separate keyboard altogether? The keyboard is just the Samsung keyboard, not GBoard and the phone is not rooted. Is there a way to do that myself in order to access that data?Any help would be really appreciated, thank you!I tried looking up the answer for this already but I'm not really getting the answers I need.

Filter

Back
Top Bottom