I am working on developing an app which involves clicking a tab/div in a website. Click event involves execution of java script in background and server also updates the page with response.
Now, my android app can make use of response data and do its application code. Here, I dont want user to click the tab/div in website. I want this to be done in background and I want the response from the website as input for my app. ) i.e I wish to perform click event on website when user opens the android application.
I have tried this using HtmlUnit and Selenium. Is there any other way to solve this problem ? Please share your valuable answers.
I wouldn't use Selenium for this at all.
Open that website up on a computer and use Fiddler2 to capture the traffic (there most certainly will be a request somewhere that will trigger that response) and just send the request to the server, receive response, and profit.
If you REALLY want to use selenium inside an android app, you might have better luck with Appium.
Related
Totally new to Azure and the services it offers, I face many questions about the "Speech" service and the bots that can be created on the Microsoft platform. Currently developing an Android mobile application I'd like to realize the following behavior:
The user records a voice file from the app (using MediaRecorder), this part is ok
Once the recording is finished, this file is sent to Azure function(via an HTTP POST).
The file is translated into Text
The text is sent (step 7) to the bot which reacts accordingly by executing an HTTP request.
Scheme of the process I explained
First of all I wanted to know if this scenario is possible or if I have to use the Speech SDK on my Android application.
Moreover if this scenario is possible, how do I send the text to the chatbot? I've checked this link but it doesn't seem very relevant to me.
NB: My bot has been completely created using "Bot Framework Composer" for the moment, no code has been written, I just wanted to know if my scenario is plausible and above all possible.
Go through your steps, and I think it can be implemented. If you want to send text to bot, you can refer to this request.
Before that, you may need to start a conversation and get the conversationId.
I'm building an Android prototype for the following use case
User selects a recipe in mobile app
Button: [Buy at <Store>] appears
User clicks on the button
User gets redirected to store with all the ingredients in his basket
Unfortunately I can't just use custom tabs because there is no way of setting a cookie from inside the application.
I wasn't able to make a get request with what looks like a session-cookie.
Tried using mtmproxy to check out the traffic of the stores' mobile application. This won't work without a workaround on phones with Android Version 7 or later, as discussed in this GitHub issue.
So, I'm running a HTTP Tunnel on NGINX with the ngx_http_proxy_connect module and in order to establish a connection I'd have to use the connect method. The Problem with that is the Android documentation states that the Connect method is forbidden for the HttpURLConnection in Java class.
Does that mean I have to create TCP sockets and the question is how do I establish a secure connection using the tunnel?
Haven't done any of this before and I'm learning a lot. But I don't have the foresight to figure out
if what I'm doing is technically/legally/ethically correct. Would appreciate some help.
I'm currently using Android Studio 3.0.1 to build a very small android app that will be used to send specific chat commands to the users twitch channel chat. It's been quite a while since I've dabbled and as such I'm getting lost with where to put certain things
Essentially what I need the app to do is two fold. Firstly I need to present the user with the Twitch authentication page on first open so that they can authorise the app to use their twitch account/channel. Then I have a single screen with buttons on it. Each button calls a certain string, and what I need to do is pass that string into the users channel chat
I've got virtually all the code required to connect to the twitch API and generate the OAuth request, as well as code connecting to the channel and code to push commands from the buttons out to another endpoint. What I'm struggling with is the following:
Where do I put any of this code? Where am I putting the twitch OAuth request code etc? Do I create a separate Java class for it?
Once I've got the code in and working where is the data being stored and how do I then call it elsewhere? I guess this might get answered once I know where I'm actually putting the main code
Obviously the app will be used by multiple users so I assume I'll be creating variables for usernames, OAuth tokens etc and then will call them from other areas. I'm just unaware of how to get this done in the current Studio version and while I can find lots of references to what code to use, and plenty of examples of how to make code work I can't seem to find any info on where to actually put any code
I've abandoned android studio for now. no matter what I tried I can't get things working. switching over to another method of working using html/js/css and I've got so much further
I want to setup One to one Video with voice call using Open TokBox. I want to setup it in Android and Server Side is dotNET. I found sample project and it is working fine but it is like multi broadcasting. And It finds if any user is online.
Rather than this, I want that One user call another user from Android Device. And if that another user is online then he gets notification about call else it shows offline user. This can happen with many users same way.
Its like skype but only one to one. So, as I know I will need to create new session id at dotNET server side.
Please help me to perform this task perfectly.
I'm fairly new to Facebook SFD for Android.
What I'm trying to achieve is an Android app that uses facebook login, post to the user timeline and gets notified whenever one is commenting or liking that post.
I went thru Facebook tutorials for login and for Publish to Feed.
All went well.
Now I'm struggling with the last part. I don't see how to be notified whenever there is a like or comments. I browsed the web and stackoverflow forum without any success. I'm guessing that there is a mechanism to be notified by Facebook and that I don't have to start a process just to monitor the post...
Anyone could give me a hint on the API to use?
I'm currently looking at "Creating Object Types" section Associating Actions with Object Creation (https://developers.facebook.com/docs/opengraph/creating-object-types) but it looks like this describes how to do for facebook web app, and not for android app.
EDIT
I've found this https://developers.facebook.com/docs/graph-api/real-time-updates/ but not quite sure how to "translate" this into Android coding.
If anyone could help me with this, it would be greatly appreciated.
I guess you have to create a page in php that will handle the responses from Facebook, it starts with a
GET response from Facebook that you retrieve with $_GET["name"] in php, and you have to send back a confirmation to Facebook to confirm that the connection works, and Facebook will send you the answer you want via
a POST request ( $_POST["name"] ) (with a json object, containing the informations about the user in object for example, and the different updates in entry).
You can put all these informations in a database, and when the user start your application, you can automatically connect him to a php script that check if the database has new informations for him.
(specifying who he is, with a user variable that he keeps in the memory of his device, and then you ask for informations from the database about this user). I haven't tested, but it should work.