everyone.
I am facing a difficult problem. I am building a small app related to security with java.
I want to close power menu when it appears.
Old android versions support sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)). But on new version, it throws Exception.
I did a lot search, read almost all previous articles here but not found the solution.
so I use AccessibilityService.performGlobalAction(ACTION_GLOBAL_BACK).😉. It works well on emulator. But not on some real devices.
Or any other way?
I want anybody to please help me. Thanks for your help.
Related
I am trying to put together a little phone app that will take characters from an ExitText and send them out via Bluetooth.
Getting Bluetooth to work seems to have become an impossible task. I have used Bluetooth before with other SDKs and it was simple. I want to replace a program I wrote years ago using VB5 and Bluetooth. It was simple and I had it working in a few hours. With Android Studio I can't seem to find any simple way of using Bluetooth.
Not that there aren't any examples. In fact there are TOO MANY examples. Most seem to be for obsolete versions of Android Studio or have other problems making them impossible to implement in 3.2.1. When I try, get so many errors I know I will never be able to correct them. Others don't throw errors but nothing happens. I don't know what all the code should do so debugging it is impossible. Over the last week or so I have tried 7 different "examples" (as reported by Android Studio "recent" list) and can't get any of them to run.
I did find an example that says it does something similar to what I want. It contains over 300 lines of code! Does that seem realistic?
I guess what I am asking is, can somebody point me in the right direction? Somewhere that I can see an explanation of what is needed and how to create it?
Sorry if this sounds like a rant but in many ways it is.
Things I have tried and that came close to working but don't:
BluetoothChat.
BluetoothhTutorial
SimpleBluetooth
and How to send/receive messages via bluetooth android studio
Thanks
Pete
Hey guys and girls for a the past week I've grown a lot of interest in android studio (even without knowing quite much about it) I decided to create an app that I deemed quite useful. However the app required maps to be integrated in it and I really did not know what I was doing and at one point I started messing with the settings and then all hell broke loose and I kept getting AAPT2 errors and I even tried to fix this issue with the gradle properties line that you add (I forgot the line of code to add). Anyways it still didnt work. However I rembered that I always kept the good version (before I broke everything) of the app on my phone. So when I go in my phone the app is there and it works just fine. Ive tried so many things to get the source code from the app on my phone without any succes. My question is, how can I get the source code back from the working app onto my laptop to continue coding in android studio? If it helps I am using Linux 18.04 LTS and running the newest version of android studio. Thank you for any help from you guys. This means a lot to me.
You can’t get back the ‘source code’ from an already compiled app.
You should consider using some version control platforms like git from the next time
I wanted to see if anyone else is running into this issue. I have Android App Links setup for my app and site. Things were working fine, but after I've updated the gradle wrapper and other libraries every time my I try my Android App Link it will cause Android to throw the modal that says...
"Unfortunately, Android System has stopped"
And it will not open my application. However it works when i try to open using the traditional URI scheme deeplink.
Any help will be greatly appreciated. Thank you.
Figured it out.
The issue was that my icon was too big for the device to render on the modal that pops up. Changing that to an appropriate size fixed it.
Personally I have no problem with Android Studio, but one of the people on my course is having a strange problem with the design view. Lines and boxes keep appearing and are causing problems and after researching profusely for the last couple of hours I've been able to find no mention of what they are or how to get rid of them anywhere on the internet.
I found one other stack overflow post about these that had been submitted a couple of months ago, however it unfortunately featured no replies. I've added the screenshot from this post just to save me getting one but it's the same problem.
Does anybody know how to get rid of these? Or what they are? Because they don't show on my Android Studio.
The screenshot
Thanks in advance.
maybe it just some bugs appeared on install?
Try to just:
1. File - > clear cache and exit
2. Reinstall studio
3. Install studio 3.0 in early access
Hope it will help)
Okay, let me first apologize by saying this is my first post on stackoverflow and haven't been coding that long so this may be a simple error on my part. Also let me thank you ahead of time for trying to help me. So this is basically what is ailing me, I have a app i have coded that is used to set wallpapers on android phones and recently have been submitted to blackberry's appworld.
I have never had any issue with the app until the other day when all of a sudden when i changed the package name to a new one. Note this is of a fresh install of the app. But for some reason the Blackberry Z10 is opening the app for about a second and shows me a black screen for less then a second and then close. However, my eclipse's logcat states otherwise and that it is still loading. Note that I have other apps using the same setup and library as this app and also have recently changed their package names and haven't run into this problem. Also this only happens on Blackberry Phones and doesnt give me this issue on any normal android phones.
Here is my logcat: http://pastebin.com/EzD6eQaU
If you have any idea why this is happening please let me know.
Thank you again,
Dalton
It took a while but i found out what was my issue. Blackberry has a package name character limit of at least 50 characters long. Any more then that and your app wont work on blackberry.