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 7 years ago.
Improve this question
I am to programming so please help me in some issues.
I download app from Google play that filter web searches. If URL in blacklist then redirect to this webpage localhost:50099/block.html
My query is how to connect this local server?
It is likely that the app you are running has its own internal web-server. If you see that address in the navigation address bar of the app you are running then you may not be able to access it outside of the app.
Are you browsing the web from inside the app itself? What are you trying to accomplish? If you want to access an internal web-server running on an android device which is open to other apps, then you should be able to access it using the URL you noted. I have seen light weight web-servers internal to apps in both conditions, only accessible internally within the app and accessible outside of the app.
UPDATE: Since your question is now 'How to create a lightweight HTTP server on Android':
Try this: HTTPD
It is very simple to use, eg:
NanoHTTPD serverObj = new NanoHTTPD(50099,new File("."));
use IP address of your machine instead of localost in url eg :-
http://192.168.1.190:50099/block.html
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 7 years ago.
Improve this question
I'm currently working on developing an android application that needs to connect to a Raspberry Pi over a local WiFi connection and read some data from a file stored on the RPi. I'm not really sure where to begin on this and what resources I can use. I already have the layout of the application set up and just need to write the code.
So my question is how should I write the android application to read a file from a Raspberry Pi that is connected to a local WiFi network? The file on the Pi could be either a JSON file or a plain text file.
Host the files with Apache, and then download them with WebClient.DownloadString
EDIT: For Android, look into this
For your case, I'd say stop thinking about it as a Raspberry Pi. My guess is that you're going to put NOOBS\Raspberian on it. At that point, it's a linux server.
You can put Apache on it, or an FTP server, or do some google searches on accessing a linux server from android to see a variety of different design patterns that accomplish this task.
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 7 years ago.
Improve this question
I'm writing a web-application using Java. It's for company's internal use.
Now I want to get the client's account name, which is in AD domain, and send it to server.
What tech should I follow?
Or, is there any other idea to complete the auto-login?
Consider this situation, the user login the windows system and open
our web app via browser, and the web app can know the user's windows
account name.
Thank you!
Based on the limited information, I guess the technology you are looking for is SPNEGO. This is the mechanism by which a browser on a windows machine can authenticate itself to a web-server transparently using the Kerberos keys present on the machine.
Here is a link to its Spring integration: http://projects.spring.io/spring-security-kerberos/
(I personally did not use the above Spring one, but used the Kerberos implementation that came with JDK 1.4)
The older non-secure version of windows transparent web-authentication used to be NTLM, but that shouldn't be supported anymore.
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 am building an android app and i have following doubts:-
I need help in how to create back end that is server (application layer).(I am good in java . so if you could guide me a way using java that would be nice)
I need know how to connect the server to my app both on app and on server side.
It depends on you're needs but you're best bet is using something like Django, Ruby on Rails or Python.
Building Awesome Rails API's Part 1
If you want to use Java, there are more ways. Here is one of them (pretty common these days). Your backend app could be a spring based and use REST controllers as the endpoints. There are plenty of introductions, e.g. http://spring.io/guides/gs/rest-service . Once you have established and run the backend app (either deployment to a web server or spring boot - see http://spring.io/guides/gs/spring-boot/) you can connect to the server via TCP/IP. Your android app could use http-client.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is it possible to update my google app engine java application without dropping user traffic?
AppEngine deploy procedure doesn't put your site nor your data in offline/read only mode. As far as the deploy is implemented your user won't notice any issues (as long as your new code didn't introduced any)
yes u can ..
gae projects allows multiple versions for the same project ,you can have upto 8versions i think ..
say ur application name is abc.com
u can deploy ur project to another version like 2.abc.com
and when ur okay with the version 2.abc.com
you can change that to default in GAE .
Now refering to abc.com will actually refer to 2.abc.com this will not affect any of ur traffic
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to acces files on my LAN (on a NAS or PC) by an Android app like I can do on Windows by typing \pcname\ in the explorer. I know this is possible on Android, because there are other apps that do this (e.g. https://play.google.com/store/apps/details?id=com.rhmsoft.fm).
I already tried accessing the file as a local file (new File("\\pcname\")). Needless to say this did not work. I searched the web for tutorials, but every tutorial I found was using ftp, http and so on.
Using java.net.URL you can use ftp urls like ftp://servername/path/to/file. To access windows share, you need to use the SMB protocol (there is similar question: How to access share folder in windows through android and read files )