Two friends and myself are developing a mobile app that we will sell on the Apple app store and the Android marketplace. We have decided to form an LLC to sell the application. Two of us are located in NYC and 1 is in NJ. It seems more beneficial to form the LLC in NJ but will we need to file as a foreign entity since two members are in NY? I am also confused as to what constitutes business in a state since everything will be done online. Any info would be appreciated.
First of, where the owners (investors) live really has nothing to do with "doing business".
Doing business in a state (USA) generally is taken to mean some sort of physical presence. This could be an office, warehouse, manufacturing plant, data-center etc. It could even be a hot dog cart that you stored in NJ and brought into NYC during the day. In this case you would be doing business in NYC since the cart was physically present there.
In the case of partners working at home, if there are no corporate assets present, no sign on the door, and no interaction with the public at the home then this would not generally be considered "doing business" in that state. Similarly if you take your laptop with you and go to a week long conference in Las Vegas, you would not generally be considered "doing business" in Nevada (the state where Las Vegas is located).
You state "everything will be done online", this is not quite true as you will be required (generally) to have a registered agent in the state where you form your LLC; so you will be doing business there. Also when you file tax returns there will be a physical return address listed (it may just be a PO Box).
So in your case it would seem you could pick either NY or NJ (or even another state like Delaware) for your LLC. If you pick NY or NJ, then use that as your mailing address. I am assuming you are not going to rent an office any time soon.
IANAL and IANAA
The best answer I could find on the subject of doing business in a particular state is here
In all likelihood if you are not employees of your own LLC you won't be doing business in either NY or NJ.
Actually here is more the same subject from the lawyers
And more so in plain language