UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    UT programming intents and system/app calls?

    Scheduled Pinned Locked Moved App Development
    4 Posts 3 Posters 605 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • developerbaymanD Offline
      developerbayman
      last edited by

      does UT provide a "intent" call basically allowing me to call funtions from another application basically android does it like this:

      Intent it = new Intent("com.android.test2.Main2method");
      context.sendBroadcast(it)
      

      then:

      public class ActionReceiver extends BroadcastReceiver {
          @Override
          public void onReceive(Context context, Intent intent) {
              if ("com.android.test2.Main2method".equalsIgnoreCase(intent.getAction())) {
                  Main2method();
              } 
          }
      }
      

      and then:

      
      
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          
      
          receiver = new ActionReceiver();
          IntentFilter filter = new IntentFilter();
          filter.addAction("com.android.test2.Main2method");
          registerReceiver(receiver, filter);
          
      }
      
      

      how does UT handle this? and any security measures i should be aware of?

      AppLeeA 1 Reply Last reply Reply Quote 0
      • AppLeeA Offline
        AppLee @developerbayman
        last edited by

        @developerbayman
        Applications are sandboxed in UT, so it cannot be achieved.
        But there are exceptions to share data apps can call on the "Content Hub".

        Here is the doc about how to use it: https://docs.ubports.com/en/latest/appdev/guides/contenthub.html

        developerbaymanD 1 Reply Last reply Reply Quote 0
        • developerbaymanD Offline
          developerbayman @AppLee
          last edited by

          @applee thank you very much

          1 Reply Last reply Reply Quote 0
          • K Offline
            kugiigi
            last edited by

            No idea about intents but I guess its equivalent would be content hub and URI handling. They're far from being robust but that's all we have now 😄

            1 Reply Last reply Reply Quote 2

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post