Comments (14)
Yes, definitely.
In order to support this, The first thing is to extend the "send broadcast" operation to allow editing categories, data, and MIME.
Then, I'm not sure which way will be better:
- add a selection button/icon in the send broadcast operation part, and pick pre-defined intents there
- add dedicated operations for these intents (maybe all in one operation)
Also, I'm planning to change the profile editing page/dialog so users can "add" operations from a list, instead of the current "selected or not selected" way. I'm thinking of which way would be more natural.
from easer.
First part is already done. We can now manually set categories (seperated by newlines), data and MIME type in addition to action.
Any suggestions on how to design the second part?
from easer.
from easer.
You mean using existing intents?
Here are a few examples given by official documents.
One example may be:
Action:
android.intent.action.DIAL
Data:tel:123123
meaning dial the phone number 123123
from easer.
Ok, many thanks for your informative answer. :-)
from easer.
Hi, is this still waiting to be implemented?
from easer.
from easer.
I couldn't get it to work. Maybe I understand intents wrong, but I came to the conclusion that broadcasts and intents to start activities are different things.
I am trying to activate SD Scanner from easier but cannot make it. In the link is a description for how to activate with Tasker, I hoped I could do it similarly with Easer.
from easer.
from easer.
@ildar thank you for your support.
- I have tried the Activity Launcher app you suggest. It crashes when trying to start SD Scanner
- I have tried the Launch App function in Easer, as you can now pass a class name which i set to
com.gmail.jerickson314.sdscanner.MainActivity
. It crashes the same as 1.
04-02 21:05:45.951 E/AndroidRuntime(17325): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gmail.jerickson314.sdscanner/com.gmail.jerickson314.sdscanner.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
- It works as intended via command line:
$ am start -a android.intent.action.RUN -n com.gmail.jerickson314.sdscanner/.MainActivity
Starting: Intent { act=android.intent.action.RUN cmp=com.gmail.jerickson314.sdscanner/.MainActivity }
<logcat>
04-02 20:33:40.032 I/ActivityManager(1279): START u0 {act=android.intent.action.RUN flg=0x10000000 cmp=com.gmail.jerickson314.sdscanner/.MainActivity} from uid 10091 on display 0
- Trying via command line broadcast does not nothing. Output:
$ am broadcast -a android.intent.action.RUN -n com.gmail.jerickson314.sdscanner/.MainActivity
Broadcasting: Intent { act=android.intent.action.RUN cmp=com.gmail.jerickson314.sdscanner/.MainActivity }
Broadcast completed: result=0
- I tried many different things with Send Broadcast in Easer, to no avail. Always Action as
android.intent.action.RUN
, then custom keys exactly as in the SD Scanner description (Class, Package, Target) or leaving out some of them, or trying Classcom.gmail.jerickson314.sdscanner/com.gmail.jerickson314.sdscanner.MainActivity
or variations of this. I also tried custom keycmp
with valuecom.gmail.jerickson314.sdscanner/com.gmail.jerickson314.sdscanner.MainActivity
and variations. Never got a response.
from easer.
from easer.
You are right, it is SD Scanner that is crashing. But it should be possible to trigger the same action as am start
with Easer that is doing the correct thing.
- I was varying this in several ways, always trying the shorter and longer written form.
- What MediaService would that be? The whole point of existence for SD Scanner is that there is no built-in function in Android anymore that you can use to scan more than a single file at a time.
Unfortunately am start
is not working via the command in Easer, its also not working in the LOS built-in terminal with the binary /system/bin/am
(it gives an exception that permission INTERACT_ACROSS_USERS_FULL is necessary). It is working in termux though, which brings its own flavor of am
.
from easer.
Whoops, I didn't notice there is a conversation going on LOL .
Thank you a lot for the help @ildar . (Both of) Your discussions made the things more clear to me, and I think I have a conclusion / solution.
@iexos Have you tried not to write any class name in the Launch App Operation (i.e. only write the package name)? I just tested it on my side, and it works without crashing.
FYI, yes, as you have seen yourself, am start
and am broadcast
are two different things, as well as the Intent. In the Send Broadcast Operation, it just does broadcast, won't do "start activity" or "start service".
It seems a bit messy to have both functions in Send Broadcast Operation from my point of view, especially when "launch app" can have a selection of apps (not implemented yet, I have to admit) while send broadcast doesn't.
Maybe we should rename this issue as something like "allow to choose from pre-defined Intents"? Or just open another issue.
from easer.
@renyuneyun thank you for clearing this up. I think I understand now what is going on.
Without the class name it starts the application as you would expect, but without performing the actual scan, as am broadcast -a android.intent.action.RUN -n com.gmail.jerickson314.sdscanner/.MainActivity
does
So as i understand it, the missing part would be to choose "action" for Launch App.
from easer.
Related Issues (20)
- 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
- Broadcast not accepted by Android system HOT 2
- 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
- [FR] use WGTunnel for Wireguard intent
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.