PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
Printing over android
Printing over android
Started by Mister TRIANTAFILLOS, Feb., 14 2018 6:47 PM - 1 reply
Connect yourself…
Mister TRIANTAFILLOS
#1
Registered member
30 messages
Posted on February, 14 2018 - 6:47 PM
Any suggestions for print in thermal network printer over android ?
(I don't wont to use web services with pc for printing data as client of web services, this is the only way to printing for know).
Report
0
0
Mister TRIANTAFILLOS
#2
Registered member
30 messages
Posted on February, 15 2018 - 7:07 PM
Hear is one code to print a text fille that export my app and send to 3rd part application "PrintBot" to handle the printig
Path
is UNICODE string
=
(
CompleteDir
(
SysDirStorageCard
(
)
) +
"document.txt"
)
textto_print
is UNICODE string
textto_print
=
"Export text + printbot line 1"
+
CR
textto_print
=
textto_print
+
"line 2"
fSaveText
(
Path
,
textto_print
)
C
all_print_bot
(
Path
)
/*Java code*/
import android.net.Uri;
import java.io.File;
import android.content.Intent;
import android.content.Context;
import android.app.Activity;
import java.lang.*;
import android.util.*;
import java.lang.Exception;
import android.util.Log;
public static void Call_print_bot(String path_tmp)
{
/* https://www.zenofx.com*/
Intent intent = new Intent("com.zenofx.action.PRINT");
File path_ToPrint = new File(path_tmp.toString());
Uri uriToPrint = Uri.fromFile(path_ToPrint);
intent.setDataAndType(uriToPrint, "text/html");
getCurrentActivity().startActivity(intent);
/*Toast.makeText(getApplicationContext(), uriToPrint.toString() ,Toast.LENGTH_LONG).show();*/
}
How can i use the google cloud printer ?
after some searching i found have some code that can print using java classes etc and i dont know how to define java classes over windev mobile. (code that i found its for Android studio). I whone this solution to do not need the 3rd part app
Message modified, February, 15 2018 - 7:09 PM
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text