diff options
author | Angelo Mantellini <angelo.mantellini@irt-systemx.fr> | 2018-03-21 14:16:02 +0100 |
---|---|---|
committer | Angelo Mantellini <angelo.mantellini@irt-systemx.fr> | 2018-03-21 20:46:00 +0100 |
commit | 5d308865d0783d0cd70f7453c77980835ac5648e (patch) | |
tree | aea91e7109a81669e5b19443296cf1dec6876532 /IGetAndroid/app/src | |
parent | e90a1ec7c82519127b63931a96535ad4bc31342d (diff) |
update android-sdk. Now it is possible to compile with clangandroid-sdk/master
Change-Id: I156aa48dd90467a2a7540eec11839c0111b13bd2
Signed-off-by: Angelo Mantellini <angelo.mantellini@irt-systemx.fr>
Diffstat (limited to 'IGetAndroid/app/src')
40 files changed, 1185 insertions, 0 deletions
diff --git a/IGetAndroid/app/src/.DS_Store b/IGetAndroid/app/src/.DS_Store Binary files differnew file mode 100644 index 00000000..0787fb7b --- /dev/null +++ b/IGetAndroid/app/src/.DS_Store diff --git a/IGetAndroid/app/src/androidTest/java/icn/iget/com/igetandroid/ExampleInstrumentedTest.java b/IGetAndroid/app/src/androidTest/java/icn/iget/com/igetandroid/ExampleInstrumentedTest.java new file mode 100644 index 00000000..68650929 --- /dev/null +++ b/IGetAndroid/app/src/androidTest/java/icn/iget/com/igetandroid/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package icn.iget.com.igetandroid; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() throws Exception { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("icn.iget.com.igetandroid", appContext.getPackageName()); + } +} diff --git a/IGetAndroid/app/src/main/.DS_Store b/IGetAndroid/app/src/main/.DS_Store Binary files differnew file mode 100644 index 00000000..cf4f5edd --- /dev/null +++ b/IGetAndroid/app/src/main/.DS_Store diff --git a/IGetAndroid/app/src/main/AndroidManifest.xml b/IGetAndroid/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..107d059c --- /dev/null +++ b/IGetAndroid/app/src/main/AndroidManifest.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="icn.iget.com.igetandroid"> + + <application + android:allowBackup="true" + android:configChanges="orientation|screenSize|keyboard" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/AppTheme"> + <activity + android:name=".IGetAndroidActivity" + android:screenOrientation="portrait"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + <uses-permission + android:name="android.permission.READ_EXTERNAL_STORAGE" + android:maxSdkVersion="26" /> + +</manifest>
\ No newline at end of file diff --git a/IGetAndroid/app/src/main/cpp/IGetWrapper.cpp b/IGetAndroid/app/src/main/cpp/IGetWrapper.cpp new file mode 100644 index 00000000..a5a92058 --- /dev/null +++ b/IGetAndroid/app/src/main/cpp/IGetWrapper.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include <jni.h> +#include <string> +#include <icnet/icnet_http_facade.h> +libl4::http::HTTPClientConnection connection; + +extern "C" +JNIEXPORT jbyteArray JNICALL +Java_icn_iget_com_igetandroid_IGetAndroidActivity_downloadFile(JNIEnv *env, jobject instance, + jstring path_) { + const char *path = env->GetStringUTFChars(path_, 0); + std::string name(path); + env->ReleaseStringUTFChars(path_, path); + connection.get(name); + auto response = connection.response(); + if (response.getPayload().size() == 0) { + jbyte a[] = {}; + jbyteArray ret = env->NewByteArray(0); + env->SetByteArrayRegion (ret, 0, 0, a); + return ret; + } + jbyteArray ret = env->NewByteArray(response.getPayload().size()); + env->SetByteArrayRegion (ret, 0, response.getPayload().size(), (jbyte *)response.getPayload().data()); + return ret; +} + +extern "C" +JNIEXPORT void JNICALL +Java_icn_iget_com_igetandroid_IGetAndroidActivity_stopDownload(JNIEnv *env, jobject instance) { + connection.stop(); +}
\ No newline at end of file diff --git a/IGetAndroid/app/src/main/ic_launcher-web.png b/IGetAndroid/app/src/main/ic_launcher-web.png Binary files differnew file mode 100644 index 00000000..8a9d5774 --- /dev/null +++ b/IGetAndroid/app/src/main/ic_launcher-web.png diff --git a/IGetAndroid/app/src/main/java/.DS_Store b/IGetAndroid/app/src/main/java/.DS_Store Binary files differnew file mode 100644 index 00000000..67c36481 --- /dev/null +++ b/IGetAndroid/app/src/main/java/.DS_Store diff --git a/IGetAndroid/app/src/main/java/icn/.DS_Store b/IGetAndroid/app/src/main/java/icn/.DS_Store Binary files differnew file mode 100644 index 00000000..6b392bb4 --- /dev/null +++ b/IGetAndroid/app/src/main/java/icn/.DS_Store diff --git a/IGetAndroid/app/src/main/java/icn/iget/com/adapter/ListViewAdapter.java b/IGetAndroid/app/src/main/java/icn/iget/com/adapter/ListViewAdapter.java new file mode 100644 index 00000000..f6e4f808 --- /dev/null +++ b/IGetAndroid/app/src/main/java/icn/iget/com/adapter/ListViewAdapter.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package icn.iget.com.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.TextView; + + +import java.io.File; +import java.util.ArrayList; + +import icn.iget.com.igetandroid.R; +import icn.iget.com.utility.Constants; + +public class ListViewAdapter extends BaseAdapter { + + Context context; + ArrayList<OutputListViewElement> outputListViewElementArrayList; + private static LayoutInflater inflater = null; + + public ListViewAdapter(Context context, ArrayList<OutputListViewElement> outputListViewElementArrayList) { + this.context = context; + this.outputListViewElementArrayList = outputListViewElementArrayList; + inflater = (LayoutInflater) context + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + } + + @Override + public int getCount() { + return outputListViewElementArrayList.size(); + } + + @Override + public Object getItem(int position) { + return outputListViewElementArrayList.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + View view = convertView; + if (view == null) + view = inflater.inflate(R.layout.list_view_row, null); + TextView urlTextView = (TextView) view.findViewById(R.id.urlTextView); + urlTextView.setText(outputListViewElementArrayList.get(position).getUrl()); + + TextView savedPathTextView = (TextView) view.findViewById(R.id.savedPathTextView); + savedPathTextView.setText(outputListViewElementArrayList.get(position).getSavedPath() + File.separator + outputListViewElementArrayList.get(position).getNameFile()); + + TextView md5TextView = (TextView) view.findViewById(R.id.md5TextView); + md5TextView.setText(outputListViewElementArrayList.get(position).getMd5()); + + TextView sizeTextView = (TextView) view.findViewById(R.id.sizeTextView); + sizeTextView.setText(Integer.toString(outputListViewElementArrayList.get(position).getSize())); + + TextView dateTextView = (TextView) view.findViewById(R.id.dateTextView); + dateTextView.setText(outputListViewElementArrayList.get(position).getDateSting(Constants.FORMAT_DATA)); + + + return view; + } +} diff --git a/IGetAndroid/app/src/main/java/icn/iget/com/adapter/OutputListViewElement.java b/IGetAndroid/app/src/main/java/icn/iget/com/adapter/OutputListViewElement.java new file mode 100644 index 00000000..87815a7a --- /dev/null +++ b/IGetAndroid/app/src/main/java/icn/iget/com/adapter/OutputListViewElement.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package icn.iget.com.adapter; + +import java.io.Serializable; +import java.text.SimpleDateFormat; +import java.util.Date; + + +public class OutputListViewElement implements Serializable { + + String url; + String savedPath; + String nameFile; + String md5; + int size; + Date date; + + public OutputListViewElement(String url, String savedPath, String nameFile, String md5, int size) { + this.url = url; + this.savedPath = savedPath; + this.nameFile = nameFile; + this.md5 = md5; + this.size = size; + this.date = new Date(); + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getSavedPath() { + return savedPath; + } + + public void setSavedPath(String savedPath) { + this.savedPath = savedPath; + } + + public String getNameFile() { + return nameFile; + } + + public void setNameFile(String nameFile) { + this.nameFile = nameFile; + } + + public String getMd5() { + return md5; + } + + public void setMd5(String md5) { + this.md5 = md5; + } + + public int getSize() { + return size; + } + + public void setSize(int size) { + this.size = size; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public String getDateSting(String format) { + return new SimpleDateFormat(format).format(date); + } + + + +} diff --git a/IGetAndroid/app/src/main/java/icn/iget/com/igetandroid/IGetAndroidActivity.java b/IGetAndroid/app/src/main/java/icn/iget/com/igetandroid/IGetAndroidActivity.java new file mode 100644 index 00000000..43eae0d2 --- /dev/null +++ b/IGetAndroid/app/src/main/java/icn/iget/com/igetandroid/IGetAndroidActivity.java @@ -0,0 +1,303 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package icn.iget.com.igetandroid; + +import android.Manifest; +import android.app.Dialog; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.pm.PackageManager; +import android.net.Uri; +import android.os.Environment; +import android.support.v4.app.ActivityCompat; +import android.support.v4.content.ContextCompat; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.ListView; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.concurrent.Executors; + +import icn.iget.com.adapter.ListViewAdapter; +import icn.iget.com.adapter.OutputListViewElement; +import icn.iget.com.igetandroid.R; +import icn.iget.com.utility.Constants; +import icn.iget.com.utility.ResourcesEnumerator; + +public class IGetAndroidActivity extends AppCompatActivity { + + private static String TAG = "IGetAndroidAcrivity"; + + // Used to load the 'native-lib' library on application startup. + static { + System.loadLibrary("IGetWrapper"); + } + + ArrayList<OutputListViewElement> outputListViewElementArrayList = new ArrayList<OutputListViewElement>(); + ListViewAdapter adapter; + + + static int fCount = 0; + SharedPreferences sharedPreferences; + EditText urlEditText; + EditText downloadPathEditText; + Button downloadButton; + Button stopButton; + ListView resultListView; + Button yesButtonDialog; + Button noButtonDialog; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_i_get_android); + adapter = new ListViewAdapter(this, outputListViewElementArrayList); + resultListView = (ListView) findViewById(R.id.resultsListView); + resultListView.setAdapter(adapter); + checkEnabledPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE); + checkEnabledPermission(Manifest.permission.READ_EXTERNAL_STORAGE); + if (!checkMetis(Constants.METIS_ID)) { + final Dialog dialog = new Dialog(this); + dialog.setContentView(R.layout.popup_message); + yesButtonDialog = (Button) dialog.findViewById(R.id.yesButtonDialog); + noButtonDialog = (Button) dialog.findViewById(R.id.noButtonDialog); + yesButtonDialog.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + try { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + Constants.METIS_ID))); + } catch (android.content.ActivityNotFoundException anfe) { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + Constants.METIS_ID))); + } + dialog.hide(); + } + }); + noButtonDialog.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + dialog.hide(); + } + }); + dialog.show(); + + } + init(); + } + + public static final String md5(final byte[] s) { + final String MD5 = "MD5"; + try { + // Create MD5 Hash + MessageDigest digest = java.security.MessageDigest + .getInstance(MD5); + digest.update(s); + byte messageDigest[] = digest.digest(); + + // Create Hex String + StringBuilder hexString = new StringBuilder(); + for (byte aMessageDigest : messageDigest) { + String h = Integer.toHexString(0xFF & aMessageDigest); + while (h.length() < 2) + h = "0" + h; + hexString.append(h); + } + return hexString.toString(); + + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return ""; + } + + private void init() { + Log.v("storage path", Environment.getExternalStorageDirectory().toString()); + sharedPreferences = getSharedPreferences(Constants.I_GET_PREFERENCES, MODE_PRIVATE); + urlEditText = (EditText) findViewById(R.id.urlEditText); + urlEditText.setText(sharedPreferences.getString(ResourcesEnumerator.URL.key(), Constants.DEFAULT_URL)); + downloadPathEditText = (EditText) findViewById(R.id.downloadPathEditText); + downloadPathEditText.setText(sharedPreferences.getString(ResourcesEnumerator.DOWNLOAD_PATH.key(), Constants.DEFAULT_DOWNLOAD_PATH)); + downloadButton = (Button) findViewById(R.id.downloadButton); + + downloadButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + + urlEditText.setEnabled(false); + downloadPathEditText.setEnabled(false); + downloadButton.setEnabled(false); + stopButton.setEnabled(true); + Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override + public void run() { + + SharedPreferences.Editor sharedPreferencesEditor = getSharedPreferences(Constants.I_GET_PREFERENCES, MODE_PRIVATE).edit(); + sharedPreferencesEditor.putString(ResourcesEnumerator.URL.key(), urlEditText.getText().toString()); + sharedPreferencesEditor.putString(ResourcesEnumerator.DOWNLOAD_PATH.key(), downloadPathEditText.getText().toString()); + sharedPreferencesEditor.commit(); + String[] urlSplitted = urlEditText.getText().toString().split(File.separator); + File downloadPath = new File(downloadPathEditText.getText().toString()); + if (!downloadPath.exists()) { + downloadPath.mkdirs(); + } + + byte[] content = downloadFile(urlEditText.getText().toString()); + if (content.length > 0) { + String nameFile = writeToFile(content, downloadPathEditText.getText().toString(), urlSplitted[urlSplitted.length - 1]); + outputListViewElementArrayList.add(0, new OutputListViewElement(urlEditText.getText().toString(), downloadPathEditText.getText().toString(), nameFile, md5(content), content.length)); + } else { + outputListViewElementArrayList.add(0, new OutputListViewElement(urlEditText.getText().toString(), Constants.DASH, Constants.DASH, Constants.DASH, 0)); + } + runOnUiThread(new Runnable() { + @Override + public void run() { + adapter.notifyDataSetChanged(); + urlEditText.setEnabled(true); + downloadPathEditText.setEnabled(true); + downloadButton.setEnabled(true); + stopButton.setEnabled(false); + } + }); + } + }); + + + } + }); + stopButton = (Button) findViewById(R.id.stopButton); + stopButton.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View view) { + stopDownload(); + } + }); + } + + + @Override + protected void onSaveInstanceState(Bundle outState) { + outState.putSerializable(Constants.LIST_ITEMS_ID, outputListViewElementArrayList); + super.onSaveInstanceState(outState); + } + + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + if (savedInstanceState != null) { + outputListViewElementArrayList = (ArrayList<OutputListViewElement>) savedInstanceState.getSerializable(Constants.LIST_ITEMS_ID); + adapter = new ListViewAdapter(this, outputListViewElementArrayList); + resultListView = (ListView) findViewById(R.id.resultsListView); + resultListView.setAdapter(adapter); + } + super.onRestoreInstanceState(savedInstanceState); + } + + + public native void stopDownload(); + + public native byte[] downloadFile(String path); + + + private void checkEnabledPermission(String permission) { + if (ContextCompat.checkSelfPermission(this, + permission) + != PackageManager.PERMISSION_GRANTED) { + if (ActivityCompat.shouldShowRequestPermissionRationale(this, + permission)) { + } else { + ActivityCompat.requestPermissions(this, + new String[]{permission}, + 1); + } + } + } + + private String writeToFile(byte[] content, String path, String nameFile) { + try { + Log.v("name", nameFile); + nameFile = checkGenerateNameFile(path, nameFile.trim()); + Log.v("name", nameFile); + + FileOutputStream fos = new FileOutputStream(path + File.separator + nameFile); + fos.write(content); + fos.close(); + + } catch (FileNotFoundException e) { + Log.v(TAG, e.toString()); + } catch (IOException e) { + Log.v(TAG, e.toString()); + } + return nameFile; + } + + /* private void checkMetis() { + boolean isAppInstalled = appInstalledOrNot("icn.forwarder.com.icnforwarderandroid"); + + + final String appPackageName = getPackageName(); // getPackageName() from Context or Activity object + try { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=icn.forwarder.com.icnforwarderandroid"))); + } catch (android.content.ActivityNotFoundException anfe) { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=icn.forwarder.com.icnforwarderandroid"))); + } + if (isAppInstalled) { + //This intent will help you to launch if the package is already installed + Log.i("iget", "Application is already installed."); + } else { + // Do whatever we want to do if application not installed + // For example, Redirect to play store + + Log.i("iget", "Application is not currently installed."); + } + }*/ + + private boolean checkMetis(String uri) { + PackageManager pm = getPackageManager(); + try { + pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); + return true; + } catch (PackageManager.NameNotFoundException e) { + return false; + } + } + + private String checkGenerateNameFile(String path, String nameFile) { + String newNameFile = nameFile.trim(); + + File file; + int count = 1; + do { + file = new File(path + File.separator + newNameFile); + + + if (file.exists()) { + + newNameFile = nameFile.trim() + Constants.UNDERSCORE + Integer.toString(count); + count++; + } + } while (file.exists()); + return newNameFile; + } +} diff --git a/IGetAndroid/app/src/main/java/icn/iget/com/utility/Constants.java b/IGetAndroid/app/src/main/java/icn/iget/com/utility/Constants.java new file mode 100644 index 00000000..37922939 --- /dev/null +++ b/IGetAndroid/app/src/main/java/icn/iget/com/utility/Constants.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package icn.iget.com.utility; + +public class Constants { + public static final String LIST_ITEMS_ID = "LIST_ITEMS_ID"; + public static final String I_GET_PREFERENCES = "I_GET_PREFERENCES"; + public static final String DEFAULT_URL = "http://systemx-cicn.enst.fr/video/sintel/mpd"; + public static final String DEFAULT_DOWNLOAD_PATH = "/sdcard/iGetAndroid"; + public static final String FORMAT_DATA = "yyyy-MM-dd hh:mm:ss"; + public static final String UNDERSCORE = "_"; + public static final String DASH = "-"; + public static int FOREGROUND_SERVICE = 101; + public static final String METIS_ID = "icn.forwarder.com.icnforwarderandroid"; +} diff --git a/IGetAndroid/app/src/main/java/icn/iget/com/utility/ResourcesEnumerator.java b/IGetAndroid/app/src/main/java/icn/iget/com/utility/ResourcesEnumerator.java new file mode 100644 index 00000000..13f9c4c7 --- /dev/null +++ b/IGetAndroid/app/src/main/java/icn/iget/com/utility/ResourcesEnumerator.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package icn.iget.com.utility; + +public enum ResourcesEnumerator { + URL("url"), + DOWNLOAD_PATH("downloadPath"); + + private String key; + + ResourcesEnumerator(String key) { + this.key = key; + } + + public String key() { + return key; + } +} diff --git a/IGetAndroid/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/IGetAndroid/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..c7bd21db --- /dev/null +++ b/IGetAndroid/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportHeight="108" + android:viewportWidth="108"> + <path + android:fillType="evenOdd" + android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z" + android:strokeColor="#00000000" + android:strokeWidth="1"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="78.5885" + android:endY="90.9159" + android:startX="48.7653" + android:startY="61.0927" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z" + android:strokeColor="#00000000" + android:strokeWidth="1" /> +</vector> diff --git a/IGetAndroid/app/src/main/res/drawable/ic_launcher_background.xml b/IGetAndroid/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..d5fccc53 --- /dev/null +++ b/IGetAndroid/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportHeight="108" + android:viewportWidth="108"> + <path + android:fillColor="#26A69A" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeColor="#33FFFFFF" + android:strokeWidth="0.8" /> +</vector> diff --git a/IGetAndroid/app/src/main/res/layout/activity_i_get_android.xml b/IGetAndroid/app/src/main/res/layout/activity_i_get_android.xml new file mode 100644 index 00000000..453b56fc --- /dev/null +++ b/IGetAndroid/app/src/main/res/layout/activity_i_get_android.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="icn.iget.com.igetandroid.IGetAndroidActivity"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical">`` + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_weight="0.25" + android:orientation="horizontal"> + + <TextView + android:id="@+id/urlLabel" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="20" + android:text="URL" + android:textAlignment="textEnd" /> + + <EditText + android:id="@+id/urlEditText" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="80" + android:ems="10" + android:inputType="text" + android:text="http://webserver/sintel/mpd" /> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingTop="10dp"> + + <TextView + android:id="@+id/downloadPathLabel" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="20" + android:text="Download Path" + android:textAlignment="textEnd" /> + + <EditText + android:id="@+id/downloadPathEditText" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="80" + android:ems="10" + android:inputType="text" + android:text="Name" /> + </LinearLayout> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingLeft="4.0dip" + android:paddingRight="4.0dip" + android:paddingTop="10dp"> + + <Button + android:id="@+id/downloadButton" + android:layout_width="0dip" + android:layout_height="fill_parent" + android:layout_weight="1.0" + android:text="Download" /> + + <Button + android:id="@+id/stopButton" + android:layout_width="0dip" + android:layout_height="fill_parent" + android:layout_weight="1.0" + android:text="Stop" /> + + </LinearLayout> + + + </LinearLayout> + + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingTop="10dp"> + + <TextView + android:id="@+id/resumeLabel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingLeft="15dp" + android:text="Resume" + android:textAlignment="textStart" + android:textSize="30sp" + android:textStyle="bold" /> + + <ListView + android:id="@+id/resultsListView" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + </LinearLayout> + + </LinearLayout> + + +</android.support.constraint.ConstraintLayout> diff --git a/IGetAndroid/app/src/main/res/layout/list_view_row.xml b/IGetAndroid/app/src/main/res/layout/list_view_row.xml new file mode 100644 index 00000000..5063c521 --- /dev/null +++ b/IGetAndroid/app/src/main/res/layout/list_view_row.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="0.5" + android:orientation="horizontal"> + + <TextView + android:id="@+id/urlLabel" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="20" + android:text="URL:" + android:textAlignment="textEnd" /> + + <TextView + android:id="@+id/urlTextView" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_weight="80" + android:text="urlTextVew" /> + </LinearLayout> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="0.5" + android:orientation="horizontal"> + + <TextView + android:id="@+id/savedPathLabel" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="20" + android:text="Saved Path:" + android:textAlignment="textEnd" /> + + <TextView + android:id="@+id/savedPathTextView" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_weight="80" + android:text="savedPathTextView" /> + </LinearLayout> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <TextView + android:id="@+id/md5Label" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="20" + android:text="MD5:" + android:textAlignment="textEnd" /> + + <TextView + android:id="@+id/md5TextView" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_weight="80" + android:text="savedPathTextView" /> + </LinearLayout> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <TextView + android:id="@+id/sizeLabel" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="20" + android:text="Size:" + android:textAlignment="textEnd" /> + + <TextView + android:id="@+id/sizeTextView" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_weight="80" + android:text="sizeTextView" /> + </LinearLayout> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <TextView + android:id="@+id/dateLabel" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="20" + android:text="Date:" + android:textAlignment="textEnd" /> + + <TextView + android:id="@+id/dateTextView" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:layout_weight="80" + android:text="dateTextView" /> + </LinearLayout> + </LinearLayout> + + +</LinearLayout>
\ No newline at end of file diff --git a/IGetAndroid/app/src/main/res/layout/popup_message.xml b/IGetAndroid/app/src/main/res/layout/popup_message.xml new file mode 100644 index 00000000..a2631820 --- /dev/null +++ b/IGetAndroid/app/src/main/res/layout/popup_message.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:background="#FFFFFF" + android:orientation="vertical"> + + <TextView + android:id="@+id/txt_dia" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_margin="10dp" + android:text="Metis is not installed.\nDo you want to install it?" + android:textColor="#1B90CD" + android:textSize="15dp" + android:textStyle="bold" /> + + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:orientation="horizontal"> + + <Button + android:id="@+id/yesButtonDialog" + android:layout_width="100dp" + android:layout_height="wrap_content" + android:clickable="true" + android:text="Yes" + android:textStyle="bold" /> + + <Button + android:id="@+id/noButtonDialog" + android:layout_width="100dp" + android:layout_height="wrap_content" + android:layout_marginLeft="5dp" + android:clickable="true" + android:text="No" + android:textStyle="bold" /> + </LinearLayout> + +</LinearLayout>
\ No newline at end of file diff --git a/IGetAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/IGetAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> +</adaptive-icon>
\ No newline at end of file diff --git a/IGetAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/IGetAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> +</adaptive-icon>
\ No newline at end of file diff --git a/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher.png b/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..2b8496e4 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 00000000..54e366bf --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher_round.png Binary files differnew file mode 100644 index 00000000..6dac2349 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher.png b/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..b19affc6 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 00000000..0ab99abc --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher_round.png Binary files differnew file mode 100644 index 00000000..93d06591 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..3b4fed61 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 00000000..573fcce3 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png Binary files differnew file mode 100644 index 00000000..770275fa --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..1cbd6c91 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 00000000..86367ca0 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png Binary files differnew file mode 100644 index 00000000..0bb64aa9 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..1befed99 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 00000000..f3cf9401 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png Binary files differnew file mode 100644 index 00000000..d3339629 --- /dev/null +++ b/IGetAndroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/IGetAndroid/app/src/main/res/values/colors.xml b/IGetAndroid/app/src/main/res/values/colors.xml new file mode 100644 index 00000000..3ab3e9cb --- /dev/null +++ b/IGetAndroid/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="colorPrimary">#3F51B5</color> + <color name="colorPrimaryDark">#303F9F</color> + <color name="colorAccent">#FF4081</color> +</resources> diff --git a/IGetAndroid/app/src/main/res/values/ic_launcher_background.xml b/IGetAndroid/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..fb66f3a0 --- /dev/null +++ b/IGetAndroid/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="ic_launcher_background">#FEFEFE</color> +</resources>
\ No newline at end of file diff --git a/IGetAndroid/app/src/main/res/values/strings.xml b/IGetAndroid/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..5f9b9704 --- /dev/null +++ b/IGetAndroid/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">ICN iGet</string> +</resources> diff --git a/IGetAndroid/app/src/main/res/values/styles.xml b/IGetAndroid/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..5885930d --- /dev/null +++ b/IGetAndroid/app/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- Base application theme. --> + <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> + <!-- Customize your theme here. --> + <item name="colorPrimary">@color/colorPrimary</item> + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="colorAccent">@color/colorAccent</item> + </style> + +</resources> diff --git a/IGetAndroid/app/src/test/java/icn/iget/com/igetandroid/ExampleUnitTest.java b/IGetAndroid/app/src/test/java/icn/iget/com/igetandroid/ExampleUnitTest.java new file mode 100644 index 00000000..35716741 --- /dev/null +++ b/IGetAndroid/app/src/test/java/icn/iget/com/igetandroid/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package icn.iget.com.igetandroid; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() throws Exception { + assertEquals(4, 2 + 2); + } +}
\ No newline at end of file |