How to make an android bot app for performing some background tasks in a cycle? - General Questions and Answers

I am working on a project in which, I want to create an Android App. The app will open a website in background, wait for the page to load. Then, it will find something on the page. After that it will do a specific task. Then, wait for the process to be completed. If the process gets completed, it will have some delay. Then, it'll reopen the url again and thenafter repeat the same task in a cycle.
It should continue doing the directed tasks until any unwanted system or wanted user interruption.
I've searched a lot on web to know that if something could be done in this route. But, I couldn't find anything helpful.
I want something similar to
HTML:
https://youtu.be/BGU2X5lrz9M
Here, in the above mentioned tutorial, he is using Python Script for making an Instagram bot for PC. The bot will open Browser, then the Instagram's Feed, then will find the button by text "Like" and then go back, thenafter it'll repeat the cycle.
I want something similar.
1). But, instead of Liking every post/photo, I want my bot to comment something on the posts of people whom I or the person using the bot is following on Instagram.
2). Second thing is, this process is being done on the main window. I want this process to be done in background.
3). He is doing it in(for) PC. I want to do it in/for Android.
4). I may follow his tutorial for PC and using Python. But, how would I do it using Java or Kotlin in Android Studio.
I started to do some research and build a very very beginning level app. Which You may find
HTML:
https://drive.google.com/file/d/17ZQ_w-Gc0jOV8Tn-QDGFdFHPyxculn6B/view?usp=drivesdk
??here
I am open to suggestions.
Please check the project and if it is possible to achieve what I want from only some modifications in my current project, then please do tell me.
Please tell me the solutions, hints, suggestions, advice, anything helpful in this project except a downvote .
If you find anything ineligible or wrong according to the forum then, please before downvoting, let me know in the comments section.
Thank You So Much in advance!
Have a nice day ahead.
P.S. :- If this question should be asked in any other forum of stack exchange then please comment it's name. I'll immediately put down this question from here and ask it in the respective forum. Thanks!
HTML:
https://youtu.be/BGU2X5lrz9M https://drive.google.com/file/d/17ZQ_w-Gc0jOV8Tn-QDGFdFHPyxculn6B/view?usp=drivesdk

Related

Basic Android SDK Tutorial For Beginners (Windows) - 02/24/2011

Setting Up Android SDK for Windows Platforms
If anything doesn't work, or you don't follow directions based on this guide, I will not be held responsible for any outcomes. You are choosing to do this 100% on your own, I am only providing the information to get started. At this point, you are taking your actions into your own hands and are warned about your decisions.
The purpose of this is to familiarize you with setting up Android SDK for Windows. After reading through this tutorial, hopefully you will be able to feel a little more comfortable with setting it up and using it. I will tell you how to set it up, and after that, if you are a little more comfortable you can place the folders wherever you like for a little more convenience for yourself, but as for this tutorial, I am going to have a set destination for everything. So let's begin.
Index:
Download Links.......................................................................................................................................Part I
What Is Android SDK?.............................................. ................................................................................Part II
Setting Up Android SDK............................................... ............................................................................Part III
Basic Command Examples.......................................... .............................................................................Part IV
Summary of Android SDK............................................... ..........................................................................Part V
Part I: Anroid SDK Download Links.
In order for you to get Android SDK set up and running properly, you must first make sure you have the right files. Below this short description, I have included the download links. This tutorial will show you how to setup Android SDK for the Windows platform. I'm going to be completely honest and say that it's the only platform I know how to set it up for, as it's the only platform I have used personally for Android SDK. You can search online for setting up the SDK with other platforms.
Links:
Android SDK Windows Installer.exe
Android SDK Mac OS X (intel) .zip
Android SDK Linux (i386) .tgz
Part II: What is Android SDK?
Android SDK is a very useful tool that allows developers and users alike to take more control of their devices. Was there ever a time, where you wanted to add/remove something from your phone, but it just wouldn't let you?. Have you ever needed to test something that wasn't working, and you needed to find out why? Ever encountered the most famous of lines "Permission Denied"? All of those questions have been asked by many, and with this tutorial, I'm hoping to at least answer some of the many questions surrounding Developing on an Android device. There are many uses for Android SDK, which I hope to cover in this instructional "blog" without boring you guys to death lol. Without getting to indepth at this point as to what SDK does, let's just go over a FEW benefits of using SDK.
1. Debugging. SDK helps you in so many ways, one of the most beneficial being debugging. If you're developing an app for your device, and you are running into constant force closes, then you can fire up SDK and try to find out why.
2. Testing. If you don't feel quite comfortable with testing certain things on your own device, Android SDK also allows you to use an emulator on your computer with real life interactions to show you exactly what would happen if you added/removed something from your device.
3. Rooting. Most of the Rooting techniques we have for the Epic consists of One Click methods brought to you by smart Dev's that like to make things easier for you. Before that, we had to manually push the files to the phone, and put them in the correct places. Sometimes, people don't get so lucky with the One Click method and must revert back to the "Prehistoric Method" lol.
4. Installing Apks. If you have an app that you want to put on your device, but don't have the convenience of adding it with an application manager of some sort, then you can always use the SDK to do so.
5. Adding/Removing Files. A lot of times, certain files managers don't show you everything you need to see in order to do particular things you want to do. With Android SDK, as long as you know the directory, you can move the files. Some times, you may need to set permissions before hand, but that is also capable with SDK.
There are MANY more options for the Android SDK, but I want to keep it short and sweet and not bore you guys too much lol.
Part III: Setting Up Android SDK.
THIS METHOD IS ONLY FOR WINDOWS USERS!
Ok, you've downloaded the correct package for windows, and you're ready to set up Android SDK on your computer. What now?
The windows installer.exe SHOULD check for Java on inital install and install it if you don't have it on your system already. The following statement is basically just for users who have problems after install should it not install Java for your system. If you do not have Java on your computer, you will need to download it at this point. Click here on JDK to download the Java Development Kit. This kit will allow you to run Android SDK through its various Java options.
THIS STEP IS OPTIONAL, YOU DO NOT NEED TO DO THIS FOR SDK TO FUNCTION PROPERLY!
Optionally, if you are planning on developing through Eclipse, then you will also need to install any plugins for it that require Android SDK to operate with Eclipse. The plugin is called the Android Development Tools or ADT Plugin. If you are new to Eclipse, but would like to start learning to develop applications and more, and don't have it on your machine yet, you can download it from here. You MUST make sure that the version of Eclipse that you are installing is suitable for Android. Eclipse recommends versoin 3.4 or higher, and I personally use Eclipse: Galileo, which can be found here.
Now that you have downloaded and installed the Java requirement and Eclipse (only if you chose it, it is NOT required), it's time to actually setup the Android SDK on your computer. When installing SDK to your system, it will allow you to set the path to where it is being installed. Personally, to have the most ease when using it, I chose to place it directly on the C: Drive. Make a note of the directory when installing should you want to use the ADT plugin for Eclipse later on. Just click on the installer.exe that you downloaded for Android SDK, and follow the on screen prompts to get it installed.
OPTIONAL ECLIPSE INSTALL, PLUGIN DIRECTIONS
If you choose to install Eclipse, here are a few steps to get the Anroid Development Tools (ADT) Plugin setup for doing so. Android Development Tools (ADT), is designed to give you a powerful, integrated environment in which to build Android applications. It extends the capabilites of Eclipse to let you quickly set up new Android projects, create an application UI, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application. In general, developing in Eclipse with ADT is a highly recommended approach and is the fastest way to get started with Android.
If you'd like to use ADT for developing Android applications, install it now. Read Installing the ADT Plugin for step-by-step installation instructions.
At the end of the Android SDK install, you are given the option to “Start SDK Manager (to download system images, etc.), go ahead and allow SDK to start. You are presented with a list of packages that will be installed. The list is rather long and contains packages for developing on all versions of Android going back to Android 1.5. If you would like to install all of these packages, go ahead, but they are not necessary for ADB. If you only plan on using ADB, click “Cancel”. Keep in mind, you can always add packages if you decide you would like to develop.Once you hit cancel, you are now in the Android SDK and AVD Manager. In the left pane select “Available Packages” and in the right pane expand “Android Repository” by clicking the “>” next to it. The only package we need for ADB is “Android SDK Platform-tools”. Put a check in the box for that package and select “Install Selected” and in the next window click “Install”. You are prompted to restart ADB, go ahead and click “Yes”. Now, you can close all windows.
One last thing we need to do is to add ADB to our PATH so that ADB will run from any command prompt. To do this Go to Start-->Control Panel-->System and select Advanced System Settings in Windows 7 or Advanced Tab in XP. Click Environment variables. Under the “System Variables” section, find PATH and double click. In the Variable Value box, at the end put C:\Program Files\Android\android-sdk-windows\platform-tools seperating the previous entry with a semi colon. For x64 you would use C:\Program Files(x86)\Android\android-sdk-windows\platform-tools.
Now we just gotta check to make sure that it was all installed correctly. To test if we have been successful, plug your phone into your PC, allow the drivers to see your phone, and then open a command prompt. At the command prompt type adb devices . You should see ADB return with your device number.
Part IV: Some Basic SDK Commands.
There are plenty of commands that you can use through SDK, but I will give you a couple to help you with what you need to do. Before you can use any of the commands, you will first need open Windows command prompt to CD to the directory to which you installed your SDK. As I said before, I installed mine to my C: Drive directly, so for me to CD to that directory, the command looks like this.
cd C:/SDK/Tools
To make it even easier, you can hold "Shift" and right click on the "Tools" folder of your SDK and it should bring up a menu in which you can choose "Open Command Prompt". It will then be directly CD'd to that directory without you having to do any thinking .
Now that you are CD'd to the SDK/Tools Directory, you can start performing actions. You MUST! have the drivers for the Samsung Epic 4G installed to do this. If you do not already have the drivers installed (which you should if you have your phone rooted, allowing SDK to work) then you can download them from here provided by noobnl of XDA-DEVELOPERS. If you already have the drivers, then simply skip that step, and head right to the next, which is allowing debugging on your phone. To perform this simple task, on your phone, navigate to Menu>Settings>Applications>Development and select USB Debugging. Now plug your phone in, because it's time to get started. Here are a few basic commands to help you on your way.
1. adb shell - The adb shell command allows you to control your phone as root from your command prompt terminal. When you type "adb shell", you will then be prompted on your phone from Superuser to either allow or deny access. Should you click deny, you will have to restart your phone, reconnect your phone to your computer via USB cable, and start again, so MAKE SURE you click allow. Once you click allow on your phone, your command prompt will return with the pound symbol (#). If it does, you are now controlling your phone as a root user from your computer. You can do a lot of things from this point here which I will cover in another tutorial later, for now, we will just stick to the basics.
2. adb push - The adb push command allows you to transfer files from your computer to your phone without having to mount your sdcard to your phone, copy the file to your phone, then disconnect, and have to use a file manager to manually put the file where you want it. In order to push ANY files to your phone, you MUST have the file in your SDK/Tools folder already. Here is an example of a file you can push to your phone. We will use adding the AOSP Lockscreen to your device as our example.
**First, you will need to download the AOSP Lockscreen.zip from XDA. It will come with a flashable folder, but this method I am about to show you will be for the folks that don't really feel like booting into clockwork and would rather use the access of their computer.
**Second, decompile the AOSP Lockscree.zip and place the android.policy.jar file inside your SDK/Tools folder. Once inside your SDK/Tools folder, it's time to move to the next step.
**Third, with the file from the AOSP Lockscreen in your SDK/Tools folder, it's time to type the command to get it to move from your computer to your phone. Type the following command to do so:
adb push android.policy.jar /system/framework/android.policy.jar
**Finally, with the file pushed to your phone now from your computer, you can safely reboot your phone to enable the changes. To reboot your phone the easiest way, simply type adb reboot. When your phone boots up again, the changes should be made and you should now be enjoying your new AOSP Lockscreen.
3. adb pull - The adb pull command can be used to pull various items from your phone. A simple example of this command would be: adb pull /system/framework/framework-res.apk /Desktop/Android/. You can pull just about anything from your phone, but when I say just about, i mean exactly that. Just about anything. There are certain things you will NOT be able to pull, such as items that are packed inside compressed files (I.E. anything inside a Kernel).
4. ddms - The ddms command allows you to debug your phone in one of the many ways. You can also use the ddms command to take screenshots of your phone should you want to show it off .
5. adb reboot/adb reboot recovery/adb reboot download - These commands are pretty self explanitory. Without having to use the 3 finger death grip, you can use these commands to reboot your phone to your preference whether it be a simple reboot, rebooting to recovery, or rebooting to download mode.
NOTE: If you are using Clockworkmod 3.0.0.5/6 ported by Dameon87, you will need to check to make sure the redirector is working. If the redirector is not baked in, then you MUST use the 3 finger death grip to boot into recovery otherwise it will boot you to the wrong recovery. Clockworkmod 3.0.0.5/6 supports Edify scripting, while Clockworkmod 2.5.5 uses Amend scripting. If you try to use an Amend script in Clockwork 3.0.0.5/6, which only supports Edify Scripting, it will return you with an error saying that it does not support it any longer. This is why it is important to find out if the redirector is baked in or not.
Part V: Summary of Android SDK
Well to bring it all to an end, I would first like to say thanks for taking the time to read this and I sincerely hope this helps you guys with setting up Android SDK for the first time. Just to recap, we went over Downloading the Android SDK, finding a little out about SDK, Setting up Android SDK (as well as installing Java if needed, and Eclipse if you chose to), and some Basic Commands of Android SDK to get you started. I will be writing up an Eclipse tutorial and a more advanced Android SDK tutorial a little later with more commands and help to get you developing in no time. Thanks again for taking the time to read this, and if I have helped you in any way, please, hit the thanks button .
If you have any questions, feel free to either write me a message here on XDA, or joining me in the Team Viper chat. You can access the chat by clicking here and following these simple instructions.
***When the page pops up, first you will need to enter your nickname. Please choose your nickname from XDA so I may better be able to help you.
***Next you will have to choose your channel. Click the dropdown box and choose "other". When the box pops up prompting you to enter the channel, enter #viper as your channel.
***Finally click on the join button and you should be brought right to Team Viper's chat.
Thank you to all the members of Team Viper who helped me throw this together and other members of XDA who have provided either information, downloads, or just a helping hand with the making of this tutorial. Also thanks to Team Whiskey for further easing the transition to using ADB.
Huge thanks for the tutorial. I only wish this was posted this past weekend. I spent about 3 hours on Monday installing SDK and reading fragmented stuff online about how to use it. It was a good learning experience, but I would have spent far less time if I saw this. Thanks again
MAN this is awesome. now my biggest problem will be trying not to spend time reading and learning while at work...BIG THANKS!!!
BT keep up the GREAT work, in behalf of us all!
BT is the King of the Epic Forums..thank you so much for all your hard work and dedication ....Cant wait to see the next installment of ViperRom
If I may add, if you want a full list of the commands while in adb, just type 'adb' and hit enter. It will display a ton of commands that you can use in abd, including the push, pull, reboot, etc. commands.
There are probably more commands that just aren't listed using that command, but I found it very useful as I was perusing.
Thanks for the heads up, I totally spaced on that... ill add it to the OP.
I'm sure this is all great information to have here, but wouldn't a simple link back to Google's Android development pages been easier - it's pretty much the exact same information and even has images and video links.
WolfKaBaL said:
I'm sure this is all great information to have here, but wouldn't a simple link back to Google's Android development pages been easier - it's pretty much the exact same information and even has images and video links.
Click to expand...
Click to collapse
Never fails... I do something here to make it easier than linking to another site and there's always that one guy who just can't be happy for whatever reason... my apologies for doing this... please, let me know who it killed from my efforts to make it easier on you and ill send my respects. I didn't know it was going to kill someone.
Exactly
BT ignore them type cats man we all know you and team viper among others do great work here i can honestly say without you guys,dameon,mammon88 i wouldnt be contributing my own rom you guys offer and willingly give help FREE help at that lol so ignore them man its always one negative person law of nature we need balance even in XDA lol
computerkid23 said:
BT ignore them type cats man we all know you and team viper among others do great work here i can honestly say without you guys,dameon,mammon88 i wouldnt be contributing my own rom you guys offer and willingly give help FREE help at that lol so ignore them man its always one negative person law of nature we need balance even in XDA lol
Click to expand...
Click to collapse
Lol I just feel like every time I say something on here, Michael Jordan creeps up behind me and sings in my ear "Anything you can do, I can do better.... I can do anything better than you"
I'm not trying to disrespect your efforts, and I do respect all the work you do on the roms and tools. But when it comes to stuff like this, I simply feel it's best left to the creators - eg: Google. Their repository of information is going to remain up-to-date and correct 99.9% of the time. Anything you post here will have to be continually updated as things change. Essentially you're fragmenting the information. That's the point of a central repository - to keep all the information together and current.
Also as far as the "making it easy" - and again, I mean no offence, but it is a lot easier to sort through and read the original documentation on Google's site simply because of formatting. [This is 100% a personal opinion though.]
In general though, if given the option to have to either link here to this post, or link back to Google and their posts, I'm pretty sure the better option is to link to the original content.
As for all the people dying and what-not.. not sure where you're getting at there, a little over-dramatic maybe? - All I'm doing is letting people know the content has been replicated - had you started off the post with a link to Google's documentation, and then continued with saying "to sum it all up, here's a quick reference" then everything is fine.
I'm not trying to troll or anything, but to a certain degree flooding the forums with redundant information becomes a waste of space, time, and effort (for the creator and the readers) - especially in the developer's section, as I think knowing of and how to use the SDK should be prerequisite for participation.
Personally I disagree. Having been to googled sdk page, this seems more comforting and real world. Maybe its because, psychologically I feel I can get his help if I get stuck. I'm hearing first hand that he has done it. Same with the rest of the info in this forum. Knowing if you repeat these steps you will see these results. After all, theres nothing new here, just building off other peoples concepts/skills/code/designs/etc.
even if its just for me, the only idiot who needed help, I hope BT is glad he posted. Thanks man! Keep it up.
Sent from my SPH-D700 using XDA App
I personaly am glad BT posted this here, I always find his instructions clear and concise, and I don't see how it's in anyone's way, you don't have to click on it. hopefully the remainder of this thread will deal with questions and issues regarding the matter at hand, the Android SDK I myself have it installed but probably not fully set up.... and this thread will help. thanks BT!
WolfKaBaL said:
I'm not trying to disrespect your efforts, and I do respect all the work you do on the roms and tools. But when it comes to stuff like this, I simply feel it's best left to the creators - eg: Google. Their repository of information is going to remain up-to-date and correct 99.9% of the time. Anything you post here will have to be continually updated as things change. Essentially you're fragmenting the information. That's the point of a central repository - to keep all the information together and current.
Also as far as the "making it easy" - and again, I mean no offence, but it is a lot easier to sort through and read the original documentation on Google's site simply because of formatting. [This is 100% a personal opinion though.]
In general though, if given the option to have to either link here to this post, or link back to Google and their posts, I'm pretty sure the better option is to link to the original content.
As for all the people dying and what-not.. not sure where you're getting at there, a little over-dramatic maybe? - All I'm doing is letting people know the content has been replicated - had you started off the post with a link to Google's documentation, and then continued with saying "to sum it all up, here's a quick reference" then everything is fine.
I'm not trying to troll or anything, but to a certain degree flooding the forums with redundant information becomes a waste of space, time, and effort (for the creator and the readers) - especially in the developer's section, as I think knowing of and how to use the SDK should be prerequisite for participation.
Click to expand...
Click to collapse
You're entire post is a matter of opinion ...what you find easier others may not ....that's like saying that if you had to choose between chicken or a hamburger for dinner, you'd go with hamburger so everyone should... Some people may just like chicken. But thanks for your OPINION.
BThomas22x said:
Never fails... I do something here to make it easier than linking to another site and there's always that one guy who just can't be happy for whatever reason... my apologies for doing this... please, let me know who it killed from my efforts to make it easier on you and ill send my respects. I didn't know it was going to kill someone.
Click to expand...
Click to collapse
his mommy didnt hug him enough
and thanks bt navigating said link was kinda of confusingly setup. much simpler and straight forward
Thanks for posting this here. I dl the sdk kit a few months ago and it was a bit confusing. The site gave me information overload and I just gave up. Now I think I will try it again (being a nurse I am no stranger to technology) as I would like to develop some apps for critical care nurses.
Edit: Subscribed
Sent from Bonsai v 5.0.3
Nice Job
Thanks for posting this guide it will help many people along the adb path.
WolfKaBaL said:
I'm not trying to disrespect your efforts, and I do respect all the work you do on the roms and tools. But when it comes to stuff like this, I simply feel it's best left to the creators
Click to expand...
Click to collapse
your opinion matters not. What's best for THIS community is that this dev (and a damn good one at that) has put together a concise and easy to follow guide. He's also here to answer questions and help those that don't quite know how to use the SDK... can u get that over on google's site ?
right.
dorkboy said:
- eg: Google. Their repository of information is going to remain up-to-date and correct 99.9% of the time. Anything you post here will have to be continually updated as things change. Essentially you're fragmenting the information. That's the point of a central repository - to keep all the information together and current.
Click to expand...
Click to collapse
pretty sure BThomas won't mind updating as necessary, and if not, anyone that gets through this guide can go find the updated information on their own.. so, the problem is ........ ??
right..
Also as far as the "making it easy" - and again, I mean no offence, but it is a lot easier to sort through and read the original documentation on Google's site simply because of formatting. [This is 100% a personal opinion though.]
Click to expand...
Click to collapse
u find sorting through information and digging for reference easier.. others find a step by step guide to be easier to navigate.. personally, a GPS navigation works similarly to a 'step by step' guide.. so this portion is trolling.
douchenozzle said:
In general though, if given the option to have to either link here to this post, or link back to Google and their posts, I'm pretty sure the better option is to link to the original content.
Click to expand...
Click to collapse
and you're the expert, right ??
platypus said:
As for all the people dying and what-not.. not sure where you're getting at there, a little over-dramatic maybe? - All I'm doing is letting people know the content has been replicated - had you started off the post with a link to Google's documentation, and then continued with saying "to sum it all up, here's a quick reference" then everything is fine.
Click to expand...
Click to collapse
I wasn't aware that BThomas needed your approval for posts, thanks for pointing that out
troller said:
I'm not trying to troll or anything, but to a certain degree flooding the forums with redundant information becomes a waste of space, time, and effort (for the creator and the readers) - especially in the developer's section, as I think knowing of and how to use the SDK should be prerequisite for participation.
Click to expand...
Click to collapse
if you feel SDK should be a pre-requisite for participation, then how would developers get started ?? There's a dev in each of us.. the problem is that most of us don't have a good starting point because often times it's overwhelming the way google has collected the info.
This guide is an AWESOME way for someone to begin as a dev and I thank BThomas a ton for the effort putting it together.
Sorry for the 'bashing' in my post, but this guy pissed me off.
[/pissed_off]
People don't come here just to be linked to other sites. The central repository for us, is HERE. Although reading the manual should be included, I'd much rather have real world knowledge from someone who knows what they're doing.
My opinion, of course
Sent from my SPH-D700 using XDA App

[REQ] Collaborative "stock" application list for KitKat/CM11/AOSP/GApps

I'm hoping to get some help with a collaborative list of applications for the latest android. The list will be comprised of the application filename, where it comes from(ie: CyanogenMod, OTA, GApps, AOSP, etc), what it's purpose is(brief description), and whether or not it is safe to remove(possibly also a column for what applications are dependent on it, if necessary.)
I know there have been other attempts at this, however I cannot find an up-to-date version.
I have started, but honestly don't know what a lot of the applications do. This will be something that I will edit over the next few days when I have the time and patience, and hopefully others will join in as well.
Here's the link if anyone feels like chipping in. Feel free to reformat it to look prettier, or prepare it with BB code for later use in a forum post.
Any help is greatly appreciated, and I hope that once this is done, it will help some people out.
I'll also include - in the final post - a prewritten script (for use in recovery) which can remove all of the apps that are "safe to remove" (so that people can edit it to their liking)

Article Sections Open Automatically

I'm sorry if this is in the wrong spot or if I do something wrong, this is my first post and I just cannot find any information anywhere else on the internet or even on these forums.
Basically what's happening is that every time I open a webpage (e.g. Wikipedia) the sections on the website are open without me clicking on them which normally would be how I open them. For instance (see image) "characteristics" and "classification" both start out as open, like classification is currently. If anyone has any information about this or a way to have them start out as closed, please let me know. I'm running stock OS and I have no rooted my phone or anything like that, I believe it started out a few updates ago but I only just caught it recently.
I am thankful for any information you guys can give or any ideas you have.
Edit: can't actually post images for the first 10 posts, sorry

Handling permission request in GeckoView

Hello,
I hope I am right here - I could not post in the dev forum because I am not long enough a member here.
Please forgive me this potential noob question, I know how these questions suck for advanced forum members but I simply don't find another way to solve my problem. I googled like crazy and tried to understand the material I found - without success.
I am new to coding and decided to code a simple app which displays a website, just for myself.
Because WebView does not support all the JavaScript Functions the websites needs, I decided to go with GeckoView - which worked fine.
I was really happy to get the app running, even though it's super basic
The website loading inside GeckoView now needs permission to access the microphone of my device.
So I added to AndroidManifest.xml the following line:
Code:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
... still did not work.
When I open the website in question in regular Firefox, the browser asks me to grant permission.
So I guess I need to give GeckoView itself permissions to access the mic.
I looked into the documentation but could not understand anything (I wanted to include the like to the doc here, but because I am new, I can't link to external pages. If you google "Interface GeckoSession.PermissionDelegate" you will find the documentation I am talking about). I did some try and error experiments but it was not working. It was more or less wild guesses because I even could not find any example code/projects using these permissions so I could try to understand it better.
I am simply stuck. I read everything regarding these permissions but have a hard time understanding most of it.
That's why I came here. I would highly appreciate your help so I can finish this seemingly easy task.
Thanks a lot!
Clms

How to find the correct intent or activity name?

Hello community!
I use Shortcut Maker to create direct shortcuts for many of the activities, including some hidden ones. But all of these are already available under the Activities section or Intents section within the app.
Is it possible to create a shortcut for an activity not available in those sections?
For example, I want to create a shortcut to the 'Background Usage Limits section of the Device Care app on my Samsung phone. There is already an activity that takes me to this page:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
But I want to create a shortcut that takes me directly into the 'Background usage limits' section:
The app allows for editing intents:
But I don't know what to add/ edit here that will achieve the desired objective.
Can someone tell me how to find the activity/ intent name for the page I'm trying to launch directly using the shortcut?
Thanks.
TheMystic said:
Hello community!
I use Shortcut Maker to create direct shortcuts for many of the activities, including some hidden ones. But all of these are already available under the Activities section or Intents section within the app.
Is it possible to create a shortcut for an activity not available in those sections?
For example, I want to create a shortcut to the 'Background Usage Limits section of the Device Care app on my Samsung phone. There is already an activity that takes me to this page:
View attachment 5651309
But I want to create a shortcut that takes me directly into the 'Background usage limits' section:
View attachment 5651311
The app allows for editing intents:
View attachment 5651313
But I don't know what to add/ edit here that will achieve the desired objective.
Can someone tell me how to find the activity/ intent name for the page I'm trying to launch directly using the shortcut?
Thanks.
Click to expand...
Click to collapse
You might be able to create a shortcut and use Tasker+shortcut to set up an automated action to open to the activity you want when you open the shortcut by creating the shortcut, then using Tasker to setup an automated process containing the sequence of actions it takes to open the app to the activity/page that you want then set the shortcut to run that automated process to open to the desired activity/page.
Or
The background usage limit activity/page is more than likely located in your system settings and the Device Care app just "links" you to it. Can you access that page by going through system settings somewhere instead of going through the Samsung Device Care app?
Droidriven said:
You might be able to create a shortcut and use Tasker+shortcut to set up an automated action to open to the activity you want when you open the shortcut by creating the shortcut, then using Tasker to setup an automated process containing the sequence of actions it takes to open the app to the activity/page that you want then set the shortcut to run that automated process to open to the desired activity/page.
Or
The background usage limit activity/page is more than likely located in your system settings and the Device Care app just "links" you to it. Can you access that page by going through system settings somewhere instead of going through the Samsung Device Care app?
Click to expand...
Click to collapse
The Device Care app is deeply integrated with the System, and it is what handles this activity, i.e. there is no other way to access this page from System Settings.
Using Tasker for the method you described appears to be a setup that allows 'Accessibility' permissions to Tasker, plus it makes the whole setup unnecessarily complicated. Besides, I avoid using automation apps because they need to run continuously in the background, consuming RAM and battery.
Is there no way to find the exact 'intent' or 'activity' name for this process?
TheMystic said:
The Device Care app is deeply integrated with the System, and it is what handles this activity, i.e. there is no other way to access this page from System Settings.
Using Tasker for the method you described appears to be a setup that allows 'Accessibility' permissions to Tasker, plus it makes the whole setup unnecessarily complicated. Besides, I avoid using automation apps because they need to run continuously in the background, consuming RAM and battery.
Is there no way to find the exact 'intent' or 'activity' name for this process?
Click to expand...
Click to collapse
You can try the Disable Service app, it should list all your apps and the individual internal services/activities within each app. That should help you identify the activity that you want.
Droidriven said:
You can try the Disable Service app, it should list all your apps and the individual internal services/activities within each app. That should help you identify the activity that you want.
Click to expand...
Click to collapse
Can you provide a link for that app?
Have you tried Shortcut Maker app? This too lists all activities per app and intents available. Does the app you suggest do anything more?
TheMystic said:
Can you provide a link for that app?
Have you tried Shortcut Maker app? This too lists all activities per app and intents available. Does the app you suggest do anything more?
Click to expand...
Click to collapse
Why? It's in the Playstore, a Playstore search for :
Disable service
Will find it, it should be at the top of the list of results. I'm sure you can handle that by yourself without needing someone to hold your hand or spoonfeed you, right?
I'm not the one that needs the app, the OP of this thread does.
And....
If you read the first post in this thread, you will see that they are already using the Shortcut Maker app and it doesn't show/list the specific activity that they are looking for. The Disable Service app will probaly list activities that do not appear in Shortcut Maker.
You didn't even read the first post of this thread to understand the situation and you requested a link to an app that is extremely easy to find in the Playstore, both of these things are a bit lazy.
Droidriven said:
Why? It's in the Playstore, a Playstore search for :
Disable service
Will find it, it should be at the top of the list of results. I'm sure you can handle that by yourself without needing someone to hold your hand or spoonfeed you, right?
I'm not the one that needs the app, the OP of this thread does.
And....
If you read the first post in this thread, you will see that they are already using the Shortcut Maker app and it doesn't show/list the specific activity that they are looking for. The Disable Service app will probaly list activities that do not appear in Shortcut Maker.
You didn't even read the first post of this thread to understand the situation and you requested a link to an app that is extremely easy to find in the Playstore, both of these things are a bit lazy.
Click to expand...
Click to collapse
I'm the OP.
Searching on Play Store did not list an app with the exact name that you wrote, and those that showed up with similar names, require root. My device isn't rooted.
Also, just wondering if it would have been easier to simply post the link than spend time typing so much, and that too addressing someone who doesn't exist. I'm assuming you has a bad day. Chill buddy.
TheMystic said:
I'm the OP.
Searching on Play Store did not list an app with the exact name that you wrote, and those that showed up with similar names, require root. My device isn't rooted.
Also, just wondering if it would have been easier to simply post the link than spend time typing so much, and that too addressing someone who doesn't exist. I'm assuming you has a bad day. Chill buddy.
Click to expand...
Click to collapse
Sorry, I didn't look at your name, also, asking me if I tried Shortcut Maker made it seem like another member was mistaking me for you, that is why I thought it was someone other than you. Why would you ask if I tried Shortcut Maker as if I were the one that needed it to achieve something I wanted? The way you worded yourself threw a wrench in things from my perspective, as if you were some random member coming in the thread and confusing me with you asking me if I had tried Shortcut Maker as if they hadn't read the first post and seen where you stated that you were already using Shortcut Maker and then asking for a link on top of that just seemed like someone that wanted to be spoonfed. We don't spoonfeed members here, it is even in the Forum Rules, members are expected to search for themselves and then ask only when they can't find anything themselves.
I've used both Shortcut Maker and the Disable Service app, though, the Disable Service no longer seems available, that must be something recent because I just searched for it when I suggested it to someone a few weeks ago. But the Service Disabler app should do the same thing. I know it is for rooted devices, it requires root to actuallu use the app to disable/modify the services, it does not need root to show the list of services/activities on/in your device/apps. I'm only telling you to use it as a tool to see/find the name of the service/activity name, then use that information to do whatever you were trying to do with the service/activity name as you asked in your first post. You can uninstall Service Disabler as soon as you find the name of the service/activity.
Droidriven said:
Sorry, I didn't look at your name, also, asking me if I tried Shortcut Maker made it seem like another member was mistaking me for you, that is why I thought it was someone other than you. Why would you ask if I tried Shortcut Maker as if I were the one that needed it to achieve something I wanted? The way you worded yourself threw a wrench in things from my perspective, as if you were some random member coming in the thread and confusing me with you asking me if I had tried Shortcut Maker as if they hadn't read the first post and seen where you stated that you were already using Shortcut Maker and then asking for a link on top of that just seemed like someone that wanted to be spoonfed. We don't spoonfeed members here, it is even in the Forum Rules, members are expected to search for themselves and then ask only when they can't find anything themselves.
I've used both Shortcut Maker and the Disable Service app, though, the Disable Service no longer seems available, that must be something recent because I just searched for it when I suggested it to someone a few weeks ago. But the Service Disabler app should do the same thing. I know it is for rooted devices, it requires root to actuallu use the app to disable/modify the services, it does not need root to show the list of services/activities on/in your device/apps. I'm only telling you to use it as a tool to see/find the name of the service/activity name, then use that information to do whatever you were trying to do with the service/activity name as you asked in your first post. You can uninstall Service Disabler as soon as you find the name of the service/activity.
Click to expand...
Click to collapse
Often, there are many apps with similar names, especially if they are doing the same functions, so when someone recommends an app based on personal experience, it helps to include the link to that app too because of the same reason mentioned above. This isn't spoon feeding. And as you confirm yourself, the app is no longer available on the Play Store, so anyone who looks for the app based on your suggestion, would have wasted time trying out several apps, except the one suggested.
Personally, I always include links when I'm helping someone. It doesn't cost me anything. But I understand we have different perspectives and approach.
But anyways, thanks for your time and effort.
TheMystic said:
Often, there are many apps with similar names, especially if they are doing the same functions, so when someone recommends an app based on personal experience, it helps to include the link to that app too because of the same reason mentioned above. This isn't spoon feeding. And as you confirm yourself, the app is no longer available on the Play Store, so anyone who looks for the app based on your suggestion, would have wasted time trying out several apps, except the one suggested.
Personally, I always include links when I'm helping someone. It doesn't cost me anything. But I understand we have different perspectives and approach.
But anyways, thanks for your time and effort.
Click to expand...
Click to collapse
I used to give detailed descriptions with all links included. Lots of times, it was posting descriptions and links that I had posted many different times for other members asking the same questions, answers that are already here, answers they would find if they searched for it. People treat this place like it is Reddit or Quora, just here to help and answer their questions when they have a problem/question, instead of what it actually is, a forum designed by developers for developers. The monotony of that became overbearing and then when you consider that I would often post 10's/dozens of posts a day, after being here for almost 10 years and helping 1000's and 1000's of users that just wanted someone to make things easy for them and just hand them everything they need to solve their issue while also being unwilling to try gaining some understanding of what they are dealing with, understanding that could/would help them in the future if they just paid attention, that eventually evolved into giving as straightforward of a description as I could and then telling the member how to find the things I mentioned for themselves, this not only encourages them to do the footwork of searching for themselves, it also helps refine and develop their ability to effectively search for what they need and actually get results. It isnt a matter of just searching, it is a matter of knowing what to search for and how to be more specific in their searching. A lot of times, users don't know the best search terms or keywords to use which leads them in circles, unable to find or make sense of anything. I would rather give them information to understand the issue or understand android itself, information that may help them understand their device, how the hardware/software actually functions so that they can have a better sense of how to go about doing things on the device. Show them the rules of the game and how it is played instead of just pointing them in a direction or just putting them on the field and letting them wander around doing things without understanding how their actions effect the outcome of the game. You can tell a person that 2+2=4, but you've done nothing if they don't understand the numbers or the math.
Long story short...
If you give someone a fish, you feed them for a day, but if you teach them how to fish, you feed them for a lifetime.
Droidriven said:
I used to give detailed descriptions with all links included. Lots of times, it was posting descriptions and links that I had posted many different times for other members asking the same questions, answers that are already here, answers they would find if they searched for it. People treat this place like it is Reddit or Quora, just here to help and answer their questions when they have a problem/question, instead of what it actually is, a forum designed by developers for developers. The monotony of that became overbearing and then when you consider that I would often post 10's/dozens of posts a day, after being here for almost 10 years and helping 1000's and 1000's of users that just wanted someone to make things easy for them and just hand them everything they need to solve their issue while also being unwilling to try gaining some understanding of what they are dealing with, understanding that could/would help them in the future if they just paid attention, that eventually evolved into giving as straightforward of a description as I could and then telling the member how to find the things I mentioned for themselves, this not only encourages them to do the footwork of searching for themselves, it also helps refine and develop their ability to effectively search for what they need and actually get results. It isnt a matter of just searching, it is a matter of knowing what to search for and how to be more specific in their searching. A lot of times, users don't know the best search terms or keywords to use which leads them in circles, unable to find or make sense of anything. I would rather give them information to understand the issue or understand android itself, information that may help them understand their device, how the hardware/software actually functions so that they can have a better sense of how to go about doing things on the device. Show them the rules of the game and how it is played instead of just pointing them in a direction or just putting them on the field and letting them wander around doing things without understanding how their actions effect the outcome of the game. You can tell a person that 2+2=4, but you've done nothing if they don't understand the numbers or the math.
Long story short...
If you give someone a fish, you feed them for a day, but if you teach them how to fish, you feed them for a lifetime.
Click to expand...
Click to collapse
Appreciate that you have stuck around for so long, and helping people with solutions. I'm neither a developer, nor have been in this platform for too long. I'm not too active either. So I'll speak for myself.
I'm aware this platform started off by Developers, and for developers. However, it has grown much beyond that with Android evolving. The Developers are now a minority, albeit still the most important category.
Although you are speaking from your personal experience, as far as I have seen, people who come to this platform come for a very specific purpose, and don't treat it like a social media platform as far as I have seen. It is just that sometimes the threads become too long and they may not find answers they are looking for, despite searching for it.
In my case, you would see that well over 90% of my questions remain unanswered. I'm not complaining. I'm aware that my questions are indeed difficult because I post only when I don't find answers after doing sufficient research. And under these circumstances, this platform becomes the best place to ask those questions because this is a platform of default for Developers, and as q consequence also has the maximum probability of providing an answer.
Whatever we post here, is going to remain forever, and it is not limited to the original poster. The answers and comments will continue to help many more people with time. I wouldn't jump into concluding that someone hasn't done his homework. That's because I don't know. So when in doubt, it is best to give the benefit of doubt. Besides, it doesn't cost anything to include links, where applicable.
So while I agree that it is better to teach someone how to do something, than providing ready made solutions, there is often no point in reinventing the wheel.
Have you since found a way to find intents?
Windows_2000 said:
Have you since found a way to find intents?
Click to expand...
Click to collapse
Not yet. On the contrary, a lot of activities/ intent already visible within the Shortcut Maker app don't work too, with this error:
No app to open this shortcut.
Don't know yet how to solve this.

Categories

Resources