+
+ Bundle extras = i.getExtras();
+ final Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);
+
+ Log.e("Dumload", "Got a send -- starting service.");
+
+ Button go = (Button)findViewById(R.id.go);
+ go.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View v) {
+ String s = ((TextView) findViewById(R.id.entry)).getText().toString();
+ android.content.ComponentName cn = getApplicationContext()
+ .startService(new Intent()
+ .setClass(getApplicationContext(), Uploader.class)
+ .setData(uri)
+ .putExtra("com.joshuawise.dumload.dest", s));
+ if (cn == null)
+ say("Failed to start uploader.");
+ else
+ Log.e("Dumload", "Started service " + cn.toString() + ".");
+ finish();
+ }
+ });
+
+ String uribase = uri.toString();
+
+
+ ((TextView) findViewById(R.id.suckit)).setText("Where to?");
+ ((TextView) findViewById(R.id.entry)).setText("/var/www/" + uribase.substring(uribase.lastIndexOf("/") + 1) + ".jpg");
+