Is it possible to block an IP address on smartphone? - java

Is it possible to block a website/ IP address in a smartphone by way of an app that people can download? I want to sell an app that blocks certain websites from being able to pull up on your phone.

There is not really any such option in the SDK. You won't be able to do it in an app. You can only do it if you plan to distribute your own android ROM (You probably don't).
What you CAN do however is to sell a configurable proxy service and let people to connect toy your service by setting up your server as a proxy. This is also not such a trivial task by itself.
There is a dedicated blog to a android proxy settings:
http://android-proxy.blogspot.com/
Good luck

Are you trying to create an adblocking app?
There's already one, but like Variant said, it uses proxies.
http://www.androlib.com/android.application.ub0r-android-adblock-zmmF.aspx

Related

Regarding wireless lan messaging system

i am developing a chat application for local environment where our office employees can chat easily so here I am getting some conflicts when I am trying to send message over the IP but there IP being change dynamically so how can i resolve it .
First of all, I recommend using a well established solution like a local Jabber Server installation and using a client that supports the required features.
If you really want to pull this off on your own, you'll need at least a central controlling point (Server) to abstract Users from their Endpoint.
Configured user would then have to login to that server to signal they are ready to receive messages. Doing this, you have the momentarily correct IP that you can then use to relay messages or to give to other clients wanting to send to that user. Also consider that users may want to use more than one client (they have 2 PCs?). You probably wouldn't want to bind one user to one client device.
Also note that you will have to create a decent protocol for all this. This can be quite tedious if you want similar features to for example Skype Chat or ICQ, or some derivate of XMPP / Jabber.
This leads me again back to my first suggestion: Better use something that already exists. Installing and configuration of that can already be effort enough. Coding all that by yourself, though will take way more effort.
And I didn't even go into status/statusmessages, groupchats, sending/sharing Files, sending messages while User is away/offline ...

Implement internet gateway in android

For my research I need to implement an internet gateway in Android. similarly to what Open Garden does to make android utilize facility provided by its own to use its provided stream etc as an internet connection. This app does not require any root access.
So my question is very narrow: how to create such a facility. and how to instruct Android to use it instead of an already existent LTE connection for example. I am not asking about protocols etc. just how to integrate something like that into the android without the use of root access; what APIs etc.
Well; after some short research the actual solution is to implement a VpnService; make localhost the server and from there route your pakcets anywhere you wish:) there seems to be trouble bugs not fixed yet (people actually waiting for yeara for google to fix) in cases like when other apps do not handle detect the vpn connection properly. Anyway:) here's the answer. I'll be on my way now.

How to share database between same application in multiple devices without server

I have created database in one application and that application is installed in multiple devices.My requirement is that if i change the value in database of one device then,that changes in database should reflect in another device of same application.I need it without server/third api.
Thanks in advance...
This is precisely when one does need a sever.
Stop and consider what it is that you are asking for. You need a way for a phone to notify all other phones that hold the same application about a change. Phones are not directly addressable to each other via the web, which makes any kind of peer to peer algorithm tricky. SMS texts is the closest form of direct addressing that phones do support, thus it could be used to build a peer to peer protocol, but that would be tricky, unreliable and is unlikely to be beneficial.
A server on the other hand is the standard approach to solving this problem, the server acts as a shared agent that all phones that connect to the web can address easily. Even if the server is just an FTP server on a freebie hosting site.
You need to implement a server functionality in your android application.
What is a server : A server is a running instance of an application (software) capable of accepting requests from the client and giving responses accordingly. Servers can run on any computer including dedicated computers, which individually are also often referred to as "the server".
For further information,I would like to provide this link which will clarify you about communication between two devices Android - communicating between two devices (Use of bluetooth etc.)

Integrate IM/chatting functionality in my Java application

I am interested in putting a chatting functionality as part of an application.
What I am interested in:
I would like to keep my application instances acting as peers, i.e.
I would prefer not to write also some server module to handle
message communications
I would like it to be able to use it with exising IM accounts. E.g.
someone can use it using his MSN account or any other client
account he may have, same way he would use MSN Messenger or Tor client etc
I googled and found that there are some Java MSN libraries available and also some other libraries that support IM e.g. SMACK for JABBER etc (not sure what that is) but I am not sure if the latter could be used for option 2 I mention.
My preference on 2 is because I assume that this way a user could do chat no matter where he is while in other solution I assume that some network infrastructure e.g. with routable IPs etc would be required. Am I wrong here?
Does anyone have expererience with Java IM libraries? Are for example any issues e.g. with different MSN versions or something?(Don't know if the protocol has been changing often to matter for me).
What would be the best path/option for my requirements?
I would go with a Jabber based approach. Jabber (also called XMPP) is an open protocol with lots of implementations and supports connecting to other IM services via transports. That way you would not have to deal with changes to the Windows Live protocols. You can rely on the open source community to provide that functionality for you.
Edit: It seems, that Windows Live even allows native XMPP access.
If you like, you can always set up your own Jabber server to provide a tighter integration with existing user accounts. In that case you wouldn't need to write the whole server.

Could I use Google App Engine to host a Java IRC Bot?

I have an IRC bot written entirely in Java that I've been hosting on my home computer, but my iffy internet connection has been disconnecting it a lot. I've been wondering if I could use the Google Apps Engine to host the bot with a constant connection? If so, what kind of changes am I going to have to make?
Thanks for the help
No, you cannot do that. Google App Engine does not allow arbitrary outgoing Socket connections (probably because they do not want people using their platform as a proxy server). The closest thing they offer is the URL Fetch API for accessing external content over the network/Internet.
Using that, you might be able to come up with something that drives an existing web-based IRC client using an App Engine app. Though I'm not sure what benefit that would have over just using a web-based IRC client directly.
Also you cannot have a "constant connection" to (or from) an App Engine app. The platform will automatically time-out/close any request that has not completed processing within about 30 seconds or so.

Categories