So I'm building an app that allows input from the user with their voice. I have built a webview and i have all the code to recieve voice input and transcode that into text. But now i want to be able to paste the text that the user says that i have already into whatever text box that is selected on the screen. For instance if the user is on google and clicked on the search box and says the words "stackoverflow", my app recieves the string containing "stackoverflow", now how do i paste that into the text box?
Thanks and let me know if i can give any further clarification
Unless you knew exactly what page the user had opened and exactly what the ID of the element you wanted to populate was, there's no way to accomplish what you're describing (if I understand your request correctly). Or are you asking how to populate an EditText that's in your Activity (I'm assuming that's NOT what you're asking, but just in case).
Related
So I am building an floating application that would allow user to browse webpages and allow them to listen audio from video sites like YouTube, etc. even when the device is locked/in background. Here I have a text box where user can input the websites or any text that they want to search i.e. SomeSite.com, www.SomeSite.com, Some Text To Be Search
I want to know is there any efficient way to do this. Currently I am thinking differentiating this by counting space in text (if there is 1 or more space then text is definitely not URL). But this won’t work for 1 word search query. Also another way is to check for top level domain like .com, .in, .uk, etc. not good as there could be thousands of domains and in future also it could increase.
I just want a effective to differentiate site or an web address
You can use the Patterns class available from API level 8.
if (Patterns.WEB_URL.matcher(myUrl).matches()) {
// Go to website
} else {
// Submit as search query
}
You can use
isValidRul()
Patterns.WEB_URL.matcher
Check if Uri.parse() returns valid value
I am looking to update my thingspeak channel with custom values from the app I am building with mit app inventor 2. Till now I am able to send fixed values. But cannot update the channel with user inputs.
Please help.
Thanks
On the design screen, add a TextBox named Input and a Button named Send. You also need to add a Web Connectivity element and assign it to the Url: https://api.thingspeak.com/update
On the Blocks screen, use the "PostTextWithEncoding" block when the button is clicked. Pass in the text of the update, "api_key=YLT2AAO8ZIT4R13Z&field1=" and the input box Text. The encoding should be set to "application/x-www-form-urlencoded".
Here's what the blocks look like:
Let me know if you need further help. It is tricky to explain since I can't share the app code.
I have an android app, which lets people share content from other apps to it. When it receives the shared data, it looks for the URL in the shared text and fetches the page and does processing on the data fetched. This is designed with specific purpose and not a generic for all apps.
It works fine, except that people have to click the share icon and then choose our app name. With accessibility we can reduce this work for the users. We are able to get the text displayed in the app.
Is it possible to get the content which we would get if we were to click the share button.
Or
Is it possible to trigger the share button and choose our app without disturbing the user in anyway
You could try that if it's only for 1 specific app. See question How to click button in settings using AccessibilityService? which clicks a button. This will not scale if you want to do this for more apps. You could however parse the text that is on the screen and look for http links and process them in a background service and then show a floating button like Link Bubble Browser
You can simply trigger the share activity of your app when you detect the text from the other app; but the question is how will you know when user is done typing the text?!
One way is you can place a system-wide floating button similar to Facebook Messenger and after user clicks it, the text can be shared. This will reduce number of clicks user has to do.
So,
1) Yes, its possible to get text content via AccessibilityService.
2) No, you cannot automate this action.
i trying to implement auto search mechanism in android like google. Here when i enter some words then display related search results in list view. For example i entered 3 letters then display related search results from server, again i will add another letter to previous 3 letters then automatically display related search results with out click search button.I don't know how to do it, every time api calling. How to use Search view option from android xml for searching?
On client side you should with the help of AutoCompleteTextView, Adapter, HTTPClient and other stuff you handle sending a request to server. On server side you implement Filter after querying database. After filter is done - respond result and via AutoCompleteTextView you show suggestions. Then via Adapter you set list.
Very nice example
Now when you know which way to search better use google. It is rich on that kind of info and if you face some problems - ask new question with exact! problem.
hope it is helpful.
I'm currently working on my first serious app., and I would like to have some sort of contol on the data that users can enter.
Specifically, my app. allows users to write some text content (imagine something like a 'tweet'), and upload pictures.
I would like to prevent them from writing inappropriate text, and uploading offensive pictures for instance.
What I thought of doing, is to allow something like 'report abuse' button, where users who find some content offesive, can press - in which case relevent data will be saved, and later checked, to decide if indeed an inappropriate usage happened (maybe by some sort of server-side code).
As I said, I'm a beginner in android development, and I would really love to hear your suggestions and guiding. Perhaps it is something over my league for now? Maybe you know of such thing that already exists?
My app. uses Parse.com as its DB.
I would really appriciate your help.
Thank you.
I'm developing as well an app with parse and I also had to integrate in it a report button for the user.
The way I did it is simple:
In every Pf User object, I created a field of type counter named "reportCounter" while in the PFObject created by the user (it can be a string, a picture, etc.)I created a boolean field named "isReported". When a user find some inappropriate content he can report it through the dedicated button. The PFObject relative to that content gets its isReported field changed to YES and a parse background job checks every day for all the PFObjects, incrementing the reportCounter field of the owner-creator of the content and sending a report e-mail to the administrator. In this way you can keep also a record to see if a particular user is behaving badly. Just take a look at the Parse documentation about background-jobs. It's pretty good.
I hope this will help.