siteList;
15 | siteList = new ArrayList<>();
16 |
17 | for (String[] strings : app.musicBookmark.bookmark) {
18 | siteList.add(new Website().setUrl(strings[0]).setName(strings[1]));
19 | }
20 |
21 | return siteList;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/.idea/codeStyleSettings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Material Libs/out/production/Material Libs/drawable/background_button_float.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 | -
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/res/layout/layout_license_list_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
--------------------------------------------------------------------------------
/Material Libs/res/drawable/background_button_float.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 | -
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Material Libs/res/anim/dialog_main_show_amination.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
19 |
20 |
--------------------------------------------------------------------------------
/src/activity/AdvertiseUtility.java:
--------------------------------------------------------------------------------
1 | package activity;
2 |
3 | import android.app.Activity;
4 |
5 | public class AdvertiseUtility {
6 |
7 | //Init the mobile core sdk to your activity.
8 | public static void init_mobilecore_sdk(Activity context) {
9 | }
10 |
11 | //Show full size ad while exiting the activity.
12 | public static void show_exit_ad(final Activity activity) {
13 | }
14 |
15 | public static void show_full_screen(Activity activity) {
16 | }
17 |
18 | //Show the stickeez ad.
19 | public static void show_stickeez(Activity activity) {
20 | }
21 |
22 | public static void setAdUnitsEventListener(final Activity activity) {
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Material Libs/out/production/Material Libs/anim/dialog_main_hide_amination.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Material Libs/res/anim/dialog_main_hide_amination.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/data/object_holder/Website.java:
--------------------------------------------------------------------------------
1 | package data.object_holder;
2 |
3 | @SuppressWarnings("UnusedDeclaration")
4 | public class Website {
5 | String url;
6 | String name;
7 | int imageUri;
8 |
9 | public int getImageUri() {
10 | return imageUri;
11 | }
12 |
13 | public Website setImageUri(int imageUri) {
14 | this.imageUri = imageUri;
15 | return this;
16 | }
17 |
18 | public String getName() {
19 | return name;
20 | }
21 |
22 | public Website setName(String name) {
23 | this.name = name;
24 | return this;
25 | }
26 |
27 | public String getUrl() {
28 | return url;
29 | }
30 |
31 | public Website setUrl(String url) {
32 | this.url = url;
33 | return this;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Material Libs/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Material Libs/Material Libs.eml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/res/layout/layout_legal_notice.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Material Libs/out/production/Material Libs/anim/progress_indeterminate_animation.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Material Libs/res/anim/progress_indeterminate_animation.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
17 |
18 |
19 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/data/object_holder/SettingsHolder.java:
--------------------------------------------------------------------------------
1 | package data.object_holder;
2 |
3 | import tools.StorageUtils;
4 |
5 | import java.io.File;
6 | import java.io.IOException;
7 | import java.io.Serializable;
8 |
9 | public class SettingsHolder extends BaseObjectHolder implements Serializable {
10 | public static final String NAME = "setting.cofig", PATH = StorageUtils.FILE_ROOT + "/.Settings";
11 | public boolean isAutoResume = true;
12 | public boolean isAutoResumeOnAnyError = false;
13 | public boolean isDownloadCompleteNotify = true;
14 | public int maxDownloadTask = 1;
15 | public int maxSpeed = 32;
16 | public String multiThread = "Smart";
17 |
18 | public SettingsHolder() throws IOException {
19 | StorageUtils.mkdirs(PATH);
20 | }
21 |
22 | public static SettingsHolder read() {
23 | return (SettingsHolder) read_object(new File(PATH, NAME));
24 | }
25 |
26 | public static void save(SettingsHolder settingsHolder) {
27 | write_object(settingsHolder, PATH, NAME);
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/view_holder/Views.java:
--------------------------------------------------------------------------------
1 | package view_holder;
2 |
3 | import android.app.Activity;
4 | import android.app.Dialog;
5 | import android.graphics.Typeface;
6 | import android.view.View;
7 | import android.view.WindowManager;
8 | import android.widget.TextView;
9 |
10 | public class Views {
11 |
12 |
13 | public static View fnd(Activity ac, int id) {
14 | return ac.findViewById(id);
15 | }
16 |
17 | public static void txt(TextView v, String txt, float size, Typeface font) {
18 | v.setText(txt);
19 | v.setTextSize(size);
20 | }
21 |
22 |
23 | public static void setTextView(TextView view, String txt, float size) {
24 | if (txt != null)
25 | view.setText(txt);
26 |
27 | view.setTextSize(size);
28 | }
29 |
30 |
31 | public static void dialog_fillParent(Dialog dialog) {
32 | WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
33 | params.width = WindowManager.LayoutParams.FILL_PARENT;
34 | dialog.getWindow().setAttributes(params);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/tools/UserEmailFetcher.java:
--------------------------------------------------------------------------------
1 | package tools;
2 |
3 | import android.accounts.Account;
4 | import android.accounts.AccountManager;
5 | import android.content.Context;
6 |
7 | /**
8 | * This class uses the AccountManager to get the primary email address of the
9 | * current user.
10 | */
11 | public class UserEmailFetcher {
12 |
13 | public static String[] getEmail(Context context) {
14 | AccountManager accountManager = AccountManager.get(context);
15 | Account account = getAccount(accountManager);
16 |
17 | if (account == null) {
18 | return null;
19 | } else {
20 |
21 | return new String[]{account.type, account.name, account.toString()};
22 | }
23 | }
24 |
25 | private static Account getAccount(AccountManager accountManager) {
26 | Account[] accounts = accountManager.getAccountsByType("com.google");
27 | Account account;
28 | if (accounts.length > 0) {
29 | account = accounts[0];
30 | } else {
31 | account = null;
32 | }
33 | return account;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/update_system/UpdateBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | package update_system;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | /**
8 | * The Main BroadcastReceiver that is useful for only get call back for update related information.
9 | *
10 | *
11 | * @author shibaprasad
12 | * @version 1.0
13 | */
14 | public abstract class UpdateBroadcastReceiver extends BroadcastReceiver {
15 |
16 | private Intent intent;
17 |
18 | public abstract void onUpdateDownloadCallback(Context context, String fileUrl, String version);
19 |
20 | @Override
21 | public void onReceive(Context context, Intent intent) {
22 | this.intent = intent;
23 |
24 | if (intent.getAction().equals("ACTION_UPDATE_APP")) {
25 | if (intent.getIntExtra("TYPE", 0) == 2) {
26 | onUpdateDownloadCallback(context, intent.getStringExtra("FILE_URL"), intent.getStringExtra("VERSION"));
27 | }
28 |
29 | }
30 | }
31 |
32 | public Intent getIntent() {
33 | return this.intent;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Shiba Prasad J.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/src/youtube/VideoStream.java:
--------------------------------------------------------------------------------
1 | package youtube;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 |
6 | /**
7 | * Represents a video stream
8 | */
9 | public class VideoStream {
10 |
11 | protected String mUrl;
12 |
13 | /**
14 | * Construct a video stream from one of the strings obtained
15 | * from the "url_encoded_fmt_stream_map" parameter if the video_info
16 | *
17 | * @param pStreamStr - one of the strings from "url_encoded_fmt_stream_map"
18 | */
19 | public VideoStream(String pStreamStr) {
20 | String[] lArgs = pStreamStr.split("&");
21 | Map lArgMap = new HashMap();
22 | for (int i = 0; i < lArgs.length; i++) {
23 | String[] lArgValStrArr = lArgs[i].split("=");
24 | if (lArgValStrArr != null) {
25 | if (lArgValStrArr.length >= 2) {
26 | lArgMap.put(lArgValStrArr[0], lArgValStrArr[1]);
27 | }
28 | }
29 | }
30 | mUrl = lArgMap.get("url") + "&signature=" + lArgMap.get("sig");
31 | }
32 |
33 | public String getUrl() {
34 | return mUrl;
35 | }
36 | }
--------------------------------------------------------------------------------
/Material Libs/src/com/gc/materialdesign/utils/Utils.java:
--------------------------------------------------------------------------------
1 | package com.gc.materialdesign.utils;
2 |
3 | import android.content.res.Resources;
4 | import android.util.TypedValue;
5 | import android.view.View;
6 |
7 | public class Utils {
8 |
9 |
10 | /**
11 | * Convert Dp to Pixel
12 | */
13 | public static int dpToPx(float dp, Resources resources) {
14 | float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, resources.getDisplayMetrics());
15 | return (int) px;
16 | }
17 |
18 | public static int getRelativeTop(View myView) {
19 | // if (myView.getParent() == myView.getRootView())
20 | if (myView.getId() == android.R.id.content)
21 | return myView.getTop();
22 | else
23 | return myView.getTop() + getRelativeTop((View) myView.getParent());
24 | }
25 |
26 | public static int getRelativeLeft(View myView) {
27 | // if (myView.getParent() == myView.getRootView())
28 | if (myView.getId() == android.R.id.content)
29 | return myView.getLeft();
30 | else
31 | return myView.getLeft() + getRelativeLeft((View) myView.getParent());
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/tools/UITool.java:
--------------------------------------------------------------------------------
1 | package tools;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.graphics.Color;
6 | import android.graphics.drawable.ColorDrawable;
7 | import android.view.Window;
8 | import android.view.WindowManager;
9 |
10 | /**
11 | * UITool class provides useful static UI functions.
12 | * Created by shibaprasad on 4/15/2015.
13 | */
14 | public class UITool {
15 |
16 | //set the width of the given dialog to fill_parent.
17 | public static void fillParent(Dialog dialog) {
18 | WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
19 | params.width = WindowManager.LayoutParams.MATCH_PARENT;
20 | dialog.getWindow().setAttributes(params);
21 | }
22 |
23 | //create a new dialog with the layout.
24 | public static Dialog createDialog(Context activity_context, int layout) {
25 | final Dialog dialog = new Dialog(activity_context);
26 | dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
27 | dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
28 | dialog.setContentView(layout);
29 | fillParent(dialog);
30 | return dialog;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Material Libs/src/com/gc/materialdesign/views/ScrollView.java:
--------------------------------------------------------------------------------
1 | package com.gc.materialdesign.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.MotionEvent;
6 | import android.view.ViewGroup;
7 |
8 |
9 | public class ScrollView extends android.widget.ScrollView {
10 |
11 | /*
12 | * This class avoid problems in scrollviews with elements in library
13 | * Use it if you want use a ScrollView in your App
14 | */
15 |
16 | public ScrollView(Context context, AttributeSet attrs) {
17 | super(context, attrs);
18 | }
19 |
20 | @Override
21 | public boolean onTouchEvent(MotionEvent ev) {
22 | // if(!onInterceptTouchEvent(ev)){
23 | for (int i = 0; i < ((ViewGroup) getChildAt(0)).getChildCount(); i++) {
24 | try {
25 | CustomView child = (CustomView) ((ViewGroup) getChildAt(0)).getChildAt(i);
26 | if (child.isLastTouch) {
27 | child.onTouchEvent(ev);
28 | return true;
29 | }
30 | } catch (ClassCastException e) {
31 | }
32 | }
33 | // }
34 | return super.onTouchEvent(ev);
35 | }
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/tools/FileTool.java:
--------------------------------------------------------------------------------
1 | package tools;
2 |
3 | import android.annotation.TargetApi;
4 | import android.os.Build;
5 | import android.os.Environment;
6 |
7 | import java.io.BufferedReader;
8 | import java.io.File;
9 | import java.io.FileReader;
10 | import java.io.IOException;
11 |
12 | /**
13 | * File utility Class.
14 | * Created by shibaprasad on 4/13/2015.
15 | */
16 | public class FileTool {
17 |
18 | public static final String ROOT_PATH = Environment.getExternalStorageDirectory() + "/" + "Text To Voice";
19 |
20 | //Get string from a text file.
21 | @TargetApi(Build.VERSION_CODES.KITKAT)
22 | public static String getStringFromFile(File file) throws IOException {
23 | BufferedReader bufferedReader = new BufferedReader(new FileReader(file.getPath()));
24 | StringBuilder stringBuilder = new StringBuilder();
25 | String line = bufferedReader.readLine();
26 | while (line != null) {
27 | stringBuilder.append(line);
28 | stringBuilder.append(System.lineSeparator());
29 | line = bufferedReader.readLine();
30 | }
31 |
32 | String allText = stringBuilder.toString();
33 | //close the buffer.
34 | bufferedReader.close();
35 | return allText;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/youtube/Format.java:
--------------------------------------------------------------------------------
1 | package youtube;
2 |
3 | /**
4 | * Represents a format in the "fmt_list" parameter
5 | * Currently, only id is used
6 | */
7 | public class Format {
8 |
9 | protected int mId;
10 |
11 | /**
12 | * Construct this object from one of the strings in the "fmt_list" parameter
13 | *
14 | * @param pFormatString one of the comma separated strings in the "fmt_list" parameter
15 | */
16 | public Format(String pFormatString) {
17 | String lFormatVars[] = pFormatString.split("/");
18 | mId = Integer.parseInt(lFormatVars[0]);
19 | }
20 |
21 | /**
22 | * Construct this object using a format id
23 | *
24 | * @param pId id of this format
25 | */
26 | public Format(int pId) {
27 | this.mId = pId;
28 | }
29 |
30 | /**
31 | * Retrieve the id of this format
32 | *
33 | * @return the id
34 | */
35 | public int getId() {
36 | return mId;
37 | }
38 |
39 | /* (non-Javadoc)
40 | * @see java.lang.Object#equals(java.lang.Object)
41 | */
42 | @Override
43 | public boolean equals(Object pObject) {
44 | if (!(pObject instanceof Format)) {
45 | return false;
46 | }
47 | return ((Format) pObject).mId == mId;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Material Libs/src/com/gc/materialdesign/views/ButtonFloatSmall.java:
--------------------------------------------------------------------------------
1 | package com.gc.materialdesign.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.RelativeLayout;
6 | import com.gc.materialdesign.R;
7 | import com.gc.materialdesign.utils.Utils;
8 |
9 | public class ButtonFloatSmall extends ButtonFloat {
10 |
11 | public ButtonFloatSmall(Context context, AttributeSet attrs) {
12 | super(context, attrs);
13 | sizeRadius = 20;
14 | sizeIcon = 20;
15 | setDefaultProperties();
16 | LayoutParams params = new LayoutParams(Utils.dpToPx(sizeIcon, getResources()), Utils.dpToPx(sizeIcon, getResources()));
17 | params.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
18 | icon.setLayoutParams(params);
19 | }
20 |
21 | protected void setDefaultProperties() {
22 | rippleSpeed = Utils.dpToPx(2, getResources());
23 | rippleSize = 10;
24 | // Min size
25 | setMinimumHeight(Utils.dpToPx(sizeRadius * 2, getResources()));
26 | setMinimumWidth(Utils.dpToPx(sizeRadius * 2, getResources()));
27 | // Background shape
28 | setBackgroundResource(R.drawable.background_button_float);
29 | // setBackgroundColor(backgroundColor);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/download_manager/services/OnRunningListener.java:
--------------------------------------------------------------------------------
1 | package download_manager.services;
2 |
3 | import data.object_holder.DownloadData;
4 |
5 | /**
6 | * This Interface is used to implement the call back mechanism for a running
7 | * download task.
8 | *
9 | * @author shibaprasad
10 | * @version 1.0
11 | */
12 | public interface OnRunningListener {
13 |
14 | //The download status code.
15 | public static final int RUNNING = 1;
16 | public static final int CLOSE = 5;
17 |
18 | /**
19 | * This method is called when the download is going to start.
20 | *
21 | * @param downloadData the download data that belong to the task.
22 | * @param downloadTask the download task that calls this method.
23 | */
24 | public void beforeDownloadStart(DownloadData downloadData, DownloadTask downloadTask);
25 |
26 | /**
27 | * This method is called when the download is running and the
28 | * controller thread need to update the view.
29 | *
30 | * @param status the download status. Check this interface to check status code.
31 | * @param downloadData the download data that belong to the task.
32 | * @param downloadTask the download task that calls this method.
33 | */
34 | public void downloadRunning(int status, DownloadData downloadData, DownloadTask downloadTask);
35 | }
36 |
--------------------------------------------------------------------------------
/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | #000000
6 | #eeeeee
7 | #FF719FD8
8 | #72167499
9 |
10 |
11 | #ff747474
12 |
13 |
14 | #FFC51A1B
15 | #FF262C5B
16 | #535353
17 | #5CE4E6E7
18 | #939393
19 | #939393
20 | #ff55b67c
21 |
22 |
23 |
24 | #FF343434
25 | #336699
26 | #ffffff
27 |
28 |
29 |
30 | #ffdddddd
31 | #6E7E94
32 | #004050
33 | #00FFFFFF
34 | #aee4e4e4
35 | #ff8f8f8f
36 | #ff64c893
37 | #a9000000
38 | #607D8A
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/tools/TextUtils.java:
--------------------------------------------------------------------------------
1 | package tools;
2 |
3 |
4 | import android.content.ClipData;
5 | import android.content.ClipboardManager;
6 | import android.content.Context;
7 | import android.os.Build;
8 |
9 | public class TextUtils {
10 |
11 | /**
12 | * Check if the text empty or not.
13 | */
14 | public static boolean isEmpty(String str) {
15 | if (str == null || str.equals("")) {
16 | return true;
17 | }
18 | return false;
19 | }
20 |
21 | /**
22 | * Copy simple text to system clipboard.
23 | */
24 | public static boolean copyText(Context lContext, String lText) {
25 | try {
26 | int sdk = Build.VERSION.SDK_INT;
27 | if (sdk < Build.VERSION_CODES.HONEYCOMB) {
28 | ClipboardManager clipboard = (ClipboardManager) lContext.getSystemService(Context.CLIPBOARD_SERVICE);
29 | clipboard.setText(lText);
30 | return true;
31 | } else {
32 | ClipboardManager clipboard = (ClipboardManager) lContext.getSystemService(Context.CLIPBOARD_SERVICE);
33 | ClipData clip = ClipData.newPlainText("URL", lText);
34 | clipboard.setPrimaryClip(clip);
35 | return true;
36 | }
37 |
38 | } catch (Exception e) {
39 | return false;
40 | }
41 | }
42 |
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/Material Libs/Material Libs.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/res/layout/abs_progress_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
21 |
22 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/.idea/dictionaries/shibaprasad.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | airmp
5 | amio
6 | apun
7 | axonix
8 | bangla
9 | bbreak
10 | beemp
11 | bollywood
12 | cofig
13 | dataset
14 | datastore
15 | decrip
16 | desiweb
17 | dont
18 | editbox
19 | elizov
20 | gmail
21 | hedley
22 | ironsource
23 | jsoup
24 | keyversioncode
25 | keyversionname
26 | keyversiontable
27 | kohit
28 | kumar
29 | lable
30 | listview
31 | lyen
32 | manoj
33 | maza
34 | mobi
35 | mobilcore
36 | mobilecore
37 | mrtzc
38 | musiq
39 | noninfringement
40 | priti
41 | rtsp
42 | sanchit
43 | sartapp
44 | sdcard
45 | seeka
46 | softcsoftware
47 | soumik
48 | sslcache
49 | stickeez
50 | suman
51 | tarif
52 | tubeaio
53 | vihe
54 | webpage
55 | webview
56 | writeable
57 | zrwh
58 |
59 |
60 |
--------------------------------------------------------------------------------
/res/layout/slash_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
26 |
27 |
28 |
29 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/system_core/SystemIntent.java:
--------------------------------------------------------------------------------
1 | package system_core;
2 |
3 | @SuppressWarnings("UnusedDeclaration")
4 | public class SystemIntent {
5 | public static final String INTENT_ACTION_START_SERVICE = "in.cyberspj.video_downloader.download_manager.services.IDownloadService";
6 | public static final String INTENT_ACTION_START_WEBVIEW = "in.cyberspj.video_downloader.webView";
7 |
8 | public static final String TYPE = "1232300000";
9 | public static final String FILE_URL = "4444550000";
10 | public static final String FILE_PATH = "153540000";
11 | public static final String FILE_NAME = "123210001";
12 | public static final String WEB_PAGE = "12321000654";
13 |
14 |
15 | public static class Types {
16 | public static final int RESTART = 2222;
17 | public static final int PAUSE = 33333;
18 | public static final int DELETE = 44444;
19 | public static final int DELETE_SOURCE = 444447777;
20 | public static final int RESUME = 55555;
21 | public static final int ADD = 66666;
22 | public static final int STOP = 77777;
23 | public static final int REFRESH = 9900;
24 | public static final int BUFFER_SIZE = 98766897;
25 | }
26 |
27 | public static class DownloadSettingsKey {
28 | public static final String DOWNLOAD_SETTINGS = "download__setting3424";
29 | public static final String MAX_RUNNING_DOWNLOAD = "max__running__download3424";
30 | public static final String MAX_DOWNLOAD = "max__download3424";
31 |
32 |
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/res/layout/abs_file_list_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/tools/HttpUtils.java:
--------------------------------------------------------------------------------
1 | package tools;
2 |
3 | import org.apache.http.HttpResponse;
4 | import org.apache.http.client.HttpClient;
5 | import org.apache.http.client.methods.HttpGet;
6 | import org.apache.http.impl.client.DefaultHttpClient;
7 | import org.apache.http.params.CoreProtocolPNames;
8 |
9 | import java.io.BufferedReader;
10 | import java.io.IOException;
11 | import java.io.InputStream;
12 | import java.io.InputStreamReader;
13 |
14 | public class HttpUtils {
15 |
16 | public static String getSource(String ur) throws IOException {
17 | //******************* Getting the HTML response from the link ******************************//
18 | String userAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1";
19 | HttpClient client = new DefaultHttpClient();
20 | client.getParams().setParameter(CoreProtocolPNames.USER_AGENT, userAgent);
21 | HttpGet request = new HttpGet(ur);
22 | HttpResponse response = client.execute(request);
23 | String html = "";
24 | InputStream in = response.getEntity().getContent();
25 | BufferedReader reader = new BufferedReader(new InputStreamReader(in));
26 | StringBuilder StringBuilder = new StringBuilder();
27 | String line = null;
28 | while ((line = reader.readLine()) != null) {
29 | line = line + "\n";
30 | StringBuilder.append(line);
31 | }
32 | in.close();
33 | html = StringBuilder.toString();
34 | return html;
35 |
36 | }
37 |
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/res/layout/layout_complete_download_task_list_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
21 |
22 |
23 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Material Libs/out/production/Material Libs/layout/progress_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
23 |
24 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/anno/application/App_.java:
--------------------------------------------------------------------------------
1 | //
2 | // DO NOT EDIT THIS FILE, IT HAS BEEN GENERATED USING AndroidAnnotations 3.1.
3 | //
4 |
5 |
6 | package application;
7 |
8 | import org.androidannotations.api.BackgroundExecutor;
9 |
10 | public final class App_
11 | extends App {
12 |
13 | private static App INSTANCE_;
14 |
15 | public static App getInstance() {
16 | return INSTANCE_;
17 | }
18 |
19 | /**
20 | * Visible for testing purposes
21 | *
22 | */
23 | public static void setForTesting(App application) {
24 | INSTANCE_ = application;
25 | }
26 |
27 | @Override
28 | public void onCreate() {
29 | INSTANCE_ = this;
30 | init_();
31 | super.onCreate();
32 | }
33 |
34 | private void init_() {
35 | }
36 |
37 | @Override
38 | public void setUpdateReceiver() {
39 | BackgroundExecutor.execute(new BackgroundExecutor.Task("", 0, "") {
40 |
41 |
42 | @Override
43 | public void execute() {
44 | try {
45 | App_.super.setUpdateReceiver();
46 | } catch (Throwable e) {
47 | Thread.getDefaultUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e);
48 | }
49 | }
50 |
51 | }
52 | );
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/Material Libs/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Android Lint
16 |
17 |
18 | Code style issues
19 |
20 |
21 | JUnit issues
22 |
23 |
24 | Plugin DevKit
25 |
26 |
27 | Spelling
28 |
29 |
30 | TestNG
31 |
32 |
33 | XPath
34 |
35 |
36 |
37 |
38 | Abstraction issues
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/res/layout/abs_youtube_video_quality.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
27 |
28 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Material Libs/src/com/gc/materialdesign/views/CustomView.java:
--------------------------------------------------------------------------------
1 | package com.gc.materialdesign.views;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Color;
6 | import android.util.AttributeSet;
7 | import android.widget.RelativeLayout;
8 |
9 | public class CustomView extends RelativeLayout {
10 |
11 |
12 | final static String MATERIALDESIGNXML = "http://schemas.android.com/apk/res-auto";
13 | final static String ANDROIDXML = "http://schemas.android.com/apk/res/android";
14 |
15 | final int disabledBackgroundColor = Color.parseColor("#E2E2E2");
16 | // Indicate if user touched this view the last time
17 | public boolean isLastTouch = false;
18 | int beforeBackground;
19 | boolean animation = false;
20 |
21 | public CustomView(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | }
24 |
25 | @Override
26 | public void setEnabled(boolean enabled) {
27 | super.setEnabled(enabled);
28 | if (enabled)
29 | setBackgroundColor(beforeBackground);
30 | else
31 | setBackgroundColor(disabledBackgroundColor);
32 | invalidate();
33 | }
34 |
35 | @Override
36 | protected void onAnimationStart() {
37 | super.onAnimationStart();
38 | animation = true;
39 | }
40 |
41 | @Override
42 | protected void onAnimationEnd() {
43 | super.onAnimationEnd();
44 | animation = false;
45 | }
46 |
47 | @Override
48 | protected void onDraw(Canvas canvas) {
49 | super.onDraw(canvas);
50 | if (animation)
51 | invalidate();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/dialogs/web/UserAgent.java:
--------------------------------------------------------------------------------
1 | package dialogs.web;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.graphics.Color;
6 | import android.graphics.drawable.ColorDrawable;
7 | import android.widget.EditText;
8 | import android.widget.TextView;
9 | import com.softcsoftware.aio.R;
10 | import view_holder.Views;
11 |
12 | @SuppressWarnings("UnusedDeclaration")
13 | public class UserAgent {
14 |
15 | private Dialog dialog;
16 | private TextView title, ok_button;
17 | private EditText input_editbox;
18 |
19 | /**
20 | * Set a dialog which shows The massage.
21 | */
22 | public UserAgent(final Context context) {
23 | dialog = new Dialog(context);
24 | dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
25 | dialog.setContentView(R.layout.abs_create_new_file);
26 | Views.dialog_fillParent(dialog);
27 | dialog.show();
28 |
29 | title = (TextView) dialog.findViewById(R.id.title);
30 | title.setTextSize(18f);
31 |
32 |
33 | input_editbox = (EditText) dialog.findViewById(R.id.name_edit);
34 | input_editbox.setTextSize(17.44f);
35 |
36 | ok_button = (TextView) dialog.findViewById(R.id.download);
37 | ok_button.setTextSize(17.88f);
38 |
39 |
40 | }
41 |
42 |
43 | public Dialog getDialog() {
44 | return this.dialog;
45 | }
46 |
47 | public TextView getTitle() {
48 | return title;
49 | }
50 |
51 | public TextView getOkButton() {
52 | return ok_button;
53 | }
54 |
55 | public EditText getEditText() {
56 | return input_editbox;
57 | }
58 |
59 |
60 | }
61 |
62 |
63 |
--------------------------------------------------------------------------------
/res/drawable/custom_progress_bar_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 | -
9 |
10 |
12 |
19 |
20 |
21 |
22 | -
24 |
25 |
26 |
28 |
33 |
34 |
35 |
36 | -
38 |
39 |
40 |
42 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/res/drawable/ic_paused_download_progress_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 | -
9 |
10 |
12 |
19 |
20 |
21 |
22 | -
24 |
25 |
26 |
28 |
33 |
34 |
35 |
36 | -
38 |
39 |
40 |
42 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/res/drawable/ic_running_download_progress_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 | -
9 |
10 |
12 |
19 |
20 |
21 |
22 | -
24 |
25 |
26 |
28 |
33 |
34 |
35 |
36 | -
38 |
39 |
40 |
42 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/src/dialogs/ProgressDialog.java:
--------------------------------------------------------------------------------
1 | package dialogs;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.graphics.Color;
6 | import android.graphics.drawable.ColorDrawable;
7 | import android.widget.TextView;
8 | import com.softcsoftware.aio.R;
9 | import view_holder.Views;
10 |
11 | /**
12 | * This class very useful if you want to show a progressDialog
13 | * that matching the app theme, then use this class.
14 | *
15 | * @author shibaprasad
16 | * @version 1.0
17 | */
18 | public class ProgressDialog {
19 | private Dialog dialog;
20 | private TextView progressText;
21 |
22 | /**
23 | * public constructor.
24 | *
25 | * @param context activity context.
26 | * @param progressText the waiting text.
27 | */
28 | public ProgressDialog(Context context, boolean cancelable, String progressText) {
29 | dialog = new Dialog(context);
30 | dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
31 | dialog.setContentView(R.layout.abs_progress_dialog);
32 | dialog.setCancelable(cancelable);
33 | Views.dialog_fillParent(dialog);
34 |
35 | this.progressText = (TextView) dialog.findViewById(R.id.title);
36 | this.progressText.setText(progressText);
37 | }
38 |
39 | /**
40 | * Show the progress dialog.
41 | */
42 | public void show() {
43 | this.dialog.show();
44 | }
45 |
46 | /**
47 | * Close the progress dialog.
48 | */
49 | public void close() {
50 | this.dialog.dismiss();
51 | }
52 |
53 | /**
54 | * Get the progress dialog.
55 | */
56 | public Dialog getDialog() {
57 | return this.dialog;
58 | }
59 |
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/src/activity/AAbout.java:
--------------------------------------------------------------------------------
1 | package activity;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.ImageButton;
7 | import android.widget.TextView;
8 | import com.softcsoftware.aio.R;
9 |
10 | @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
11 | public class AAbout extends ABase {
12 |
13 | private TextView title, aboutApp;
14 | private ImageButton exitButton;
15 |
16 | private Context context;
17 | /**
18 | * Final Strings variables.
19 | */
20 | private String ABOUT_APP = null;
21 |
22 | @Override
23 | public void onCreate(Bundle bundle) {
24 | super.onCreate(bundle);
25 | ABOUT_APP = " AIO video downloader [ " + "Version - " + versionName + " ]\n" +
26 | " Powered by SoftC Software LLC.";
27 |
28 | context = AAbout.this;
29 |
30 | setContentView(R.layout.about_activity);
31 |
32 | initViews();
33 | initOnClick();
34 | }
35 |
36 | private void initViews() {
37 | title = (TextView) findViewById(R.id.title);
38 | aboutApp = (TextView) findViewById(R.id.about_app);
39 | exitButton = (ImageButton) findViewById(R.id.option_button);
40 |
41 | aboutApp.setText(ABOUT_APP);
42 | }
43 |
44 | private void initOnClick() {
45 |
46 | exitButton.setOnClickListener(new View.OnClickListener() {
47 | @Override
48 | public void onClick(View view) {
49 | finish();
50 | overridePendingTransition(R.anim.left_to_right, R.anim.right_to_left);
51 | }
52 | });
53 | }
54 |
55 | @Override
56 | public void onDestroy() {
57 | super.onDestroy();
58 | }
59 |
60 |
61 | }
--------------------------------------------------------------------------------
/Material Libs/res/layout/progress_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
26 |
27 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Material Libs/out/production/Material Libs/layout/snackbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
22 |
23 |
31 |
32 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/connectivity_system/DownloadFunctions.java:
--------------------------------------------------------------------------------
1 | package connectivity_system;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.SharedPreferences;
5 | import application.App;
6 |
7 | /**
8 | * Download function is the main bridge from where the download manager class
9 | * uses the useful global methods.
10 | *
11 | * @author shibaprasad
12 | * @version 1.0
13 | */
14 | @SuppressWarnings({"UnusedDeclaration", "FieldCanBeLocal"})
15 | public class DownloadFunctions {
16 |
17 | public static final String KEY_SELECTED_DOWNLOAD_PATH = "KEY_SELECTED_DOWNLOAD_PATH";
18 | public final String UPDATE_LOOP = "1", BUFFER_SIZE = "2";
19 | private int bufferSize = 1024 * 16;
20 | private int updateLoop = 0;
21 | private App application;
22 | private SharedPreferences preferences;
23 |
24 | public DownloadFunctions(App app) {
25 | this.application = app;
26 | this.preferences = application.getPreference();
27 |
28 | //set the download update loop and buffer size.
29 | setDownloadUpdateLoop(preferences.getInt(UPDATE_LOOP, 2));
30 | setDownloadBufferSize(preferences.getInt(BUFFER_SIZE, 1024 * 16));
31 | }
32 |
33 | public int getDownloadBufferSize() {
34 | return bufferSize;
35 | }
36 |
37 | public boolean setDownloadBufferSize(int bufferSize) {
38 | this.bufferSize = bufferSize;
39 | return preferences.edit().putInt(BUFFER_SIZE, this.bufferSize).commit();
40 | }
41 |
42 | public int getDownloadUpdateLoop() {
43 | return this.updateLoop;
44 | }
45 |
46 | @SuppressLint("CommitPrefEdits")
47 | public void setDownloadUpdateLoop(int num) {
48 | this.updateLoop = num;
49 | preferences.edit().putInt(UPDATE_LOOP, num).commit();
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/dialogs/MakeFavDialog.java:
--------------------------------------------------------------------------------
1 | package dialogs;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.graphics.Color;
6 | import android.graphics.drawable.ColorDrawable;
7 | import android.view.View;
8 | import android.widget.TextView;
9 | import com.softcsoftware.aio.R;
10 |
11 | @SuppressWarnings("UnusedDeclaration")
12 | public class MakeFavDialog {
13 |
14 | private Dialog popup_dialog;
15 | private OnClickButtonListener lis;
16 |
17 | public MakeFavDialog(final Context lContext, String titleText, String msgText) {
18 | popup_dialog = new Dialog(lContext);
19 | popup_dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
20 | popup_dialog.setContentView(R.layout.abs_message_popup);
21 | popup_dialog.show();
22 |
23 | TextView title = (TextView) popup_dialog.findViewById(R.id.title);
24 | title.setTextSize(18.44f);
25 | title.setText(titleText);
26 |
27 |
28 | TextView message = (TextView) popup_dialog.findViewById(R.id.message);
29 | message.setTextSize(18.30f);
30 | message.setLineSpacing(1.0f, 1.1f);
31 | message.setText(msgText);
32 |
33 | TextView ok = (TextView) popup_dialog.findViewById(R.id.ok);
34 | ok.setTextSize(18.44f);
35 | ok.setText(" Make a favorite ");
36 |
37 |
38 | ok.setOnClickListener(new View.OnClickListener() {
39 | @Override
40 | public void onClick(View v) {
41 | if (lis != null) {
42 | lis.onOKClick(getDialog(), v);
43 | }
44 | }
45 | });
46 |
47 | }
48 |
49 | public Dialog getDialog() {
50 | return this.popup_dialog;
51 | }
52 |
53 | public void setListener(OnClickButtonListener v) {
54 | this.lis = v;
55 | }
56 |
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AIO-Video-Downloader
2 | The AIO App was originally created for online video saving purpose. It was first available on google play but had been removed after 8 months from its first release. So I have turn the project to an open sourced project.
3 |
4 | [](https://sourceforge.net/projects/aio-video-download-manager/files/latest/download)
5 |
6 | [](https://sourceforge.net/projects/aio-video-download-manager/files/latest/download)
7 |
8 | # Why user will love this app ?
9 | The app was a commercial app and now its free ( ad free ). And it have all the standard features that any video downloader can offers but also has the capability of saving youtube videos too.
10 |
11 | AIO is not limited to just a few supporting websites but has the capability to save all the flash video without any problem.
12 |
13 | # Main Features
14 | 1 Web Browser
15 | * Automatically capture video files form web pages.
16 | * Tap on a video to download the video file.
17 | * Integrated Google search.
18 | * Ability to change browser's User-Agent.
19 |
20 | 2 Download Manager
21 | * Super fast Downloading.
22 | * Support multiple downloading at a same time.
23 | * Live download progress bar and speed indicator.
24 | * Support background download.
25 | * Support pause, resume and cancel on download tasks.
26 | * Show download progress Indicator notification.
27 |
28 | 3 Other Features
29 | * Its a free app.
30 | * Easy to use UI.
31 | * Support music and other file download.
32 | * Ability to get open from other apps.
33 | * Other apps can call AIO to download video files(e.g. Email app can call AIO to download any file attachments).
34 |
35 | # AIO Project Page
36 | http://shiba58.github.io/aio-video-downloader/
37 |
--------------------------------------------------------------------------------
/Material Libs/res/values/attributes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------