Hi,
I need to print some labels from a web application (chrome on android).
On PC I use a small webserver application and XmlHTTPRequest to send printer data (ZPL for example) to the serial or usb port.
On android I would have done the same but it seems like a HTTPS server is not yet possible with b4a,
plain http is often not allowed in this case because the web app itself is https.
So I use an Intent, this works fine (myapp://printlabel?id=111) but after printing my app stays in the foreground, when I run Activity.Finish in the end the app stops receiving these intents.
I tried redirecting this intent to a service but this doesn't seem to work (can't cast service to Activity).
So,I have two questions:
-Is an https server indeed not yet possible in B4A ? This worked very well actually (tried it with http).
-Is there another a way to hide but not finish my activity and return to the browser window where the link was clicked.
Or get the intent sent to a service.
-This seems to be what I need, https://developer.android.com/reference/android/app/IntentService
but it's unclear to me how to make that work in B4A, esp the manifest part.
Does anyone have some pointers ?
thx
I need to print some labels from a web application (chrome on android).
On PC I use a small webserver application and XmlHTTPRequest to send printer data (ZPL for example) to the serial or usb port.
On android I would have done the same but it seems like a HTTPS server is not yet possible with b4a,
plain http is often not allowed in this case because the web app itself is https.
So I use an Intent, this works fine (myapp://printlabel?id=111) but after printing my app stays in the foreground, when I run Activity.Finish in the end the app stops receiving these intents.
I tried redirecting this intent to a service but this doesn't seem to work (can't cast service to Activity).
So,I have two questions:
-Is an https server indeed not yet possible in B4A ? This worked very well actually (tried it with http).
-Is there another a way to hide but not finish my activity and return to the browser window where the link was clicked.
Or get the intent sent to a service.
-This seems to be what I need, https://developer.android.com/reference/android/app/IntentService
but it's unclear to me how to make that work in B4A, esp the manifest part.
Does anyone have some pointers ?
thx