ilan Expert Licensed User Longtime User Dec 11, 2016 #1 hi can i start a service when something was copied to clipboard? maybe with intent filters like recognize when an sms arrives? thanx, ilan EDIt: maybe this can help? http://stackoverflow.com/questions/19963785/service-android-clipboard-listener
hi can i start a service when something was copied to clipboard? maybe with intent filters like recognize when an sms arrives? thanx, ilan EDIt: maybe this can help? http://stackoverflow.com/questions/19963785/service-android-clipboard-listener
ilan Expert Licensed User Longtime User Dec 11, 2016 #3 Ohanian said: Hi, try this Click to expand... Awesome. But dont i need to add something to the manifest? Upvote 0
Ohanian said: Hi, try this Click to expand... Awesome. But dont i need to add something to the manifest?
Ohanian Active Member Licensed User Longtime User Dec 11, 2016 #4 as far as i remember no. i don't have access to my code, i'll check it tomorrow if you face any problem. Upvote 0
as far as i remember no. i don't have access to my code, i'll check it tomorrow if you face any problem.
ilan Expert Licensed User Longtime User Dec 11, 2016 #5 just tried it, it works but as long the service is running. and i would like to avoid running a forground service so i need to add an intent filter to the manifest that will start this service when someone copy something to the clipboard something like this B4X: AddReceiverText(clipboard, <intent-filter> <action android:name="android.intent.action.onPrimaryClipChanged" /> </intent-filter>) i just dont know the right intent action (ps clipboard is the service) Upvote 0
just tried it, it works but as long the service is running. and i would like to avoid running a forground service so i need to add an intent filter to the manifest that will start this service when someone copy something to the clipboard something like this B4X: AddReceiverText(clipboard, <intent-filter> <action android:name="android.intent.action.onPrimaryClipChanged" /> </intent-filter>) i just dont know the right intent action (ps clipboard is the service)
ilan Expert Licensed User Longtime User Dec 11, 2016 #6 if there is no intent filter for that i will use a sticky service. thanx a lot @Ohanian Upvote 0
MitchBu Well-Known Member Licensed User Longtime User Dec 12, 2016 #7 Would this help ? https://www.b4x.com/android/forum/threads/cant-disable-clipboard-listener.67335/ Upvote 0
ilan Expert Licensed User Longtime User Dec 12, 2016 #8 MitchBu said: Would this help ? https://www.b4x.com/android/forum/threads/cant-disable-clipboard-listener.67335/ Click to expand... Thanx but what i am looking for is to start a service when something was copied to clipboard. A listner will work as long as the service is running. Using a sticky service solved my problem but i prefer to do it with a regular service to save batery life. Upvote 0
MitchBu said: Would this help ? https://www.b4x.com/android/forum/threads/cant-disable-clipboard-listener.67335/ Click to expand... Thanx but what i am looking for is to start a service when something was copied to clipboard. A listner will work as long as the service is running. Using a sticky service solved my problem but i prefer to do it with a regular service to save batery life.