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

Uris from the filepicker

Hi all, Newbie here. I am working on an app that involves picking a mp3 file , saving its Uri to a database, and then later selecting the file from the database and playing it with the mediaPlayer. This is all similar to creating a playlist from the music stored on the device. In this regard I have several questions.

I can only get the mediaPlayer to play the mp3 if the Uri is an audio based Uri. The filePicker seems to want to return a document based Uri. So, Is there a way to get the mediaPlayer to play the file based on the content/document based Uri?

Is there a simple way to convert the document Uri into an audio based Uri?

Is there a way to get the filePicker to return an audio based Uri?

Would all this be easier if I used the exoPlayer instead of the builtin mediaPlayer?

Thanks for any advice and/or code samples.

Help Two Android phones got slower at the same time

I went with a Z Flip 4. I have been spoiled by Samsung since the SIII, and the Flip is more my speed with its unique design that can still fit a pocket properly yet still turn into a huge 6.7" smartphone if needed, and if not, the cover screen allows it to function like a dumbphone if you want, and there's a satisfaction one gets by hanging up on a telemarketer by slapping it shut.

"Content is not allowed in prolog error" despite valid XML

Did you solve?
Yes, yesterday. It turns out that Android hates having empty directories, and since I had deleted all the navigation components that use Fragments and XML and switched to Compose navigation, I had an empty "menu" directory and an empty "navigation" directory. I hadn't deleted them in case I wanted to backtrack! But as soon as I deleted the empty directories, the error went. It was nothing to do with a prolog in my XML at all. Total red herring of an error message.

Phone is hacked

Search for: What is Google 400 the server Cannot process the request because it is malformed?


What does it mean if a server is malformed?

What Does It Mean?
This violation indicates that a request that was not created by a browser, and does not comply with HTTP standards, has been sent to the server.

This may be the result of of an HTTP request being manually crafted or of a client tunneling other protocols over HTTP.

Goodbye, Wi-Fi

The higher frequency of visible light vs radio is source of both the advantage (bandwidth) and the disadvantage (signal blocking) here, but the latter is just a feature of the particular frequency range: increase the frequency further and it starts to penetrate clothing and thin walls again, and in principle you can also get higher bandwidth. So maybe we should skip over "LiFi" and move direct to "XiFi": X-ray based wireless communications? Solve both of those problems and as a bonus the people who are paranoid about radiation from wireless networks would finally have the satisfaction of being justified? ;)

Play Store scam?

The only thing that I've had happen with prepaid cards (especially those infamous 'vanilla' cards you get at dollar stores) is a straight up decline--many don't work online just in stores. I think many online stores require a name tied to the card or a billing address, even on a prepaid or bank debit card, so it limits such options. But I've never had an account suspension over it. It just never completes the transaction either claiming it's declined, unsuccessful, or not supported.
That was my previous experience. This time the card may not have been "registered" for on-line use in the latest format. It used to require only a zip code to be accepted for on-line purchases, and before that nothing at all, but now registration requires a name and some address beyond a zip code. Refusing the transaction I can understand but demanding bank statements, as the play store and the e-mail in the gmail account attached to the play store ID did, seems more than a little over the top.

Do Knock-Off Phones Deserve their Unsavory Reputation?

There are actual fake Samsung phones that to the untrained, look pretty close enough to fool anyone. They can even cop One UI and apps and then they go deeper and fake specs by editing files such as build.prop and others to make the phone's 'about phone' section lie about the RAM, storage, and CPU cores. Some even have fake cameras posing as a multi-camera system with the only real camera being very low quality like 5 MP or less. Some even fake the Android version and easter egg. There are a ton out there that look like they're running Android 12 or 13 but they're just heavily-themed versions of Android 6 or 8. Some aren't even LTE capable, relying on outdated 3G and 2G. Some go farther and use stolen IMEI numbers.

Check out Smoorez on YouTube for more info.

Horribly Hacked

When you say "program" I assume that this is speculation and you don't know what program you are talking about? Please correct me if that is wrong.

One thing you need to understand is that different smart devices run on different hardware platforms and different operating systems. So one program being able to infect them all is really, really unlikely. More likely is that the problem is that you are using one or more accounts that have been compromised, and what you see is either a direct result of the account being hacked or that someone is using the account to add other stuff to the device (depends on what device it is whether thst is possible).

It's impossible to say more than that very general speculation without explaining what you see on these unnamed "smart devices" that makes you think they are compromised.

Slow ethernet reconnect times on samsung active 4 pro tablets.

Thanks for the enlightening write-up, this does clarify things.

This is just speculation but I'm guessing the auto-connect delay is due to some kind of verification or authentication 'handshake' where those tablets are then involved in an exchange between each tablet with the main airMAX BaseStation in your office facility. Kind of reminds me of the annoyingly long time it takes to cold start a modem with a lot of today's ISPs.
Given your drivers could connect instantly by manually selecting the necessary WiFi network, why is this not possible with these Samsung tablets?
Thanks! I'll do some more checking on that. We are using the radios at this site for better range. They are close to a town so we've got some interference w local ISPs and houses. We switched over to these radios about 4 years ago and ran w our windows PCs and software till about 2 years ago. The yard switched to our android app and surface tab a 2019s but after a few years those tablets were starting to fail so we updated to these active tablets. I'm thinking that our range has been dropping from interference and we are just starting to notice it. Maybe before that extra range was enough for the android to reconnect w out us noticing. We are using the same setup at other yards, and I think we've got better range there, so nothing ever fully disconnects.

If I had the drivers manually reconnect, I'd ha e to switch our radios out to stuff the tablets can connect to. Not out of the question, just a hassel when it had been working. The other issue is that a lot of our drivers are to impatient or not smart enough to do that. We have had a rocket m2 running and the trucks using WiFi, and part of the guys broke the tablets because they were frustrated that it wasn't "working" right.

We have a lot of solutions to problems that shouldn't exist at my job.

Root RIP ACE :(

updates don't guarantee security. Not updating also doesn't mean you're less secure. That's on you and how you use your devices. With the amount of data gathering done by stuff today, and most updated apps doing it, you're probably more private and secure on outdated software that no one cares about hacking.

For myself, the constant UI downgrades over the years ensures I'll never update again until skeuomorphism returns. I have absolutely zero interest in reliving DeskMate, VisiON or CP/M again.
well updates will almost always include security updates as well as updates to the os. these security updates usually will patch up any loopholes or vulnerabilities in the os........thus keeping it more secure. it also means that it would be harder to root which is why you never update a phone if you plan on rooting it.

so yeah updates are important IMHO.

My phone has been hack

Sounds like a bad situation. Maybe need to get the feds involved.
Tried that it was over the local polices heads they said and the feds told me it was the polices issue since they will only get involved if it's a matter of national security and I have information on future 0 day attacks that could effect the country and since the 0 day I knew about was now past tense it didn't warrant a federal response. And thanks to whatever defense system I trigger by alerting these people and the phone I lose access to my email social media and phone number because the sim will be locked or the phone will just auto reject phone calls and I never even know about it. So it has made follow up almost impossible and while speaking to these branches of law enforcement it takes a lot of explaining to somebody knowledgeable before I was taking seriously. Honestly if I wasn't going through myself I wouldn't understand and think it was somebody off their medication myself. I have never been somebody with a mind for technology in a developer or programmer way. I understand how to use technology properly from the user format so for me to know so much about system applications and capabilities it takes a lot of research and I have put months into it and only when I speak to the most knowledgeable engineers do the things I start saying makes sense. A lot of it is theoretical still they told me but for it to be used in the wild like it has been for me they said is unbelievable. But I could go on like this for days. The moral of the story is whatever this is is widespread. Best thing you can do is not screw with it, I spent the better part of last summer trying to rid my devices and avoiding spreading this programming only to find out that it was already spread widely and that it's almost impossible to come across a device that doesn't have this program in it already. It's just dormant and not attacking the user. I believe it's a self-defense mechanism that triggers the hackers attention or AI and once it's triggered the level of effort you put into exposing it or removing it determines your threat level. At one point I was told that I had a score of 576 in the negative for my attempts by my google assistant when it use to randomly ask me questions. So I sincerely don't wish what I've gone through on anyone. Not only was it very hard to live without a phone that worked but having to go to all of these agencies and explain this to all of my friends and family was awful because it sounds so far-fetched that people start thinking you've gone off the deep end. One day this will all make sense I'm sure but for the last year I have sounded like I'm warning people about judgment day from Terminator lol. But if anyone has any advice or would want to look into this more I'd be happy to assist. I've had the phone wiped about 30 times I'm going to try and replace the ROM tomorrow and see if the kernel gets deleted if the phone will lose all the bloatware. But since I've tried this with 12 fresh phones and all of them managed to get this program on them even with no connection to my previous device or even being in proximity of them it seems very targeted. Not sure what I did to piss everybody off but since I'm the only person I have met with this sever of an issue it can't just be random.

Filter

Back
Top Bottom