Android Question new apk on device

Lupa

Member
Licensed User
Longtime User
Hi, When i install new apk on my device (smartphone), that installs upon previous installation. But I have different title, different project and different apk name.
Also I have this problem only from 15 days ago. Until february 2016 all was ok, also in the same project.
Any idea about?
Thanks
lupa
 

DonManfred

Expert
Licensed User
Longtime User
Each app must have a unique packagename!
Press CTRL-B and setup a different packagename for each app you create. It default´s to b4a.example for each new app. You need to change this before you compile the app.
 
Last edited:
Upvote 0

Lupa

Member
Licensed User
Longtime User
I have this problem only from 15 days ago! But my computer has no changed.
I have just tried with different packagename, title and apk filename, but i have always the same result.
I can see only the last app on my smartphone and not the previous app (totally different).
Thanks
lupa
 
Upvote 0

Lupa

Member
Licensed User
Longtime User
Sorry, but not. all the names are different and I have many app with the same package name already installed without problems.
lupa
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
and I have many app with the same package name already installed without problems
NO! I dont´believe that! This is the case in b4a 5.8 and it was the case in b4a 3.72 (the one i buyed three years ago)!

You can only install ONE app with the packagename XY!

EACH App must have a different packagename.

You can give it all the same NAME (ApplicationLabel)
#Region Project Attributes
#ApplicationLabel: B4A Example

but you can´t install two apps with the same PACKAGENAME (default is b4a.example) in Android!

packagename0110.png
 
Upvote 0

Lupa

Member
Licensed User
Longtime User
Ok. I have uploaded two files (.zip).
Thanks and regards
lupa
 

Attachments

  • cronorotate.zip
    45.4 KB · Views: 261
  • kronometro2.zip
    162.5 KB · Views: 283
Upvote 0

Lupa

Member
Licensed User
Longtime User
Hi,
Any new project (with different packagename) installed overrides the last installation.
I have installed on my smartphone 5 app and 3 of these have packagename "b4a.example" ,
I have this problem only from from 15 days ago!
But now kronometro2 override cronorotate and viceversa.
Thank you for all
lupa
 
Upvote 0

gz7tnn

Member
Licensed User
Longtime User
Hi Lupa
What DonManfred and Erel are saying above is correct. I have downloaded the 2 sample files you posted in #8 above and the way these are set up they will not over-write each other however one of the settings you have in kronometro2 WILL have the potential to overwrite other apps you have created, and will also have the potential to be overwritten by a future app that you may create.

I have attached 3 images of my dev environment which may help you to solve this. The first 2 are screen shots of the code you supplied in #8, unchanged.
cronorotate.png:
The way you have this is setup it will not overwrite - or be overwritten as you have the following settings
#ApplicationLabel: cronorotate
Package Name: crono.rotate
The apk that is produced is named cronorotate.apk (from the name in #ApplicationLabel)

kronometro2.png:
The way this is setup it will certainly be ovewritten - or overwrite as you have these setings
#ApplicationLabel: kronometro2
Package Name: b4a.example <<-- it is this setting that is causing your problem
The apk in this case is named as kronometro2.apk (again from the name in #ApplicationLabel)

quiktest.png
This one shows a quik test I have just done, and with these settings -- my new app overwrites your kronometro2 app.
because I have deliberately left the package name as b4a.example
The apk name for my one is quiktest.apk

In testing a cycle of installing your kronometro2 then my quiktest then your kronometro2 app. each time i did the install the existing one was overwritten
Simply because the Package Name is the same.

So as DonManfred and Erel say - check the Package Name in your projects as this will be the reason for what you are experiencing.
As to why this has only started to happen for you would just be a guess on my part, but the identical Package Name is the key.

cronorotate.png kronometro2.png quiktest.png
 
Last edited:
Upvote 0

shb777

Active Member
Licensed User
Longtime User
This is really stupid. If you need a different package name for every program, in should automatically be set to the application label. not b4a.example.
I've wasted a lot of time with this blunder.

Now that I changed the package name it won't install it to my phone. Great job Erel

I copied the apk file from my program's object directory, to my phone, and installed it manually, and it works, but I shouldn't have to do that.
 
Last edited:
Upvote 0

KMatle

Expert
Licensed User
Longtime User
This is really stupid. If you need a different package name for every program, in should automatically be set to the application label. not b4a.example.
I've wasted a lot of time with this blunder.

Now that I changed the package name it won't install it to my phone. Great job Erel

Please be polite! We all have "wasted" a lot of time trying to solve a problem. You must understand some basics. It's not an issue of B4A or because "someone" hasn't thought if it.

- the App's label is just a label. It is just displayed and you can use almost any char you want (with spaces). So it CAN'T be used for the package name.

- the package name MUST be unique ("world wide") and MUST follow strict requirements of Google. You have experienced what happens when you have more than one apps with the same package name.

- did you ever save a file on Windows? Yes, there are strict rules how the filename may be defined.

- if you don't believe that or find it stupid: Just upload your app to the Playstore and see what Google says

Summary:

App-Label: Do what you want

Package-Name:

Almost all users chose it like this:

Country
Your name / your server address (if you have one)
The app's name

Example: de.xxxxxx.myapp1 (I come from Germany, so it's "de"). If your family name is "Miller" you have to think about a more unique name like "millerssupersoftware"

Again: Be polite and we help you. If you don't understand things, ask. If you find thing's stupid, tell us about it. Don't blame enyone here.
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
This is really stupid. If you need a different package name for every program, in should automatically be set to the application label. not b4a.example.
I've wasted a lot of time with this blunder.

Now that I changed the package name it won't install it to my phone. Great job Erel

I copied the apk file from my program's object directory, to my phone, and installed it manually, and it works, but I shouldn't have to do that.

You are very nervous for my taste. You are Member since 2013 you ahve write "only" 2 Messages and you show up in this way.
Oh boy take easy
This is a large community ready to help anyone.
Even Erel is always available to help everyone, and yes i confirm ... does great work.
If you have problems you can take the deep.
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
You are very nervous for my taste. You are Member since 2013 you ahve write "only" 2 Messages and you show up in this way.
Oh boy take easy
This is a large community ready to help anyone.
Even Erel is always available to help everyone, and yes i confirm ... does great work.
If you have problems you can take the deep.


I bought B4A less than a month ago so I don't know how I could be a member since 2013.
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
Sorry, I didn't mean to be rude. Erel did a good job on this, especially for only one person. This morning, I compiled without changing anything,
and it worked!!! So I don't know why it wasn't working last night. My package name in b4a is b4a.mp3player, and the generated apk name is
mp3Player.apk. I think Visual Basic 6 has a project name you would set. Maybe you could do that, and make sure it's a legal apk name..Steve



Please be polite! We all have "wasted" a lot of time trying to solve a problem. You must understand some basics. It's not an issue of B4A or because "someone" hasn't thought if it.

- the App's label is just a label. It is just displayed and you can use almost any char you want (with spaces). So it CAN'T be used for the package name.

- the package name MUST be unique ("world wide") and MUST follow strict requirements of Google. You have experienced what happens when you have more than one apps with the same package name.

- did you ever save a file on Windows? Yes, there are strict rules how the filename may be defined.

- if you don't believe that or find it stupid: Just upload your app to the Playstore and see what Google says

Summary:

App-Label: Do what you want

Package-Name:

Almost all users chose it like this:

Country
Your name / your server address (if you have one)
The app's name

Example: de.xxxxxx.myapp1 (I come from Germany, so it's "de"). If your family name is "Miller" you have to think about a more unique name like "millerssupersoftware"

Again: Be polite and we help you. If you don't understand things, ask. If you find thing's stupid, tell us about it. Don't blame enyone here.
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
I'm still having big problems with this. I compile with the bridge connected, and then it never asks me if I want to install the new version. It's not my network, because if I compile another program, the bridge works fine. This is happening with my phone and my tablet. Steve

now I got a "there is a problem parsing the package" error
 
Last edited:
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
I'm still having big problems with this. I compile with the bridge connected, and then it never asks me if I want to install the new version. It's not my network, because if I compile another program, the bridge works fine. This is happening with my phone and my tablet. Steve

now I got a "there is a problem parsing the package" error


This error happen ( you see this in documentation disponible in internet )

  • Parse error can occur if you have made changes to the app’s manifest file like changing the Android version.
  • It can also occur due to a corrupted .apk file or may because of a partially downloaded apk file.
  • Not enough permission to install third-party apps from unknown sources.
  • Your Android smartphone OS version or the hardware is not compatible with the app.
  • A third-party security application is blocking the app installation.

You write: "
1. I compile with the bridge connected, and then it never asks me if I want to install the new version ( STRAIN )
2. It's not my network, because if I compile another program, the bridge works fine...
"

So i think that you have problem about NETWORK. Use USB and you will see all problem vanish"
You can see in "Beginner's Guide" ( HERE ) pag. 140
 
Upvote 0
Top