Android Question I can't run my app!

nicieri

Active Member
Licensed User
Longtime User
Hi, if I try my app in release mode with B4a everything is OK.

But when I try to install the apk directly in the phone (from a link) this is not working..

I don't have enabled the option "open" my app after install (in the installed package screen of android os).

I can't open my app from an icon, beacuse part of my code hide the icon from "Apps" (This is intended to be a hidden application).

Maybe some missed option in the manifest.. i don't know.

How can I view this?..
 

nicieri

Active Member
Licensed User
Longtime User
Hi,.. I know now the error...

'AddReplacement(android.intent.action.MAIN, unused_action)

This line means that it can not be opened.

But now my app is not with hidden icon

Any idea?
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Hi,.. I know now the error...

'AddReplacement(android.intent.action.MAIN, unused_action)

This line means that it can not be opened.

But now my app is not with hidden icon

Any idea?
I assume you don't want users to see your app? if that is the case how do you expect your app to run, what is the purpose of this app?, maybe you need add a service that will start as soon as the app is installed and run whatever code you want run in the background?

Walter
 
Upvote 0

nicieri

Active Member
Licensed User
Longtime User
Yes.. really my app is a service.. a hidden service..

'AddReplacement(android.intent.action.MAIN, unused_action) but i can hide my app now.

When I installed my app with the line.. the service don't make nothing.

Tha app don't run.
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Yes.. really my app is a service.. a hidden service..

'AddReplacement(android.intent.action.MAIN, unused_action) but i can hide my app now.

When I installed my app with the line.. the service don't make nothing.

Tha app don't run.
when asking questions like this, it is always better to at least include the relevant parts of your code, an extra pair of eyes is always good and you'll be able to get the help you need from others in the forums.

Regards,
Walter
 
Upvote 0

nicieri

Active Member
Licensed User
Longtime User
Ok Walter,.. Thanks..

My app, really is a Service.. for this my app is hidden..

Sub Service_Create
'This is the program entry point.
'This is a good place to load resources that are not specific to a single activity.
Try
PWS.PartialLock
.......
Catch
Log(LastException)
End Try
End Sub

So, the problem is this line: 'AddReplacement(android.intent.action.MAIN, unused_action) but i can hide my app now.

This line prevents that service or app start (when is installed directly from apk file if I try with b4a software this work's good).

When I remove this line, the service work!.. but the icon appear.
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Due to security reasons, Android doesn't allow apps like this to run.
They must have changed it then, i wrote an app a few years ago and it ran in the background and i was able to hide the icon, but it's been a while so yeah things must be different now.

regards,
Walter
 
Upvote 0
Top