Android Question Application does not appear in the Task List

adriano.freitas

Active Member
Hi!

I've been having a problem that I'm not able to solve, although I think it's simple:

The application doesn't appear along with others running when I press the android task button. If I'm using the app and I need to switch to any other (like whatsapp etc), then it's not possible to return anymore, it's necessary to restart the app, reset the password, etc... Any suggestions?
 

adriano.freitas

Active Member
Hi! Yes, in my app. I'll illustrate with pictures. Look at image 1. The application is running. In figure two, when you press the activities button, it is there. Then I need to switch to whatsapp, as shown in figure 3. Then I need to go back to the app and it no longer appears. If I try to open it again, it starts the whole process (login, etc) and not where it left off.
 

Attachments

  • 01.jpg
    01.jpg
    142.5 KB · Views: 138
  • 02.jpg
    02.jpg
    202.2 KB · Views: 140
  • 03.JPG
    03.JPG
    389.9 KB · Views: 126
  • 04.jpg
    04.jpg
    324.1 KB · Views: 123
Upvote 0

adriano.freitas

Active Member
Manifest:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")

CreateResourceFromFile(Macro, Themes.DarkTheme)

'End of default text.

SetActivityAttribute("Main",  android:windowSoftInputMode, "stateHidden|adjustPan")

AddManifestText(<uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE"
    android:maxSdkVersion="18" />
)

AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)

CreateResourceFromFile(Macro, Core.NetworkClearText)

AddActivityText(Main,
  <intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data android:scheme="$PACKAGE$" />
  </intent-filter>
   )

AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)

SetActivityAttribute(Main, "android:excludeFromRecents", "true")

' Required to read and write calendars, as per DonManfred's
' https://www.b4x.com/android/forum/threads/working-with-calendars-using-contentresolver-query-insert-update-delete.100229/
AddManifestText(
<uses-permission android:name="android.permission.READ_CALENDAR"/>
<uses-permission android:name="android.permission.WRITE_CALENDAR"/>
)
AddPermission("android.permission.GET_ACCOUNTS")
I used the manifest as it is initially generated and added some things that I collected here to use the Google calendar, etc. I'll put the manifest here so you can see:
 
Upvote 0

adriano.freitas

Active Member
Hi! Perfect! That was it! I was really dumb, as this code already says it is the cause of the problem, but as I'm new to these platforms (Android and V4A), I didn't pay attention to it! Thank you very much!
 
Upvote 0
Top