├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── scopes
│ └── scope_settings.xml
└── vcs.xml
├── Documentation
├── allclasses-frame.html
├── allclasses-noframe.html
├── com
│ └── hp
│ │ └── mss
│ │ ├── hpprint
│ │ ├── ApplicationTest.html
│ │ ├── activity
│ │ │ ├── PrintPreview.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── adapter
│ │ │ ├── HPPrintDocumentAdapter.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── model
│ │ │ ├── ApplicationMetricsData.html
│ │ │ ├── ImagePrintItem.html
│ │ │ ├── PDFPrintItem.html
│ │ │ ├── PrintItem.ScaleType.html
│ │ │ ├── PrintItem.html
│ │ │ ├── PrintJob.ItemType.html
│ │ │ ├── PrintJob.html
│ │ │ ├── PrintJobData.ItemType.html
│ │ │ ├── PrintJobData.html
│ │ │ ├── PrintMetricsData.html
│ │ │ ├── asset
│ │ │ │ ├── Asset.html
│ │ │ │ ├── ImageAsset.MeasurementUnits.html
│ │ │ │ ├── ImageAsset.html
│ │ │ │ ├── package-frame.html
│ │ │ │ ├── package-summary.html
│ │ │ │ └── package-tree.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ ├── package-frame.html
│ │ ├── package-summary.html
│ │ ├── package-tree.html
│ │ ├── util
│ │ │ ├── FontUtil.html
│ │ │ ├── GAUtil.html
│ │ │ ├── ImageLoaderUtil.html
│ │ │ ├── PrintPluginHelper.PluginHelperListener.html
│ │ │ ├── PrintPluginHelper.html
│ │ │ ├── PrintPluginInstaller.OnInstallPluginListener.html
│ │ │ ├── PrintPluginInstaller.html
│ │ │ ├── PrintUtil.OnPrintDataCollectedListener.html
│ │ │ ├── PrintUtil.PackageStatus.html
│ │ │ ├── PrintUtil.PrintMetricsListener.html
│ │ │ ├── PrintUtil.html
│ │ │ ├── SnapShotsMediaPrompt.SnapShotsPromptListener.html
│ │ │ ├── SnapShotsMediaPrompt.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ └── view
│ │ │ ├── PagePreviewView.ImageLoaderTask.html
│ │ │ ├── PagePreviewView.LoaderParams.html
│ │ │ ├── PagePreviewView.html
│ │ │ ├── package-frame.html
│ │ │ ├── package-summary.html
│ │ │ └── package-tree.html
│ │ └── printsdksample
│ │ ├── ApplicationTest.html
│ │ ├── BuildConfig.html
│ │ ├── MainActivity.html
│ │ ├── R.anim.html
│ │ ├── R.array.html
│ │ ├── R.attr.html
│ │ ├── R.bool.html
│ │ ├── R.color.html
│ │ ├── R.dimen.html
│ │ ├── R.drawable.html
│ │ ├── R.html
│ │ ├── R.id.html
│ │ ├── R.integer.html
│ │ ├── R.layout.html
│ │ ├── R.menu.html
│ │ ├── R.mipmap.html
│ │ ├── R.string.html
│ │ ├── R.style.html
│ │ ├── R.styleable.html
│ │ ├── package-frame.html
│ │ ├── package-summary.html
│ │ └── package-tree.html
├── constant-values.html
├── deprecated-list.html
├── help-doc.html
├── index-files
│ ├── index-1.html
│ ├── index-10.html
│ ├── index-11.html
│ ├── index-12.html
│ ├── index-13.html
│ ├── index-14.html
│ ├── index-15.html
│ ├── index-16.html
│ ├── index-17.html
│ ├── index-18.html
│ ├── index-19.html
│ ├── index-2.html
│ ├── index-20.html
│ ├── index-21.html
│ ├── index-3.html
│ ├── index-4.html
│ ├── index-5.html
│ ├── index-6.html
│ ├── index-7.html
│ ├── index-8.html
│ └── index-9.html
├── index.html
├── overview-frame.html
├── overview-summary.html
├── overview-tree.html
├── package-list
├── script.js
└── stylesheet.css
├── DroidPrint.iml
├── PrintSDKSample
├── .gitignore
├── .idea
│ ├── .name
│ ├── compiler.xml
│ ├── copyright
│ │ ├── HP_Copyright.xml
│ │ └── profiles_settings.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── PrintSDKSample.iml
├── app
│ ├── .gitignore
│ ├── app.iml
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── hp
│ │ │ └── mss
│ │ │ └── printsdksample
│ │ │ └── ApplicationTest.java
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ ├── 4x5.pdf
│ │ ├── 4x6.pdf
│ │ ├── 5x7.pdf
│ │ ├── 8.5x11.pdf
│ │ └── t8.5x11.png
│ │ ├── java
│ │ └── com
│ │ │ └── hp
│ │ │ └── mss
│ │ │ └── printsdksample
│ │ │ ├── activity
│ │ │ └── MainActivity.java
│ │ │ ├── adapter
│ │ │ └── ViewPagerAdapter.java
│ │ │ └── fragment
│ │ │ ├── TabFragmentPrintHelp.java
│ │ │ └── TabFragmentPrintLayout.java
│ │ └── res
│ │ ├── drawable
│ │ ├── dark_gradient_bg.xml
│ │ ├── t4x5.png
│ │ ├── t4x6.png
│ │ ├── t5x7.png
│ │ ├── t85x11.png
│ │ └── tab_shadow.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── tab_fragment_print_help.xml
│ │ └── tab_fragment_print_layout.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-ja
│ │ └── printSDKSample_strings.ja.xml
│ │ ├── values-pt
│ │ └── printSDKSample_strings.pt.xml
│ │ ├── values-tr
│ │ └── printSDKSample_strings.tr.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ ├── values-zh
│ │ └── strings.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── features
│ ├── event_metrics.feature
│ ├── home.feature
│ ├── pages
│ │ └── home_screen.rb
│ ├── plugin_helper.feature
│ ├── print.feature
│ ├── print_metrics.feature
│ ├── step_definitions
│ │ ├── calabash_steps.rb
│ │ ├── common_steps.rb
│ │ ├── event_metrics_steps.rb
│ │ ├── home_steps.rb
│ │ ├── plugin_helper_steps.rb
│ │ ├── print_metrics_steps.rb
│ │ ├── print_plugin_steps.rb
│ │ ├── print_steps.rb
│ │ └── print_verification_steps.rb
│ └── support
│ │ ├── 03_helper_methods.rb
│ │ ├── app_installation_hooks.rb
│ │ ├── app_life_cycle_hooks.rb
│ │ ├── appium_utils.rb
│ │ ├── config.json
│ │ ├── env.rb
│ │ ├── hooks.rb
│ │ ├── runme.sh
│ │ └── utilsforautomation.rb
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── README.md
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── mobileprintsdk
├── .gitignore
├── app.iml
├── build.gradle
├── hpprintsdk.iml
├── hpprinttest.iml
├── libs
│ └── app-debug.aar
├── mobileprintsdk.iml
├── printutil.iml
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── hp
│ │ └── mss
│ │ └── hpprint
│ │ └── ApplicationTest.java
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── fonts
│ │ └── HPSimplified_Rg.ttf
│ ├── java
│ └── com
│ │ └── hp
│ │ └── mss
│ │ └── hpprint
│ │ ├── activity
│ │ ├── PrintHelp.java
│ │ ├── PrintPluginManagerActivity.java
│ │ ├── PrintPreview.java
│ │ └── PrintServicePluginInformation.java
│ │ ├── adapter
│ │ ├── HPPrintDocumentAdapter.java
│ │ └── PrintPluginAdapter.java
│ │ ├── model
│ │ ├── ApplicationMetricsData.java
│ │ ├── ImagePrintItem.java
│ │ ├── PDFPrintItem.java
│ │ ├── PrintItem.java
│ │ ├── PrintJobData.java
│ │ ├── PrintMetricsData.java
│ │ ├── PrintPlugin.java
│ │ └── asset
│ │ │ ├── Asset.java
│ │ │ ├── ImageAsset.java
│ │ │ └── PDFAsset.java
│ │ ├── util
│ │ ├── EventMetricsCollector.java
│ │ ├── FontUtil.java
│ │ ├── ImageLoaderUtil.java
│ │ ├── MetricsUtil.java
│ │ ├── PrintMetricsCollector.java
│ │ ├── PrintPluginStatusHelper.java
│ │ ├── PrintUtil.java
│ │ └── SnapShotsMediaPrompt.java
│ │ └── view
│ │ └── PagePreviewView.java
│ └── res
│ ├── drawable-hdpi
│ ├── ic_mobile_printing.png
│ ├── ic_mobile_printing_text.png
│ ├── ic_print_service_help_enable.png
│ ├── ic_print_service_help_plugin_icon.png
│ ├── ic_printer_error_icon.png
│ ├── ic_printscreen_print_instructions.png
│ ├── ic_support.png
│ └── ic_wifi_icon.png
│ ├── drawable-mdpi
│ ├── ic_launcher.png
│ └── ic_printscreen_print_instructions.png
│ ├── drawable-xhdpi
│ ├── ann1.png
│ ├── ic_back_icon.png
│ ├── ic_launcher.png
│ └── ic_printscreen_print_instructions.png
│ ├── drawable-xxhdpi
│ ├── brother.png
│ ├── canon.png
│ ├── disabled.png
│ ├── down_arrow.png
│ ├── downloading_arrow.png
│ ├── enable.png
│ ├── enabled.png
│ ├── epson.png
│ ├── hp.png
│ ├── ic_green_question.png
│ ├── ic_help_icon.png
│ ├── ic_launcher.png
│ ├── ic_play.png
│ ├── ic_print_preview_print_button.png
│ ├── ic_printscreen_print_instructions.png
│ ├── mopria.png
│ ├── other.png
│ ├── samsung.png
│ ├── update.png
│ └── x.png
│ ├── drawable-xxxhdpi
│ └── ic_printscreen_print_instructions.png
│ ├── layout-large
│ ├── activity_print_help.xml
│ └── printer_service_plugin_information.xml
│ ├── layout
│ ├── activity_print_help.xml
│ ├── activity_print_plugin_manger.xml
│ ├── activity_print_preview.xml
│ ├── checkbox.xml
│ ├── dialog_before_enable_tips.xml
│ ├── item_print_plugin_service.xml
│ └── printer_service_plugin_information.xml
│ ├── menu
│ ├── menu_print_plugin_manager.xml
│ └── menu_print_preview.xml
│ ├── values-cs
│ └── strings.xml
│ ├── values-de
│ └── strings.xml
│ ├── values-es-rxl
│ └── strings.xml
│ ├── values-es
│ └── strings.xml
│ ├── values-fr-rca
│ └── strings.xml
│ ├── values-fr
│ └── strings.xml
│ ├── values-it
│ └── strings.xml
│ ├── values-ja
│ └── strings.xml
│ ├── values-nl
│ └── strings.xml
│ ├── values-pl
│ └── strings.xml
│ ├── values-pt-rbr
│ └── strings.xml
│ ├── values-pt
│ └── strings.xml
│ ├── values-ru
│ └── strings.xml
│ ├── values-tr
│ └── strings.xml
│ ├── values-v21
│ └── strings.xml
│ ├── values-w820dp
│ └── dimens.xml
│ ├── values-zh
│ └── strings.xml
│ └── values
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | /.idea/dictionaries
6 | .DS_Store
7 | /build
8 | hpprint_ver.txt
9 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | DroidPrint
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
23 |
24 |
--------------------------------------------------------------------------------
/.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 | 1.7
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Documentation/allclasses-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | All Classes
7 |
8 |
9 |
10 |
11 |
12 | All Classes
13 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Documentation/allclasses-noframe.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | All Classes
7 |
8 |
9 |
10 |
11 |
12 | All Classes
13 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/hpprint/activity/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.hpprint.activity
7 |
8 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/hpprint/adapter/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.hpprint.adapter
7 |
8 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/hpprint/model/asset/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.hpprint.model.asset
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
Interfaces
15 |
18 |
Classes
19 |
22 |
Enums
23 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/hpprint/model/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.hpprint.model
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
Classes
15 |
22 |
Enums
23 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/hpprint/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.hpprint
7 |
8 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/hpprint/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.hpprint Class Hierarchy
7 |
8 |
9 |
10 |
11 |
12 |
22 |
25 |
26 |
43 |
70 |
71 |
78 |
79 |
Class Hierarchy
80 |
81 | - java.lang.Object
82 |
83 | - <any>
84 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
110 |
111 |
112 | - Prev
113 | - Next
114 |
115 |
119 |
122 |
123 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/hpprint/util/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.hpprint.util
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
Interfaces
15 |
20 |
Classes
21 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/hpprint/view/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.hpprint.view
7 |
8 |
9 |
10 |
11 |
12 |
13 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Documentation/com/hp/mss/printsdksample/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.hp.mss.printsdksample
7 |
8 |
9 |
10 |
11 |
12 |
13 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Documentation/deprecated-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Deprecated List
7 |
8 |
9 |
10 |
11 |
12 |
22 |
25 |
26 |
43 |
70 |
71 |
75 |
76 |
93 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/Documentation/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Generated Documentation (Untitled)
7 |
59 |
60 |
74 |
75 |
--------------------------------------------------------------------------------
/Documentation/overview-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Overview List
7 |
8 |
9 |
10 |
11 |
12 |
13 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Documentation/package-list:
--------------------------------------------------------------------------------
1 | com.hp.mss.hpprint
2 | com.hp.mss.hpprint.activity
3 | com.hp.mss.hpprint.adapter
4 | com.hp.mss.hpprint.model
5 | com.hp.mss.hpprint.model.asset
6 | com.hp.mss.hpprint.util
7 | com.hp.mss.hpprint.view
8 | com.hp.mss.printsdksample
9 |
--------------------------------------------------------------------------------
/Documentation/script.js:
--------------------------------------------------------------------------------
1 | function show(type)
2 | {
3 | count = 0;
4 | for (var key in methods) {
5 | var row = document.getElementById(key);
6 | if ((methods[key] & type) != 0) {
7 | row.style.display = '';
8 | row.className = (count++ % 2) ? rowColor : altColor;
9 | }
10 | else
11 | row.style.display = 'none';
12 | }
13 | updateTabs(type);
14 | }
15 |
16 | function updateTabs(type)
17 | {
18 | for (var value in tabs) {
19 | var sNode = document.getElementById(tabs[value][0]);
20 | var spanNode = sNode.firstChild;
21 | if (value == type) {
22 | sNode.className = activeTableTab;
23 | spanNode.innerHTML = tabs[value][1];
24 | }
25 | else {
26 | sNode.className = tableTab;
27 | spanNode.innerHTML = "" + tabs[value][1] + "";
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/DroidPrint.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/PrintSDKSample/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 | /captures
8 |
--------------------------------------------------------------------------------
/PrintSDKSample/.idea/.name:
--------------------------------------------------------------------------------
1 | PrintSDKSample
--------------------------------------------------------------------------------
/PrintSDKSample/.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 |
--------------------------------------------------------------------------------
/PrintSDKSample/.idea/copyright/HP_Copyright.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PrintSDKSample/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/PrintSDKSample/.idea/gradle.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 |
--------------------------------------------------------------------------------
/PrintSDKSample/.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 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/PrintSDKSample/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/PrintSDKSample/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/PrintSDKSample/PrintSDKSample.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | apply plugin: 'com.android.application'
14 |
15 | android {
16 | compileSdkVersion 23
17 | buildToolsVersion "21.1.2"
18 |
19 | defaultConfig {
20 | applicationId "com.hp.mss.printsdksample"
21 | minSdkVersion 19
22 | targetSdkVersion 22
23 | versionCode 1
24 | versionName "1.0"
25 | }
26 | buildTypes {
27 | release {
28 | minifyEnabled false
29 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30 | }
31 | }
32 |
33 | lintOptions {
34 | abortOnError false
35 | }
36 | }
37 |
38 | dependencies {
39 | compile fileTree(dir: 'libs', include: ['*.jar'])
40 | compile project(':hpprintsdk')
41 | compile 'com.android.support:appcompat-v7:23.2.1'
42 | compile 'com.android.support:design:23.2.1'
43 | compile 'com.android.support:support-v4:23.2.1'
44 | }
45 |
--------------------------------------------------------------------------------
/PrintSDKSample/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 /Users/panini/Android-sdk/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 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/androidTest/java/com/hp/mss/printsdksample/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.printsdksample;
14 |
15 | import android.app.Application;
16 | import android.test.ApplicationTestCase;
17 |
18 | /**
19 | * Testing Fundamentals
20 | */
21 | public class ApplicationTest extends ApplicationTestCase {
22 | public ApplicationTest() {
23 | super(Application.class);
24 | }
25 | }
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
16 |
17 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/assets/4x5.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/assets/4x5.pdf
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/assets/4x6.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/assets/4x6.pdf
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/assets/5x7.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/assets/5x7.pdf
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/assets/8.5x11.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/assets/8.5x11.pdf
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/assets/t8.5x11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/assets/t8.5x11.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/java/com/hp/mss/printsdksample/activity/MainActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.printsdksample.activity;
14 |
15 | import android.os.Bundle;
16 | import android.support.design.widget.TabLayout;
17 | import android.support.v4.view.ViewPager;
18 | import android.support.v7.app.AppCompatActivity;
19 | import android.support.v7.widget.Toolbar;
20 |
21 | import com.hp.mss.printsdksample.R;
22 | import com.hp.mss.printsdksample.adapter.ViewPagerAdapter;
23 | import com.hp.mss.printsdksample.fragment.TabFragmentPrintHelp;
24 | import com.hp.mss.printsdksample.fragment.TabFragmentPrintLayout;
25 |
26 |
27 | public class MainActivity extends AppCompatActivity {
28 | TabFragmentPrintLayout printLayoutFragment;
29 | TabFragmentPrintHelp printHelpFragment;
30 |
31 | @Override
32 | protected void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 | setContentView(R.layout.activity_main);
35 |
36 | Toolbar toolbar = (Toolbar) findViewById(R.id.sample_toolbar);
37 | setSupportActionBar(toolbar);
38 |
39 | ViewPager viewPager = (ViewPager) findViewById(R.id.sample_viewpager);
40 | setupViewPager(viewPager);
41 |
42 | TabLayout tabLayout = (TabLayout) findViewById(R.id.sample_tablayout);
43 | tabLayout.setupWithViewPager(viewPager);
44 |
45 | }
46 |
47 | private void setupViewPager(ViewPager viewPager) {
48 | ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());
49 | printLayoutFragment = new TabFragmentPrintLayout();
50 | printHelpFragment = new TabFragmentPrintHelp();
51 |
52 | adapter.addFrag(printLayoutFragment, getResources().getString(R.string.print_settings));
53 | adapter.addFrag(printHelpFragment, getResources().getString(R.string.printing_help));
54 |
55 | viewPager.setAdapter(adapter);
56 | }
57 |
58 | @Override
59 | protected void onResume() {
60 | super.onResume();
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/java/com/hp/mss/printsdksample/adapter/ViewPagerAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.printsdksample.adapter;
14 |
15 | import android.support.v4.app.Fragment;
16 | import android.support.v4.app.FragmentManager;
17 | import android.support.v4.app.FragmentPagerAdapter;
18 |
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | /**
23 | * Created by panini on 2/25/16.
24 | */
25 | public class ViewPagerAdapter extends FragmentPagerAdapter {
26 | private final List mFragmentList = new ArrayList<>();
27 | private final List mFragmentTitleList = new ArrayList<>();
28 | public ViewPagerAdapter(FragmentManager manager) {
29 | super(manager);
30 | }
31 | @Override
32 | public Fragment getItem(int position) {
33 | return mFragmentList.get(position);
34 | }
35 | @Override
36 | public int getCount() {
37 | return mFragmentList.size();
38 | }
39 | public void addFrag(Fragment fragment, String title) {
40 | mFragmentList.add(fragment);
41 | mFragmentTitleList.add(title);
42 | }
43 | @Override
44 | public CharSequence getPageTitle(int position) {
45 | return mFragmentTitleList.get(position);
46 | }
47 | }
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/java/com/hp/mss/printsdksample/fragment/TabFragmentPrintHelp.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.printsdksample.fragment;
14 |
15 | import android.content.Intent;
16 | import android.os.Bundle;
17 | import android.support.v4.app.Fragment;
18 | import android.view.LayoutInflater;
19 | import android.view.View;
20 | import android.view.ViewGroup;
21 | import android.widget.RelativeLayout;
22 |
23 | import com.hp.mss.hpprint.activity.PrintHelp;
24 | import com.hp.mss.hpprint.activity.PrintPluginManagerActivity;
25 | import com.hp.mss.hpprint.util.PrintUtil;
26 | import com.hp.mss.printsdksample.R;
27 |
28 | /**
29 | * Created by panini on 2/25/16.
30 | */
31 | public class TabFragmentPrintHelp extends Fragment {
32 |
33 | @Override
34 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
35 | View inflatedView = inflater.inflate(R.layout.tab_fragment_print_help, container, false);
36 |
37 | RelativeLayout printPluginManager =(RelativeLayout) inflatedView.findViewById(R.id.print_plugin_manager);
38 | printPluginManager.setOnClickListener(new View.OnClickListener(){
39 | @Override
40 | public void onClick(View v){
41 | pluginStatusButtonClicked(v);
42 | }
43 | });
44 |
45 | RelativeLayout printHelpMenu = (RelativeLayout) inflatedView.findViewById(R.id.print_help_menu);
46 | printHelpMenu.setOnClickListener(new View.OnClickListener(){
47 | @Override
48 | public void onClick(View v){
49 | printHelpClicked(v);
50 | }
51 | });
52 | return inflatedView;
53 | }
54 |
55 |
56 | public void pluginStatusButtonClicked(View v) {
57 | PrintUtil.setPrintJobData(null);
58 | Intent intent = new Intent(getActivity(), PrintPluginManagerActivity.class);
59 | startActivity(intent);
60 | }
61 |
62 | public void printHelpClicked(View v) {
63 | PrintUtil.setPrintJobData(null);
64 | Intent intent = new Intent(getActivity(), PrintHelp.class);
65 | startActivity(intent);
66 | }
67 | }
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/drawable/dark_gradient_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
19 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/drawable/t4x5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/res/drawable/t4x5.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/drawable/t4x6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/res/drawable/t4x6.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/drawable/t5x7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/res/drawable/t5x7.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/drawable/t85x11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/res/drawable/t85x11.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/drawable/tab_shadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
18 |
19 |
20 |
23 |
24 |
28 |
29 |
36 |
37 |
38 |
39 |
45 |
46 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/layout/tab_fragment_print_help.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
19 |
20 |
25 |
34 |
43 |
51 |
52 |
53 |
59 |
67 |
76 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values-ja/printSDKSample_strings.ja.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 | SDKの印刷
15 |
16 | Hello world!
17 | 設定
18 | 印刷する
19 | 印刷設定
20 | 印刷のヘルプ
21 | 印刷プラグインマネージャ
22 | ユーザのプリンタPSPインストールをお手伝いします
23 | 印刷ヘルプメニュ
24 | ご使用のアプリケーション内にヘルプが用意されています
25 | 以下に、カスタムデータを入力してください
26 | タグ
27 | 値
28 | 資産
29 | ページ レイアウト
30 | 中央
31 | 上部中央
32 | 塗りつぶし
33 | サイズ調整
34 | 左上
35 | ページ余白
36 | 1/2インチ
37 | なし
38 | HPのみ
39 | メトリック
40 | 一意のデバイスID
41 | コンテンツタイプ
42 | PDF
43 | イメージ
44 | fonts/HPSimplified_Rg.ttf
45 | データの追加
46 | 暗号化されていません
47 | アプリごとに一意
48 | メーカーごとに一意
49 | ファイルの選択
50 |
51 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values-pt/printSDKSample_strings.pt.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 | Imprimir SDK
15 |
16 | Olá, mundo!
17 | Configurações
18 | Imprimir
19 | CONFIGURAÇÕES DE IMPRESSÃO
20 | AJUDA DE IMPRESSÃO
21 | Gerenciador de plugins de impressão
22 | Ajudar usuários na instalação de suas impressoras PSP
23 | Menu da ajuda de impressão
24 | Fornecer conteúdo de ajuda dentro de seu aplicativo
25 | Favor inserir os dados personalizados abaixo
26 | Tag
27 | Valor
28 | Ativo
29 | LAYOUT DA PÁGINA
30 | Centro
31 | Parte sup. central
32 | Preencher
33 | Adaptar
34 | Parte sup. esquerda
35 | MARGENS DE PÁGINA
36 | 1/2 polegada
37 | Nenhum
38 | Apenas parte sup.
39 | MÉTRICA
40 | ID DE DISPOSITIVO EXCLUSIVO
41 | TIPO DE CONTEÚDO
42 | PDF
43 | Imagem
44 | fonts/HPSimplified_Rg.ttf
45 | Adicionar dados
46 | Não criptografados
47 | Exclusivo por aplicativo
48 | Exclusivo por fornecedor
49 | SELECIONAR UM ARQUIVO
50 |
51 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values-tr/printSDKSample_strings.tr.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 | Baskı SDK\'si
15 |
16 | Merhaba dünya!
17 | Ayarlar
18 | Yazdır
19 | YAZDIRMA AYARLARI
20 | YAZDIRMA YARDIMI
21 | Baskı Eklentisi Yöneticisi
22 | Kullanıcıların yazıcılarının baskı hizmeti eklentisini yüklemesine yardım edin
23 | Yazdırma Yardımı Menüsü
24 | Uygulamanız içinde yardım içeriği sağlayın
25 | Lütfen özel bilgileri aşağıya girin
26 | Etiket
27 | Değer
28 | Varlık
29 | SAYFA DÜZENİ
30 | Orta
31 | Orta Üst
32 | Doldur
33 | Sığdır
34 | Sol Üst
35 | SAYFA KENAR BOŞLUKLARI
36 | 1/2 inç
37 | Hiçbiri
38 | Yalnızca Üst
39 | METRİKLER
40 | ÖZGÜN AYGIT KİMLİĞİ
41 | İÇERİK TÜRÜ
42 | PDF
43 | Görüntü
44 | fonts/HPSimplified_Rg.ttf
45 | Veri Ekle
46 | Şifrelenmemiş
47 | Uygulama için Özgün
48 | Tedarikçi için Özgün
49 | BİR DOSYA SEÇİN
50 |
51 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
17 | 64dp
18 |
19 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 | Print SDK
16 |
17 | Hello world!
18 | 设置
19 | 打印
20 | 打印设置
21 | 打印帮助
22 | 打印插件管理
23 | 帮助用户安装他们的PSP
24 | 打印帮助菜单
25 | 在应用程序中提供帮助内容
26 | 请在下面输入用户数据
27 | 标签
28 | 数值
29 | 资源
30 | 页面布局
31 | 居中
32 | 上部居中
33 | 充满
34 | 合适
35 | 左部居中
36 | 页边距
37 | 1/2英寸
38 | 无
39 | 仅顶部
40 | 度量
41 | 唯一设备ID
42 | 内容类型
43 | PDF
44 | 图片
45 | fonts/HPSimplified_Rg.ttf
46 | 增加数据
47 | 不加密
48 | 唯一应用程序
49 | 唯一供应商
50 | 选择一个文件
51 |
52 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 | #b0b0b0
16 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 | 16dp
16 | 16dp
17 | 16dp
18 |
19 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 | Print SDK
15 |
16 | Hello world!
17 | Settings
18 | Print
19 | PRINT SETTINGS
20 | PRINTING HELP
21 | Print Plugin Manager
22 | Help users install their printers PSP
23 | Print Help Menu
24 | Provide help content within your application
25 | Please enter the custom data below
26 | Tag
27 | Value
28 | Asset
29 | PAGE LAYOUT
30 | Center
31 | Center Top
32 | Fill
33 | Fit
34 | Top Left
35 | PAGE MARGINS
36 | 1/2 Inch
37 | None
38 | Top Only
39 | METRICS
40 | UNIQUE DEVICE ID
41 | CONTENT TYPE
42 | PDF
43 | Image
44 | fonts/HPSimplified_Rg.ttf
45 | Add Data
46 | Not Encrypted
47 | Unique Per App
48 | Unique Per Vendor
49 | SELECT A FILE
50 |
51 |
--------------------------------------------------------------------------------
/PrintSDKSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
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 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/PrintSDKSample/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
14 |
15 | buildscript {
16 | repositories {
17 | jcenter()
18 | }
19 | dependencies {
20 | classpath 'com.android.tools.build:gradle:2.2.1'
21 |
22 | // NOTE: Do not place your application dependencies here; they belong
23 | // in the individual module build.gradle files
24 | }
25 | }
26 |
27 | allprojects {
28 | repositories {
29 | jcenter()
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/home.feature:
--------------------------------------------------------------------------------
1 | Feature: Home feature
2 |
3 | As an user
4 | I want to view home screen for Print SDK Sample app
5 | and select different options and do print
6 |
7 |
8 | @done
9 | Scenario: Navigate to Print screen using appium
10 | Given I am on Home screen
11 | Then I tap on "Image" option
12 | And I select preview button
13 | Then I tap on "I have one" option
14 |
15 |
16 | @done
17 | Scenario: Verify all titles, values and button present in home screen
18 | Given I am on "Home" screen
19 | Then I should see the following options:
20 | |CONTENT TYPE|
21 | |PAGE LAYOUT|
22 | |PAGE MARGINS|
23 | |UNIQUE DEVICE ID|
24 | # |Metrics Options|
25 | # |Unique Device Id Per App|
26 |
27 | @reset
28 | @done
29 | Scenario Outline: Verify all titles, values and button present in home screen
30 | Given I am on "Home" screen
31 | And "" value should be selected
32 | When I tap on "" value, it should be selected
33 | Examples:
34 | |default_value |new_selection |
35 | |Image |PDF |
36 | |Center Top |Center |
37 | |Center Top |Fill |
38 | |Center Top |Fit |
39 | |Center Top |Top Left |
40 | |None |1/2 Inch |
41 | |None |Top Only |
42 | |Not Encrypted |Unique Per App |
43 | |Not Encrypted |Unique Per Vendor |
44 | # |Without Metrics |With Metrics |
45 | # |True |False |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/pages/home_screen.rb:
--------------------------------------------------------------------------------
1 | require 'calabash-android/abase'
2 |
3 | class HomeScreen < Calabash::ABase
4 |
5 | def trait
6 | screen_title
7 | end
8 |
9 | def screen_title
10 | "* text:'Print SDK'"
11 | end
12 |
13 |
14 | def navigate
15 | await
16 | end
17 |
18 | end
--------------------------------------------------------------------------------
/PrintSDKSample/features/plugin_helper.feature:
--------------------------------------------------------------------------------
1 | Feature: Pre-condition: Print Plugin needs to be disabled/uninstalled to verify this feature from preview option
2 |
3 |
4 | @done
5 | Scenario: verify plugin helper screen
6 | Given I am on Home screen
7 | And I tap on "PRINTING HELP" option
8 | And I tap on print plugin manager
9 | Then I should see "Print Service Manager" screen
10 | And I should see the following
11 |
12 | | HP Print Service Plugin |
13 | | Mopria Print Service |
14 | | Samsung Print Service Plugin |
15 | |Brother Print Service Plugin |
16 | | Canon Print Service |
17 | | Epson Print Enabler |
18 | | Other PrintServicePlugin |
19 |
20 | #Need to run on a device where Plugin not installed/not enabled
21 | @regression
22 | Scenario: verify plugin helper screen from Preview
23 | Given I am on Home screen
24 | And I tap on "PRINTING HELP" option
25 | And I tap on print plugin manager
26 | Then I should see "Print Service Manager" screen
27 | And I should see the following
28 |
29 | | HP Print Service Plugin |
30 | | Mopria Print Service |
31 | | Samsung Print Service Plugin |
32 | |Brother Print Service Plugin |
33 | | Canon Print Service |
34 | | Epson Print Enabler |
35 | | Other PrintServicePlugin |
36 |
37 |
38 | #Need to run on a device where Plugin installed but not enabled
39 | @regression
40 | Scenario Outline: Verify enable plugin pop up
41 | Given I am on Home screen
42 | And I tap on "PRINTING HELP" option
43 | And I tap on print plugin manager
44 | Then I should see "Print Service Manager" screen
45 | Then I tap to enable "" if installed
46 | Then I should see "Enable Your Plugin" pop up
47 |
48 | Examples:
49 |
50 | | plugin_name |
51 | | HP Print Service Plugin |
52 | | Mopria Print Service |
53 | #|Samsung Print Service Plugin|
54 | # |Brother Print Service Plugin |
55 | # |Canon Print Service|
56 | # |Epson Print Enabler|
57 | # |Other PrintServicePlugin|
58 |
59 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/print.feature:
--------------------------------------------------------------------------------
1 | Feature: Print feature
2 |
3 | As an user
4 | I want to take and verify print for different options
5 | for Print SDK Sample app
6 |
7 |
8 | @TA12260
9 | Scenario Outline: Print a card and verify xml counters for 'PDF' option
10 | Given I am on Home screen
11 | Then I tap on "" option
12 | And I select layout as ""
13 | And I select preview button
14 | And I tap on Print in Print Preview screen
15 | Then I select the printer "_QA Photosmart 6510 series [FD90EC]" if available
16 | Then I select paper size as ""
17 | Then I tap on Printer settings
18 | Then I select Quality as ""
19 | Then I select Paper Type as ""
20 | Then I navigate to back
21 | Then I fetch xml counters
22 | Then I tap on Print
23 | Then I verify counters
24 |
25 | #PDF print for 4x6 and 5x7 print has crash issues(defect DE3532)
26 |
27 | Examples:
28 | |Content Type | Paper Size| Quality | Paper Type |Layout Type|
29 | |Image | 4x6 in | Best | Plain |Center |
30 | |PDF | Letter | Normal | Plain |Center Top |
31 | |Image | 5x7 in | Best | Plain |Fit |
32 | |PDF | 5x7 in | Draft | Plain |Fill |
33 |
34 |
35 |
36 | @TA12260
37 | Scenario Outline: Print a card in Lollipop device and verify xml counters for 'Image' option
38 | Given I am on Home screen
39 | Then I tap on "Image" option
40 | And I select layout as ""
41 | And I select preview button
42 | And I tap on Print in Print Preview screen
43 | Then I select the printer "_QA Photosmart 6510 series [FD90EC]" if available
44 | Then I select paper size as ""
45 | Then I tap on Printer settings
46 | Then I select Quality as ""
47 | Then I select Paper Type as ""
48 | Then I navigate to back
49 | Then I fetch xml counters
50 | Then I tap on Print
51 | Then I verify counters
52 |
53 | Examples:
54 | | Paper Size | Quality | Paper Type |Layout Type|
55 | | 4x6 in | Draft | Plain |Center |
56 | | 5x7 in | Normal | Plain |Center |
57 | | Letter | Best | Plain |Center |
58 |
59 | | 4x6 in | Draft | Plain |Crop |
60 | | 5x7 in | Normal | Plain |Crop |
61 | | Letter | Best | Plain |Crop |
62 |
63 | | 4x6 in | Draft | Plain |Fit |
64 | | 5x7 in | Normal | Plain |Fit |
65 | | Letter | Best | Plain |Fit |
66 |
67 | | 4x6 in | Draft | Plain |Top Left |
68 | | 5x7 in | Normal | Plain |Top Left |
69 | | Letter | Best | Plain |Top Left |
70 |
71 | @TA13625
72 | Scenario: Select a pdf and verify print
73 | Given I am on Home screen
74 | Then I tap on "PDF" option
75 | Then I click "SELECT A FILE" button
76 | Then I select the "pdf"
77 | And I select layout as "Center"
78 | Then I tap on "Not Encrypted" option
79 | And I tap on "PRINT SETTINGS" option
80 | And I select preview button
81 | And I check the pop up - Print plugin is present or not
82 | And I tap on Print in Print Preview screen
83 | Then I should see "pdf" screen
84 |
85 | @TA13625
86 | Scenario: Select a image and verify print
87 | Given I am on Home screen
88 | Then I tap on "Image" option
89 | Then I click "SELECT A FILE" button
90 | Then I select the "photo"
91 | And I select layout as "Center"
92 | Then I tap on "Not Encrypted" option
93 | And I tap on "PRINT SETTINGS" option
94 | And I select preview button
95 | And I check the pop up - Print plugin is present or not
96 | Then I should see "preview" screen
97 |
98 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/step_definitions/calabash_steps.rb:
--------------------------------------------------------------------------------
1 | require 'calabash-android/calabash_steps'
--------------------------------------------------------------------------------
/PrintSDKSample/features/step_definitions/common_steps.rb:
--------------------------------------------------------------------------------
1 | Given /^I am on "(.*?)" screen$/ do |screen_name|
2 | @current_page = page_by_name(screen_name)
3 | @current_page.navigate
4 | sleep(STEP_PAUSE)
5 | end
6 |
7 | Then /^I should see the "(.*?)" screen$/ do |screen_name|
8 | required_page = page_by_name(screen_name)
9 | wait_for { required_page.current_page? }
10 | @current_page = required_page
11 | sleep(STEP_PAUSE)
12 | end
13 |
14 | Then /^I should see the following (?:.*):$/ do |table|
15 | check_elements_exist table.raw
16 | sleep(STEP_PAUSE)
17 | end
18 |
19 | Then(/^I should see the following$/) do |table|
20 | check_value_exists table.raw
21 | end
22 |
23 | Then(/^I navigate back$/)do
24 | selenium.driver.press_keycode 4
25 | sleep(MAX_TIMEOUT)
26 | end
--------------------------------------------------------------------------------
/PrintSDKSample/features/step_definitions/event_metrics_steps.rb:
--------------------------------------------------------------------------------
1 | require 'digest/md5'
2 | require 'uri'
3 |
4 | Then (/^I Fetch event metrics details$/) do
5 | sleep(APPIUM_TIMEOUT)
6 | encrypted_device_id = get_device_id
7 | hash = `curl -x "http://proxy.atlanta.hp.com:8080" -L "http://hpmobileprint:print1t@print-metrics-test.twosmiles.com/api/v2/events?device_id=#{encrypted_device_id}&product_id=com.hp.mss.printsdksample"`
8 | #hash = `curl -L "http://hpmobileprint:print1t@print-metrics-test.twosmiles.com/api/v2/events?device_id=#{encrypted_device_id}&product_id=com.hp.mss.printsdksample"`
9 | $hash = JSON.parse(hash)
10 | $mertics_array = $hash
11 | end
12 | Then(/^I get the event metrics for "(.*?)"$/) do |event_name|
13 | if event_name == "entered_print_sdk"
14 | $mertics_details = $hash[($mertics_array.length)-2]
15 | else
16 | $mertics_details = $hash[($mertics_array.length)-1]
17 | end
18 | end
19 |
20 | Then(/^I check the print session id is "(.*?)"$/) do |print_session_id|
21 | compare = ($mertics_details['print_session_id'] == print_session_id) ? true : false
22 | raise "Print_session_id verification failed!" unless compare==true
23 | end
24 |
25 | Then(/^I check the event count is "(.*?)"$/) do |event_count|
26 | compare = ($mertics_details['event_count'] == event_count) ? true : false
27 | raise "Event_count verification failed!" unless compare==true
28 | end
29 |
30 | Then(/^I check the event type id is "(.*?)"$/) do |event_type|
31 | compare = ($mertics_details['event_type_id'] == event_type) ? true : false
32 | raise "Event_type verification failed!" unless compare==true
33 | end
--------------------------------------------------------------------------------
/PrintSDKSample/features/step_definitions/plugin_helper_steps.rb:
--------------------------------------------------------------------------------
1 | Then(/^I should see the skip option$/) do
2 | skip_button =selenium.find_elements(:id,"com.hp.mss.printsdksample:id/print_btn")
3 | #selenium.find_element(:id,"com.hp.mss.printsdksample:id/print_btn").click
4 | raise "skip button not found!" unless skip_button.size > 0
5 |
6 | end
7 | Then(/^I should see "(.*?)" screen$/) do |screen_name|
8 | $flag = ""
9 | if screen_name == "Print Service Manager"
10 | element_xpath="//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.view.View[1]/android.widget.FrameLayout[1]/android.view.View[1]/android.widget.TextView[1]"
11 | wait.until { selenium.find_element(:xpath,element_xpath) }
12 | home_title = selenium.find_element(:xpath,element_xpath).text
13 | raise "Error Screen" unless home_title == "Print Service Manager"
14 | end
15 | end
16 |
17 | Then(/^I tap to enable "(.*?)" if installed$/) do |plugin_name|
18 | $os_version = getOSversion
19 | if plugin_name == "HP Print Service Plugin"
20 | index =1
21 | else if plugin_name == "Samsung Print Service Plugin" || plugin_name == "Brother Print Service Plugin"
22 | index =3
23 | else if plugin_name == "Mopria Print Service"
24 | index =4
25 | else if plugin_name == "Canon Print Service"
26 | index =2
27 | else if plugin_name == "Epson Print Enabler"
28 | index =5
29 | else if plugin_name == "Other PrintServicePlugin"
30 | index =6
31 | else
32 | end
33 | end
34 | end
35 | end
36 | end
37 | end
38 | if plugin_name == "Samsung Print Service Plugin" && $os_version >= '5.0'
39 | puts "skipping-check for Samsung plugin(Kitkat only)"
40 | $flag = "false"
41 | else if plugin_name == "Brother Print Service Plugin" && $os_version < '5.0'
42 | puts "skipping-check for Brother plugin(Lollipop only)"
43 | $flag = "false"
44 | else
45 | element_id ="//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.view.View[1]/android.widget.FrameLayout[2]/android.widget.RelativeLayout[1]/android.widget.ListView[1]/android.widget.RelativeLayout[#{index.to_i}]/android.widget.FrameLayout[1]/android.widget.TextView[1]"
46 | if selenium.find_element(:xpath,element_id).text == "Disabled"
47 | selenium.find_element(:xpath,element_id).click
48 | else
49 | raise "#{plugin_name} not installed!"
50 | end
51 |
52 | end
53 | end
54 | end
55 |
56 | Then(/^I should see "(.*?)" pop up$/) do |dialog_title|
57 | if $flag != "false"
58 | element_id="com.hp.mss.printsdksample:id/dialog_title"
59 | wait.until { selenium.find_element(:id,element_id) }
60 | home_title = selenium.find_element(:id,element_id).text
61 | raise "Error Screen" unless home_title == "Enable your Plugin"
62 | else
63 | puts "skipping-not applicable"
64 | end
65 | end
66 |
67 |
68 | Then(/^I get installed and enabled plugin count$/) do
69 | sleep(APPIUM_TIMEOUT)
70 | index=1
71 | $enabled_plugin_count = 0
72 | $installed_plugin_count = 0
73 | while index < 7
74 | element_id ="//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.view.View[1]/android.widget.FrameLayout[2]/android.widget.RelativeLayout[1]/android.widget.ListView[1]/android.widget.RelativeLayout[#{index.to_i}]/android.widget.FrameLayout[1]/android.widget.TextView[1]"
75 |
76 | if ((selenium.find_element(:xpath,element_id).text == "Disabled") ||(selenium.find_element(:xpath,element_id).text == "Enabled"))
77 | $installed_plugin_count = $installed_plugin_count+1
78 |
79 | if selenium.find_element(:xpath,element_id).text == "Enabled"
80 | $enabled_plugin_count = $enabled_plugin_count+1
81 | end
82 | end
83 | index = index + 1
84 | end
85 | end
86 | Then(/^I tap to "(.*?)" a plugin$/) do |action|
87 | index=1
88 | while index < 7
89 | element_id ="//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.view.View[1]/android.widget.FrameLayout[2]/android.widget.RelativeLayout[1]/android.widget.ListView[1]/android.widget.RelativeLayout[#{index.to_i}]/android.widget.FrameLayout[1]/android.widget.TextView[1]"
90 |
91 | if action == "enable"
92 | if (selenium.find_element(:xpath,element_id).text == "Disabled")
93 | selenium.find_element(:xpath,element_id).click
94 | break
95 | end
96 | else
97 | if (selenium.find_element(:xpath,element_id).text == "")
98 | selenium.find_element(:xpath,element_id).click
99 | break
100 | end
101 | end
102 | index = index + 1
103 | end
104 | end
--------------------------------------------------------------------------------
/PrintSDKSample/features/step_definitions/print_steps.rb:
--------------------------------------------------------------------------------
1 |
2 | Then (/^I navigate to back$/) do
3 | selenium.driver.press_keycode 4
4 | sleep(MAX_TIMEOUT)
5 | end
6 |
7 | Then (/^I tap on Print$/) do
8 | sleep(APPIUM_TIMEOUT)
9 | wait.until { selenium.find_element(:id,"com.android.printspooler:id/print_button") }
10 | selenium.find_element(:id,"com.android.printspooler:id/print_button").click
11 | sleep(MAX_TIMEOUT)
12 | end
13 |
14 | Then(/^I should see "([^\"]*) screen$/) do |screen_name|
15 | $os_version = getOSversion
16 |
17 | if $os_version >= '5.0'
18 | screen_displayed = selenium.find_element(:id, "com.android.printspooler:id/embedded_content_scrim").displayed?
19 | else
20 | if screen_name == "pdf"
21 | screen_displayed = selenium.find_element(:id,"com.android.printspooler:id/print_button").displayed?
22 | else
23 | screen_displayed = selenium.find_element(:id, "com.hp.mss.printsdksample:id/preview_image_view").displayed?
24 | end
25 | end
26 | raise "Error screen not loaded" unless screen_displayed == true
27 |
28 | end
29 |
30 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/step_definitions/print_verification_steps.rb:
--------------------------------------------------------------------------------
1 | Then(/^I fetch xml counters$/) do
2 | $xmlCounter = readXMLValues
3 |
4 | end
5 |
6 | Then(/^I verify counters$/) do
7 | result = verifyxmlCounters
8 | if result != true
9 | raise "\n Paper size counter before print: " + $xmlCounter[$counter[$paper_size]] + "\n Paper size counter after print : " + $xmlCounterAfterPrint[$counter[$paper_size]] + "\n Paper type/quality counter before print: " + $xmlCounter[$paperType_qualityCounter] + "\n Paper type/quality counter after print: " + $xmlCounterAfterPrint[$paperType_qualityCounter] + "\n Counter verification failed!"
10 | end
11 | end
12 |
13 | After do
14 | sleep(5)
15 | selenium.driver_quit
16 | ENV['http_proxy']=$proxy_http
17 | ENV['https_proxy']=$proxy_https
18 | end
19 |
20 | Then(/^I should see the "(.*?)" button$/) do |menu|
21 | if menu=="Print"
22 | print_button_value=query("* id:'mobile_print'")
23 | raise "Print button not found!" unless print_button_value.length > 0
24 | else if menu=="Back"
25 | raise "Back menu not found!" unless navigate_button.length > 0
26 | else if menu=="Hamburger"
27 | hamburger_button_value=query("android.widget.ImageButton")
28 | raise "Hamburger menu not found!" unless hamburger_button_value.length > 0
29 | else
30 | raise "Invalid menu!" unless menu=="Share"
31 | share_button_value=query("* id:'mobile_print'")
32 | raise "Share button not found!" unless share_button_value.length > 0
33 | end
34 | end
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/support/app_installation_hooks.rb:
--------------------------------------------------------------------------------
1 | require 'calabash-android/management/app_installation'
2 |
3 | AfterConfiguration do |config|
4 | FeatureNameMemory.feature_name = nil
5 | end
6 |
7 | Before do |scenario|
8 | @scenario_is_outline = (scenario.class == Cucumber::Ast::OutlineTable::ExampleRow)
9 | if @scenario_is_outline
10 | scenario = scenario.scenario_outline
11 | end
12 |
13 | feature_name = scenario.feature.title
14 | if FeatureNameMemory.feature_name != feature_name \
15 | or ENV["RESET_BETWEEN_SCENARIOS"] == "1"
16 | if ENV["RESET_BETWEEN_SCENARIOS"] == "1"
17 | log "New scenario - reinstalling apps"
18 | else
19 | log "First scenario in feature - reinstalling apps"
20 | end
21 |
22 | uninstall_apps
23 | install_app(ENV["TEST_APP_PATH"])
24 | install_app(ENV["APP_PATH"])
25 | FeatureNameMemory.feature_name = feature_name
26 | FeatureNameMemory.invocation = 1
27 | else
28 | FeatureNameMemory.invocation += 1
29 | end
30 | end
31 |
32 | FeatureNameMemory = Class.new
33 | class << FeatureNameMemory
34 | @feature_name = nil
35 | attr_accessor :feature_name, :invocation
36 | end
37 |
38 | Around('@lollipop') do |scenario, block|
39 | if getOSversion.to_f < 5.0
40 | puts "Applicable only for Lollipop devices!".blue
41 | scenario.skip_invoke!
42 | else
43 | block.call
44 | end
45 | end
46 |
47 | Around('@kitkat') do |scenario, block|
48 | if getOSversion.to_f >= 5.0
49 | puts "Applicable only for Kitkat devices!".blue
50 | scenario.skip_invoke!
51 | else
52 | block.call
53 | end
54 | end
55 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/support/app_life_cycle_hooks.rb:
--------------------------------------------------------------------------------
1 | require 'calabash-android/management/adb'
2 | require 'calabash-android/operations'
3 |
4 | Before do |scenario|
5 | start_test_server_in_background
6 | end
7 |
8 | After do |scenario|
9 | if scenario.failed?
10 | screenshot_embed
11 | end
12 | shutdown_test_server
13 | end
14 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/support/appium_utils.rb:
--------------------------------------------------------------------------------
1 | # My appium utils function
2 | require 'appium_lib'
3 | require 'selenium-webdriver'
4 |
5 |
6 | CAPS = {
7 | 'platformName' => 'Android',
8 | 'deviceName' => %x(adb shell getprop ro.serialno),
9 | 'app'=> ENV['APP_PATH'],
10 | 'noSign' => true
11 | }
12 |
13 | def server_url
14 | "http://127.0.0.1:4723/wd/hub"
15 | end
16 |
17 | def selenium
18 | @driver ||= Appium::Driver.new(caps: CAPS)
19 | end
20 |
21 | def wait
22 | wait = Selenium::WebDriver::Wait.new(:timeout => APPIUM_TIMEOUT)
23 | end
--------------------------------------------------------------------------------
/PrintSDKSample/features/support/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "PrinterIP" : "10.7.5.202",
3 | "counter1" : {
4 | "4 x 6" : "5031",
5 | "5 x 7" : "5032"
6 | },
7 |
8 | "counter2" : {
9 | "4x6 in" : "5031",
10 | "5x7 in" : "5032",
11 | "Letter" : "5037"
12 | },
13 | "Plain/Normal" : "5041",
14 | "Plain/Draft" : "5042",
15 | "Plain/Best" : "5043",
16 | "Photo Glossy/Normal" : "5044",
17 | "Photo Glossy/Best" : "5046"
18 | }
19 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/support/env.rb:
--------------------------------------------------------------------------------
1 | WAIT_TIMEOUT = (ENV['WAIT_TIMEOUT'] || 30).to_f
2 | STEP_PAUSE = (ENV['STEP_PAUSE'] || 0.5).to_f
3 | APPIUM_TIMEOUT = (ENV['APPIUM_TIMEOUT'] || 5).to_f
4 | WAIT_SCREENLOAD = (ENV['WAIT_SCREENLOAD'] || 3).to_f
5 | MAX_TIMEOUT = (ENV['MAX_TIMEOUT'] || 20).to_f
6 | take_screenshots = ENV['TAKE_SCREENSHOTS']
7 |
8 | require 'calabash-android/cucumber'
9 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/support/hooks.rb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/features/support/hooks.rb
--------------------------------------------------------------------------------
/PrintSDKSample/features/support/runme.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if ps aux | grep "[a]ppium" > /dev/null
4 | then
5 | echo 'Appium is already running'
6 | else
7 | osascript << END
8 | tell application "Terminal"
9 | do script "cd ${APPIUM_PATH} && appium --no-reset"
10 | end tell
11 | END
12 | fi
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/PrintSDKSample/features/support/utilsforautomation.rb:
--------------------------------------------------------------------------------
1 | require 'rubygems'
2 | #require 'selenium-cucumber'
3 | require 'selenium-webdriver'
4 |
5 |
6 | def todaysdate
7 | time = Time.new
8 | currentdate = time.strftime("%Y-%m-%d_%H:%M:%S")
9 | return currentdate
10 | end
11 |
12 | def clearfunction
13 | comments =selenium.find_element(:xpath,"//android.view.View[1]/android.widget.FrameLayout[2]/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[1]/android.widget.EditText[1]").text
14 |
15 | #$driver.find_element(:xpath,"//android.view.View[1]/android.widget.FrameLayout[2]/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[1]/android.widget.EditText[1]").clear
16 | while comments.length > 0 do
17 | selenium.find_element(:id,"com.hp.mss.droidcardsapp:id/sentiment_edit_text").send_keys [:control,'a'], :delete
18 | comments =selenium.find_element(:xpath,"//android.view.View[1]/android.widget.FrameLayout[2]/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[1]/android.widget.EditText[1]").text
19 |
20 | end
21 | end
22 |
23 | def getOSversion
24 | #return %x(adb shell getprop ro.build.version.release)[0..2]
25 | return %x(adb shell getprop ro.build.version.release)
26 | end
27 |
28 |
--------------------------------------------------------------------------------
/PrintSDKSample/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Hewlett-Packard Company
3 | # All rights reserved.
4 | #
5 | # This file, its contents, concepts, methods, behavior, and operation
6 | # (collectively the "Software") are protected by trade secret, patent,
7 | # and copyright laws. The use of the Software is governed by a license
8 | # agreement. Disclosure of the Software to third parties, in any form,
9 | # in whole or in part, is expressly prohibited except as authorized by
10 | # the license agreement.
11 | #
12 |
13 | # Project-wide Gradle settings.
14 |
15 | # IDE (e.g. Android Studio) users:
16 | # Gradle settings configured through the IDE *will override*
17 | # any settings specified in this file.
18 |
19 | # For more details on how to configure your build environment visit
20 | # http://www.gradle.org/docs/current/userguide/build_environment.html
21 |
22 | # Specifies the JVM arguments used for the daemon process.
23 | # The setting is particularly useful for tweaking memory settings.
24 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
25 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
26 |
27 | # When configured, Gradle will run in incubating parallel mode.
28 | # This option should only be used with decoupled projects. More details, visit
29 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
30 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/PrintSDKSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/PrintSDKSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/PrintSDKSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Oct 04 10:02:08 PDT 2016
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-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/PrintSDKSample/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 |
--------------------------------------------------------------------------------
/PrintSDKSample/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | include ':app', ':hpprintsdk'
14 | project(':hpprintsdk').projectDir = new File('../mobileprintsdk')
15 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.1.0'
9 |
10 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
11 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
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
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
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-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/mobileprintsdk/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/mobileprintsdk/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | apply plugin: 'com.android.library'
14 | apply plugin: 'com.github.dcendents.android-maven'
15 | apply plugin: 'com.jfrog.bintray'
16 |
17 | version = 'v2.02.474'
18 |
19 | buildscript {
20 | repositories {
21 | jcenter()
22 | }
23 |
24 | dependencies {
25 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
26 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
27 | }
28 | }
29 |
30 | android {
31 | compileSdkVersion 23
32 | buildToolsVersion "21.1.2"
33 | def sha = ""
34 |
35 | defaultConfig {
36 | minSdkVersion 19
37 | targetSdkVersion 23
38 | versionCode 1
39 | versionName "v2.02.474"
40 |
41 | if (org.gradle.internal.os.OperatingSystem.current().windows == false) {
42 | def cmd = "git rev-parse --short HEAD"
43 | def proc = cmd.execute()
44 | sha = proc.text.trim()
45 | // cmd = "git rev-list HEAD --count"
46 | // proc = cmd.execute()
47 | versionCode = 418
48 | } else {
49 | versionCode = 418
50 | }
51 |
52 | }
53 | buildTypes {
54 | release {
55 | minifyEnabled false
56 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
57 | // versionNameSuffix = ".${defaultConfig.versionCode}"
58 | // println("versionNameSuffix = ${versionNameSuffix}")
59 | }
60 | debug {
61 | versionNameSuffix = " (debug-${sha})"
62 | }
63 |
64 | }
65 | libraryVariants.all { variant ->
66 | variant.outputs.each { output ->
67 | output.outputFile = new File(
68 | output.outputFile.parent, "mobileprintsdk.aar"
69 | )
70 | }
71 | }
72 |
73 | lintOptions {
74 | abortOnError false
75 | }
76 | }
77 |
78 | def siteUrl = 'https://github.com/IPGPTP/DroidPrint'
79 | def gitUrl = 'https://github.com/IPGPTP/DroidPrint.git'
80 | group = 'com.hp.mss'
81 |
82 | bintray {
83 | user = System.getenv('BINTRAY_USER')
84 | key = System.getenv('BINTRAY_API_KEY')
85 |
86 | configurations = ['archives']
87 | pkg {
88 | repo = 'maven'
89 | name = 'mobileprintsdk'
90 | userOrg = 'mobileprintsdk'
91 | desc = 'Android Mobile Print SDK'
92 | websiteUrl = siteUrl
93 | issueTrackerUrl = 'https://developers.hp.com/forums/mobile-print-sdk'
94 | vcsUrl = gitUrl
95 | licenses = ['MIT']
96 | labels = ['Android', 'Print', 'SDK']
97 | publicDownloadNumbers = true
98 | }
99 | }
100 |
101 | install {
102 | repositories.mavenInstaller {
103 | pom {
104 | project {
105 | packaging 'aar'
106 |
107 | name 'Mobile Print SDK'
108 | url siteUrl
109 |
110 | licenses {
111 | license {
112 | name 'The MIT License (MIT)'
113 | url 'https://opensource.org/licenses/MIT'
114 | }
115 | }
116 | scm {
117 | connection gitUrl
118 | developerConnection gitUrl
119 | url siteUrl
120 | }
121 | }
122 | }
123 | }
124 | }
125 |
126 | task sourcesJar(type: Jar) {
127 | from android.sourceSets.main.java.srcDirs
128 | classifier = 'sources'
129 | }
130 |
131 | task javadoc(type: Javadoc) << {
132 | source = android.sourceSets.main.java.srcDirs
133 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
134 | }
135 |
136 | task javadocJar(type: Jar, dependsOn: javadoc) {
137 | classifier = 'javadoc'
138 | from javadoc.destinationDir
139 | // options.encoding = 'UTF-8'
140 | }
141 | artifacts {
142 | archives javadocJar
143 | archives sourcesJar
144 | }
145 |
146 | task copyAarFile(type: Copy) << {
147 | def myDir = System.getProperty("user.dir")
148 | def myFile = "mobileprintsdk.aar"
149 |
150 | from("${myDir}/app/build/outputs/aar/")
151 | into("${myDir}/")
152 | include("mobileprintsdk.aar")
153 | }
154 |
155 | dependencies {
156 | compile fileTree(dir: 'libs', include: ['*.jar'])
157 | compile 'com.mcxiaoke.volley:library:1.0.6'
158 | compile 'com.android.support:appcompat-v7:23.0.1'
159 | compile 'com.android.support:design:23.0.1'
160 | compile 'com.android.support:support-v4:23.0.1'
161 | }
162 |
--------------------------------------------------------------------------------
/mobileprintsdk/libs/app-debug.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/libs/app-debug.aar
--------------------------------------------------------------------------------
/mobileprintsdk/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 /Users/panini/Android-sdk/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 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/androidTest/java/com/hp/mss/hpprint/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint;
14 |
15 | import android.app.Application;
16 | import android.test.ApplicationTestCase;
17 |
18 | /**
19 | * Testing Fundamentals
20 | */
21 | public class ApplicationTest extends ApplicationTestCase {
22 | public ApplicationTest() {
23 | super(Application.class);
24 | }
25 | }
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
12 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
34 |
35 |
40 |
41 |
45 |
46 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/assets/fonts/HPSimplified_Rg.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/assets/fonts/HPSimplified_Rg.ttf
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/activity/PrintHelp.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint.activity;
14 |
15 | import android.content.Intent;
16 | import android.os.Bundle;
17 | import android.support.v7.app.AppCompatActivity;
18 | import android.view.Menu;
19 | import android.view.MenuItem;
20 | import android.view.View;
21 | import android.widget.TextView;
22 |
23 | import com.hp.mss.hpprint.R;
24 |
25 | /**
26 | * Created by panini on 2/8/16.
27 | */
28 | public class PrintHelp extends AppCompatActivity {
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.activity_print_help);
33 | final android.support.v7.app.ActionBar actionBar = getSupportActionBar();
34 | if (actionBar != null) {
35 | actionBar.setDisplayHomeAsUpEnabled(true);
36 | }
37 |
38 | final TextView printPluginHelperLink = (TextView) findViewById(R.id.print_help_activity_msg_1_link);
39 | printPluginHelperLink.setOnClickListener(new View.OnClickListener() {
40 | @Override
41 | public void onClick(View v) {
42 | startActivity(new Intent(PrintHelp.this, PrintPluginManagerActivity.class));
43 | }
44 | });
45 | }
46 |
47 |
48 | @Override
49 | public boolean onOptionsItemSelected(MenuItem item) {
50 | // Handle action bar item clicks here. The action bar will
51 | // automatically handle clicks on the Home/Up button, so long
52 | // as you specify a parent activity in AndroidManifest.xml.
53 | switch (item.getItemId()) {
54 | case android.R.id.home:
55 | this.finish();
56 | return true;
57 | default:
58 | return super.onOptionsItemSelected(item);
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/activity/PrintServicePluginInformation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint.activity;
14 |
15 | import android.app.ActionBar;
16 | import android.app.Activity;
17 | import android.graphics.Typeface;
18 | import android.graphics.drawable.ColorDrawable;
19 | import android.os.Bundle;
20 | import android.support.v7.app.AppCompatActivity;
21 | import android.support.v7.widget.Toolbar;
22 | import android.view.Menu;
23 | import android.view.MenuItem;
24 | import android.widget.TextView;
25 |
26 | import com.hp.mss.hpprint.R;
27 | import com.hp.mss.hpprint.util.FontUtil;
28 |
29 | /**
30 | * Created by panini on 1/25/16.
31 | */
32 | public class PrintServicePluginInformation extends AppCompatActivity {
33 | @Override
34 | protected void onCreate(Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 | setContentView(R.layout.printer_service_plugin_information);
37 | final android.support.v7.app.ActionBar actionBar = getSupportActionBar();
38 | if (actionBar != null) {
39 | actionBar.setDisplayHomeAsUpEnabled(true);
40 | }
41 | }
42 |
43 | @Override
44 | public boolean onCreateOptionsMenu(Menu menu) {
45 | return true;
46 | }
47 | @Override
48 | public boolean onOptionsItemSelected(MenuItem item) {
49 | // Handle action bar item clicks here. The action bar will
50 | // automatically handle clicks on the Home/Up button, so long
51 | // as you specify a parent activity in AndroidManifest.xml.
52 | int id = item.getItemId();
53 | if (id == android.R.id.home) {
54 | super.onBackPressed();
55 | invalidateOptionsMenu();
56 | return true;
57 | }
58 | return super.onOptionsItemSelected(item);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/adapter/PrintPluginAdapter.java:
--------------------------------------------------------------------------------
1 | package com.hp.mss.hpprint.adapter;
2 |
3 | import android.content.Context;
4 | import android.graphics.Color;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.BaseAdapter;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | import com.hp.mss.hpprint.R;
13 | import com.hp.mss.hpprint.model.PrintPlugin;
14 |
15 | public class PrintPluginAdapter extends BaseAdapter {
16 | private static final String TOOLBAR_TITLE_FONTFACE = "fonts/HPSimplified_Rg.ttf";
17 |
18 | Context context;
19 | PrintPlugin[] plugins;
20 |
21 | private LayoutInflater inflater;
22 |
23 | /**
24 | *
25 | * @param context calling activity
26 | * @param plugins plugin list that is managed by this adapter
27 | */
28 | public PrintPluginAdapter(Context context, PrintPlugin[] plugins) {
29 | this.context = context;
30 | this.plugins = plugins;
31 |
32 | this.inflater = LayoutInflater.from(context);
33 | }
34 |
35 | /**
36 | *
37 | * @return counter of the items
38 | */
39 | @Override
40 | public int getCount() {
41 | return plugins.length;
42 | }
43 |
44 | /**
45 | *
46 | * @param i item index
47 | * @return the object at index i
48 | */
49 | @Override
50 | public Object getItem(int i) {
51 | return plugins[i];
52 | }
53 |
54 | /**
55 | *
56 | * @param position item index
57 | * @return item id
58 | */
59 | @Override
60 | public long getItemId(int position) {
61 | return position;
62 | }
63 |
64 | /**
65 | *
66 | * @param i item position
67 | * @param view the view to reused
68 | * @param parent the parent that this view eventually be attached to
69 | * @return a new view that will be displayed in the list
70 | */
71 | @Override
72 | public View getView(int i, View view, ViewGroup parent) {
73 |
74 | View row;
75 |
76 | row = inflater.inflate(R.layout.item_print_plugin_service, null);
77 |
78 | TextView nameView, makerView, statusImageView;
79 | ImageView iconImageView;
80 |
81 | nameView = (TextView) row.findViewById(R.id.plugin_name);
82 | nameView.setText( ((PrintPlugin)plugins[i]).getName() );
83 |
84 | makerView = (TextView) row.findViewById(R.id.plugin_maker_name);
85 | makerView.setText( ((PrintPlugin)plugins[i]).getMaker() );
86 |
87 | iconImageView = (ImageView) row.findViewById(R.id.print_service_plugin_id);
88 | iconImageView.setBackgroundResource( ((PrintPlugin)plugins[i]).getIcon() );
89 |
90 | statusImageView = (TextView) row.findViewById(R.id.plugin_state);
91 | statusImageView.setBackgroundResource(((PrintPlugin) plugins[i]).getNextActionIcon());
92 |
93 | if( ((PrintPlugin) plugins[i]).getStatus().equals(PrintPlugin.PluginStatus.DISABLED) )
94 | statusImageView.setText(R.string.disabled);
95 | else if ( ((PrintPlugin) plugins[i]).getStatus().equals(PrintPlugin.PluginStatus.READY) )
96 | statusImageView.setText(R.string.enabled);
97 |
98 | return row;
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/model/PDFPrintItem.java:
--------------------------------------------------------------------------------
1 | package com.hp.mss.hpprint.model;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.Canvas;
6 | import android.graphics.RectF;
7 | import android.os.Parcel;
8 | import android.print.PrintAttributes;
9 |
10 | import com.hp.mss.hpprint.model.asset.Asset;
11 | import com.hp.mss.hpprint.model.asset.PDFAsset;
12 |
13 | public class PDFPrintItem extends PrintItem{
14 |
15 | PDFPrintItem() {
16 | super();
17 | }
18 |
19 | public PDFPrintItem(PrintAttributes.MediaSize mediaSize,PrintAttributes.Margins margins, ScaleType scaleType, PDFAsset asset) {
20 | super(mediaSize,margins, scaleType, asset);
21 | }
22 |
23 | public PDFPrintItem(PrintAttributes.MediaSize mediaSize,ScaleType scaleType, PDFAsset asset) {
24 | this(mediaSize, new PrintAttributes.Margins(0, 0, 0, 0), scaleType, asset);
25 | }
26 |
27 | public PDFPrintItem(PrintAttributes.Margins margins,ScaleType scaleType, PDFAsset asset) {
28 | this(null, margins, scaleType, asset);
29 | }
30 |
31 | public PDFPrintItem(PrintAttributes.MediaSize mediaSize,PrintAttributes.Margins margins, PDFAsset asset) {
32 | this(mediaSize, margins, DEFAULT_SCALE_TYPE, asset);
33 | }
34 |
35 | public PDFPrintItem(PrintAttributes.MediaSize mediaSize, PDFAsset asset) {
36 | this(mediaSize,new PrintAttributes.Margins(0, 0, 0, 0),DEFAULT_SCALE_TYPE, asset);
37 | }
38 |
39 | public PDFPrintItem(PrintAttributes.Margins margins, PDFAsset asset) {
40 | this(null, margins, DEFAULT_SCALE_TYPE, asset);
41 | }
42 |
43 | public PDFPrintItem(ScaleType scaleType, PDFAsset asset) {
44 | this(null, new PrintAttributes.Margins(0, 0, 0, 0), scaleType, asset);
45 | }
46 |
47 | public PDFPrintItem(PDFAsset asset) {
48 | this(null, new PrintAttributes.Margins(0, 0, 0, 0), DEFAULT_SCALE_TYPE, asset);
49 | }
50 |
51 | @Override
52 | public PrintAttributes.MediaSize getMediaSize() {
53 | return super.getMediaSize();
54 | }
55 |
56 | @Override
57 | public ScaleType getScaleType() {
58 | return super.getScaleType();
59 | }
60 |
61 | @Override
62 | public Asset getAsset() {
63 | return super.getAsset();
64 | }
65 |
66 | @Override
67 | public Bitmap getPrintableBitmap() {
68 | return super.getPrintableBitmap();
69 | }
70 |
71 | @Override
72 | public void drawPage(Canvas canvas, float dpi, RectF pageBounds) {
73 |
74 | }
75 |
76 | @Override
77 | protected void cleanup(Context context){
78 | return;
79 | }
80 |
81 | protected PDFPrintItem(Parcel in) {
82 | super(in);
83 | }
84 |
85 | @Override
86 | public int describeContents() {
87 | return 0;
88 | }
89 |
90 | @Override
91 | public void writeToParcel(Parcel dest, int flags) {
92 | super.writeToParcel(dest, flags);
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/model/PrintItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint.model;
14 |
15 | import android.content.Context;
16 | import android.graphics.Bitmap;
17 | import android.graphics.Canvas;
18 | import android.graphics.RectF;
19 | import android.os.Parcel;
20 | import android.os.Parcelable;
21 | import android.print.PrintAttributes;
22 |
23 | import com.hp.mss.hpprint.model.asset.Asset;
24 |
25 | /**
26 | * This is an abstract class provided as a base for print item implementations.
27 | */
28 | public abstract class PrintItem implements Parcelable{
29 | //Clients are able to override printitems, to have their own layouting methods.
30 | PrintAttributes.MediaSize mediaSize;
31 | PrintAttributes.Margins margins;
32 | ScaleType scaleType;
33 | Asset asset;
34 |
35 | public static PrintItem.ScaleType DEFAULT_SCALE_TYPE = null;
36 |
37 | /**
38 | * This defines how the print item will be laid out on the paper.
39 | */
40 | public enum ScaleType {
41 | CENTER,
42 | CENTER_TOP,
43 | CROP,
44 | FIT,
45 | CENTER_TOP_LEFT
46 | // CENTER_INSIDE,
47 | // FIT_CENTER,
48 | // FIT_END,
49 | // FIT_START,
50 | // FIT_XY,
51 | // MATRIX
52 | }
53 |
54 | PrintItem () {
55 | }
56 |
57 | PrintItem (PrintAttributes.MediaSize mediaSize,PrintAttributes.Margins margins, ScaleType scaleType, Asset asset) {
58 | this.scaleType = scaleType;
59 | this.mediaSize = mediaSize;
60 | this.margins = margins;
61 | this.asset = asset;
62 | }
63 |
64 | /**
65 | * Get the media size of the print item.
66 | * @return The MediaSize attribute of the print item.
67 | * @see MediaSize
68 | */
69 | public PrintAttributes.MediaSize getMediaSize(){
70 | return mediaSize;
71 | }
72 |
73 | /**
74 | * Get the margin of the print item.
75 | * @return The margin attribute of the print item.
76 | * @see Margins
77 | */
78 | public PrintAttributes.Margins getMargins(){
79 | return margins;
80 | }
81 |
82 | /**
83 | * Get the scale type.
84 | * @return The print item's scale type.
85 | */
86 | public ScaleType getScaleType(){
87 | return scaleType;
88 | }
89 |
90 | /**
91 | * Get the asset of the print item.
92 | * @return The print item asset.
93 | */
94 | public Asset getAsset(){
95 | return asset;
96 | }
97 |
98 | /**
99 | * Get's the bitmap from the asset.
100 | * @return The bitmap
101 | */
102 | public Bitmap getPrintableBitmap(){
103 | return asset.getPrintableBitmap();
104 | }
105 |
106 | /**
107 | * Draw the printItem onto a canvas.
108 | * @param canvas The canvas to be drawn on
109 | * @param dpi The dpi of the canvas
110 | * @param pageBounds The bounds of the page on the canvas. (Canvas can be bigger than the page we
111 | * want to draw on.
112 | */
113 | public abstract void drawPage(Canvas canvas, float dpi, RectF pageBounds);
114 |
115 | protected abstract void cleanup(Context context);
116 |
117 | //Parcelable methods
118 | protected PrintItem(Parcel in) {
119 | mediaSize = new PrintAttributes.MediaSize(in.readString(), "android", in.readInt(), in.readInt());
120 | margins = new PrintAttributes.Margins(in.readInt(), in.readInt(), in.readInt(), in.readInt());
121 | scaleType = (ScaleType) in.readValue(ScaleType.class.getClassLoader());
122 | asset = (Asset) in.readValue(Asset.class.getClassLoader());
123 | }
124 |
125 | @Override
126 | public void writeToParcel(Parcel dest, int flags) {
127 | dest.writeString(mediaSize.getId());
128 | dest.writeInt(mediaSize.getWidthMils());
129 | dest.writeInt(mediaSize.getHeightMils());
130 | dest.writeInt(margins.getLeftMils());
131 | dest.writeInt(margins.getTopMils());
132 | dest.writeInt(margins.getRightMils());
133 | dest.writeInt(margins.getBottomMils());
134 | dest.writeValue(scaleType);
135 | dest.writeValue(asset);
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/model/asset/Asset.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint.model.asset;
14 |
15 | import android.graphics.Bitmap;
16 |
17 | /**
18 | * Interface for subclassing different types of assets (Image, PDF, HTML...)
19 | */
20 | public interface Asset{
21 | /**
22 | * This method is used to get the bitmap from the asset.
23 | * @return The bitmap.
24 | */
25 | Bitmap getPrintableBitmap();
26 |
27 | /**
28 | * This returns the uri of the asset.
29 | * @return The URI location of the asset.
30 | */
31 | String getAssetUri();
32 |
33 | /**
34 | * Get the asset width.
35 | */
36 | int getAssetWidth();
37 |
38 | /**
39 | * Get the asset height.
40 | */
41 | int getAssetHeight();
42 |
43 | /**
44 | * Get content type string.
45 | */
46 | String getContentType();
47 | }
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/model/asset/PDFAsset.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint.model.asset;
14 |
15 | import android.content.Context;
16 | import android.graphics.Bitmap;
17 | import android.net.Uri;
18 | import android.os.Parcel;
19 | import android.os.Parcelable;
20 | import android.util.Log;
21 |
22 | import java.io.File;
23 | import java.io.FileInputStream;
24 | import java.io.IOException;
25 | import java.io.InputStream;
26 |
27 | public class PDFAsset implements Asset, Parcelable {
28 |
29 | String uriString;
30 | Boolean fromAsset;
31 | Uri uri;
32 |
33 | public PDFAsset(String uriString) {
34 | this.uriString = uriString;
35 | this.fromAsset = false;
36 | }
37 |
38 | public PDFAsset(String uriString, Boolean fromAsset) {
39 | this.uriString = uriString;
40 | this.fromAsset = fromAsset;
41 | }
42 |
43 | public PDFAsset(Uri uri, Boolean fromAsset) {
44 | this.uri = uri;
45 | this.fromAsset = fromAsset;
46 | }
47 |
48 | @Override
49 | public Bitmap getPrintableBitmap() {
50 | return null;
51 | }
52 |
53 | @Override
54 | public String getAssetUri() {
55 | return uriString;
56 | }
57 |
58 | @Override
59 | public int getAssetWidth() {
60 | return 0;
61 | }
62 |
63 | @Override
64 | public int getAssetHeight() {
65 | return 0;
66 | }
67 |
68 | @Override
69 | public String getContentType() {
70 | return "pdf";
71 | }
72 |
73 | @Override
74 | public int describeContents() {
75 | return 0;
76 | }
77 |
78 | @Override
79 | public void writeToParcel(Parcel parcel, int i) {
80 |
81 | }
82 |
83 | public InputStream getInputStream(Context context) {
84 | InputStream input = null;
85 | try {
86 | if (fromAsset) {
87 | // get InputStream from AssetManager
88 | if (context != null) {
89 | input = context.getAssets().open(this.uriString);
90 |
91 | if (input == null) {
92 | Log.e("PDFAsset", "Unable to open asset: " + this.uriString);
93 | }
94 | } else {
95 | Log.e("PDFAsset", "Error opening file. Context was null.");
96 | }
97 | } else {
98 | if(this.uri != null) {
99 | input = context.getContentResolver().openInputStream(uri);
100 | } else if (this.uriString != null) {
101 | File file = new File(this.uriString);
102 | input = new FileInputStream(file);
103 | }
104 |
105 | if (input == null) {
106 | Log.e("PDFAsset", "Unable to open file: " + this.uriString);
107 | }
108 | }
109 | } catch (IOException e) {
110 | Log.e("PDFAsset", "Error opening file: " + this.uriString);
111 | e.printStackTrace();
112 | }
113 |
114 | return input;
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/util/FontUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint.util;
14 |
15 | import android.content.Context;
16 | import android.graphics.Typeface;
17 |
18 | import com.hp.mss.hpprint.R;
19 |
20 | /**
21 | * This is used to load the HP Simplified font.
22 | */
23 | public class FontUtil {
24 | private static Typeface defaultFont;
25 |
26 | public static Typeface getDefaultFont(Context context) {
27 | if (defaultFont == null) {
28 | final String defaultFontFile = context.getResources().getString(R.string.lib_font);
29 |
30 | if(defaultFontFile.equals("")){
31 | defaultFont = Typeface.DEFAULT;
32 | }else{
33 | defaultFont = Typeface.createFromAsset(context.getAssets(), defaultFontFile);
34 | }
35 | }
36 | return defaultFont;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/util/MetricsUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint.util;
14 |
15 | import android.app.Activity;
16 | import android.content.Context;
17 | import android.content.SharedPreferences;
18 | import android.content.pm.ApplicationInfo;
19 | import android.preference.PreferenceManager;
20 | import android.util.Base64;
21 |
22 | public class MetricsUtil {
23 |
24 | private static final String PRINT_METRICS_PRODUCTION_SERVER = "https://print-metrics-w1.twosmiles.com/api";
25 | private static final String PRINT_METRICS_TEST_SERVER = "http://print-metrics-test.twosmiles.com/api";
26 | private static final String PRINT_METRICS_LOCAL_SERVER = "http://10.0.2.2:4567/api";
27 | private static final String PRINT_METRICS_USER_NAME = "hpmobileprint";
28 | private static final String PRINT_METRICS_PASSWORD = "print1t";
29 |
30 |
31 | public static boolean isDebuggable(Context context) {
32 | return ( 0 != ( context.getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE ) );
33 | }
34 |
35 | public static String getMetricsServer(Context context) {
36 | return (isDebuggable(context) ? PRINT_METRICS_TEST_SERVER : PRINT_METRICS_PRODUCTION_SERVER);
37 | }
38 |
39 | public static String getAuthorizationString() {
40 | String authorizationString = "Basic " + Base64.encodeToString((PRINT_METRICS_USER_NAME + ":" + PRINT_METRICS_PASSWORD).getBytes(), Base64.NO_WRAP);
41 | return authorizationString;
42 | }
43 |
44 | public static int getNextEventCounter(Activity hostActivity, String key) {
45 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(hostActivity.getApplicationContext());
46 |
47 | int id = preferences.getInt(key, 0);
48 | id += 1;
49 |
50 | SharedPreferences.Editor editor = preferences.edit();
51 | editor.putInt(key, id).commit();
52 |
53 | return id;
54 | }
55 |
56 | public static int getCurrentSessionCounter(Activity hostActivity) {
57 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(hostActivity.getApplicationContext());
58 |
59 | return preferences.getInt(EventMetricsCollector.PrintFlowEventTypes.ENTERED_PRINT_SDK.name(), 1);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/java/com/hp/mss/hpprint/util/SnapShotsMediaPrompt.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Hewlett-Packard Company
3 | * All rights reserved.
4 | *
5 | * This file, its contents, concepts, methods, behavior, and operation
6 | * (collectively the "Software") are protected by trade secret, patent,
7 | * and copyright laws. The use of the Software is governed by a license
8 | * agreement. Disclosure of the Software to third parties, in any form,
9 | * in whole or in part, is expressly prohibited except as authorized by
10 | * the license agreement.
11 | */
12 |
13 | package com.hp.mss.hpprint.util;
14 |
15 | import android.app.Activity;
16 | import android.app.AlertDialog;
17 | import android.content.Context;
18 | import android.content.DialogInterface;
19 | import android.content.Intent;
20 | import android.content.SharedPreferences;
21 | import android.content.res.Resources;
22 | import android.net.Uri;
23 | import android.os.Build;
24 | import android.preference.PreferenceManager;
25 | import android.provider.Settings;
26 | import android.view.View;
27 | import android.widget.CheckBox;
28 | import android.widget.CompoundButton;
29 |
30 | import com.hp.mss.hpprint.R;
31 |
32 | /**
33 | * This informs the user about 4x5 media and the steps necessary to print.
34 | */
35 | public class SnapShotsMediaPrompt {
36 |
37 | /**
38 | * This allows us to track user interaction with the prompt.
39 | */
40 | public interface SnapShotsPromptListener {
41 | public void SnapShotsPromptOk();
42 | public void SnapShotsPromptCancel();
43 | }
44 |
45 | private static final String SHOW_SNAP_SHOTS_MESSAGE_KEY = "com.hp.mss.hpprint.ShowSnapShotsMessage";
46 |
47 | public static void displaySnapShotsPrompt(final Context context, final SnapShotsPromptListener promptListener) {
48 | String header = context.getString(R.string.snap_shots_prompt_header);
49 | String message = context.getString(R.string.snap_shots_prompt_message);
50 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext());
51 | boolean showSnapShotsPrompt = preferences.getBoolean(SHOW_SNAP_SHOTS_MESSAGE_KEY, true);
52 | if (!showSnapShotsPrompt) {
53 | if (promptListener != null) {
54 | promptListener.SnapShotsPromptOk();
55 | }
56 | return;
57 | }
58 |
59 | View checkBoxView = View.inflate(context, R.layout.checkbox, null);
60 | final CheckBox checkBox = (CheckBox) checkBoxView.findViewById(R.id.checkbox);
61 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
62 | int id = Resources.getSystem().getIdentifier("btn_check_holo_light", "drawable", "android");
63 | checkBox.setButtonDrawable(id);
64 | }
65 | checkBox.setText(R.string.snap_shots_prompt_do_not_show);
66 |
67 | AlertDialog.Builder builder = new AlertDialog.Builder(context);
68 | builder.setMessage(message)
69 | .setTitle(header)
70 | .setView(checkBoxView)
71 | .setCancelable(true)
72 | .setOnCancelListener(new DialogInterface.OnCancelListener() {
73 | @Override
74 | public void onCancel(DialogInterface dialog) {
75 | if (promptListener != null)
76 | promptListener.SnapShotsPromptCancel();
77 | }
78 | })
79 | .setPositiveButton(R.string.snap_shots_prompt_ok, new DialogInterface.OnClickListener() {
80 | @Override
81 | public void onClick(DialogInterface dialog, int which) {
82 | if (checkBox.isChecked()) {
83 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext());
84 | preferences.edit().putBoolean(SHOW_SNAP_SHOTS_MESSAGE_KEY, false).commit();
85 | }
86 | if (promptListener != null)
87 | promptListener.SnapShotsPromptOk();
88 | }
89 | })
90 | .create()
91 | .show();
92 |
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-hdpi/ic_mobile_printing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-hdpi/ic_mobile_printing.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-hdpi/ic_mobile_printing_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-hdpi/ic_mobile_printing_text.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-hdpi/ic_print_service_help_enable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-hdpi/ic_print_service_help_enable.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-hdpi/ic_print_service_help_plugin_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-hdpi/ic_print_service_help_plugin_icon.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-hdpi/ic_printer_error_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-hdpi/ic_printer_error_icon.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-hdpi/ic_printscreen_print_instructions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-hdpi/ic_printscreen_print_instructions.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-hdpi/ic_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-hdpi/ic_support.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-hdpi/ic_wifi_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-hdpi/ic_wifi_icon.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-mdpi/ic_printscreen_print_instructions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-mdpi/ic_printscreen_print_instructions.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xhdpi/ann1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xhdpi/ann1.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xhdpi/ic_back_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xhdpi/ic_back_icon.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xhdpi/ic_printscreen_print_instructions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xhdpi/ic_printscreen_print_instructions.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/brother.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/brother.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/canon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/canon.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/disabled.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/down_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/down_arrow.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/downloading_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/downloading_arrow.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/enable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/enable.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/enabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/enabled.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/epson.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/epson.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/hp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/hp.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_green_question.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_green_question.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_help_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_help_icon.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_play.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_print_preview_print_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_print_preview_print_button.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_printscreen_print_instructions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/ic_printscreen_print_instructions.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/mopria.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/mopria.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/other.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/other.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/samsung.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/samsung.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/update.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/update.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxhdpi/x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxhdpi/x.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/drawable-xxxhdpi/ic_printscreen_print_instructions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobileprint/android-print-sdk/2f41a507588fa61027b9c1e200fa2722ee542c7c/mobileprintsdk/src/main/res/drawable-xxxhdpi/ic_printscreen_print_instructions.png
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/layout-large/printer_service_plugin_information.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
21 |
22 |
29 |
36 |
44 |
45 |
46 |
58 |
59 |
67 |
74 |
82 |
83 |
84 |
85 |
97 |
98 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/layout/activity_print_plugin_manger.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
22 |
23 |
29 |
30 |
43 |
44 |
45 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/layout/activity_print_preview.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
21 |
22 |
28 |
29 |
42 |
43 |
55 |
56 |
57 |
58 |
63 |
64 |
71 |
72 |
73 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/layout/checkbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
17 |
18 |
24 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/layout/dialog_before_enable_tips.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
18 |
19 |
29 |
30 |
35 |
46 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/layout/item_print_plugin_service.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
22 |
23 |
34 |
35 |
36 |
43 |
44 |
50 |
51 |
59 |
60 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/layout/printer_service_plugin_information.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
21 |
22 |
29 |
36 |
43 |
44 |
45 |
57 |
58 |
66 |
73 |
80 |
81 |
82 |
83 |
95 |
96 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/menu/menu_print_plugin_manager.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
24 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/menu/menu_print_preview.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
26 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/values-v21/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 | When using 4x5 media, you will need to select 4x6 on the print preview screen, but don\'t worry, it will print correctly.
16 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
17 | 64dp
18 |
19 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 | 打印预览
16 | 打印
17 | 设置
18 | 想象一个大型图像出现在下部
19 | 打印引导
20 | 支持
21 | 纸张大小
22 | 纸张类型
23 |
24 |
25 | 4 x 5
26 | 4 x 6
27 | 5 x 7
28 | 8.5 x 11
29 |
30 |
31 | - 照片纸
32 |
33 |
34 | 打印帮助
35 | 打印服务插件
36 |
37 |
38 | 惠普打印插件
39 | 你有惠普打印机吗?为了打印最好质量的照片,请安装惠普打印插件。
40 | 你有惠普打印机吗?为了打印最好质量的照片,请更新惠普打印插件。
41 | 确认你的惠普打印插件可用。
42 |
43 |
44 | 打印服务助手
45 | 为了打印最好质量的照片,请安装合适的插件并启动。
46 |
47 |
48 | 打印服务信息
49 | 获取打印服务插件
50 | 你必须安装打印服务插件。每个品牌的打印机都有自己的插件,使您可以使用移动设备打印。通用打印服务插件也可使用。选择为您提供最佳服务的插件。你可以随时添加额外的打印插件。
51 | 启动插件
52 | 下载打印服务插件后,你应该试图启动插件,选中并切换到“ON”
53 |
54 |
55 | 打印服务
56 | 确认打印服务插件安装并启动完成。
57 | 你必须安装打印服务插件。每个品牌的打印机都有自己的插件,使您可以使用移动设备打印。通用打印服务插件也可使用。选择为您提供最佳服务的插件。你可以随时添加额外的打印插件。
58 | 下载打印服务插件后,你应该试图启动插件,选中并切换到“ON”
59 | 检查你的打印服务插件
60 | 确认你的移动设备和打印机连接到同一网络中。
61 | 您的移动设备和打印机必须连接到您的本地Wi-Fi网络。查看您的设备的Wi-Fi信息,并按照指示连接。
62 | 检查您的打印机的任何错误信息或者电源问题。
63 | 一些常见的打印机问题有墨量低、卡纸、未装纸。另外检查确认打印机的电源。
64 |
65 |
66 |
67 | 在4x5纸上打印
68 | 继续
69 | 不再显示
70 | 您选择了4x5作为纸张大小。下一个屏幕将显示4x6,但是别担心,打印机将正确工作。
71 |
72 |
73 | 打印服务管理
74 | 你需要安装和启动打印服务插件
75 |
76 |
77 | - 惠普打印服务插件
78 | - 打印服务
79 | - 兄弟打印服务插件
80 | - 三星打印服务插件
81 | - 佳能打印服务
82 | - 爱普生打印技术
83 | - 其他打印服务插件
84 |
85 |
86 |
87 | - 惠普公司
88 | - Mopria联盟
89 | - 兄弟工业有限公司
90 | - 三星电子有限公司
91 | - 佳能公司
92 | - 精工爱普生公司
93 | - N/A
94 |
95 |
96 | 继续打印
97 | 跳过
98 | 你将被引导至安卓打印设置
99 | 启动插件
100 | 去设置
101 | 取消
102 | 启动
103 | 不启动
104 |
105 |
106 | 请首先设置打印作业数据
107 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 | #3A3A3A
16 | #0096D9
17 | #FFFFFF
18 | #007eba
19 | #EFEFF4
20 | #333333
21 | #8F8F95
22 | #61E3E3EC
23 | #2c363c
24 |
25 | #9B9B9B
26 | #00849D
27 | #00A5C4
28 | #F2F1F2
29 | #000000
30 | #333333
31 | #959595
32 | #FFEFEEEE
33 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 | 16dp
16 | 16dp
17 |
18 |
--------------------------------------------------------------------------------
/mobileprintsdk/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
20 |
21 |
25 |
26 |
30 |
31 |
36 |
37 |
41 |
42 |
45 |
46 |
49 |
50 |
56 |
57 |
60 |
61 |
64 |
65 |
68 |
69 |
72 |
73 |
74 |
75 |
76 |
79 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':mobileprintsdk'
2 |
--------------------------------------------------------------------------------