From 3398c580fd742d785ce5cc90ba2d1c720874fb3f Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Sun, 3 Aug 2014 03:51:13 +0100 Subject: Created the home screen with a grid of images from blaupload --- .../java/uk/co/blatech/blaupload/HomeScreen.java | 81 ++++------ .../co/blatech/blaupload/HomeScreenFragment.java | 171 +++++++++++++++++++++ .../uk/co/blatech/blaupload/UploadFragment.java | 118 ++++++++++++++ .../uk/co/blatech/blaupload/data/ImageItem.java | 46 ++++++ .../co/blatech/blaupload/ui/GridViewAdapter.java | 56 +++++++ .../uk/co/blatech/blaupload/util/EventBus.java | 17 ++ .../uk/co/blatech/blaupload/util/ImageLoader.java | 95 ++++++++++++ .../blaupload/util/ImageLoaderResultEvent.java | 16 ++ .../uk/co/blatech/blaupload/util/JSONLoader.java | 103 +++++++++++++ .../blaupload/util/JSONLoaderResultEvent.java | 16 ++ 10 files changed, 665 insertions(+), 54 deletions(-) create mode 100644 app/src/main/java/uk/co/blatech/blaupload/HomeScreenFragment.java create mode 100644 app/src/main/java/uk/co/blatech/blaupload/UploadFragment.java create mode 100644 app/src/main/java/uk/co/blatech/blaupload/data/ImageItem.java create mode 100644 app/src/main/java/uk/co/blatech/blaupload/ui/GridViewAdapter.java create mode 100644 app/src/main/java/uk/co/blatech/blaupload/util/EventBus.java create mode 100644 app/src/main/java/uk/co/blatech/blaupload/util/ImageLoader.java create mode 100644 app/src/main/java/uk/co/blatech/blaupload/util/ImageLoaderResultEvent.java create mode 100644 app/src/main/java/uk/co/blatech/blaupload/util/JSONLoader.java create mode 100644 app/src/main/java/uk/co/blatech/blaupload/util/JSONLoaderResultEvent.java (limited to 'app/src/main/java/uk') diff --git a/app/src/main/java/uk/co/blatech/blaupload/HomeScreen.java b/app/src/main/java/uk/co/blatech/blaupload/HomeScreen.java index 3c20697..cb280d3 100644 --- a/app/src/main/java/uk/co/blatech/blaupload/HomeScreen.java +++ b/app/src/main/java/uk/co/blatech/blaupload/HomeScreen.java @@ -3,24 +3,21 @@ package uk.co.blatech.blaupload; import android.app.Activity; import android.app.ActionBar; -import android.app.Fragment; import android.app.FragmentManager; -import android.content.Context; -import android.os.Build; +import android.net.Uri; import android.os.Bundle; -import android.view.Gravity; -import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; -import android.view.View; -import android.view.ViewGroup; import android.support.v4.widget.DrawerLayout; -import android.widget.ArrayAdapter; -import android.widget.TextView; +/** + * Home screen activity class + * This class doesn't do much on it's own, just pulls together the HomeScreenFragment + * with the NavigationDrawerFragment. Mostly auto generated by Android Studio + */ public class HomeScreen extends Activity - implements NavigationDrawerFragment.NavigationDrawerCallbacks { + implements NavigationDrawerFragment.NavigationDrawerCallbacks, UploadFragment.OnFragmentInteractionListener{ /** * Fragment managing the behaviors, interactions and presentation of the navigation drawer. @@ -51,9 +48,23 @@ public class HomeScreen extends Activity public void onNavigationDrawerItemSelected(int position) { // update the main content by replacing fragments FragmentManager fragmentManager = getFragmentManager(); - fragmentManager.beginTransaction() - .replace(R.id.container, PlaceholderFragment.newInstance(position + 1)) - .commit(); + switch (position) { + case 0: + fragmentManager.beginTransaction() + .replace(R.id.container, HomeScreenFragment.newInstance()) + .commit(); + break; + case 1: + fragmentManager.beginTransaction() + .replace(R.id.container, UploadFragment.newInstance(null, null)) + .commit(); + break; + case 2: + fragmentManager.beginTransaction() + .replace(R.id.container, HomeScreenFragment.newInstance()) + .commit(); + } + } public void onSectionAttached(int number) { @@ -97,50 +108,12 @@ public class HomeScreen extends Activity // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); - if (id == R.id.action_settings) { - return true; - } - return super.onOptionsItemSelected(item); + return id == R.id.action_settings || super.onOptionsItemSelected(item); } - /** - * A placeholder fragment containing a simple view. - */ - public static class PlaceholderFragment extends Fragment { - /** - * The fragment argument representing the section number for this - * fragment. - */ - private static final String ARG_SECTION_NUMBER = "section_number"; - - /** - * Returns a new instance of this fragment for the given section - * number. - */ - public static PlaceholderFragment newInstance(int sectionNumber) { - PlaceholderFragment fragment = new PlaceholderFragment(); - Bundle args = new Bundle(); - args.putInt(ARG_SECTION_NUMBER, sectionNumber); - fragment.setArguments(args); - return fragment; - } - - public PlaceholderFragment() { - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { - View rootView = inflater.inflate(R.layout.fragment_home_screen, container, false); - return rootView; - } + @Override + public void onFragmentInteraction(Uri uri) { - @Override - public void onAttach(Activity activity) { - super.onAttach(activity); - ((HomeScreen) activity).onSectionAttached( - getArguments().getInt(ARG_SECTION_NUMBER)); - } } } diff --git a/app/src/main/java/uk/co/blatech/blaupload/HomeScreenFragment.java b/app/src/main/java/uk/co/blatech/blaupload/HomeScreenFragment.java new file mode 100644 index 0000000..6e6369b --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/HomeScreenFragment.java @@ -0,0 +1,171 @@ +package uk.co.blatech.blaupload; + +import android.app.Activity; +import android.net.Uri; +import android.os.Bundle; +import android.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.GridView; +import android.widget.Toast; + +import com.squareup.otto.Subscribe; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.ArrayList; + +import uk.co.blatech.blaupload.data.ImageItem; +import uk.co.blatech.blaupload.ui.GridViewAdapter; +import uk.co.blatech.blaupload.util.EventBus; +import uk.co.blatech.blaupload.util.ImageLoader; +import uk.co.blatech.blaupload.util.ImageLoaderResultEvent; +import uk.co.blatech.blaupload.util.JSONLoader; +import uk.co.blatech.blaupload.util.JSONLoaderResultEvent; + + +/** + * A simple {@link Fragment} subclass. + * This is the main part of the home screen. + * Currently it displays the 9 most recent files from blaupload in a grid + * + */ +public class HomeScreenFragment extends Fragment { + + private OnFragmentInteractionListener mListener; + private ArrayList thumbnails; + private GridViewAdapter gridAdapter; + private GridView gridView; + /** + * Returns a new instance of this fragment + */ + public static HomeScreenFragment newInstance() { + HomeScreenFragment fragment = new HomeScreenFragment(); + Bundle args = new Bundle(); + fragment.setArguments(args); + return fragment; + } + + public HomeScreenFragment() { + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + + View rootView = inflater.inflate(R.layout.fragment_home_screen, container, false); + EventBus.getInstance().register(this); + gridView = (GridView) rootView.findViewById(R.id.gridView); + + return rootView; + } + + @Override + public void onActivityCreated(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + thumbnails = new ArrayList(); + gridAdapter = + new GridViewAdapter(getActivity(), R.layout.grid_item, thumbnails); + gridView.setAdapter(gridAdapter); + + //Display a message when an item is clicked + //TODO: Make it display the full image + gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + public void onItemClick(AdapterView parent, View v, + int position, long id) { + Toast.makeText(getActivity(), "Clicked image #"+position, Toast.LENGTH_SHORT).show(); + + } + + }); + } + + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + + //Start loading the JSON file list in a thread as soon as we start + new JSONLoader().execute("http://www.blaupload.co.uk/?format=json&last=9"); + + } + + + @Override + public void onDetach() { + super.onDetach(); + mListener = null; + } + + + /** + * This interface must be implemented by activities that contain this + * fragment to allow an interaction in this fragment to be communicated + * to the activity and potentially other fragments contained in that + * activity. + *

+ * See the Android Training lesson Communicating with Other Fragments for more information. + */ + public interface OnFragmentInteractionListener { + // TODO: Update argument type and name + public void onFragmentInteraction(Uri uri); + } + + /** + * This function is called when the JSONLoader thread finishes + * It processes the JSON and then starts loading the image thumbnails + * @param event Event containing the JSONArray of files + */ + @Subscribe + public void onAsyncTaskResult(JSONLoaderResultEvent event) { + + JSONArray json = event.getResult(); + ArrayList filenames = new ArrayList(); + + if (json != null) { + + try { + // Get the filename out of each JSON item + for (int i = 0; i < json.length(); i++) { + JSONObject item = json.getJSONObject(i); + filenames.add(item.getString("filename")); + + } + } catch (JSONException e) { + //TODO: Error handling + e.printStackTrace(); + } + + + //Load the thumbnail for each item on a thread + int id = 0; + for (String filename : filenames) { + new ImageLoader(getResources()).execute("http://www.lc8n.com/blathumbs/", filename, String.valueOf(id)); + id++; + } + + + } + } + + /** + * This function is called when an ImageLoader thread finishes + * It puts the image into the grid + * @param event Event containing an ImageItem with a bitmap and image details + */ + @Subscribe + public void onAsyncTaskResult(ImageLoaderResultEvent event) { + + ImageItem image = event.getResult(); + thumbnails.add(image.getId(), image); + gridAdapter.notifyDataSetChanged(); + + } + +} diff --git a/app/src/main/java/uk/co/blatech/blaupload/UploadFragment.java b/app/src/main/java/uk/co/blatech/blaupload/UploadFragment.java new file mode 100644 index 0000000..7ef458c --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/UploadFragment.java @@ -0,0 +1,118 @@ +package uk.co.blatech.blaupload; + +import android.app.Activity; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + + + +/** + * A simple {@link Fragment} subclass. + * Activities that contain this fragment must implement the + * {@link UploadFragment.OnFragmentInteractionListener} interface + * to handle interaction events. + * Use the {@link UploadFragment#newInstance} factory method to + * create an instance of this fragment. + * + * Currently just auto generated code from Android Studio + * TODO: Add the upload screen + * + */ +public class UploadFragment extends Fragment { + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + + private OnFragmentInteractionListener mListener; + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment UploadFragment. + */ + // TODO: Rename and change types and number of parameters + public static UploadFragment newInstance(String param1, String param2) { + UploadFragment fragment = new UploadFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + public UploadFragment() { + // Required empty public constructor + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); + photoPickerIntent.setType("image/*"); + photoPickerIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); + startActivityForResult(photoPickerIntent, 1); + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_upload, container, false); + } + + // TODO: Rename method, update argument and hook method into UI event + public void onButtonPressed(Uri uri) { + if (mListener != null) { + mListener.onFragmentInteraction(uri); + } + } + + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + try { + mListener = (OnFragmentInteractionListener) activity; + } catch (ClassCastException e) { + throw new ClassCastException(activity.toString() + + " must implement OnFragmentInteractionListener"); + } + } + + @Override + public void onDetach() { + super.onDetach(); + mListener = null; + } + + /** + * This interface must be implemented by activities that contain this + * fragment to allow an interaction in this fragment to be communicated + * to the activity and potentially other fragments contained in that + * activity. + *

+ * See the Android Training lesson Communicating with Other Fragments for more information. + */ + public interface OnFragmentInteractionListener { + // TODO: Update argument type and name + public void onFragmentInteraction(Uri uri); + } + +} diff --git a/app/src/main/java/uk/co/blatech/blaupload/data/ImageItem.java b/app/src/main/java/uk/co/blatech/blaupload/data/ImageItem.java new file mode 100644 index 0000000..928101d --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/data/ImageItem.java @@ -0,0 +1,46 @@ +package uk.co.blatech.blaupload.data; + +import android.graphics.Bitmap; + +/** + * Simple object to store images with extra details + * ID is used in the UI for ordering things + * + */ +public class ImageItem { + + private int id; + private Bitmap image; + private String title; + + public ImageItem(int id, Bitmap image, String title) { + super(); + this.id = id; + this.image = image; + this.title = title; + } + + public Bitmap getImage() { + return image; + } + + public void setImage(Bitmap image) { + this.image = image; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } +} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload/ui/GridViewAdapter.java b/app/src/main/java/uk/co/blatech/blaupload/ui/GridViewAdapter.java new file mode 100644 index 0000000..d22b74b --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/ui/GridViewAdapter.java @@ -0,0 +1,56 @@ +package uk.co.blatech.blaupload.ui; + + +import java.util.ArrayList; +import android.app.Activity; +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.ImageView; +import android.widget.TextView; + +import uk.co.blatech.blaupload.R; +import uk.co.blatech.blaupload.data.ImageItem; + +public class GridViewAdapter extends ArrayAdapter { + private Context context; + private int layoutResourceId; + private ArrayList data = new ArrayList(); + + public GridViewAdapter(Context context, int layoutResourceId, + ArrayList data) { + super(context, layoutResourceId, data); + this.layoutResourceId = layoutResourceId; + this.context = context; + this.data = data; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + View row = convertView; + ViewHolder holder; + + if (row == null) { + LayoutInflater inflater = ((Activity) context).getLayoutInflater(); + row = inflater.inflate(layoutResourceId, parent, false); + holder = new ViewHolder(); + holder.imageTitle = (TextView) row.findViewById(R.id.thumbtitle); + holder.image = (ImageView) row.findViewById(R.id.thumbimage); + row.setTag(holder); + } else { + holder = (ViewHolder) row.getTag(); + } + + ImageItem item = (ImageItem) data.get(position); + holder.imageTitle.setText(item.getTitle()); + holder.image.setImageBitmap(item.getImage()); + return row; + } + + static class ViewHolder { + TextView imageTitle; + ImageView image; + } +} \ No newline at end of file diff --git a/app/src/main/java/uk/co/blatech/blaupload/util/EventBus.java b/app/src/main/java/uk/co/blatech/blaupload/util/EventBus.java new file mode 100644 index 0000000..073a6a3 --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/util/EventBus.java @@ -0,0 +1,17 @@ +package uk.co.blatech.blaupload.util; + +import com.squareup.otto.Bus; + +/** + * Simple class for sending messages between threads using the Otto library + * + * Created by joe on 03/08/14. + */ +public class EventBus { + + private static final Bus BUS = new Bus(); + + public static Bus getInstance() { + return BUS; + } +} diff --git a/app/src/main/java/uk/co/blatech/blaupload/util/ImageLoader.java b/app/src/main/java/uk/co/blatech/blaupload/util/ImageLoader.java new file mode 100644 index 0000000..9af9a26 --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/util/ImageLoader.java @@ -0,0 +1,95 @@ +package uk.co.blatech.blaupload.util; + +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.os.AsyncTask; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.StatusLine; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.util.EntityUtils; + +import java.io.IOException; + +import uk.co.blatech.blaupload.R; +import uk.co.blatech.blaupload.data.ImageItem; + +/** + * This class is used for loading images in the background + * + * Created by joe on 02/08/14. + */ +public class ImageLoader extends AsyncTask { + + private Resources res; + + //Get the resources object from the UI thread so we can load a placeholder image + public ImageLoader(Resources resources) { + this.res = resources; + } + + /** + * + * @param args host, filename, id + * host - the hostname to download from, eg http://www.blaupload.co.uk + * filename - the filename with no path, eg image.jpg + * id - the ID of the image used by the UI to order the images + * + * TODO: Some generic way of adding the suffix used for thumbnails + * + * @return an ImageItem object which contains the ID, a Bitmap image object, and the filename + */ + @Override + protected ImageItem doInBackground(String... args) { + + Bitmap bmp = null; + String host = args[0]; + String filename = args[1]; + int id = Integer.parseInt(args[2]); + + //Add an extra .png on the end to match the current thumbnail filenames + String url = host + filename + ".png"; + + DefaultHttpClient client = new DefaultHttpClient(); + HttpGet httpGet = new HttpGet(url); + + + try { + HttpResponse response = client.execute(httpGet); + StatusLine statusLine = response.getStatusLine(); + int statusCode = statusLine.getStatusCode(); + + //Create the Bitmap if the file exists + if (statusCode == 200) { + // If the thumbnail wasn't found, show a placeholder + HttpEntity entity = response.getEntity(); + byte[] bytes = EntityUtils.toByteArray(entity); + bmp = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); + } else { + //If the file doesn't exist, use the placeholder instead + bmp = BitmapFactory.decodeResource(res, R.drawable.x); + + } + + //TODO: Error handling (Not sure how we get here) + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + ImageItem image = new ImageItem(id, bmp, filename); + return image; + } + + @Override + protected void onPostExecute(ImageItem result) { + EventBus.getInstance().post(new ImageLoaderResultEvent(result)); + + } + +} diff --git a/app/src/main/java/uk/co/blatech/blaupload/util/ImageLoaderResultEvent.java b/app/src/main/java/uk/co/blatech/blaupload/util/ImageLoaderResultEvent.java new file mode 100644 index 0000000..31acc6c --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/util/ImageLoaderResultEvent.java @@ -0,0 +1,16 @@ +package uk.co.blatech.blaupload.util; + +import uk.co.blatech.blaupload.data.ImageItem; + +public class ImageLoaderResultEvent { + + private ImageItem result; + + public ImageLoaderResultEvent(ImageItem result) { + this.result = result; + } + + public ImageItem getResult() { + return result; + } +} diff --git a/app/src/main/java/uk/co/blatech/blaupload/util/JSONLoader.java b/app/src/main/java/uk/co/blatech/blaupload/util/JSONLoader.java new file mode 100644 index 0000000..028202a --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/util/JSONLoader.java @@ -0,0 +1,103 @@ +package uk.co.blatech.blaupload.util; + +import android.os.AsyncTask; +import android.util.Log; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.StatusLine; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.CookieStore; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.BasicCookieStore; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.impl.cookie.BasicClientCookie; +import org.json.JSONArray; +import org.json.JSONException; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + + +/** + * This class is used for loading a JSON array from a given URL + * + * TODO: Make the cookie stuff generic + * Created by joe on 02/08/14. + */ +public class JSONLoader extends AsyncTask { + + private String url; + + + /** + * + * @param url - The URL to load JSON from + * @return JSONArray of data from the URL + */ + @Override + protected JSONArray doInBackground(String... url) { + + this.url = url[0]; + String jsonText = readJSON(); + JSONArray json = null; + try { + json = new JSONArray(jsonText); + } catch (JSONException e) { + //TODO: Error handling if we got something other than JSON + Log.e(JSONLoader.class.toString(), "Failed to parse JSON"); + e.printStackTrace(); + } + return json; + } + + private String readJSON() { + + StringBuilder builder = new StringBuilder(); + DefaultHttpClient client = new DefaultHttpClient(); + CookieStore cookieStore = new BasicCookieStore(); + //TODO: Don't hard code the cookie. + BasicClientCookie cookie = new BasicClientCookie("password", "PASSWORDHASHHERE"); + cookie.setDomain(".blaupload.co.uk"); + cookie.setPath("/"); + cookieStore.addCookie(cookie); + client.setCookieStore(cookieStore); + + HttpGet httpGet = new HttpGet(url); + + try { + //Read the JSON from the URL + HttpResponse response = client.execute(httpGet); + StatusLine statusLine = response.getStatusLine(); + int statusCode = statusLine.getStatusCode(); + if (statusCode == 200) { + HttpEntity entity = response.getEntity(); + InputStream content = entity.getContent(); + BufferedReader reader = new BufferedReader(new InputStreamReader(content)); + String line; + while ((line = reader.readLine()) != null) { + builder.append(line); + } + } else { + //TODO: Error handling if there's no JSON there + Log.e(JSONLoader.class.toString(), "Failed to download file"); + } + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + return builder.toString(); + } + + @Override + protected void onPostExecute(JSONArray result) { + EventBus.getInstance().post(new JSONLoaderResultEvent(result)); + + } + + +} + diff --git a/app/src/main/java/uk/co/blatech/blaupload/util/JSONLoaderResultEvent.java b/app/src/main/java/uk/co/blatech/blaupload/util/JSONLoaderResultEvent.java new file mode 100644 index 0000000..fd2af3a --- /dev/null +++ b/app/src/main/java/uk/co/blatech/blaupload/util/JSONLoaderResultEvent.java @@ -0,0 +1,16 @@ +package uk.co.blatech.blaupload.util; + +import org.json.JSONArray; + +public class JSONLoaderResultEvent { + + private JSONArray result; + + public JSONLoaderResultEvent(JSONArray result) { + this.result = result; + } + + public JSONArray getResult() { + return result; + } +} -- cgit v1.2.3