This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void uploadFile(String urlString, Map<String, String> params, String fileName, InputStream fileInputStream) { | |
String lineEnd = "\r\n"; | |
String twoHyphens = "--"; | |
String boundary = "*****"; | |
HttpURLConnection conn; | |
try { | |
// ------------------ CLIENT REQUEST | |
Log.e(Tag, "Inside second Method"); | |
// open a URL connection to the Servlet | |
URL url = new URL(urlString); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OverlayService extends Service { | |
LinearLayout oView; | |
@Override | |
public IBinder onBind(Intent i) { | |
return null; | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent filter for URL capturing | |
Task: catch urls of type http://ХХХXviewster.com/movie/XXXXXX | |
Solution: activity with intent filter | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
<data android:scheme="http" /> | |
<data android:host="*.viewster.com" /> |