Android Question paste to Clipboard from a service

peacemaker

Expert
Licensed User
Longtime User
Hi, All
Is it possible ?
BClipboard object of the known lib is the Activity object.
 

peacemaker

Expert
Licensed User
Longtime User
Yes, Erel, thanks.
After change it's OK for the service as Process object.

B4X:
<?xml version="1.0" encoding="UTF-8"?>

-<root>

<doclet-version-NOT-library-version>1.00</doclet-version-NOT-library-version>


-<class>

<name>b4a.util.BClipboard</name>

<shortname>BClipboard</shortname>

<owner>process</owner>


-<method>

<name>getText</name>

<comment/>

<returntype>java.lang.String</returntype>


-<parameter>

<name>ba</name>

<type>anywheresoftware.b4a.BA</type>

</parameter>

</method>


-<method>

<name>clrText</name>

<comment/>

<returntype>void</returntype>


-<parameter>

<name>ba</name>

<type>anywheresoftware.b4a.BA</type>

</parameter>

</method>


-<method>

<name>setText</name>

<comment/>

<returntype>void</returntype>


-<parameter>

<name>ba</name>

<type>anywheresoftware.b4a.BA</type>

</parameter>


-<parameter>

<name>text</name>

<type>java.lang.String</type>

</parameter>

</method>


-<method>

<name>hasText</name>

<comment/>

<returntype>boolean</returntype>


-<parameter>

<name>ba</name>

<type>anywheresoftware.b4a.BA</type>

</parameter>

</method>

</class>

</root>
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
"Sleep" means stop working and relax (just a joke)
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
But, seems, it's clear, if your app must work - you must prevent it of sleeping. By PhoneWakeState from Phone, and Foreground service.
BUt it's offtopic discussion here, make a new topic.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…