Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
My question is if it's possible to create an app where the user can temporarily block several apps, so he can prohibit using an app for an optimal time?
Yes, I've done that.
As a rough solution, if you set your 'controller' app as an accessibility app then it has the ability to monitor which apps are launched. Then you can apply your logic to determine if an app is allowed to be run at this time. If it should be blocked then you can launch a full screen overlay to block that app and show a warning/ block message instead.
I'm not sure about your exact intentions, but generally it is possible, of course, with some limitations - many applications for parental control do this. You need to check out AccessibilityService documentation to dive deeper. This test project may help you to understand some basic concepts - in it I demonstrated how you could block applications, which use INTERNET permission.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
It just so happened, that I have created a class that has 1000+ lines.
After installing the app on the device, the application starts slowing the device really hard. Will rewriting this script to three different classes, approximately 300 lines each, solve my issue?
If your application uses the internet, it is possible, that the phone has a worse connection than your comp. Slower connection - you have to wait...
Read responsive App and App performance - VERY useful. you will know the name of your problem - bad responsiveness (not performance) - for better further searches
No. The problem is not about how many lines are there, or how many classes, it is about the complexity of the algorithms and time each action takes.
Try to use Threads or Handlers while possible to make the app more responsive.
Also, don't do too much work inside onCreate(), onResume() methods to make the app load faster.
Use Systrace. It is a great tool provided by Android community to help improve your app's performance by giving a detail info on what is happening in your app at a very low level.
It has many tutorials on how to use it available as official docs and on there YouTube Channel. But surely this software will do only good if you have some core concepts about the android operating system and how memory, threads etc are utilised. But you can also learn them along the way.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
A company asked me today that if I could develop a keylogger inside their company application which logs what their workers do in working time with their company phones. They suspect that not every employee works hard enough.
Well I know it's not ethical but I got curious whether it is at all possible? I think Android has enough security feature to make it stop an app like this. I saw some keylogger features on GitHub but they only log inside the app, not outside the other applications.
Another approach you might be able to take would be to develop a fork of the Keyboard, and force users to use that keyboard via a Device Administrator Policy. However, as previously mentioned, this might be in violation of a whole host of employee data protection laws.
Custom Keyboard Creation Tutorial: https://code.tutsplus.com/tutorials/create-a-custom-keyboard-on-android--cms-22615
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I need to design a testing system which would not allow to use google. I mean that, theoretically, the user still can do it, but the purpose is to hinder this as much as possible.
I have an idea, but I don't know how good it is. I want the question in the database to be a simple text. And when we need to load it to the test, we convert it into a picture with a watermark. But the problem is that, theoretically, it still can be recognized. Google is able to convert the text on the image into the text and then search it as a text. Google is also able to recognize images despite some hue differences on them. Does anybody have proposals on that score? What would you do?
just use robots exclusion headers on the page to tell google not to store your page. or even robots.txt
As you say if it's human-readable, google will read it. Google has millions of slaves doing OCR for them (via Re-Captcha). but if you tell google to leave your site alone, it will.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I've been wondering, since you can make apps and such using the ADK and JDK, is there a way to change certain mechanics on the phone itself aswell?? like themes, actions when starting apps, calls, the browser, etc?
You cannot. Most of the actions you describe are executed as "root" user, which has access to EVERYTHING on your phone, while (normal) apps are executed as user, which lacks those rights. There are exceptions to this in the form of apps that run as "root", but these require you to go through a process that is aptly named "rooting your phone". This however is not recommended unless you know what you're doing.
What you describe is the creation of a custom ROM. Taking the original source code, modifying it, and then packaging it so it can be installed on another phone.
This is a very difficult and complex task, especially when you want your modification to be available on different phones. They all have unique specificities and most likely will need specific versions of your mod.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
So while developing a custom camera application I've realized on rare occasions and on various devices if the app has to force close, it does not always release the camera resource.
Is there a way to find/detect the process that is holding onto this resource and kill it? Or some other technique? It is rather difficult bug to reproduce (for me anyway), but ultimately the device has to be restarted.
Thanks!
From chasing up on all the other posts you have made on this subject, it appears like there is no sure fire way of getting the camera back after a crash without a restart of the device. A pain, to be sure. Best option is not to crash / catch everything that might fault. Which is a pretty rubbish answer, but that's what I'm endeavouring to do now.
Lots and lots of try catch !
I suggest you to see the code of google sample apps completely. the link is as follow.
https://github.com/googlesamples/android-Camera2Basic
As you can see in Camera2BasicFragment, mCameraOpenCloseLock Semaphore used to resolve release resources problems.