GithubHelp home page GithubHelp logo

Comments (14)

renyuneyun avatar renyuneyun commented on May 14, 2024

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:

  1. add a selection button/icon in the send broadcast operation part, and pick pre-defined intents there
  2. 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.

renyuneyun avatar renyuneyun commented on May 14, 2024

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.

ildar avatar ildar commented on May 14, 2024

from easer.

renyuneyun avatar renyuneyun commented on May 14, 2024

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.

jpggithub avatar jpggithub commented on May 14, 2024

Ok, many thanks for your informative answer. :-)

from easer.

iexos avatar iexos commented on May 14, 2024

Hi, is this still waiting to be implemented?

from easer.

ildar avatar ildar commented on May 14, 2024

from easer.

iexos avatar iexos commented on May 14, 2024

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.

ildar avatar ildar commented on May 14, 2024

from easer.

iexos avatar iexos commented on May 14, 2024

@ildar thank you for your support.

  1. I have tried the Activity Launcher app you suggest. It crashes when trying to start SD Scanner
  2. 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
  1. 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
  1. 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
  1. 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 Class com.gmail.jerickson314.sdscanner/com.gmail.jerickson314.sdscanner.MainActivity or variations of this. I also tried custom key cmp with value com.gmail.jerickson314.sdscanner/com.gmail.jerickson314.sdscanner.MainActivity and variations. Never got a response.

from easer.

ildar avatar ildar commented on May 14, 2024

from easer.

iexos avatar iexos commented on May 14, 2024

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.

  1. I was varying this in several ways, always trying the shorter and longer written form.
  2. 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.

renyuneyun avatar renyuneyun commented on May 14, 2024

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.

iexos avatar iexos commented on May 14, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.