Comments (2)
I think I'm experiencing the same issue but with sending a broadcast to a different app (KeyMapper). I'm trying to send an intent to KeyMapper with the following settings:
I know it works from the KeyMapper side because I can trigger it with Termux's version on am:
am broadcast -a io.github.sds100.keymapper.ACTION_TRIGGER_KEYMAP_BY_UID --es io.github.sds100.keymapper.EXTRA_KEYMAP_UID 5344b82e-e269-473b-a19f-9c01cf4ed634
It seems the broadcast profile is broken
from easer.
The problem is that applyDynamics method ignores target package and target class. Without the data the broadcast is implicit which is not allowed on Android 8+. Also extras are lost here.
A quick fix is as follows. I did not go any deeper though, so it may break some other stuff as the class is used in other Intent actions. I also add ACCESS_BACKGROUND_LOCATION permission. I think it is needed to start background location in controlled app.
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0b8d99ca..cf238990 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+ <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
diff --git a/app/src/main/java/ryey/easer/skills/operation/intent/IntentOperationData.java b/app/src/main/java/ryey/easer/skills/operation/intent/IntentOperationData.java
index e39fbfac..c568bbd0 100644
--- a/app/src/main/java/ryey/easer/skills/operation/intent/IntentOperationData.java
+++ b/app/src/main/java/ryey/easer/skills/operation/intent/IntentOperationData.java
@@ -225,7 +225,13 @@ public class IntentOperationData implements OperationData, Reused {
String type = extra.type;
extras.add(new ExtraItem(key, value, type));
}
- data.extras = Extras.mayConstruct(extras);
+ intentData.extras = Extras.mayConstruct(extras);
+ }
+ if (data.target_package != null) {
+ intentData.target_package = data.target_package;
+ }
+ if (data.target_class != null) {
+ intentData.target_class = data.target_class;
}
IntentOperationData ret = new IntentOperationData(intentData);
ret.setSkillID(skillID());
from easer.
Related Issues (20)
- UX improvement HOT 1
- Question: How to switch hotspot on/of when connecting to other device via Bluetooth; Bug: external logging not possible
- wifi or data does not work
- [FR] Monitor directory HOT 4
- Improving the usage example HOT 1
- [FR] "wait" profile command
- Wiki pages vandalized HOT 1
- [FR] Multiple conditions?
- Crash when opening `Pivot`
- Download link is dead.
- FeatureRequest: Add option to scan for available networks and connect to a better one if in range
- [FR] Wi-Fi disconnection trigger
- [FR] dynamics string sanitization
- [FR] Condition valid for <x> time (duration condition)
- Can I initiate power off/on, enabled/disable battery saving mode? HOT 1
- Profile triggering at the wrong time
- Media volume issue
- [FR] Detect USB connections/input devices.
- [support] Where is the user support forum? (sending contents of notification) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easer.