Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Calling native function from android broadcast receiver

Calling native function from android broadcast receiver

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 588 Views
  • 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.
  • M Offline
    M Offline
    MajidKamali
    wrote on last edited by
    #1

    Hi.
    I have a Qt application which runs a service, that schedules an android AlarmManager broadcast receiver.
    When AlarmManager receives its broad cast, It calls a C++ function.
    I correctly registered a C++ function in main.cpp file, but I can not call that function from that broadcast receiver and application crashes.
    Error says: java.lang.UnsatisfiedLinkError: Native method not found

    changing
    <meta-data android:name="android.app.background_running" android:value="false" />
    to
    <meta-data android:name="android.app.background_running" android:value="true" />
    does not work either

    I have 2 questions:

    1. Can a Qt application runs in background with an AlarmManager?
    2. Can I call a C++ function in android broadcast receiver?
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved