├── .gitignore
├── .idea
├── caches
│ ├── build_file_checksums.ser
│ └── gradle_models.ser
├── codeStyles
│ └── Project.xml
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── Images
├── MagicalCameraVideo.mp4
├── MagicalCameraVideo2.mp4
├── aperture (1).ai
├── aperture (1).png
├── cameraHighQ.png
├── cameraLow.png
├── cameraMediumQ.png
├── faceDetection2.png
├── index.html
├── information2.png
├── magical camera tomar foto android facil.mp4
└── magicalcamera.gif
├── LICENSE
├── MagicalCamera 3.0.iml
├── MagicalCamera.iml
├── PrivacyPolicy_magicalcamera.pdf
├── README.md
├── _config.yml
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── fabric.properties
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ ├── README.md
│ └── ic_magical_vertical_assets.png
│ ├── java
│ └── com
│ │ └── frosquivel
│ │ └── magicalcameraapp
│ │ ├── Activities
│ │ ├── HireUs
│ │ │ ├── FifthPageHireUsFragment.java
│ │ │ ├── FirstPageHireUsFragment.java
│ │ │ ├── FourthPageHireUsFragment.java
│ │ │ ├── HireUsActivity.java
│ │ │ ├── SecondPageHireUsFragment.java
│ │ │ ├── SixthPageHireUsFragment.java
│ │ │ └── ThirdPageHireUsFragment.java
│ │ ├── ImageViewActivity.java
│ │ ├── MainActivity.java
│ │ ├── Menu
│ │ │ ├── AboutUsActivity.java
│ │ │ ├── HelpUsActivity.java
│ │ │ ├── MarkDownReadMeActivity.java
│ │ │ ├── SplashActivity.java
│ │ │ └── WebViewActivity.java
│ │ └── SharedPreferenceActivity.java
│ │ ├── Fragments
│ │ ├── ActivityForFragment.java
│ │ └── FragmentSample.java
│ │ └── Utils
│ │ └── Utils.java
│ └── res
│ ├── drawable
│ ├── briefcase.png
│ ├── button_blue.xml
│ ├── button_light_blue.xml
│ ├── button_material_design.xml
│ ├── fab_label_background.xml
│ ├── ic_about.png
│ ├── ic_cam.png
│ ├── ic_donation.png
│ ├── ic_face.png
│ ├── ic_fragment_1_contact_us_1.png
│ ├── ic_fragment_1_contact_us_2.png
│ ├── ic_fragment_1_contact_us_3.png
│ ├── ic_fragment_1_contact_us_4.png
│ ├── ic_fragment_1_contact_us_5.png
│ ├── ic_fragment_1_contact_us_6.png
│ ├── ic_fragment_2_contact_us_2.png
│ ├── ic_fragment_2_contact_us_3.png
│ ├── ic_fragment_2_contact_us_4.png
│ ├── ic_fragment_3_contact_us_1.png
│ ├── ic_fragment_3_contact_us_2.png
│ ├── ic_fragment_3_contact_us_3.png
│ ├── ic_fragment_4_contact_us_1.png
│ ├── ic_fragment_4_contact_us_2.png
│ ├── ic_fragment_4_contact_us_3.png
│ ├── ic_fragment_4_contact_us_4.png
│ ├── ic_fragment_5_contact_us_3.png
│ ├── ic_fragment_6_contact_us_1.png
│ ├── ic_fragment_6_contact_us_2.png
│ ├── ic_gallery.png
│ ├── ic_git.png
│ ├── ic_github.png
│ ├── ic_google_play.png
│ ├── ic_information.png
│ ├── ic_magical.png
│ ├── ic_magical_vertical.png
│ ├── ic_magical_vertical_div_2.png
│ ├── ic_next.png
│ ├── ic_remove.png
│ ├── ic_remove2.png
│ ├── ic_rotate.png
│ ├── ic_save.png
│ ├── ic_setting_menu.png
│ ├── ic_settings.png
│ ├── ic_share.png
│ ├── ic_shared.png
│ ├── progress_dialog.xml
│ ├── vec_checkbox_blank_circle_outline.xml
│ └── vec_checkbox_fill_circle_outline.xml
│ ├── layout
│ ├── activity_about_us.xml
│ ├── activity_activity_for_fragment.xml
│ ├── activity_contact_us.xml
│ ├── activity_help_us.xml
│ ├── activity_hire_us.xml
│ ├── activity_image.xml
│ ├── activity_main.xml
│ ├── activity_markdown_readme.xml
│ ├── activity_shared_preference.xml
│ ├── activity_splash_screen.xml
│ ├── activity_web_view.xml
│ ├── fragment_hire_us_fifth_page.xml
│ ├── fragment_hire_us_first_page.xml
│ ├── fragment_hire_us_fourth_page.xml
│ ├── fragment_hire_us_second_page.xml
│ ├── fragment_hire_us_sixth_page.xml
│ ├── fragment_hire_us_third_page.xml
│ ├── popup_color_picker.xml
│ └── progress_dialog.xml
│ ├── menu
│ └── menu_main.xml
│ ├── mipmap-hdpi
│ └── ic_launcher.png
│ ├── mipmap-ldpi
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxxhdpi
│ └── ic_launcher.png
│ ├── values-es
│ └── strings.xml
│ ├── values-v21
│ └── styles.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── magicalcamera
├── .gitignore
├── build.gradle
├── magicalcamera.iml
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── frosquivel
│ │ └── magicalcamera
│ │ ├── Functionallities
│ │ ├── ActionPicture.java
│ │ ├── FaceRecognition.java
│ │ ├── PrivateInformation.java
│ │ ├── SaveEasyPhoto.java
│ │ └── URIPaths.java
│ │ ├── MagicalCamera.java
│ │ ├── MagicalCameraApplication.java
│ │ ├── MagicalPermissions.java
│ │ ├── Objects
│ │ ├── ActionPictureObject.java
│ │ ├── FaceRecognitionObject.java
│ │ ├── MagicalCameraObject.java
│ │ ├── PermissionGrantedObject.java
│ │ ├── PrivateInformationObject.java
│ │ └── URIPathsObject.java
│ │ ├── Provider
│ │ └── PhotoProvider.java
│ │ └── Utilities
│ │ ├── ConvertSimpleImage.java
│ │ ├── PictureUtils.java
│ │ └── Utils.java
│ └── res
│ ├── values
│ └── strings.xml
│ └── xml
│ └── provider_paths.xml
├── maven_push.gradle
├── pom.xml
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 | /captures
8 | skins/overlay/spritesheet.png
9 |
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.idea/caches/gradle_models.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/.idea/caches/gradle_models.ser
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.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 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
21 |
22 |
--------------------------------------------------------------------------------
/.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 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | Android
47 |
48 |
49 | Android Lint
50 |
51 |
52 | CorrectnessLintAndroid
53 |
54 |
55 | General
56 |
57 |
58 | LintAndroid
59 |
60 |
61 | Maven
62 |
63 |
64 |
65 |
66 | Android
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Images/MagicalCameraVideo.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/MagicalCameraVideo.mp4
--------------------------------------------------------------------------------
/Images/MagicalCameraVideo2.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/MagicalCameraVideo2.mp4
--------------------------------------------------------------------------------
/Images/aperture (1).ai:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/aperture (1).ai
--------------------------------------------------------------------------------
/Images/aperture (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/aperture (1).png
--------------------------------------------------------------------------------
/Images/cameraHighQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/cameraHighQ.png
--------------------------------------------------------------------------------
/Images/cameraLow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/cameraLow.png
--------------------------------------------------------------------------------
/Images/cameraMediumQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/cameraMediumQ.png
--------------------------------------------------------------------------------
/Images/faceDetection2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/faceDetection2.png
--------------------------------------------------------------------------------
/Images/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello World
5 | I'm hosted with GitHub Pages.
6 |
7 |
--------------------------------------------------------------------------------
/Images/information2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/information2.png
--------------------------------------------------------------------------------
/Images/magical camera tomar foto android facil.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/magical camera tomar foto android facil.mp4
--------------------------------------------------------------------------------
/Images/magicalcamera.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/Images/magicalcamera.gif
--------------------------------------------------------------------------------
/MagicalCamera 3.0.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/MagicalCamera.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/PrivacyPolicy_magicalcamera.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/PrivacyPolicy_magicalcamera.pdf
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-slate
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'io.fabric'
3 |
4 | android {
5 | compileSdkVersion 28
6 | buildToolsVersion '28.0.2'
7 |
8 | defaultConfig {
9 | applicationId "com.frosquivel.magicalcameraapp"
10 | minSdkVersion 14
11 | targetSdkVersion 28
12 | versionCode 10
13 | versionName "6.0.0"
14 | }
15 | android {
16 | lintOptions {
17 | abortOnError false
18 | }
19 | }
20 | buildTypes {
21 | release {
22 | minifyEnabled false
23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 | }
27 |
28 | repositories {
29 | jcenter()
30 | maven { url "https://jitpack.io" }
31 | maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
32 | maven { url 'https://maven.fabric.io/public' }
33 | }
34 |
35 | dependencies {
36 | compile fileTree(dir: 'libs', include: ['*.jar'])
37 |
38 | compile 'com.android.support:appcompat-v7:25.2.0'
39 | compile 'com.android.support:support-v4:20.0.+'
40 | compile 'com.afollestad.material-dialogs:commons:0.8.6.1'
41 | compile 'com.android.support:design:25.2.0'
42 | compile 'com.android.support:percent:23.1.0'
43 |
44 | compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
45 | transitive = true;
46 | }
47 | //compile project(':magicalcamera')
48 | compile 'com.frosquivel:magicalcamera:6.0.0'
49 | compile 'com.github.clans:fab:1.6.3'
50 | compile 'com.afollestad.material-dialogs:core:0.8.5.9'
51 | compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
52 | compile 'com.afollestad.material-dialogs:commons:0.8.6.1'
53 | compile 'com.squareup.picasso:picasso:2.5.2'
54 | compile 'com.larswerkman:HoloColorPicker:1.5'
55 | compile 'com.github.rey5137:material:1.2.4'
56 | compile 'com.github.rey5137:material:1.2.3.1-SNAPSHOT'
57 | compile 'com.github.paolorotolo:appintro:4.1.0'
58 | compile 'com.wang.avi:library:2.1.3'
59 | compile 'com.github.mukeshsolanki:MarkdownView-Android:1.0.4'
60 | }
61 |
--------------------------------------------------------------------------------
/app/fabric.properties:
--------------------------------------------------------------------------------
1 | #Contains API Secret used to validate your application. Commit to internal source control; avoid making secret public.
2 | #Sun Mar 19 11:02:23 CST 2017
3 | apiSecret=e9af95eb325a63302f4d9764e264c018f83bc9ab66a3163219cd93c14471a4fc
4 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\Fabian\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
34 |
35 |
36 |
40 |
41 |
42 |
46 |
47 |
48 |
52 |
53 |
54 |
58 |
59 |
60 |
64 |
65 |
66 |
70 |
71 |
72 |
77 |
78 |
79 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
96 |
97 |
98 |
101 |
102 |
103 |
110 |
113 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/app/src/main/assets/ic_magical_vertical_assets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/assets/ic_magical_vertical_assets.png
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/HireUs/FifthPageHireUsFragment.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.HireUs;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.ColorInt;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import com.frosquivel.magicalcameraapp.R;
12 | import com.github.paolorotolo.appintro.ISlideBackgroundColorHolder;
13 |
14 | /**
15 | * Created by Fabian on 05/05/2017.
16 | */
17 |
18 | public class FifthPageHireUsFragment extends Fragment implements ISlideBackgroundColorHolder {
19 |
20 | private static final String ARG_LAYOUT_RES_ID = "fragment_hire_us_fifth_page";
21 | private int layoutResId;
22 | private View rootView;
23 |
24 | public static FifthPageHireUsFragment newInstance(int layoutResId) {
25 | FifthPageHireUsFragment sampleSlide = new FifthPageHireUsFragment();
26 | Bundle args = new Bundle();
27 | args.putInt(ARG_LAYOUT_RES_ID, layoutResId);
28 | sampleSlide.setArguments(args);
29 | return sampleSlide;
30 | }
31 |
32 | @Override
33 | public void onCreate(@Nullable Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | if (getArguments() != null && getArguments().containsKey(ARG_LAYOUT_RES_ID)) {
36 | layoutResId = getArguments().getInt(ARG_LAYOUT_RES_ID);
37 | }
38 | }
39 |
40 | @Nullable
41 | @Override
42 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
43 | @Nullable Bundle savedInstanceState) {
44 | rootView = inflater.inflate(layoutResId, container, false);
45 | rootView.setBackgroundColor(getResources().getColor(R.color.colorFifthFragment));
46 | return rootView;
47 | }
48 |
49 | @Override
50 | public int getDefaultBackgroundColor() {
51 | // Return the default background color of the slide.
52 | return getResources().getColor(R.color.colorFifthFragment);
53 | }
54 |
55 | @Override
56 | public void setBackgroundColor(@ColorInt int backgroundColor) {
57 | // Set the background color of the view within your slide to which the transition should be applied.
58 | if (rootView != null) {
59 | rootView.setBackgroundColor(backgroundColor);
60 | }
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/HireUs/FirstPageHireUsFragment.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.HireUs;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.support.annotation.ColorInt;
6 | import android.support.annotation.Nullable;
7 | import android.support.v4.app.Fragment;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.ImageView;
12 |
13 | import com.frosquivel.magicalcameraapp.R;
14 | import com.frosquivel.magicalcameraapp.Utils.Utils;
15 | import com.github.paolorotolo.appintro.ISlideBackgroundColorHolder;
16 |
17 | /**
18 | * Created by Fabian on 04/05/2017.
19 | */
20 | //https://github.com/apl-devs/AppIntro/blob/master/example/src/main/java/com/amqtech/opensource/appintroexample/ui/mainTabs/CustomBackgroundIntro.java
21 | public class FirstPageHireUsFragment extends Fragment implements ISlideBackgroundColorHolder {
22 |
23 |
24 | private static final String ARG_LAYOUT_RES_ID = "fragment_hire_us_first_page";
25 | private int layoutResId;
26 | private View rootView;
27 |
28 | private ImageView imgEmail;
29 | private ImageView imgLinkedIn;
30 | private ImageView imgMessenger;
31 |
32 | private Activity activity;
33 |
34 | public static FirstPageHireUsFragment newInstance(int layoutResId) {
35 | FirstPageHireUsFragment sampleSlide = new FirstPageHireUsFragment();
36 | Bundle args = new Bundle();
37 | args.putInt(ARG_LAYOUT_RES_ID, layoutResId);
38 | sampleSlide.setArguments(args);
39 | return sampleSlide;
40 | }
41 |
42 | @Override
43 | public void onCreate(@Nullable Bundle savedInstanceState) {
44 | super.onCreate(savedInstanceState);
45 | if (getArguments() != null && getArguments().containsKey(ARG_LAYOUT_RES_ID)) {
46 | layoutResId = getArguments().getInt(ARG_LAYOUT_RES_ID);
47 | }
48 |
49 | activity= getActivity();
50 | }
51 |
52 | @Nullable
53 | @Override
54 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
55 | @Nullable Bundle savedInstanceState) {
56 | rootView = inflater.inflate(layoutResId, container, false);
57 | rootView.setBackgroundColor(getResources().getColor(R.color.colorFirstFragment));
58 |
59 | imgEmail = (ImageView) rootView.findViewById(R.id.imgEmail);
60 | imgLinkedIn = (ImageView) rootView.findViewById(R.id.imgLinkedIn);
61 | imgMessenger = (ImageView) rootView.findViewById(R.id.imgMessenger);
62 |
63 | imgEmail.setOnClickListener(new View.OnClickListener() {
64 | @Override
65 | public void onClick(View v) {
66 | Utils.sendMeAnEmail(activity);
67 | }
68 | });
69 |
70 | imgLinkedIn.setOnClickListener(new View.OnClickListener() {
71 | @Override
72 | public void onClick(View v) {
73 |
74 | Utils.openScheme(activity, "linkedin://", "fabian-rosales-esquivel-698893106",
75 | "https://www.linkedin.com/in/fabian-rosales-esquivel-698893106/", activity.getString(R.string.error_not_open_linkedin));
76 | }
77 | });
78 |
79 | imgMessenger.setOnClickListener(new View.OnClickListener() {
80 | @Override
81 | public void onClick(View v) {
82 | Utils.openScheme(activity, "fb-messenger://user/", "100003819211529",
83 | "https://www.messenger.com/t/fabian.rosales.509", activity.getString(R.string.error_not_open_messenger));
84 | }
85 | });
86 |
87 | return rootView;
88 | }
89 |
90 | @Override
91 | public int getDefaultBackgroundColor() {
92 | // Return the default background color of the slide.
93 | return getResources().getColor(R.color.colorFirstFragment);
94 | }
95 |
96 | @Override
97 | public void setBackgroundColor(@ColorInt int backgroundColor) {
98 | // Set the background color of the view within your slide to which the transition should be applied.
99 | if (rootView != null) {
100 | rootView.setBackgroundColor(backgroundColor);
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/HireUs/FourthPageHireUsFragment.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.HireUs;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.ColorInt;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import com.frosquivel.magicalcameraapp.R;
12 | import com.github.paolorotolo.appintro.ISlideBackgroundColorHolder;
13 |
14 | /**
15 | * Created by Fabian on 05/05/2017.
16 | */
17 |
18 | public class FourthPageHireUsFragment extends Fragment implements ISlideBackgroundColorHolder {
19 |
20 | private static final String ARG_LAYOUT_RES_ID = "fragment_hire_us_fourth_page";
21 | private int layoutResId;
22 | private View rootView;
23 |
24 | public static FourthPageHireUsFragment newInstance(int layoutResId) {
25 | FourthPageHireUsFragment sampleSlide = new FourthPageHireUsFragment();
26 | Bundle args = new Bundle();
27 | args.putInt(ARG_LAYOUT_RES_ID, layoutResId);
28 | sampleSlide.setArguments(args);
29 | return sampleSlide;
30 | }
31 |
32 | @Override
33 | public void onCreate(@Nullable Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | if (getArguments() != null && getArguments().containsKey(ARG_LAYOUT_RES_ID)) {
36 | layoutResId = getArguments().getInt(ARG_LAYOUT_RES_ID);
37 | }
38 | }
39 |
40 | @Nullable
41 | @Override
42 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
43 | @Nullable Bundle savedInstanceState) {
44 | rootView = inflater.inflate(layoutResId, container, false);
45 | rootView.setBackgroundColor(getResources().getColor(R.color.colorFourthFragment));
46 | return rootView;
47 | }
48 |
49 | @Override
50 | public int getDefaultBackgroundColor() {
51 | // Return the default background color of the slide.
52 | return getResources().getColor(R.color.colorFourthFragment);
53 | }
54 |
55 | @Override
56 | public void setBackgroundColor(@ColorInt int backgroundColor) {
57 | // Set the background color of the view within your slide to which the transition should be applied.
58 | if (rootView != null) {
59 | rootView.setBackgroundColor(backgroundColor);
60 | }
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/HireUs/HireUsActivity.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.HireUs;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import com.frosquivel.magicalcameraapp.R;
7 | import com.github.paolorotolo.appintro.AppIntro2;
8 |
9 | /**
10 | * Created by Fabian on 03/04/2017.
11 | */
12 | public class HireUsActivity extends AppIntro2 {
13 | @Override
14 | protected void onCreate(@Nullable Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setFlowAnimation();
17 | addSlide(FirstPageHireUsFragment.newInstance(R.layout.fragment_hire_us_first_page));
18 | addSlide(SecondPageHireUsFragment.newInstance(R.layout.fragment_hire_us_second_page));
19 | addSlide(ThirdPageHireUsFragment.newInstance(R.layout.fragment_hire_us_third_page));
20 | addSlide(FourthPageHireUsFragment.newInstance(R.layout.fragment_hire_us_fourth_page));
21 | addSlide(FifthPageHireUsFragment.newInstance(R.layout.fragment_hire_us_fifth_page));
22 | addSlide(SixthPageHireUsFragment.newInstance(R.layout.fragment_hire_us_sixth_page));
23 |
24 | // Hide Skip/Done button.
25 | showSkipButton(false);
26 | setProgressButtonEnabled(true);
27 | }
28 |
29 | @Override
30 | public void onSkipPressed(Fragment currentFragment) {
31 | super.onSkipPressed(currentFragment);
32 | finish();
33 | }
34 |
35 | @Override
36 | public void onDonePressed(Fragment currentFragment) {
37 | super.onDonePressed(currentFragment);
38 | finish();
39 | }
40 |
41 | @Override
42 | public void onSlideChanged(@Nullable Fragment oldFragment, @Nullable Fragment newFragment) {
43 | super.onSlideChanged(oldFragment, newFragment);
44 | // Do something when the slide changes.
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/HireUs/SecondPageHireUsFragment.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.HireUs;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.ColorInt;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import com.frosquivel.magicalcameraapp.R;
12 | import com.github.paolorotolo.appintro.ISlideBackgroundColorHolder;
13 |
14 | /**
15 | * Created by Fabian on 04/05/2017.
16 | */
17 |
18 | public class SecondPageHireUsFragment extends Fragment implements ISlideBackgroundColorHolder {
19 | private static final String ARG_LAYOUT_RES_ID = "fragment_hire_us_second_page";
20 | private int layoutResId;
21 | private View rootView;
22 |
23 | public static SecondPageHireUsFragment newInstance(int layoutResId) {
24 | SecondPageHireUsFragment sampleSlide = new SecondPageHireUsFragment();
25 |
26 | Bundle args = new Bundle();
27 | args.putInt(ARG_LAYOUT_RES_ID, layoutResId);
28 | sampleSlide.setArguments(args);
29 |
30 | return sampleSlide;
31 | }
32 |
33 | @Override
34 | public void onCreate(@Nullable Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 |
37 | if (getArguments() != null && getArguments().containsKey(ARG_LAYOUT_RES_ID)) {
38 | layoutResId = getArguments().getInt(ARG_LAYOUT_RES_ID);
39 | }
40 | }
41 |
42 | @Nullable
43 | @Override
44 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
45 | @Nullable Bundle savedInstanceState) {
46 | rootView = inflater.inflate(layoutResId, container, false);
47 | rootView.setBackgroundColor(getResources().getColor(R.color.colorSecondFragment));
48 | return rootView;
49 | }
50 |
51 | @Override
52 | public int getDefaultBackgroundColor() {
53 | // Return the default background color of the slide.
54 | return getResources().getColor(R.color.colorSecondFragment);
55 | }
56 |
57 | @Override
58 | public void setBackgroundColor(@ColorInt int backgroundColor) {
59 | // Set the background color of the view within your slide to which the transition should be applied.
60 | if (rootView != null) {
61 | rootView.setBackgroundColor(backgroundColor);
62 | }
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/HireUs/SixthPageHireUsFragment.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.HireUs;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.ColorInt;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import com.frosquivel.magicalcameraapp.R;
12 | import com.github.paolorotolo.appintro.ISlideBackgroundColorHolder;
13 |
14 | /**
15 | * Created by Fabian on 05/05/2017.
16 | */
17 |
18 | public class SixthPageHireUsFragment extends Fragment implements ISlideBackgroundColorHolder {
19 |
20 | private static final String ARG_LAYOUT_RES_ID = "fragment_hire_us_sixth_page";
21 | private int layoutResId;
22 | private View rootView;
23 |
24 | public static SixthPageHireUsFragment newInstance(int layoutResId) {
25 | SixthPageHireUsFragment sampleSlide = new SixthPageHireUsFragment();
26 | Bundle args = new Bundle();
27 | args.putInt(ARG_LAYOUT_RES_ID, layoutResId);
28 | sampleSlide.setArguments(args);
29 | return sampleSlide;
30 | }
31 |
32 | @Override
33 | public void onCreate(@Nullable Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | if (getArguments() != null && getArguments().containsKey(ARG_LAYOUT_RES_ID)) {
36 | layoutResId = getArguments().getInt(ARG_LAYOUT_RES_ID);
37 | }
38 | }
39 |
40 | @Nullable
41 | @Override
42 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
43 | @Nullable Bundle savedInstanceState) {
44 | rootView = inflater.inflate(layoutResId, container, false);
45 | rootView.setBackgroundColor(getResources().getColor(R.color.colorSixthFragment));
46 | return rootView;
47 | }
48 |
49 | @Override
50 | public int getDefaultBackgroundColor() {
51 | // Return the default background color of the slide.
52 | return getResources().getColor(R.color.colorSixthFragment);
53 | }
54 |
55 | @Override
56 | public void setBackgroundColor(@ColorInt int backgroundColor) {
57 | // Set the background color of the view within your slide to which the transition should be applied.
58 | if (rootView != null) {
59 | rootView.setBackgroundColor(backgroundColor);
60 | }
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/HireUs/ThirdPageHireUsFragment.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.HireUs;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.ColorInt;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import com.frosquivel.magicalcameraapp.R;
12 | import com.github.paolorotolo.appintro.ISlideBackgroundColorHolder;
13 |
14 | /**
15 | * Created by Fabian on 04/05/2017.
16 | */
17 |
18 | public class ThirdPageHireUsFragment extends Fragment implements ISlideBackgroundColorHolder {
19 | private static final String ARG_LAYOUT_RES_ID = "fragment_hire_us_third_page";
20 | private int layoutResId;
21 | private View rootView;
22 |
23 | public static ThirdPageHireUsFragment newInstance(int layoutResId) {
24 | ThirdPageHireUsFragment sampleSlide = new ThirdPageHireUsFragment();
25 |
26 | Bundle args = new Bundle();
27 | args.putInt(ARG_LAYOUT_RES_ID, layoutResId);
28 | sampleSlide.setArguments(args);
29 |
30 | return sampleSlide;
31 | }
32 |
33 | @Override
34 | public void onCreate(@Nullable Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 |
37 | if (getArguments() != null && getArguments().containsKey(ARG_LAYOUT_RES_ID)) {
38 | layoutResId = getArguments().getInt(ARG_LAYOUT_RES_ID);
39 | }
40 | }
41 |
42 | @Nullable
43 | @Override
44 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
45 | @Nullable Bundle savedInstanceState) {
46 | rootView = inflater.inflate(layoutResId, container, false);
47 | rootView.setBackgroundColor(getResources().getColor(R.color.colorThirdFragment));
48 | return rootView;
49 | }
50 |
51 | @Override
52 | public int getDefaultBackgroundColor() {
53 | // Return the default background color of the slide.
54 | return getResources().getColor(R.color.colorThirdFragment);
55 | }
56 |
57 | @Override
58 | public void setBackgroundColor(@ColorInt int backgroundColor) {
59 | // Set the background color of the view within your slide to which the transition should be applied.
60 | if (rootView != null) {
61 | rootView.setBackgroundColor(backgroundColor);
62 | }
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/ImageViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities;
2 |
3 | import android.app.Activity;
4 | import android.os.AsyncTask;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.ImageView;
9 | import android.widget.LinearLayout;
10 |
11 | import com.frosquivel.magicalcameraapp.R;
12 | import com.frosquivel.magicalcameraapp.Utils.Utils;
13 | import com.frosquivel.magicalcamera.MagicalCamera;
14 | import com.frosquivel.magicalcamera.Utilities.ConvertSimpleImage;
15 |
16 | /**
17 | * Created by Fabian on 02/03/2017.
18 | * This activity show the bitmap image and have the posibility of resie the bitmap
19 | */
20 |
21 | public class ImageViewActivity extends Activity {
22 | //this is the image view for show your picture taken in big size
23 | private ImageView bigImageView;
24 | private Button btnChangeSize;
25 |
26 | private LinearLayout progressLoadingIndicator;
27 |
28 | @Override
29 | protected void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 | setContentView(R.layout.activity_image);
32 | bigImageView = (ImageView) findViewById(R.id.bigImageView);
33 | btnChangeSize = (Button) findViewById(R.id.btnChangeSize);
34 | progressLoadingIndicator = (LinearLayout) findViewById(R.id.progressLoadingIndicator);
35 | bigImageView.setImageBitmap(Utils.magicalCameraBitmap);
36 |
37 | btnChangeSize.setOnClickListener(new View.OnClickListener() {
38 | @Override
39 | public void onClick(View v) {
40 | new AsyncTask() {
41 | protected void onPreExecute() {
42 | progressLoadingIndicator.setVisibility(View.VISIBLE);
43 | }
44 |
45 | protected String doInBackground(Void... params) {
46 | try {
47 | byte[] arrayBytesFromBitmap = ConvertSimpleImage.bitmapToBytes(Utils.magicalCameraBitmap,
48 | MagicalCamera.PNG);
49 |
50 | Utils.magicalCameraBitmap = ConvertSimpleImage.resizeImageRunTime(arrayBytesFromBitmap,
51 | Utils.magicalCameraBitmap.getWidth() - 150,
52 | Utils.magicalCameraBitmap.getHeight() - 150, false);
53 | }catch(Exception ev){}
54 | return null;
55 | }
56 |
57 | protected void onPostExecute(String msg) {
58 | bigImageView.setImageBitmap(Utils.magicalCameraBitmap);
59 | progressLoadingIndicator.setVisibility(View.GONE);
60 | }
61 | }.execute();
62 | }
63 | });
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/Menu/AboutUsActivity.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.Menu;
2 | /*
3 | Copyright 2013 Square, Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | import android.os.Bundle;
18 | import android.support.v7.app.AppCompatActivity;
19 | import android.view.View;
20 | import android.widget.ImageButton;
21 | import android.widget.ImageView;
22 |
23 | import com.frosquivel.magicalcameraapp.R;
24 | import com.frosquivel.magicalcameraapp.Utils.Utils;
25 | import com.squareup.picasso.Picasso;
26 |
27 | /**
28 | * Created by Fabian on 05/03/2017.
29 | * This class only shown the about us of the developers of magical camera
30 | */
31 |
32 | public class AboutUsActivity extends AppCompatActivity{
33 |
34 | private ImageView imageCreator;
35 | private ImageView imageContributor1;
36 | private ImageView imageContributor2;
37 |
38 | private ImageButton btnGitContributor1;
39 | private ImageButton btnGitContributor2;
40 | private ImageButton btnGitCreator;
41 |
42 | @Override
43 | protected void onCreate(Bundle savedInstanceState) {
44 | super.onCreate(savedInstanceState);
45 | setContentView(R.layout.activity_about_us);
46 |
47 | imageCreator = (ImageView) findViewById(R.id.imageCreator);
48 | imageContributor1 = (ImageView) findViewById(R.id.imageContributor1);
49 | imageContributor2 = (ImageView) findViewById(R.id.imageContributor2);
50 |
51 | btnGitContributor1 = (ImageButton) findViewById(R.id.btnGitContributor1);
52 | btnGitContributor2 = (ImageButton) findViewById(R.id.btnGitContributor2);
53 | btnGitCreator = (ImageButton) findViewById(R.id.btnGitCreator);
54 |
55 | Picasso.with(this)
56 | .load(getString(R.string.dev_image_creator))
57 | .into(imageCreator);
58 |
59 | Picasso.with(this)
60 | .load(getString(R.string.dev_image_contributor_1))
61 | .into(imageContributor1);
62 |
63 | Picasso.with(this)
64 | .load(getString(R.string.dev_image_contributor_2))
65 | .into(imageContributor2);
66 |
67 | btnGitContributor1.setOnClickListener(new View.OnClickListener() {
68 | @Override
69 | public void onClick(View v) {
70 | Utils.goToWebView(getString(R.string.dev_link_git_contributor_1), AboutUsActivity.this);
71 | }
72 | });
73 |
74 | btnGitContributor2.setOnClickListener(new View.OnClickListener() {
75 | @Override
76 | public void onClick(View v) {
77 | Utils.goToWebView(getString(R.string.dev_link_git_contributor_2), AboutUsActivity.this);
78 | }
79 | });
80 |
81 | btnGitCreator.setOnClickListener(new View.OnClickListener() {
82 | @Override
83 | public void onClick(View v) {
84 | Utils.goToWebView(getString(R.string.dev_link_git_creator), AboutUsActivity.this);
85 | }
86 | });
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/Menu/HelpUsActivity.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.Menu;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.view.View;
6 | import android.widget.ImageView;
7 |
8 | import com.frosquivel.magicalcameraapp.R;
9 | import com.frosquivel.magicalcameraapp.Utils.Utils;
10 |
11 | /**
12 | * Created by Fabian on 30/03/2017.
13 | */
14 |
15 | public class HelpUsActivity extends AppCompatActivity {
16 |
17 | private ImageView imgEmail;
18 | private ImageView imgGithub;
19 | private ImageView imgYouTube;
20 | private ImageView imgShare;
21 |
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_help_us);
26 |
27 | imgEmail = (ImageView) findViewById(R.id.imgEmail);
28 | imgGithub = (ImageView) findViewById(R.id.imgGithub);
29 | imgYouTube = (ImageView) findViewById(R.id.imgYouTube);
30 | imgShare = (ImageView) findViewById(R.id.imgShare);
31 |
32 |
33 | imgEmail.setOnClickListener(new View.OnClickListener() {
34 | @Override
35 | public void onClick(View v) {
36 | Utils.sendMeAnEmail(HelpUsActivity.this);
37 | }
38 | });
39 |
40 | imgGithub.setOnClickListener(new View.OnClickListener() {
41 | @Override
42 | public void onClick(View v) {
43 | Utils.goToWebView(getString(R.string.link_documentation), HelpUsActivity.this);
44 | }
45 | });
46 |
47 | imgYouTube.setOnClickListener(new View.OnClickListener() {
48 | @Override
49 | public void onClick(View v) {
50 | Utils.openScheme(HelpUsActivity.this, "youtube://channel/", "UCJnvvHb_vwMwbnZWplkHIfw",
51 | "https://www.youtube.com/channel/UCJnvvHb_vwMwbnZWplkHIfw", getString(R.string.error_not_open_youtube));
52 | }
53 | });
54 |
55 | imgShare.setOnClickListener(new View.OnClickListener() {
56 | @Override
57 | public void onClick(View v) {
58 | Utils.sharedApp(HelpUsActivity.this);
59 | }
60 | });
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/Menu/MarkDownReadMeActivity.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.Menu;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.widget.ImageView;
6 | import com.frosquivel.magicalcameraapp.R;
7 | import com.mukesh.MarkdownView;
8 |
9 | /**
10 | * Created by Fabian on 06/05/2017.
11 | */
12 | public class MarkDownReadMeActivity extends AppCompatActivity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_markdown_readme);
18 |
19 | MarkdownView markdownView = (MarkdownView) findViewById(R.id.markdown_view);
20 | markdownView.loadMarkdownFromAssets("README.md"); //Loads the markdown file from the assets folder
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/Menu/SplashActivity.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.Menu;
2 | /*
3 | The MIT License (MIT)
4 |
5 | Copyright (c) 2015 Viktor Arsovski
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in
15 | all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | THE SOFTWARE.
24 | */
25 | import android.content.Intent;
26 | import android.view.Window;
27 | import android.view.WindowManager;
28 |
29 | import com.daimajia.androidanimations.library.Techniques;
30 | import com.frosquivel.magicalcameraapp.Activities.MainActivity;
31 | import com.frosquivel.magicalcameraapp.R;
32 | import com.frosquivel.magicalcameraapp.Utils.Utils;
33 | import com.viksaa.sssplash.lib.activity.AwesomeSplash;
34 | import com.viksaa.sssplash.lib.cnst.Flags;
35 | import com.viksaa.sssplash.lib.model.ConfigSplash;
36 |
37 | /**
38 | * Created by Fabian on 28/02/2017.
39 | * This class shown the splash screen of the application
40 | * init the backendless and the shared preferences
41 | */
42 |
43 | public class SplashActivity extends AwesomeSplash {
44 | private final int SPLASH_DISPLAY_LENGTH = 1000;
45 |
46 | @Override
47 | public void initSplash(ConfigSplash configSplash) {
48 |
49 | //Fabric.with(this, new Crashlytics());
50 | requestWindowFeature(Window.FEATURE_NO_TITLE);
51 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
52 |
53 | Utils.setInitialSharedPreference(this, false);
54 |
55 | Intent i = new Intent(this, MainActivity.class);
56 | startService(i);
57 |
58 | //Customize Circular Reveal
59 | configSplash.setBackgroundColor(R.color.colorWhite); //any color you want form colors.xml
60 | configSplash.setAnimCircularRevealDuration(1000); //int ms
61 | configSplash.setRevealFlagX(Flags.REVEAL_RIGHT); //or Flags.REVEAL_LEFT
62 | configSplash.setRevealFlagY(Flags.REVEAL_BOTTOM); //or Flags.REVEAL_TOP
63 |
64 | //Choose LOGO OR PATH; if you don't provide String value for path it's logo by default
65 |
66 | //Customize Logo
67 | configSplash.setLogoSplash(R.drawable.ic_magical_vertical_div_2); //or any other drawable
68 | configSplash.setAnimLogoSplashDuration(1000); //int ms
69 | configSplash.setAnimLogoSplashTechnique(Techniques.FadeIn); //choose one form Techniques (ref: https://github.com/daimajia/AndroidViewAnimations)
70 |
71 | //Customize Title
72 | configSplash.setTitleSplash(getString(R.string.version));
73 | configSplash.setTitleTextColor(R.color.colorPrimary);
74 | configSplash.setTitleTextSize(25f); //float value
75 | configSplash.setAnimTitleDuration(2000);
76 | configSplash.setAnimTitleTechnique(Techniques.DropOut);
77 | }
78 |
79 | @Override
80 | public void animationsFinished() {
81 | Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);
82 | startActivity(mainIntent);
83 | finish();
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Activities/Menu/WebViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Activities.Menu;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.webkit.WebView;
7 |
8 | import com.frosquivel.magicalcameraapp.R;
9 |
10 | /**
11 | * Created by Fabian on 04/03/2017.
12 | * This class open all webViews that the app need
13 | */
14 |
15 | public class WebViewActivity extends Activity {
16 | private WebView webView;
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | this.setContentView(R.layout.activity_web_view);
21 | webView = (WebView) this.findViewById(R.id.webView);
22 |
23 | String link = getIntent().getStringExtra("link");
24 | webView.getSettings().setJavaScriptEnabled(true);
25 | webView.loadUrl(link);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Fragments/ActivityForFragment.java:
--------------------------------------------------------------------------------
1 |
2 | package com.frosquivel.magicalcameraapp.Fragments;
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import com.frosquivel.magicalcameraapp.R;
6 |
7 | /**
8 | * Created by Fabián Rosales Esquivel
9 | * Visit my web page http://www.frosquivel.com
10 | * Visit my blog http://www.frosquivel.com/blog
11 | * Created Date on 5/19/16
12 | * This is an android library to take easy picture
13 | */
14 | public class ActivityForFragment extends AppCompatActivity {
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContentView(R.layout.activity_activity_for_fragment);
20 | }
21 |
22 | @Override
23 | public void onBackPressed() {
24 | super.onBackPressed();
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/frosquivel/magicalcameraapp/Utils/Utils.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcameraapp.Utils;
2 |
3 | import android.app.Activity;
4 | import android.content.ContentUris;
5 | import android.content.Context;
6 | import android.content.Intent;
7 | import android.content.SharedPreferences;
8 | import android.graphics.Bitmap;
9 | import android.net.Uri;
10 | import android.support.design.widget.Snackbar;
11 | import android.view.View;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.frosquivel.magicalcameraapp.R;
16 | import com.frosquivel.magicalcameraapp.Activities.Menu.WebViewActivity;
17 | import com.frosquivel.magicalcamera.MagicalCamera;
18 |
19 | /**
20 | * Created by Fabian on 01/03/2017.
21 | * This class have the general method for avoid code duplicate
22 | */
23 |
24 | public class Utils {
25 |
26 | public static final String C_PREFERENCE_MAGICAL_CAMERA = "MCPreference";
27 | public static final String C_PREFERENCE_MC_DIRECTORY_NAME = "MCDirectoryName";
28 | public static final String C_PREFERENCE_MC_PHOTO_NAME = "MCPhotoName";
29 | public static final String C_PREFERENCE_MC_SELECTED_PICTURE = "MCTitleSelectPicture";
30 | public static final String C_PREFERENCE_MC_QUALITY_PICTURE = "MCQualityPicture";
31 | public static final String C_PREFERENCE_MC_FORMAT = "MCFormat";
32 | public static final String C_PREFERENCE_MC_AUTO_IC_NAME = "MCAutoincrementName";
33 | public static final String C_PREFERENCE_MC_FACIAL_RECOGNITION_THICK = "MCFacialRecognitionThick";
34 | public static final String C_PREFERENCE_MC_FACIAL_RECOGNITION_COLOR = "MCFacialRecognitionColor";
35 |
36 | public static final String C_PNG = "png";
37 | public static final String C_JPG = "jpg";
38 | public static final String C_WEBP = "webp";
39 |
40 | public static Bitmap magicalCameraBitmap;
41 |
42 | // Utils methods
43 |
44 | /**
45 | * Validate if magicalcamera object is null of not have photo, and shown a message if it is null.
46 | * @param context
47 | * @param view
48 | * @param magicalCamera
49 | * @return return true or false
50 | */
51 | public static boolean validateMagicalCameraNull(Context context, View view, MagicalCamera magicalCamera){
52 | if(magicalCamera != null) {
53 | if (magicalCamera.getPhoto() != null) {
54 | return true;
55 | }else{
56 | viewSnackBar(context.getString(R.string.error_image_null), view);
57 | return false;
58 | }
59 | }else{
60 | viewSnackBar(context.getString(R.string.error_init_magicalcamera), view);
61 | return false;
62 | }
63 | }
64 |
65 | /**
66 | * View Snack bar for simple form
67 | * @param message the message to shown
68 | * @param view the principal view (layout)
69 | */
70 | public static void viewSnackBar(String message, View view){
71 | Snackbar snackbar = Snackbar.make(view, message,
72 | Snackbar.LENGTH_LONG).setDuration(Snackbar.LENGTH_LONG);
73 |
74 | View snackbarView = snackbar.getView();
75 | TextView tv= (TextView) snackbarView.findViewById(android.support.design.R.id.snackbar_text);
76 | tv.setMaxLines(5);
77 | snackbar.show();
78 | }
79 |
80 | /**
81 | * validate if the variable is null or empty
82 | * @param validate the string to validate
83 | * @return true or false
84 | */
85 | public static boolean notNullNotFill(String validate){
86 | if(validate != null){
87 | if(!validate.trim().equals("")){
88 | return true;
89 | }else{
90 |
91 | return false;
92 | }
93 | }else{
94 | return false;
95 | }
96 | }
97 |
98 |
99 | //#Shared preference methods
100 | public static void setSharedPreference(Context context, String preferenceName, String preferenceValue){
101 | SharedPreferences.Editor editor = context.getSharedPreferences(C_PREFERENCE_MAGICAL_CAMERA, context.MODE_PRIVATE).edit();
102 | editor.putString(preferenceName, preferenceValue);
103 | editor.commit();
104 | }
105 |
106 | public static String getSharedPreference(Context context, String preferenceName){
107 | SharedPreferences pref = context.getApplicationContext().getSharedPreferences(C_PREFERENCE_MAGICAL_CAMERA, context.MODE_PRIVATE);
108 | return pref.getString(preferenceName, "");
109 | }
110 |
111 | /**
112 | * Get the format for save into sd or internal memory device.
113 | * @param context
114 | * @return
115 | */
116 | public static Bitmap.CompressFormat getFormat(Context context){
117 | String format = getSharedPreference(context, C_PREFERENCE_MC_FORMAT);
118 | Bitmap.CompressFormat compressFormat = null;
119 | switch(format){
120 | case C_PNG:
121 | compressFormat = MagicalCamera.PNG;
122 | break;
123 |
124 | case C_JPG:
125 | compressFormat = MagicalCamera.JPEG;
126 | break;
127 |
128 | case C_WEBP:
129 | compressFormat = MagicalCamera.WEBP;
130 | break;
131 |
132 | default:
133 | break;
134 | }
135 |
136 | return compressFormat;
137 | }
138 |
139 | //initial the shared preference
140 | public static void setInitialSharedPreference(Context context, boolean isDefaultValues){
141 |
142 | if(getSharedPreference(context, C_PREFERENCE_MC_DIRECTORY_NAME).equals("") || isDefaultValues)
143 | setSharedPreference(context, C_PREFERENCE_MC_DIRECTORY_NAME, context.getString(R.string.value_directory_name));
144 |
145 | if(getSharedPreference(context, C_PREFERENCE_MC_PHOTO_NAME).equals("") || isDefaultValues)
146 | setSharedPreference(context, C_PREFERENCE_MC_PHOTO_NAME, context.getString(R.string.value_photo_name));
147 |
148 | if(getSharedPreference(context, C_PREFERENCE_MC_QUALITY_PICTURE).equals("") || isDefaultValues)
149 | setSharedPreference(context, C_PREFERENCE_MC_QUALITY_PICTURE, context.getString(R.string.value_quality_picture));
150 |
151 | if(getSharedPreference(context, C_PREFERENCE_MC_FORMAT).equals("") || isDefaultValues)
152 | setSharedPreference(context, C_PREFERENCE_MC_FORMAT, C_PNG);
153 |
154 | if(getSharedPreference(context, C_PREFERENCE_MC_AUTO_IC_NAME).equals("") || isDefaultValues)
155 | setSharedPreference(context, C_PREFERENCE_MC_AUTO_IC_NAME, context.getString(R.string.value_autoincrement_picture));
156 |
157 | if(getSharedPreference(context, C_PREFERENCE_MC_FACIAL_RECOGNITION_THICK).equals("") || isDefaultValues)
158 | setSharedPreference(context, C_PREFERENCE_MC_FACIAL_RECOGNITION_THICK, context.getString(R.string.value_facial_recognition_thick));
159 |
160 | if(getSharedPreference(context, C_PREFERENCE_MC_FACIAL_RECOGNITION_COLOR).equals("") || isDefaultValues)
161 | setSharedPreference(context, C_PREFERENCE_MC_FACIAL_RECOGNITION_COLOR, context.getString(R.string.value_facial_recognition_color));
162 |
163 | if(getSharedPreference(context, C_PREFERENCE_MC_SELECTED_PICTURE).equals("") || isDefaultValues)
164 | setSharedPreference(context, C_PREFERENCE_MC_SELECTED_PICTURE, context.getString(R.string.value_selected_picture));
165 |
166 | }
167 |
168 | /**
169 | * open a link into webView
170 | * @param url
171 | * @param activity
172 | */
173 | public static void goToWebView(String url, Activity activity){
174 | Intent intent = new Intent(activity, WebViewActivity.class);
175 | intent.putExtra("link",url);
176 | activity.startActivity(intent);
177 | }
178 |
179 |
180 | public static void openScheme(Activity activity, String scheme, String id, String url, String errorMessage){
181 | Uri uri = Uri.parse(scheme);
182 | try {
183 | uri = ContentUris.withAppendedId(uri, Long.parseLong(id));
184 | }catch(Exception ev){
185 | uri = Uri.parse(scheme + id);
186 | }
187 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
188 | try {
189 | activity.startActivity(intent);
190 | }catch(Exception ev){
191 | try {
192 | Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
193 | activity.startActivity(browserIntent);
194 | }catch(Exception ex){
195 | Toast.makeText(activity,errorMessage,Toast.LENGTH_LONG).show();
196 | }
197 | }
198 | }
199 |
200 | public static void sendMeAnEmail(Activity activity){
201 | Intent email = new Intent(Intent.ACTION_SEND);
202 | email.putExtra(Intent.EXTRA_EMAIL, new String[]{"fabian7593@gmail.com"});
203 | email.putExtra(Intent.EXTRA_SUBJECT, activity.getString(R.string.email_subject));
204 | email.putExtra(Intent.EXTRA_TEXT, "");
205 | email.setType("message/rfc822");
206 | activity.startActivity(Intent.createChooser(email, activity.getString(R.string.email_choose)));
207 | }
208 |
209 | public static void sharedApp(Activity activity) {
210 | Intent shareIntent = new Intent();
211 | String textEmail = activity.getString(R.string.email_text);
212 | textEmail = textEmail.replace("XXXX1", activity.getString(R.string.link_git));
213 | textEmail = textEmail.replace("XXXX2", activity.getString(R.string.link_play_store));
214 | textEmail = textEmail.replace("XXXX3", activity.getString(R.string.link_play_store_payment));
215 |
216 | shareIntent.setAction(Intent.ACTION_SEND);
217 | shareIntent.setType("text/plain");
218 | shareIntent.putExtra(Intent.EXTRA_TEXT, textEmail);
219 | shareIntent.putExtra(Intent.EXTRA_SUBJECT, activity.getString(R.string.email_subject));
220 | shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
221 | activity.startActivity(Intent.createChooser(shareIntent, activity.getString(R.string.email_title)));
222 | }
223 | }
224 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/briefcase.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/briefcase.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_light_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_material_design.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fab_label_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_about.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_cam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_cam.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_donation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_donation.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_face.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_face.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_1_contact_us_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_1_contact_us_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_1_contact_us_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_1_contact_us_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_1_contact_us_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_1_contact_us_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_1_contact_us_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_1_contact_us_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_1_contact_us_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_1_contact_us_5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_1_contact_us_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_1_contact_us_6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_2_contact_us_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_2_contact_us_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_2_contact_us_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_2_contact_us_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_2_contact_us_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_2_contact_us_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_3_contact_us_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_3_contact_us_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_3_contact_us_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_3_contact_us_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_3_contact_us_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_3_contact_us_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_4_contact_us_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_4_contact_us_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_4_contact_us_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_4_contact_us_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_4_contact_us_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_4_contact_us_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_4_contact_us_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_4_contact_us_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_5_contact_us_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_5_contact_us_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_6_contact_us_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_6_contact_us_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fragment_6_contact_us_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_fragment_6_contact_us_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_git.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_git.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_github.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_google_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_google_play.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_information.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_magical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_magical.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_magical_vertical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_magical_vertical.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_magical_vertical_div_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_magical_vertical_div_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_next.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_remove.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_remove2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_remove2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_rotate.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_setting_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_setting_menu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_settings.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_share.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_shared.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/drawable/ic_shared.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/vec_checkbox_blank_circle_outline.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/vec_checkbox_fill_circle_outline.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_about_us.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
16 |
17 |
28 |
29 |
37 |
38 |
43 |
51 |
52 |
60 |
61 |
62 |
63 |
73 |
74 |
75 |
85 |
86 |
95 |
96 |
101 |
109 |
110 |
118 |
119 |
120 |
121 |
131 |
132 |
140 |
141 |
146 |
154 |
155 |
163 |
164 |
165 |
166 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_activity_for_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_contact_us.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
16 |
17 |
28 |
29 |
30 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_help_us.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
16 |
17 |
28 |
29 |
30 |
40 |
41 |
52 |
53 |
64 |
65 |
75 |
76 |
86 |
87 |
97 |
98 |
108 |
109 |
119 |
120 |
121 |
129 |
136 |
137 |
143 |
144 |
150 |
151 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_hire_us.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
14 |
15 |
22 |
23 |
24 |
33 |
34 |
35 |
36 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_markdown_readme.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_web_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hire_us_fifth_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hire_us_first_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
31 |
32 |
33 |
41 |
42 |
56 |
57 |
58 |
66 |
73 |
74 |
80 |
81 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hire_us_fourth_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
30 |
31 |
41 |
42 |
50 |
51 |
66 |
67 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hire_us_second_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
27 |
28 |
38 |
39 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hire_us_sixth_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
29 |
30 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hire_us_third_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
29 |
30 |
39 |
40 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_color_picker.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
21 |
22 |
28 |
29 |
35 |
36 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/progress_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
21 |
22 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/mipmap-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #4699CBF8
4 | #449def
5 | #0A8BD1
6 | #05679C
7 | #343434
8 | #FFFFFF
9 | #6B6B6B
10 | #F2FFFFFF
11 | #BF000000
12 |
13 | #1abc9c
14 | #f39c12
15 | #e74c3cf39c12
16 | #2ecc71
17 | #3498db
18 | #9b59b6
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 5dp
4 | 5dp
5 | 10dp
6 | 20dp
7 | 30dp
8 | 48dp
9 | 35dp
10 | 35dp
11 | 100dp
12 | 16dp
13 |
14 | 16dp
15 | 10dp
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
16 |
17 |
28 |
29 |
30 |
35 |
36 |
37 |
44 |
45 |
46 |
47 |
60 |
61 |
65 |
66 |
75 |
76 |
77 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | jcenter()
7 | maven { url 'https://maven.fabric.io/public' }
8 | }
9 |
10 | dependencies {
11 | classpath 'io.fabric.tools:gradle:1.+'
12 | classpath 'com.android.tools.build:gradle:2.3.1'
13 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
14 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | jcenter()
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 | GROUP=im.quar
20 | VERSION_NAME=6.0.0
21 |
22 | POM_DESCRIPTION=Magical Camera.
23 |
24 | POM_URL=https://github.com/fabian7593/MagicalCamera
25 | POM_SCM_URL=https://github.com/fabian7593/MagicalCamera
26 | POM_SCM_CONNECTION=scm:git:git://github.com/fabian7593/MagicalCamera.git
27 | POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com:fabian7593/MagicalCamera.git
28 | POM_ISSUE_URL=https://github.com/fabian7593/MagicalCamera/issues
29 |
30 | POM_LICENCE_NAME=The Apache Software License, Version 2.0
31 | POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
32 | POM_ALL_LICENCES=['Apache-2.0']
33 | POM_LICENCE_DIST=repo
34 |
35 | POM_DEVELOPER_ID=frosquiveldev
36 | POM_DEVELOPER_NAME=Fabian Rosales - Frosquivel Developer
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fabian7593/MagicalCamera/db74ebd992a93fcc59447f8d1540faa31abb4db5/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Mar 23 23:29:51 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/magicalcamera/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/magicalcamera/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.jfrog.bintray'
3 |
4 | ext {
5 | bintrayRepo = 'maven'
6 | bintrayName = 'MagicalCamera'
7 |
8 | publishedGroupId = 'com.frosquivel'
9 | libraryName = 'magicalcamera'
10 | artifact = 'magicalcamera'
11 |
12 | libraryDescription = 'You can take photo easy and save too :D'
13 |
14 | siteUrl = 'https://github.com/fabian7593/MagicalCamera'
15 | gitUrl = 'https://github.com/fabian7593/MagicalCamera.git'
16 |
17 | libraryVersion = '6.0.0'
18 |
19 | developerId = 'frosquiveldev'
20 | developerName = 'Fabian Rosales - Frosquivel Developer'
21 | developerEmail = 'fabian7593@gmail.com'
22 |
23 | licenseName = 'The Apache Software License, Version 2.0'
24 | licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
25 | allLicenses = ["Apache-2.0"]
26 | }
27 |
28 | Properties properties = new Properties()
29 | try {
30 | properties.load(project.rootProject.file('local.properties').newDataInputStream())
31 | } catch (Exception e) {
32 | properties.load(project.rootProject.file('bintray.properties').newDataInputStream())
33 | }
34 |
35 | bintray {
36 | user = properties.getProperty("bintray.user")
37 | key = properties.getProperty("bintray.apikey")
38 | }
39 |
40 | buildscript {
41 | repositories {
42 | jcenter()
43 | }
44 | dependencies {
45 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
46 | }
47 | }
48 |
49 | repositories {
50 | mavenCentral();
51 |
52 | }
53 |
54 | android {
55 | compileSdkVersion 28
56 | buildToolsVersion "28.0.2"
57 |
58 | lintOptions {
59 | abortOnError false
60 | }
61 |
62 | defaultConfig {
63 | minSdkVersion 14
64 | targetSdkVersion 28
65 | versionCode 6
66 | versionName "6.0.0"
67 | }
68 | buildTypes {
69 | release {
70 | minifyEnabled false
71 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
72 | }
73 | }
74 | }
75 |
76 | dependencies {
77 | compile fileTree(dir: 'libs', include: ['*.jar'])
78 | compile 'com.android.support:appcompat-v7:25.2.0'
79 | compile 'com.android.support:support-v4:20.0.+'
80 | compile 'com.google.android.gms:play-services-location:10.2.1'
81 | compile 'com.google.android.gms:play-services-vision:10.2.1'
82 | }
83 |
84 | apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
85 | apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
--------------------------------------------------------------------------------
/magicalcamera/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\Fabian\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
9 |
12 |
13 |
18 |
21 |
22 |
23 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Functionallities/ActionPicture.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Functionallities;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.database.Cursor;
6 | import android.graphics.Bitmap;
7 | import android.graphics.BitmapFactory;
8 | import android.net.Uri;
9 | import android.provider.MediaStore;
10 |
11 | import com.frosquivel.magicalcamera.MagicalCamera;
12 | import com.frosquivel.magicalcamera.Objects.ActionPictureObject;
13 | import com.frosquivel.magicalcamera.Utilities.PictureUtils;
14 |
15 | /**
16 | * Created by Fabian Rosales Esquivel (Frosquivel Developer)
17 | * Created Date 07/12/2016.
18 | * Made in Costa Rica
19 | * This class call the intent of take picture or select picture in device
20 | */
21 |
22 | public class ActionPicture {
23 |
24 | //================================================================================
25 | // Properties and constructor
26 | //================================================================================
27 | //region Properties
28 | private ActionPictureObject actionPictureObject;
29 | private URIPaths uriPaths;
30 |
31 | //Getter and Setter methods
32 | public ActionPictureObject getActionPictureObject() {
33 | return actionPictureObject;
34 | }
35 | //endregion
36 |
37 | //region Constructor
38 | public ActionPicture(Activity activity,int resizePicture, URIPaths uriPaths){
39 | this.actionPictureObject = new ActionPictureObject();
40 | this.uriPaths = uriPaths;
41 | this.actionPictureObject.setActivity(activity);
42 | this.actionPictureObject.setResizePhoto(resizePicture);
43 | }
44 | //endregion
45 |
46 |
47 | //================================================================================
48 | // Take and Select photos
49 | //================================================================================
50 | //region Photo Methods
51 |
52 | /**
53 | * This method call the intent for take the picture in activity screen
54 | * Too validate the permissions in android 6.0
55 | * @return return true if the picture was taken
56 | */
57 | public boolean takePhoto() {
58 | Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
59 |
60 | Uri FileUri = this.uriPaths.getPhotoFileUri(ActionPictureObject.photoNameAuxiliar,
61 | ActionPictureObject.photoNameAuxiliar, this.actionPictureObject.getActivity());
62 |
63 | if (FileUri != null) {
64 |
65 | intent.putExtra(MediaStore.EXTRA_OUTPUT, FileUri);
66 | if (intent.resolveActivity(this.actionPictureObject.getActivity().getPackageManager()) != null) {
67 | this.actionPictureObject.getActivity().startActivityForResult(intent, MagicalCamera.TAKE_PHOTO);
68 | }
69 | return true;
70 | } else {
71 | return false;
72 | }
73 | }
74 |
75 | /**
76 | * This method call the intent for take the picture in fragment screen
77 | * Too validate the permissions in android 6.0
78 | * @return return true if the picture was taken
79 | */
80 | public boolean takeFragmentPhoto() {
81 | Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
82 |
83 | Uri FileUri = this.uriPaths.getPhotoFileUri(ActionPictureObject.photoNameAuxiliar,
84 | ActionPictureObject.photoNameAuxiliar, this.actionPictureObject.getActivity());
85 |
86 | if (FileUri != null) {
87 |
88 | intent.putExtra(MediaStore.EXTRA_OUTPUT, this.uriPaths.getPhotoFileUri(ActionPictureObject.photoNameAuxiliar,
89 | ActionPictureObject.photoNameAuxiliar, this.actionPictureObject.getActivity()));
90 |
91 | if (intent.resolveActivity(this.actionPictureObject.getActivity().getPackageManager()) != null) {
92 | this.actionPictureObject.setIntentFragment(intent);
93 | return true;
94 |
95 | } else {
96 | return false;
97 | }
98 | } else {
99 | return false;
100 | }
101 | }
102 |
103 |
104 | /**
105 | * This call the intent to selected the picture for activity screen
106 | * @param headerName the header name of popUp that you need to shown
107 | * @return return true if the photo was taken or false if it was not.
108 | */
109 | public boolean selectedPicture(String headerName) {
110 |
111 | try {
112 | Intent intent = new Intent(
113 | Intent.ACTION_PICK,
114 | android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
115 | intent.setType("image/*");
116 | this.actionPictureObject.getActivity().startActivityForResult(
117 | Intent.createChooser(intent, (!headerName.equals("") ? headerName : "Magical Camera")),
118 | MagicalCamera.SELECT_PHOTO);
119 |
120 | return true;
121 | }catch (Exception ev){
122 | return false;
123 | }
124 | }
125 |
126 | /**
127 | * This call the intent to selected the picture for activity screen
128 | * @return return true if the photo was taken or false if it was not.
129 | */
130 | public boolean selectedFragmentPicture() {
131 | Intent intent = new Intent(
132 | Intent.ACTION_PICK,
133 | android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
134 | intent.setType("image/*");
135 | if (intent.resolveActivity(this.actionPictureObject.getActivity().getPackageManager()) != null) {
136 | this.actionPictureObject.setIntentFragment(intent);
137 | return true;
138 | } else {
139 | return false;
140 | }
141 | }
142 |
143 | /**
144 | * This method obtain the path of the picture selected, and convert this in the
145 | * phsysical path of the image, and decode the file with the respective options,
146 | * resize the file and change the quality of photos selected.
147 | *
148 | * @param data the intent data for take the photo path
149 | * @return return a bitmap of the photo selected
150 | */
151 | @SuppressWarnings("deprecation")
152 | private Bitmap onSelectFromGalleryResult(Intent data) {
153 | Uri selectedImageUri = data.getData();
154 | String[] projection = {MediaStore.MediaColumns.DATA};
155 | Cursor cursor = this.actionPictureObject.getActivity().managedQuery(selectedImageUri, projection, null, null,
156 | null);
157 | int column_index = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);
158 | cursor.moveToFirst();
159 | String selectedImagePath = cursor.getString(column_index);
160 | BitmapFactory.Options options = new BitmapFactory.Options();
161 | options.inJustDecodeBounds = true;
162 | BitmapFactory.decodeFile(selectedImagePath, options);
163 | options.inJustDecodeBounds = false;
164 | Bitmap bm = BitmapFactory.decodeFile(selectedImagePath, options);
165 | bm = PictureUtils.resizePhoto(bm, this.actionPictureObject.getResizePhoto(), true);
166 |
167 | this.uriPaths.getPhotoFileUri(selectedImagePath);
168 | if (bm != null)
169 | return bm;
170 | else
171 | return null;
172 | }
173 |
174 | /**
175 | * Save the photo in memory bitmap, resize and return the photo
176 | * @return the bitmap of the respective photo
177 | */
178 | private Bitmap onTakePhotoResult() {
179 | Uri takenPhotoUri = this.uriPaths.getPhotoFileUri(ActionPictureObject.photoNameAuxiliar,
180 | ActionPictureObject.photoNameAuxiliar, actionPictureObject.getActivity());
181 | // by this point we have the camera photo on disk
182 | if (takenPhotoUri != null) {
183 | Bitmap takenImage = BitmapFactory.decodeFile(takenPhotoUri.getPath());
184 | takenImage = PictureUtils.resizePhoto(takenImage, actionPictureObject.getResizePhoto(), true);
185 | return takenImage;
186 | } else {
187 | return null;
188 | }
189 | }
190 | //endregion
191 |
192 | //region Method to call in Override
193 | /**
194 | * This methods is called in the override method onActivityResult
195 | * for the respective activation, and this validate which of the intentn result be,
196 | * for example: if is selected file or if is take picture
197 | */
198 | public void resultPhoto(int requestCode, int resultCode, Intent data) {
199 | if (resultCode == Activity.RESULT_OK) {
200 | if (requestCode == MagicalCamera.SELECT_PHOTO) {
201 | this.actionPictureObject.setMyPhoto(onSelectFromGalleryResult(data));
202 | } else if (requestCode == MagicalCamera.TAKE_PHOTO) {
203 | this.actionPictureObject.setMyPhoto(onTakePhotoResult());
204 | }
205 | }
206 | }
207 |
208 | /**
209 | * This methods is called in the override method onActivityResult
210 | * for the respective activation, and this validate which of the intentn result be,
211 | * for example: if is selected file or if is take picture
212 | *
213 | * doLandScape
214 | * BUT you have the posibillity of rotate the picture "manually", with the parameter doLandScape
215 | */
216 | public void resultPhoto(int requestCode, int resultCode, Intent data, int rotatePicture) {
217 | if (resultCode == Activity.RESULT_OK) {
218 | if (requestCode == MagicalCamera.SELECT_PHOTO) {
219 | this.actionPictureObject.setMyPhoto(onSelectFromGalleryResult(data));
220 | } else if (requestCode == MagicalCamera.TAKE_PHOTO) {
221 | this.actionPictureObject.setMyPhoto(onTakePhotoResult());
222 | }
223 |
224 | if (this.actionPictureObject.getMyPhoto() != null) {
225 | this.actionPictureObject.setMyPhoto(PictureUtils.rotateImage(this.actionPictureObject.getMyPhoto(), rotatePicture));
226 | }
227 | }
228 | }
229 | //endregion
230 | }
231 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Functionallities/FaceRecognition.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Functionallities;
2 |
3 | import android.app.Activity;
4 | import android.graphics.Bitmap;
5 | import android.graphics.Canvas;
6 | import android.graphics.Paint;
7 | import android.graphics.PointF;
8 | import android.graphics.RectF;
9 | import android.util.SparseArray;
10 | import com.frosquivel.magicalcamera.Objects.FaceRecognitionObject;
11 | import com.google.android.gms.vision.Frame;
12 | import com.google.android.gms.vision.face.Face;
13 | import com.google.android.gms.vision.face.FaceDetector;
14 |
15 | import static android.graphics.Color.RED;
16 |
17 | /**
18 | * Created by Fabian Rosales Esquivel (Frosquivel Developer)
19 | * Created Date 06/12/2016.
20 | * Made in Costa Rica
21 | * This is the class for use face recognition
22 | */
23 |
24 | public class FaceRecognition {
25 |
26 | //================================================================================
27 | // Properties and constructor
28 | //================================================================================
29 | //region Properties
30 | private FaceRecognitionObject faceRecognitionInformation;
31 | private FaceDetector detector;
32 |
33 | //Getter and setter methods
34 | public FaceRecognitionObject getFaceRecognitionInformation() {
35 | return faceRecognitionInformation;
36 | }
37 | //endregion
38 |
39 | //region Constructor
40 | public FaceRecognition(){
41 | super();
42 | faceRecognitionInformation = new FaceRecognitionObject();
43 | }
44 | //endregion
45 |
46 | //================================================================================
47 | // Face detector methods
48 | //================================================================================
49 | //region FaceDetector
50 | public Bitmap faceDetector(int stroke, int color, Activity activity, Bitmap photo){
51 | return faceDetection(stroke, color, activity, photo);
52 | }
53 |
54 | public Bitmap faceDetector(Activity activity, Bitmap photo){
55 | return faceDetection(5, RED, activity, photo);
56 | }
57 |
58 | /***
59 | * This method realize the face detection, and this call in another methods
60 | * for automatice the process
61 | * @param stroke the bold of line to show around the face
62 | * @param color the color of rectangle to recognizer the face
63 | * @param activity the currect activity
64 | * @param photo your photo
65 | * @return
66 | */
67 | private Bitmap faceDetection(int stroke, int color, Activity activity, Bitmap photo){
68 | this.detector = new FaceDetector.Builder(activity)
69 | .setMode(FaceDetector.ACCURATE_MODE)
70 | .setLandmarkType(FaceDetector.ALL_LANDMARKS)
71 | .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)
72 | .setTrackingEnabled(false)
73 | .build();
74 | try {
75 | if (false == this.detector.isOperational()) {
76 | return null;
77 | }
78 |
79 | //Add the image on a Frame object
80 | Frame frame = new Frame.Builder()
81 | .setBitmap(photo)
82 | .build();
83 |
84 | //Detect all faces from Frame object
85 | SparseArray faceArray = detector.detect(frame);
86 |
87 | //Do some drawing on faces
88 | Bitmap outBitmap = drawOnFace(faceArray, photo, stroke, color);
89 |
90 | //Releasing the detector object
91 | this.detector.release();
92 | return (outBitmap != null) ? outBitmap : photo;
93 | }catch(Exception ev){
94 | return null;
95 | }
96 | }
97 |
98 |
99 | /**
100 | * Method to drawing on faces
101 | */
102 | private Bitmap drawOnFace(SparseArray faceArray, Bitmap photo, int stroke, int color){
103 | Bitmap outBitmap = Bitmap.createBitmap(photo.getWidth(), photo.getHeight(), Bitmap.Config.RGB_565);
104 | Canvas canvas = new Canvas(outBitmap);
105 | canvas.drawBitmap(photo, 0, 0, null);
106 |
107 | for(int i=0; i < faceArray.size(); i++){
108 | int key = faceArray.keyAt(i);
109 | // get the object by the key.
110 | Face face = faceArray.get(key);
111 | //Drawing rectangle on each face
112 | drawRectangle(canvas, face.getPosition(), face.getWidth(), face.getHeight(),stroke,color);
113 | this.faceRecognitionInformation.setListLandMarkPhoto(face.getLandmarks());
114 | }
115 | return outBitmap;
116 | }
117 |
118 | //draw a rectangle in your bitmap
119 | private void drawRectangle(Canvas canvas, PointF point, float width, float height, int stroke, int color){
120 | Paint paint = new Paint();
121 | paint.setColor(color);
122 | paint.setStrokeWidth(stroke);
123 | paint.setStyle(Paint.Style.STROKE);
124 |
125 | float x1 = point.x;
126 | float y1 = point.y;
127 | float x2 = x1 + width;
128 | float y2 = y1 + height;
129 |
130 | RectF rect = new RectF(x1, y1, x2, y2);
131 | canvas.drawRect(rect, paint);
132 | }
133 | //endregion
134 | }
135 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Functionallities/PrivateInformation.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Functionallities;
2 |
3 | import android.media.ExifInterface;
4 | import com.frosquivel.magicalcamera.Objects.PrivateInformationObject;
5 | import com.frosquivel.magicalcamera.Utilities.Utils;
6 | import java.io.IOException;
7 |
8 | /**
9 | * Created by Fabian Rosales Esquivel (Frosquivel Developer)
10 | * Created Date 07/12/2016.
11 | * Made in Costa Rica
12 | * This class access to information of photographies with exif interface
13 | */
14 |
15 | public class PrivateInformation {
16 |
17 | //properties
18 | private PrivateInformationObject privateInformationObject;
19 | public PrivateInformationObject getPrivateInformationObject() {
20 | return privateInformationObject;
21 | }
22 |
23 | //constructor
24 | public PrivateInformation(){
25 | super();
26 | privateInformationObject = new PrivateInformationObject();
27 | }
28 |
29 | //================================================================================
30 | // Exif interface methods
31 | //================================================================================
32 | private ExifInterface getAllFeatures(String realPath) {
33 | if (!realPath.equals("")) {
34 | ExifInterface exif = null;
35 | try {
36 | exif = new ExifInterface(realPath.toString());
37 | return exif;
38 | } catch (IOException e) {
39 | return exif;
40 | }
41 | } else {
42 | return null;
43 | }
44 | }
45 |
46 | public boolean getImageInformation(String realPath) {
47 | try {
48 | ExifInterface exif = getAllFeatures(realPath);
49 | if (exif != null) {
50 |
51 | float[] latLong = new float[2];
52 | try{
53 | exif.getLatLong(latLong);
54 | privateInformationObject.setLatitude(latLong[0]);
55 | privateInformationObject.setLongitude(latLong[1]);
56 | }catch(Exception ex){}
57 |
58 |
59 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF))) {
60 | privateInformationObject.setLatitudeReference(exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF));
61 | }
62 |
63 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF))) {
64 | privateInformationObject.setLongitudeReference(exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF));
65 | }
66 |
67 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_DATETIME))) {
68 | privateInformationObject.setDateTimeTakePhoto(exif.getAttribute(ExifInterface.TAG_DATETIME));
69 | }
70 |
71 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_ORIENTATION))) {
72 | privateInformationObject.setOrientation(exif.getAttribute(ExifInterface.TAG_ORIENTATION));
73 | }
74 |
75 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_ISO))) {
76 | privateInformationObject.setIso(exif.getAttribute(ExifInterface.TAG_ISO));
77 | }
78 |
79 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_GPS_DATESTAMP))) {
80 | privateInformationObject.setDateStamp(exif.getAttribute(ExifInterface.TAG_GPS_DATESTAMP));
81 | }
82 |
83 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_IMAGE_LENGTH))) {
84 | privateInformationObject.setImageLength(exif.getAttribute(ExifInterface.TAG_IMAGE_LENGTH));
85 | }
86 |
87 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_IMAGE_WIDTH))) {
88 | privateInformationObject.setImageWidth(exif.getAttribute(ExifInterface.TAG_IMAGE_WIDTH));
89 | }
90 |
91 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_MODEL))) {
92 | privateInformationObject.setModelDevice(exif.getAttribute(ExifInterface.TAG_MODEL));
93 | }
94 |
95 | if (Utils.notNullNotFill(exif.getAttribute(ExifInterface.TAG_MAKE))) {
96 | privateInformationObject.setMakeCompany(exif.getAttribute(ExifInterface.TAG_MAKE));
97 | }
98 | return true;
99 | } else {
100 | return false;
101 | }
102 | } catch (Exception ex) {
103 | return false;
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Functionallities/SaveEasyPhoto.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Functionallities;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.graphics.Bitmap;
6 | import android.net.Uri;
7 | import android.os.Environment;
8 |
9 | import com.frosquivel.magicalcamera.MagicalCamera;
10 | import java.io.ByteArrayOutputStream;
11 | import java.io.File;
12 | import java.io.FileOutputStream;
13 | import java.text.DateFormat;
14 | import java.text.SimpleDateFormat;
15 | import java.util.Calendar;
16 |
17 | /**
18 | * Created by Fabian Rosales Esquivel (Frosquivel Developer)
19 | * Created Date 07/12/2016.
20 | * Made in Costa Rica
21 | * This class save the photo bitmap like a real photo in device
22 | */
23 |
24 | public class SaveEasyPhoto {
25 |
26 | //================================================================================
27 | // Save Photo in device
28 | //================================================================================
29 | //region Save Photo in device
30 |
31 | /**
32 | * This library write the file in the device storage or sdcard
33 | *
34 | * @param bitmap the bitmap that you need to write in device
35 | * @param photoName the photo name
36 | * @param directoryName the directory that you need to create the picture
37 | * @param format the format of the photo, maybe png or jpeg
38 | * @param autoIncrementNameByDate is this variable is active the system create
39 | * the photo with a number of the date, hour, and second to diferenciate this
40 | * @return return true if the photo is writen
41 | */
42 | public String writePhotoFile(Bitmap bitmap, String photoName, String directoryName,
43 | Bitmap.CompressFormat format, boolean autoIncrementNameByDate, Activity activity) {
44 |
45 | if (bitmap == null) {
46 | return null;
47 | } else {
48 | ByteArrayOutputStream bytes = new ByteArrayOutputStream();
49 | bitmap.compress(format, 100, bytes);
50 |
51 | DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
52 | String date = df.format(Calendar.getInstance().getTime());
53 |
54 | if (format == MagicalCamera.PNG) {
55 | photoName = (autoIncrementNameByDate) ? photoName + "_" + date + ".png" : photoName + ".png";
56 | } else if (format == MagicalCamera.JPEG) {
57 | photoName = (autoIncrementNameByDate) ? photoName + "_" + date + ".jpeg" : photoName + ".jpeg";
58 | } else if (format == MagicalCamera.WEBP) {
59 | photoName = (autoIncrementNameByDate) ? photoName + "_" + date + ".webp" : photoName + ".webp";
60 | }
61 |
62 | File wallpaperDirectory = null;
63 |
64 | try {
65 | wallpaperDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES + "/" + directoryName + "/");
66 | } catch (Exception ev) {
67 | try {
68 | wallpaperDirectory = Environment.getExternalStorageDirectory();
69 | } catch (Exception ex) {
70 | try {
71 | wallpaperDirectory = Environment.getDataDirectory();
72 | } catch (Exception e) {
73 | wallpaperDirectory = Environment.getRootDirectory();
74 | }
75 | }
76 | }
77 |
78 | if (wallpaperDirectory != null) {
79 | if (!wallpaperDirectory.exists()) {
80 | wallpaperDirectory.exists();
81 | wallpaperDirectory.mkdirs();
82 | }
83 |
84 | File f = new File(wallpaperDirectory, photoName);
85 | try {
86 | f.createNewFile();
87 | FileOutputStream fo = new FileOutputStream(f);
88 | fo.write(bytes.toByteArray());
89 | fo.close();
90 | activity.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
91 | Uri.parse("file://" + f.getAbsolutePath())));
92 |
93 | try {
94 | //Update the System
95 | Uri u = Uri.parse(f.getAbsolutePath());
96 | activity.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, u));
97 | } catch (Exception ex) {
98 | }
99 |
100 | return f.getAbsolutePath();
101 | } catch (Exception ev) {
102 | return null;
103 | }
104 |
105 | } else {
106 | return null;
107 | }
108 | }
109 | }
110 | //endregion
111 | }
112 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Functionallities/URIPaths.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Functionallities;
2 |
3 | import android.content.Context;
4 | import android.net.Uri;
5 | import android.os.Environment;
6 | import android.support.v4.content.FileProvider;
7 |
8 | import com.frosquivel.magicalcamera.Objects.URIPathsObject;
9 | import com.frosquivel.magicalcamera.Provider.PhotoProvider;
10 |
11 | import java.io.File;
12 |
13 | /**
14 | * Created by Fabian Rosales Esquivel (Frosquivel Developer)
15 | * Created Date 07/12/2016.
16 | * Made in Costa Rica
17 | * This class return the uri photo like real uri or fake (for a some jobs)
18 | */
19 |
20 | public class URIPaths {
21 | private URIPathsObject uriPathsObject;
22 | private PrivateInformation privateInformation;
23 | private Context context;
24 |
25 | public URIPaths(PrivateInformation privateInformation, Context context){
26 | this.privateInformation = privateInformation;
27 | this.uriPathsObject = new URIPathsObject();
28 | this.context = context;
29 | }
30 |
31 | public URIPathsObject getUriPathsObject() {
32 | return uriPathsObject;
33 | }
34 |
35 | public void setUriPathsObject(URIPathsObject uriPathsObject) {
36 | this.uriPathsObject = uriPathsObject;
37 | }
38 |
39 | //================================================================================
40 | // Get URI photo for selected photos of device
41 | //================================================================================
42 | // Returns the Uri for a photo stored on memory device
43 | // the real URI for show the information of the photo
44 | // select photos
45 | public Uri getPhotoFileUri(String fileDir) {
46 | File mediaStorageDir = null;
47 | mediaStorageDir = new File("", fileDir);
48 |
49 | Uri photoURI = null;
50 | if (android.os.Build.VERSION.SDK_INT >= 24) {
51 | photoURI = FileProvider.getUriForFile(context,
52 | context.getApplicationContext().getPackageName() + ".provider", mediaStorageDir);
53 | }else{
54 | photoURI = Uri.fromFile(mediaStorageDir);
55 | }
56 |
57 | this.uriPathsObject.setRealPath(mediaStorageDir.getPath());
58 | try {
59 | this.privateInformation.getImageInformation(uriPathsObject.getRealPath());
60 | } catch (Exception ex) {}
61 | return photoURI;
62 | }
63 |
64 |
65 |
66 | // Returns the Uri for a photo stored on memory device
67 | public Uri getPhotoFileUri(String fileName, String fileDir, Context context) {
68 | // Only continue if the SD Card is mounted
69 | if (isExternalStorageAvailable()) {
70 | File mediaStorageDir = null;
71 | mediaStorageDir = new File(context.getExternalFilesDir(Environment.DIRECTORY_PICTURES), fileDir);
72 |
73 | if (mediaStorageDir != null) {
74 | return getUriFiles(mediaStorageDir, fileName);
75 | } else {
76 | mediaStorageDir = new File(context.getFilesDir(), fileDir);
77 | return getUriFiles(mediaStorageDir, fileName);
78 | }
79 | } else {
80 | File mediaStorageDir = new File(
81 | context.getFilesDir(), fileDir);
82 | return getUriFiles(mediaStorageDir, fileName);
83 | }
84 | }
85 |
86 | // return the real URI from files
87 | private Uri getUriFiles(File mediaStorageDir, String fileName) {
88 |
89 | if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()) {
90 | mediaStorageDir.exists();
91 | mediaStorageDir.mkdirs();
92 | }
93 |
94 | try {
95 | return getUriAuxiliar(mediaStorageDir.getPath() + File.separator + fileName);
96 | } catch (Exception ev) {
97 | try {
98 | return getUriAuxiliar(Environment.getExternalStorageDirectory() + "/DCIM/", fileName);
99 | } catch (Exception ex) {
100 | try {
101 | return getUriAuxiliar(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "");
102 | } catch (Exception e) {
103 | try {
104 | return getUriAuxiliar(Environment.getDataDirectory() + "");
105 | } catch (Exception ef) {
106 | return null;
107 | }
108 | }
109 | }
110 | }
111 | }
112 |
113 | /**
114 | * Obtain the Uri from file (like an auxiliar method)
115 | * @param direction the direction string
116 | * @param nameFile the name string
117 | * @return
118 | */
119 | private Uri getUriAuxiliar(String direction, String nameFile) {
120 |
121 | File file = new File(direction, nameFile);
122 | Uri photoURI = null;
123 |
124 | try {
125 |
126 | //8 oreo
127 | if(android.os.Build.VERSION.SDK_INT >= 26){
128 |
129 | photoURI = PhotoProvider.getPhotoUri(file);
130 | //7
131 | }else if (android.os.Build.VERSION.SDK_INT >= 24) {
132 | photoURI = FileProvider.getUriForFile(context,
133 | context.getApplicationContext().getPackageName() + ".provider", file);
134 | }else{
135 | photoURI = Uri.fromFile(file);
136 | }
137 |
138 | this.uriPathsObject.setRealPath(photoURI.getPath());
139 | try {
140 | this.privateInformation.getImageInformation(this.uriPathsObject.getRealPath());
141 | } catch (Exception ev) {}
142 |
143 | return photoURI;
144 | } catch (Exception ex) {
145 |
146 | return null;
147 | }
148 | }
149 |
150 | /**
151 | * Obtain the Uri from file (like an auxiliar method)
152 | * @param direction
153 | * @return
154 | */
155 | private Uri getUriAuxiliar(String direction) {
156 | try {
157 | File file = new File(direction);
158 | Uri photoURI;
159 | //8 oreo
160 | if(android.os.Build.VERSION.SDK_INT >= 26){
161 |
162 | photoURI = PhotoProvider.getPhotoUri(file);
163 | //7
164 | }else if (android.os.Build.VERSION.SDK_INT >= 24) {
165 | photoURI = FileProvider.getUriForFile(context,
166 | context.getApplicationContext().getPackageName() + ".provider", file);
167 | }else{
168 | photoURI = Uri.fromFile(file);
169 | }
170 |
171 | this.uriPathsObject.setRealPath(photoURI.getPath());
172 | return photoURI;
173 | } catch (Exception ex) {
174 | return null;
175 | }
176 | }
177 |
178 | // Returns true if external storage for photos is available
179 | private static boolean isExternalStorageAvailable() {
180 | String state = Environment.getExternalStorageState();
181 | return state.equals(Environment.MEDIA_MOUNTED);
182 | }
183 | //endregion
184 |
185 | }
186 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/MagicalCameraApplication.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera;
2 |
3 | import android.app.Application;
4 | import android.content.res.Configuration;
5 | import android.os.StrictMode;
6 |
7 | /**
8 | * Created by Fabian on 23/02/2019.
9 | */
10 |
11 | public class MagicalCameraApplication extends Application {
12 | // Called when the application is starting, before any other application objects have been created.
13 | // Overriding this method is totally optional!
14 | @Override
15 | public void onCreate() {
16 | super.onCreate();
17 | // Required initialization logic here!
18 | StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
19 | StrictMode.setVmPolicy(builder.build());
20 | }
21 |
22 | // Called by the system when the device configuration changes while your component is running.
23 | // Overriding this method is totally optional!
24 | @Override
25 | public void onConfigurationChanged(Configuration newConfig) {
26 | super.onConfigurationChanged(newConfig);
27 | }
28 |
29 | // This is called when the overall system is running low on memory,
30 | // and would like actively running processes to tighten their belts.
31 | // Overriding this method is totally optional!
32 | @Override
33 | public void onLowMemory() {
34 | super.onLowMemory();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/MagicalPermissions.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera;
2 |
3 | import android.app.Activity;
4 | import android.app.Fragment;
5 | import android.content.Context;
6 | import android.content.pm.PackageManager;
7 | import android.os.Build;
8 | import android.support.v4.content.ContextCompat;
9 |
10 | import java.util.ArrayList;
11 | import java.util.HashMap;
12 | import java.util.Iterator;
13 | import java.util.List;
14 | import java.util.Map;
15 |
16 | /**
17 | * Created by cutiko on 25-02-17.
18 | * This library helps us for request the necessary permissions for use magical camera
19 | */
20 |
21 | public class MagicalPermissions {
22 |
23 | private static final int RC_PERMISSIONS_ACTIVITY = 878;
24 | private static final int RC_PERMISSIONS_FRAGMENT = 879;
25 | private Activity activity;
26 | private Fragment fragment;
27 | private android.support.v4.app.Fragment fragmentV4;
28 | private String[] permissions;
29 | private String[] allPermissions;
30 | private Runnable task;
31 |
32 |
33 |
34 | public MagicalPermissions(Activity activity, String[] permissions) {
35 | this.activity = activity;
36 | this.permissions = permissions;
37 | this.allPermissions = permissions;
38 | }
39 |
40 | public MagicalPermissions(Fragment fragment, String[] permissions) {
41 | this.fragment = fragment;
42 | this.permissions = permissions;
43 | this.allPermissions = permissions;
44 | }
45 |
46 | public MagicalPermissions(android.support.v4.app.Fragment fragmentV4, String[] permissions) {
47 | this.fragmentV4 = fragmentV4;
48 | this.permissions = permissions;
49 | this.allPermissions = permissions;
50 | }
51 |
52 |
53 | public boolean permissionsNeeded() {
54 | return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M);
55 | }
56 |
57 | public void askPermissions(final Runnable task) {
58 | //In case the developer want to do something after the permissions are granted
59 | this.task = task;
60 | if (permissionsNeeded()) {
61 | requestPermissions();
62 | } else {
63 | runPendingTask();
64 | }
65 | }
66 |
67 | public void askPermissions(final Runnable task, String operationType) {
68 | //In case the developer want to do something after the permissions are granted
69 | this.task = task;
70 | if (permissionsNeeded()) {
71 | requestPermissions(operationType);
72 | } else {
73 | runPendingTask();
74 | }
75 | }
76 |
77 | private void requestPermissions() {
78 | executeRequestPermission(null);
79 | }
80 |
81 | private void requestPermissions(String operationType) {
82 | executeRequestPermission(operationType);
83 | }
84 |
85 | private void executeRequestPermission(String operationType) {
86 | Context context = null;
87 | if (activity != null) {
88 | context = activity;
89 | } else {
90 | context = (fragment != null) ? fragment.getActivity() : fragmentV4.getContext();
91 | }
92 |
93 | List permissionListFault = new ArrayList<>();
94 | //obtain the list of permissions faults
95 | for (String permission : permissions) {
96 | if (ContextCompat.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) {
97 | permissionListFault.add(permission);
98 | }
99 | }
100 |
101 | boolean runPendingTaskFlag = true;
102 | //Then only if there are permissions to be requested, only request those
103 | if (permissionListFault.size() > 0) {
104 | //If there are permissions to be requested then we can redefine the original array with the ones we have to take care
105 | permissions = permissionListFault.toArray(new String[permissionListFault.size()]);
106 | runPendingTaskFlag = false;
107 | } else {
108 | runPendingTaskFlag = true;
109 | //But if every permission is granted then go a head and do what you want
110 | runPendingTask();
111 | }
112 |
113 | //validate if have permissions or not for call the request permissions
114 | if (permissionListFault.size() > 0 && !runPendingTaskFlag) {
115 | boolean isCurrentOpetationType = false;
116 | for (int x = 0; this.allPermissions.length > x; x++) {
117 |
118 | boolean isSuccessPermission = true;
119 | for (int i = 0; permissionListFault.size() > i; i++) {
120 | if (permissionListFault.get(i).equals(this.allPermissions[x])) {
121 | isSuccessPermission = false;
122 | }
123 | }
124 |
125 | if (isSuccessPermission) {
126 | if(allPermissions[x] != null && operationType != null){
127 | if (operationType.equals(allPermissions[x])) {
128 | isCurrentOpetationType = true;
129 | runPendingTask();
130 | break;
131 | }
132 | }
133 | }
134 | }
135 |
136 | if (!isCurrentOpetationType) {
137 | //Request permissions is being lint, but that is not a problem in the askPermissions method there is a validation to prevent it in lowe API
138 | //Adding a suppress warning annotation is worst because since android studio 2.3 annotated methods can be marked as dangerous
139 | if (activity != null) {
140 | activity.requestPermissions(permissions, RC_PERMISSIONS_ACTIVITY);
141 | } else if (fragment != null) {
142 | fragment.requestPermissions(permissions, RC_PERMISSIONS_FRAGMENT);
143 | } else if (fragmentV4 != null) {
144 | fragmentV4.requestPermissions(permissions, RC_PERMISSIONS_FRAGMENT);
145 | }
146 | }
147 | }
148 | }
149 |
150 | public Map permissionResult(int requestCode, String[] permissions, int[] grantResults) {
151 | //Returning a map is better to let developer know the permissions and what happened
152 | Map map = new HashMap<>();
153 | if (RC_PERMISSIONS_ACTIVITY == requestCode || RC_PERMISSIONS_FRAGMENT == requestCode) {
154 | boolean validation = true;
155 | for (int i = 0; i < permissions.length; i++) {
156 | int result = grantResults[i];
157 | map.put(permissions[i], (result == PackageManager.PERMISSION_GRANTED));
158 | if (PackageManager.PERMISSION_GRANTED != result) {
159 | validation = false;
160 | }
161 | }
162 | if (validation) {
163 | runPendingTask();
164 | }
165 | }
166 |
167 | return map;
168 | }
169 |
170 | private void runPendingTask() {
171 | if (task != null) {
172 | task.run();
173 | }
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Objects/ActionPictureObject.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Objects;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.graphics.Bitmap;
6 |
7 | /**
8 | * Created by Fabian on 08/12/2016.
9 | */
10 |
11 | public class ActionPictureObject {
12 |
13 | //the max of quality photo
14 | public static final int BEST_QUALITY_PHOTO = 4000;
15 |
16 | //The photo name for uxiliar save picture
17 | public static final String photoNameAuxiliar = "MagicalCamera";
18 |
19 | //properties
20 | //my intent curret fragment (only use for fragments)
21 | private Intent intentFragment;
22 |
23 | //Your own resize picture
24 | private int resizePhoto;
25 |
26 | //my activity variable
27 | private Activity activity;
28 |
29 | //bitmap to set and get
30 | private Bitmap myPhoto;
31 |
32 |
33 | //getters and setters
34 | public Intent getIntentFragment() {
35 | return intentFragment;
36 | }
37 |
38 | public void setIntentFragment(Intent intentFragment) {
39 | this.intentFragment = intentFragment;
40 | }
41 |
42 | public Bitmap getMyPhoto() {
43 | return myPhoto;
44 | }
45 |
46 | public void setMyPhoto(Bitmap myPhoto) {
47 | this.myPhoto = myPhoto;
48 | }
49 |
50 | public int getResizePhoto() {
51 | return resizePhoto;
52 | }
53 |
54 | public void setResizePhoto(int resizePhoto) {
55 | resizePhoto = resizePhoto * 40;
56 | if (resizePhoto <= BEST_QUALITY_PHOTO && resizePhoto > 0)
57 | this.resizePhoto = resizePhoto;
58 | else{
59 | this.resizePhoto = BEST_QUALITY_PHOTO;
60 | }
61 | }
62 |
63 | public Activity getActivity() {
64 | return activity;
65 | }
66 |
67 | public void setActivity(Activity activity) {
68 | this.activity = activity;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Objects/FaceRecognitionObject.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Objects;
2 |
3 | import com.google.android.gms.vision.face.Landmark;
4 | import java.util.List;
5 |
6 | /**
7 | * Created by Fabian on 06/12/2016.
8 | */
9 |
10 | public class FaceRecognitionObject {
11 | //Getters and Setters method
12 | public List listLandMarkPhoto;
13 |
14 | public List getListLandMarkPhoto() {
15 | return listLandMarkPhoto;
16 | }
17 |
18 | public void setListLandMarkPhoto(List listLandMarkPhoto) {
19 | this.listLandMarkPhoto = listLandMarkPhoto;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Objects/MagicalCameraObject.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Objects;
2 |
3 | import android.app.Activity;
4 |
5 | import com.frosquivel.magicalcamera.Functionallities.ActionPicture;
6 | import com.frosquivel.magicalcamera.Functionallities.FaceRecognition;
7 | import com.frosquivel.magicalcamera.Functionallities.PrivateInformation;
8 | import com.frosquivel.magicalcamera.Functionallities.SaveEasyPhoto;
9 | import com.frosquivel.magicalcamera.Functionallities.URIPaths;
10 |
11 | /**
12 | * Created by Fabian on 07/12/2016.
13 | */
14 |
15 | public class MagicalCameraObject {
16 | //================================================================================
17 | // Properties
18 | //================================================================================
19 |
20 | //my activity variable
21 | private Activity activity;
22 |
23 | //the face recognition class for instance
24 | private FaceRecognition faceRecognition;
25 |
26 | //the private information class for instance
27 | private PrivateInformation privateInformation;
28 |
29 | //the private variable of saveEasyPhoto
30 | private SaveEasyPhoto saveEasyPhoto;
31 |
32 | //the actions to take pictures or selected
33 | private ActionPicture actionPicture;
34 |
35 | //the uri of paths class
36 | private URIPaths uriPaths;
37 | //endregion
38 |
39 |
40 | //Constructor
41 | public MagicalCameraObject(Activity activity, int qualityPhoto){
42 | this.activity = activity;
43 | this.faceRecognition = new FaceRecognition();
44 | this.privateInformation = new PrivateInformation();
45 | this.uriPaths = new URIPaths(this.privateInformation, activity);
46 | this.saveEasyPhoto = new SaveEasyPhoto();
47 | this.actionPicture = new ActionPicture(activity, qualityPhoto, this.uriPaths);
48 | }
49 |
50 |
51 | //================================================================================
52 | // Accessors
53 | //================================================================================
54 |
55 | public Activity getActivity() {
56 | return activity;
57 | }
58 |
59 | public void setActivity(Activity activity) {
60 | this.activity = activity;
61 | }
62 |
63 | public FaceRecognition getFaceRecognition() {
64 | return faceRecognition;
65 | }
66 |
67 | public void setFaceRecognition(FaceRecognition faceRecognition) {
68 | this.faceRecognition = faceRecognition;
69 | }
70 |
71 | public PrivateInformation getPrivateInformation() {
72 | return privateInformation;
73 | }
74 |
75 | public void setPrivateInformation(PrivateInformation privateInformation) {
76 | this.privateInformation = privateInformation;
77 | }
78 |
79 | public SaveEasyPhoto getSaveEasyPhoto() {
80 | return saveEasyPhoto;
81 | }
82 |
83 | public void setSaveEasyPhoto(SaveEasyPhoto saveEasyPhoto) {
84 | this.saveEasyPhoto = saveEasyPhoto;
85 | }
86 |
87 | public ActionPicture getActionPicture() {
88 | return actionPicture;
89 | }
90 |
91 | public void setActionPicture(ActionPicture actionPicture) {
92 | this.actionPicture = actionPicture;
93 | }
94 | public URIPaths getUriPaths() {
95 | return uriPaths;
96 | }
97 | //endregion
98 | }
99 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Objects/PermissionGrantedObject.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Objects;
2 |
3 | import android.app.Activity;
4 |
5 | /**
6 | * Created by Fabian on 08/12/2016.
7 | */
8 |
9 | public class PermissionGrantedObject {
10 |
11 | public static final int REQUEST_CAMERA_PERMISSION = 1;
12 | public static final int REQUEST_WRITE_EXTERNAL_STORAGE_PERMISSION = 2;
13 | public static final int REQUEST_READ_EXTERNAL_STORAGE_PERMISSION = 3;
14 | public static final int REQUEST_LOCATION_PERMISSION = 4;
15 | public static final int REQUEST_ALL_PERMISSION = 5;
16 | public static final int REQUEST_IN_OUT_PERMISSION = 6;
17 |
18 | private boolean cameraPermission;
19 | private boolean writeExternalStoragePermission;
20 | private boolean readExternalStoragePermission;
21 | private boolean locationPermission;
22 |
23 | private Activity activity;
24 |
25 | public boolean isReadExternalStoragePermission() {
26 | return readExternalStoragePermission;
27 | }
28 |
29 | public void setReadExternalStoragePermission(boolean readExternalStoragePermission) {
30 | this.readExternalStoragePermission = readExternalStoragePermission;
31 | }
32 |
33 | public boolean isCameraPermission() {
34 | return cameraPermission;
35 | }
36 |
37 | public void setCameraPermission(boolean cameraPermission) {
38 | this.cameraPermission = cameraPermission;
39 | }
40 |
41 | public boolean isWriteExternalStoragePermission() {
42 | return writeExternalStoragePermission;
43 | }
44 |
45 | public void setWriteExternalStoragePermission(boolean writeExternalStoragePermission) {
46 | this.writeExternalStoragePermission = writeExternalStoragePermission;
47 | }
48 |
49 | public boolean isLocationPermission() {
50 | return locationPermission;
51 | }
52 |
53 | public void setLocationPermission(boolean locationPermission) {
54 | this.locationPermission = locationPermission;
55 | }
56 |
57 | public Activity getActivity() {
58 | return activity;
59 | }
60 |
61 | public void setActivity(Activity activity) {
62 | this.activity = activity;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Objects/PrivateInformationObject.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Objects;
2 |
3 | /**
4 | * Created by Fabian on 07/12/2016.
5 | */
6 |
7 | public class PrivateInformationObject {
8 | //Properties of face recognition
9 | float latitude;
10 | String latitudeReference;
11 | float longitude;
12 | String longitudeReference;
13 | String dateTimeTakePhoto;
14 | String imageLength;
15 | String imageWidth;
16 | String modelDevice;
17 | String makeCompany;
18 | String orientation;
19 | String iso;
20 | String dateStamp;
21 |
22 | public void setLongitudeReference(String longitudeReference) {
23 | this.longitudeReference = longitudeReference;
24 | }
25 |
26 | public void setDateStamp(String dateStamp) {
27 | this.dateStamp = dateStamp;
28 | }
29 |
30 | public void setDateTimeTakePhoto(String dateTimeTakePhoto) {
31 | this.dateTimeTakePhoto = dateTimeTakePhoto;
32 | }
33 |
34 | public void setImageLength(String imageLength) {
35 | this.imageLength = imageLength;
36 | }
37 |
38 | public void setImageWidth(String imageWidth) {
39 | this.imageWidth = imageWidth;
40 | }
41 |
42 | public void setIso(String iso) {
43 | this.iso = iso;
44 | }
45 |
46 | public void setLatitude(float latitude) {
47 | this.latitude = latitude;
48 | }
49 |
50 | public void setLatitudeReference(String latitudeReference) {
51 | this.latitudeReference = latitudeReference;
52 | }
53 |
54 | public void setLongitude(float longitude) {
55 | this.longitude = longitude;
56 | }
57 |
58 | public void setMakeCompany(String makeCompany) {
59 | this.makeCompany = makeCompany;
60 | }
61 |
62 | public void setModelDevice(String modelDevice) {
63 | this.modelDevice = modelDevice;
64 | }
65 |
66 | public void setOrientation(String orientation) {
67 | this.orientation = orientation;
68 | }
69 |
70 | public float getLatitude() {
71 | return latitude;
72 | }
73 |
74 | public String getLatitudeReference() {
75 | return latitudeReference;
76 | }
77 |
78 | public float getLongitude() {
79 | return longitude;
80 | }
81 |
82 | public String getLongitudeReference() {
83 | return longitudeReference;
84 | }
85 |
86 | public String getMakeCompany() {
87 | return makeCompany;
88 | }
89 |
90 | public String getModelDevice() {
91 | return modelDevice;
92 | }
93 |
94 | public String getDateTimeTakePhoto() {
95 | return dateTimeTakePhoto;
96 | }
97 |
98 | public String getImageLength() {
99 | return imageLength;
100 | }
101 |
102 | public String getImageWidth() {
103 | return imageWidth;
104 | }
105 |
106 | public String getOrientation() {
107 | return orientation;
108 | }
109 |
110 | public String getIso() {
111 | return iso;
112 | }
113 |
114 | public String getDateStamp() {
115 | return dateStamp;
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Objects/URIPathsObject.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Objects;
2 |
3 | /**
4 | * Created by Fabian on 08/12/2016.
5 | */
6 |
7 | public class URIPathsObject {
8 | //THIS IS THE REAL PATH IN DEVICE
9 | private String realPath;
10 |
11 | public String getRealPath() {
12 | return realPath;
13 | }
14 |
15 | public void setRealPath(String realPath) {
16 | this.realPath = realPath;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Provider/PhotoProvider.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Provider;
2 |
3 | import android.content.ContentProvider;
4 | import android.content.ContentValues;
5 | import android.database.Cursor;
6 | import android.net.Uri;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 |
10 | import java.io.File;
11 |
12 | /**
13 | * Created by Fabian on 23/02/2019.
14 | */
15 |
16 | public class PhotoProvider extends ContentProvider {
17 |
18 | public static final String CONTENT_PROVIDER_AUTHORITY = "com.frosquivel.magicalcamera.Provider.PhotoProvider";
19 |
20 | @Override
21 | public boolean onCreate() {
22 | return true;
23 | }
24 |
25 | @Nullable
26 | @Override
27 | public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
28 | return null;
29 | }
30 |
31 | @Nullable
32 | @Override
33 | public String getType(@NonNull Uri uri) {
34 | return null;
35 | }
36 |
37 | @Nullable
38 | @Override
39 | public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
40 | return null;
41 | }
42 |
43 | @Override
44 | public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
45 | return 0;
46 | }
47 |
48 | @Override
49 | public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
50 | return 0;
51 | }
52 |
53 | public static Uri getPhotoUri(File file) {
54 | Uri outputUri = Uri.fromFile(file);
55 | Uri.Builder builder = new Uri.Builder()
56 | .authority(CONTENT_PROVIDER_AUTHORITY)
57 | .scheme("file")
58 | .path(outputUri.getPath())
59 | .query(outputUri.getQuery())
60 | .fragment(outputUri.getFragment());
61 |
62 | return builder.build();
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Utilities/ConvertSimpleImage.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Utilities;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.os.AsyncTask;
7 | import android.util.Base64;
8 |
9 | import java.io.ByteArrayOutputStream;
10 |
11 | /**
12 | * Created by Fabian on 07/12/2016.
13 | */
14 |
15 | public class ConvertSimpleImage {
16 |
17 | //================================================================================
18 | // Conversion Methods
19 | //================================================================================
20 |
21 | public static Bitmap resizeImageRunTime(byte[] byteArray, int width, int height,boolean isFilter){
22 | Bitmap b = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
23 | return Bitmap.createScaledBitmap(b, width, height, isFilter);
24 | }
25 |
26 | //region Conversion Methods
27 | public static byte[] bitmapToBytes(Bitmap bitmap, Bitmap.CompressFormat format) {
28 | ByteArrayOutputStream stream = new ByteArrayOutputStream();
29 | bitmap.compress(format, 100, stream);
30 | return stream.toByteArray();
31 | }
32 |
33 | public static Bitmap bytesToBitmap(byte[] byteArray) {
34 | return BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
35 | }
36 |
37 | public static Bitmap bytesToBitmap(byte[] byteArray, Bitmap.CompressFormat format) {
38 | Bitmap bitmap = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
39 | ByteArrayOutputStream stream = new ByteArrayOutputStream();
40 | bitmap.compress(format, 100, stream);
41 | return bitmap;
42 | }
43 |
44 | public static String bytesToStringBase64(byte[] byteArray) {
45 | StringBuilder base64 = new StringBuilder(Base64.encodeToString(byteArray, Base64.DEFAULT));
46 | return base64.toString();
47 | }
48 |
49 | public static byte[] stringBase64ToBytes(String stringBase64) {
50 | byte[] byteArray = Base64.decode(stringBase64, Base64.DEFAULT);
51 | return byteArray;
52 | }
53 | //endregion
54 | }
55 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Utilities/PictureUtils.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Utilities;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.Matrix;
5 | import android.os.Build;
6 |
7 | import com.frosquivel.magicalcamera.Objects.MagicalCameraObject;
8 |
9 | /**
10 | * Created by Fabian on 08/12/2016.
11 | */
12 |
13 | public class PictureUtils {
14 | //===============================================================================
15 | // Utils methods, resize and get Photo Uri and others
16 | //================================================================================
17 |
18 | /**
19 | * Rotate the bitmap if the image is in landscape camera
20 | * @param source
21 | * @param angle
22 | * @return
23 | */
24 | public static Bitmap rotateImage(Bitmap source, float angle) {
25 | Bitmap retVal;
26 | Matrix matrix = new Matrix();
27 | matrix.postRotate(angle);
28 | retVal = Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true);
29 | return retVal;
30 | }
31 |
32 | /**
33 | * This method resize the photo
34 | *
35 | * @param realImage the bitmap of image
36 | * @param maxImageSize the max image size percentage
37 | * @param filter the filter
38 | * @return a bitmap of the photo rezise
39 | */
40 | public static Bitmap resizePhoto(Bitmap realImage, float maxImageSize,
41 | boolean filter) {
42 | float ratio = Math.min(
43 | (float) maxImageSize / realImage.getWidth(),
44 | (float) maxImageSize / realImage.getHeight());
45 | int width = Math.round((float) ratio * realImage.getWidth());
46 | int height = Math.round((float) ratio * realImage.getHeight());
47 |
48 | Bitmap newBitmap = Bitmap.createScaledBitmap(realImage, width,
49 | height, filter);
50 | return newBitmap;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/java/com/frosquivel/magicalcamera/Utilities/Utils.java:
--------------------------------------------------------------------------------
1 | package com.frosquivel.magicalcamera.Utilities;
2 |
3 | /**
4 | * Created by Fabian on 06/12/2016.
5 | */
6 |
7 | public class Utils {
8 |
9 | //validate if the string isnull or empty
10 | public static boolean notNullNotFill(String validate) {
11 | if (validate != null) {
12 | if (!validate.trim().equals("")) {
13 | return true;
14 | } else {
15 | return false;
16 | }
17 | } else {
18 | return false;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MagicalCamera
3 |
4 |
--------------------------------------------------------------------------------
/magicalcamera/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/maven_push.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Chris Banes
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | apply plugin: 'com.jfrog.bintray'
18 | apply plugin: 'com.github.dcendents.android-maven'
19 |
20 | version = VERSION_NAME
21 | group = GROUP
22 |
23 | // Bintray
24 | Properties properties = new Properties()
25 | properties.load(project.rootProject.file('local.properties').newDataInputStream())
26 |
27 | bintray {
28 | user = properties.getProperty("bintray.user")
29 | key = properties.getProperty("bintray.apikey")
30 |
31 | configurations = ['archives']
32 | pkg {
33 | repo = 'maven'
34 | name = POM_ARTIFACT_ID
35 | desc = POM_DESCRIPTION
36 | websiteUrl = POM_URL
37 | issueTrackerUrl = POM_ISSUE_URL
38 | vcsUrl = POM_SCM_URL
39 | licenses = ["Apache-2.0"]
40 | publish = true
41 | publicDownloadNumbers = true
42 | version {
43 | desc = POM_DESCRIPTION
44 | gpg {
45 | sign = true //Determines whether to GPG sign the files. The default is false
46 | passphrase = properties.getProperty("bintray.gpg.password")
47 | //Optional. The passphrase for GPG signing'
48 | }
49 |
50 | mavenCentralSync {
51 | sync = true
52 | user = properties.getProperty("bintray.oss.user")
53 | password = properties.getProperty("bintray.oss.password")
54 | close = '1'
55 | }
56 | }
57 | }
58 | }
59 |
60 | if (project.getPlugins().hasPlugin('com.android.application') ||
61 | project.getPlugins().hasPlugin('com.android.library')) {
62 | install {
63 | repositories.mavenInstaller {
64 | configuration = configurations.archives
65 |
66 | pom.groupId = GROUP
67 | pom.artifactId = POM_ARTIFACT_ID
68 | pom.version = VERSION_NAME
69 |
70 | pom.project {
71 | name POM_NAME
72 | packaging POM_PACKAGING
73 | description POM_DESCRIPTION
74 | url POM_URL
75 |
76 | scm {
77 | url POM_SCM_URL
78 | connection POM_SCM_CONNECTION
79 | developerConnection POM_SCM_DEV_CONNECTION
80 | }
81 |
82 | licenses {
83 | license {
84 | name POM_LICENCE_NAME
85 | url POM_LICENCE_URL
86 | distribution POM_LICENCE_DIST
87 | }
88 | }
89 |
90 | developers {
91 | developer {
92 | id POM_DEVELOPER_ID
93 | name POM_DEVELOPER_NAME
94 | }
95 | }
96 | }
97 | }
98 | }
99 |
100 | task androidJavadocs(type: Javadoc) {
101 | source = android.sourceSets.main.java.source
102 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
103 | }
104 |
105 | task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
106 | classifier = 'javadoc'
107 | from androidJavadocs.destinationDir
108 | }
109 |
110 | task androidSourcesJar(type: Jar) {
111 | classifier = 'sources'
112 | from android.sourceSets.main.java.source
113 | }
114 | } else {
115 | install {
116 | repositories.mavenInstaller {
117 | pom.groupId = GROUP
118 | pom.artifactId = POM_ARTIFACT_ID
119 | pom.version = VERSION_NAME
120 |
121 | pom.project {
122 | name POM_NAME
123 | packaging POM_PACKAGING
124 | description POM_DESCRIPTION
125 | url POM_URL
126 |
127 | scm {
128 | url POM_SCM_URL
129 | connection POM_SCM_CONNECTION
130 | developerConnection POM_SCM_DEV_CONNECTION
131 | }
132 |
133 | licenses {
134 | license {
135 | name POM_LICENCE_NAME
136 | url POM_LICENCE_URL
137 | distribution POM_LICENCE_DIST
138 | }
139 | }
140 |
141 | developers {
142 | developer {
143 | id POM_DEVELOPER_ID
144 | name POM_DEVELOPER_NAME
145 | }
146 | }
147 | }
148 | }
149 | }
150 |
151 | task sourcesJar(type: Jar, dependsOn: classes) {
152 | classifier = 'sources'
153 | from sourceSets.main.allSource
154 | }
155 |
156 | task javadocJar(type: Jar, dependsOn: javadoc) {
157 | classifier = 'javadoc'
158 | from javadoc.destinationDir
159 | }
160 | }
161 |
162 | if (JavaVersion.current().isJava8Compatible()) {
163 | allprojects {
164 | tasks.withType(Javadoc) {
165 | options.addStringOption('Xdoclint:none', '-quiet')
166 | }
167 | }
168 | }
169 |
170 | artifacts {
171 | if (project.getPlugins().hasPlugin('com.android.application') ||
172 | project.getPlugins().hasPlugin('com.android.library')) {
173 | archives androidSourcesJar
174 | archives androidJavadocsJar
175 | } else {
176 | archives sourcesJar
177 | archives javadocJar
178 | }
179 | }
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 6.0.0
6 | com.frosquivel
7 | magicalcamera
8 | 6.0.0
9 | aar
10 | magicalcamera
11 | You can take photo easy and save too
12 | https://github.com/fabian7593/MagicalCamera
13 |
14 |
15 | The Apache Software License, Version 2.0
16 | http://www.apache.org/licenses/LICENSE-2.0.txt
17 |
18 |
19 |
20 |
21 | frosquiveldev
22 | Fabian Rosales - Frosquivel Developer
23 | fabian7593@gmail.com
24 |
25 |
26 |
27 | https://github.com/fabian7593/MagicalCamera.git
28 | https://github.com/fabian7593/MagicalCamera.git
29 | https://github.com/fabian7593/MagicalCamera
30 |
31 |
32 |
33 | com.android.support
34 | appcompat-v7
35 | 24.0.0-alpha1
36 | compile
37 |
38 |
39 | com.google.android.gms
40 | play-services
41 | 7.8+
42 | compile
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':magicalcamera'
2 |
--------------------------------------------------------------------------------