Issue Integrating JSON API with Ajax for APK Build in Framework7

Hello Framework7 Community,

I am encountering a challenge while attempting to build an APK with Framework7. Initially, creating an APK from the basic design works without any issues. However, the problem arises when I try to integrate a JSON API using Ajax.

Here’s a brief overview of the steps I’ve taken and where I am getting stuck:

  1. The basic Framework7 app design is complete, and the APK is generated successfully with the standard features.
  2. I then proceed to integrate a JSON API using Ajax to fetch dynamic content.
  3. After this integration, when I attempt to build the APK, the process fails, and the APK is not created.

I have double-checked the API integration and ensured that the Ajax calls are correctly implemented. Despite this, the APK build process seems to be impacted by this addition.

I’m looking for guidance on how to resolve this issue. Here are some specific questions I have:

  • Are there any known compatibility issues with Ajax calls in Framework7 when building for Android?
  • Is there a particular build configuration or step that I need to adjust to accommodate the Ajax-based API interactions within the app?
  • Could there be a CORS issue or any other security setting that I might be overlooking when the app is in the APK format?

Any advice, insights, or recommendations would be greatly appreciated. If further information is needed, I am happy to provide code snippets or error logs.

Thank you in advance for your assistance. My name is karshan Zala from Fruxinfo private Limited you can contact me on skype fruxinfo

Hey Karshan,

Are you building for Android using Cordova or Capacitor? I don’t think the issue is with f7 but with the apk permissions

I don’t fully understand what you do in number 2. You say you fetch a JSON API and that fails the build of the apk in 3.
That could be different than CORS issues inside the app vs during the build

Can you paste the errors you have?