can't see admob banners in libgdx app - android

I added the code as it is written
here
But I can't see banners with ads in my game.
My app is published. But the current version is not published yet.
I've added to manifest:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
There is a similar thread
here
But I could not understand the answer there.
They wrote:
You don't need to have an app already on the market to get a Publisher ID for a new app.
In the Android Package URL field that's on the "Add Site/App" form, just enter
"market://details?id=your.package.name". You'll of course want to replace the
'your.package.name' with your app's actual package name.
The viewWidth warnings are fine and you will likely still see them after inserting
your Publisher ID.
I don't understand where should I include "market://details?id=your.package.name".
Logcat shows me the following errors:
w/Ads (3200) Invalid unknown request error: Cannot determine request type.
Is your ad unit id correct?
w/webcore(3200): can't get the viewwidth after the first layout
My publisher key is correctly inserted to the code.
BTW it was printed in logcat. (Is it possible to exclude printing it?)
Thanks

You don't need to have an app already on the market to get a Publisher
ID for a new app. In the Android Package URL field that's on the "Add
Site/App" form, just enter "market://details?id=your.package.name".
You'll of course want to replace the 'your.package.name' with your
app's actual package name. The viewWidth warnings are fine and you
will likely still see them after inserting your Publisher ID.
This is related to Admob, when adding an application to Admob (via admob.com) its not required to have the app published in the market. Admob will ask you for the package name, its ok to write a package name that is not yet published in the Android Market.

Related

Installation failed with message INSTALL_FAILED_DUPLICATE_PERMISSION… C2D_MESSAGE possibilities

(if you came here by googling looking for a solution for this error,below links will give you an answer,also my question has kind of an explanation!)
Possible duplicate of
INSTALL_FAILED_DUPLICATE_PERMISSION… C2D_MESSAGE
Error -505 INSTALL_FAILED_DUPLICATE_PERMISSION
Wait!
I got this error today in a live project.User came with the 505 error unable to install the app.Then i ran it on IDE!
If you download an app with this mentioned issue from play store you will get an error with 505 when you try to install.
If you try to run it using your IDE you will get the error like in above image! (correct me if I am wrong)
Then I was looking for reasons.
This was my issue!
<permission
android:name="in.wptrafficanalyzer.locationroutedirectionmapv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="in.wptrafficanalyzer.locationroutedirectionmapv2.permission.MAPS_RECEIVE" />
Surprise thing was another developer's app on a particular users phone used the same signature! Damn, those copy pastes met each other today!!
I think if I try to declare same permission in two applications with
same package name this error can occur.(correct me if I am wrong)
Here are my 2 questions?
1.Do they need to be with the same permission? anyway they will get this thing when its same. lets say app A users a pkg.name with permission permission.RECEIVE app B use same package with another permission CONFIGURE_SIP.Can this occur when they meet each other?(seems like a stupid question but I want to confirm the other app that was there in the client's mobile had the same thing!)
2.What are/is there any other the possibilities that this error can occur?
An application defines a custom permission using signature level security
You attempt to update the installed app with a version signed with a different key
The test device is running Android 21 or newer with support for multiple users
Got those 1 2 3 from this post ! Are they true? If yes any good explanation about them will be great or any additional reason for this error?
There are many good answers in the mentioned posts!Not asking how to fix this! But how it gets generated! Also if I mentioned/understood something wrong please do note it down!!
Thank you.
Edit : As I mentioned please note that the issue came form an app which is already in the Play Store. And about the other app I have no idea! It's there in the client's mobile.Probably its also from play store because even developer options was not activated till I try to run on that mobile.He did not had any previous apps from my company as well.He just tried to download the app got 505 error and came to fix it.
And also my first option was the removal of that permission an it made the app install successfully(not the right thing but to confirm where the issue was). That is the reason that I need to know the possibilities of this error!
#commonsware blogs has explain it in details in Custom Permission Vulnerability and the 'L' Developer Preview:
Near as I can tell, the “L” Developer Preview requires that all apps
with a <permission> element for the same android:name value be signed
by the same signing key. The actual protectionLevel or other values
inside the <permission> does not matter. Even if they are identical, an
app trying to define the <permission> will fail to install if an
existing installed app already defines the <permission>. Specifically,
the installation of the second app will fail with an
INSTALL_FAILED_DUPLICATE_PERMISSION error.
Here the answer from #commonsware: https://stackoverflow.com/a/11730133/4758255
Your problem isn't permissions. It's impossible to have two apps with the same manifest package name.It must be unique. So system think that user try to reinstall/update old app with new signing certificate. From android developers blog
If the signing certificate changes, trying to install the new application on to the device will fail until the old version is uninstalled.
EDIT:
I run some tests with permissions. I think, behavior is very similar with application package name. Error occur only if 100% matching. Results:
app A(package test.test) vs app B(package test.test2)
package="test.test">
<permission
android:name="test2.example.h"
android:protectionLevel="signature" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.test2">
<permission
android:name="test.example.hr"
android:protectionLevel="signature" />
permission A - test.example.h vs B - test.example.h - DUPLICATE_PERMSSIONS error
test.example vs test.example.h - success
test.example.g vs test.example.h - success
uses-permission doesn't affect on errors/installations. But I think you can get SeciurityException in runtime, if try to use others permissions.

Seeing 'redirect_url' errors when using the LiveSDKs

When setting up the example Android application, I updated the configuration file to include my application id that I received when I registered on the development portal. Then when attempting to sign in to the application on my device I see this error message:
The provided value for the input parameter 'redirect_uri' is not valid. The client application must be marked as 'mobile', or the value must be an absolute URL which matches the registered redirect URI.
What do I do to get around this error so that I can sign in with the sample app?
This error is correctable by adding a Redirect Urls setting in the Microsoft Account Developer Center, as pictured below.

Facebook on Android — Debug popup Hashkey keep appear

I'm trying to add the Facebook API in my application. I build it in ActionScript3-AIR to proceed an export on iOS/Android and use the GoViral API to apply the connection with Facebook.
After the creation of the application on Facebook Developer, it works on iOS, but not on Android.
When this line is read GoViral.goViral.initFacebook( XXXXXXX ), on Android, the application show a popup which display the Key Hashes Here, the screenshot:
Then, nothing happen. The connexion don't seem to be done and, if I try an authentication with GoViral.goViral.authenticateWithFacebook( "user_likes,user_photos,publish_actions" ) it does nothing. And by that, I really mean nothing in the way that it don't even return the GVFacebookEvent.FB_LOGIN_FAILED event.
I used the "Mail It" button on this popup. Took the hash key and pasted it in the Android section of my application in the Facebook Developer Here, the screenshot:
But, nothing changes and the popup always appears.
After that and by the results of some google research, I've try to make my own Hash Key, helped by some tutorials. The Key has been generated but didn't correct anything about the popup.
So, actually, I'm a little confuse about this issue.
Especially as I've try to put another fake App ID in the initFacebook method : the popup continues to appear. So I wonder if it can really see it.
For information, I created the application project on the Google Developers Console.
The manifest I use to apply the Facebook API is this one :
<uses-sdk android:targetSdkVersion="12"/>
<uses-sdk android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="Login"/>
</application>
Thanks a lot to help me to fix this issue.
------ EDIT ------
I found the problem about the Debug Pop-up with the Hash Key. It was relative to the GoViral API which ( I didn't know this ) has two version : One normal and one for the debug which always makes appear the hash key in a pop-up at connection.
The Facebook connection still not working, but it's sound to be another problem so I can say this problem is solved.
I've found the solution which is way simple than I imagined. In the sources of GoViral, there was two ANE, I used the one which was makes for debug. It makes appear the popup to give us the hashkey. After what, we have to put the other ane to make it work.

Map not being displayed after refactoring to change the name of the project and package

I'm close to finish my first app so I change its name and the corresponding packages. To do so, I used the Android Tools from Eclipse and everything works after one or two attemps (there where a couple of things that I had to change manually), but in general, following the comments from this response, there were not further problems. Except for the Google Maps. Now they are not being displayed anymore and I'm getting the following error:
Google Maps Android API(12251): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
I know that there is no connection problem because I'm getting other kind of info from the internet and because the following sentence is true:
int availabilityCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());
if(availabilityCode == ConnectionResult.SUCCESS){
The first thing that I did was to go to the Google API and change the package name in the place where you generate the key to make it match the new one. That didn't work, so I deleted the key and created a new one. I pasted the new API key in the Android Manifest but it is not working. Any clues? I'm missing any steps?
In the manifest I still have the needed permissions set, like
<permission
android:name="com.alvarosantisteban.pathos.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
etc.
I think it was a combination of the three things commented here:
That the api key was not valid anymore (but when I posted the question, I already had that done, as I mentioned on it)
But specially that I had to clean the data. I actually deleted the app, because, thanks to the help of android_hungry I went to check my apps and saw that my app appeared two times, one with the maps workings and the other one, the one that is on my desktop as a shortcut, not.
Additionally, it might have happened what silver_man mentioned, I'm not sure.
Thanks to all for the help. :)
You have to create a new api key, as the fingerprint is made from your package name. https://developers.google.com/maps/documentation/android/start?hl=es#obtaining_an_api_key

Is there a way to change the name of an application on Google Play app store?

I submitted an app to the app store last year and I found out a few weeks ago the name is being used for something similar. Is there a way to change the name of the app?
UPDATE:
In AIR you an application has an application descriptor file. In the application descriptor file is the Android manifest.
In the application descriptor file change the name attribute (leave the id the same):
<application xmlns="http://ns.adobe.com/air/application/3.6">
<id>com.mycompany.myAppID</id>
<filename>MyApplicationFile</filename>
<name>My Application Name</name>
At first I thought that you needed to change the "android:label" attribute on the application tag in the Android specific section as shown:
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-sdk android:targetSdkVersion="12"/>
<uses-sdk android:minSdkVersion="8"/>
<application android:label="My Application Name"></application>
</manifest>
]]></manifestAdditions>
</android>
But when I did that I would get an error, "error 404: Android attribute android:label is not allowed to be overridden". I'm guessing the AIR compiler is setting that attribute through the name property.
In Android on the device the name has been changed. However, I have yet to upload this to GooglePlay. I think I need to change the application product name there as well.
UPDATE
Answer: Change the name property.
<application xmlns="http://ns.adobe.com/air/application/3.6">
<id>com.mycompany.myAppID</id>
<filename>MyApplicationFile</filename>
<name>Application Name Can Change</name>
You cannot change the ID as mentioned in an answer but you can change the name. I changed the name, created a new build, uploaded it to the Google app store and it has changed on the Google app store successfully.
Yes, you can change the name whenever you want by changing android:label attribute of your application tag in AndroidManifest.xml file.
But, you can't change Package name once you uploaded app on play store.
It turns out that all I had to do to change the name of the app is to change the name property in the application descriptor file.
Before:
<application xmlns="http://ns.adobe.com/air/application/3.6">
<id>com.mycompany.myAppID</id>
<filename>MyApplicationFile</filename>
<name>My Application Name</name>
</application>
After:
<application xmlns="http://ns.adobe.com/air/application/3.6">
<id>com.mycompany.myAppID</id>
<filename>MyApplicationFile</filename>
<name>My Shiny New Application Name</name>
</application>
I changed the name, created a new build and package, uploaded it to Google app store and published. I changed the name of the Google app store listing a few minutes after upload. When the app changes went live the app name was changed. The app may have been in draft mode but I think I published it on accident before changing the name in the store. Either way it's updated.
The app ID shows up in some locations and lists and there is nothing you can do AFAIK to change it after it has been submitted to some app stores except submit a new app with that ID.
Take a look at this link if you want to change your app name. Also you have to update your app on Google Play.
yes you can change, this is the answer i got from google support
me : can i change app name, app icon and description, after app is published
i mean the name appear on google play and icon
11:09 pm
Google play chat answer :
Yes, you can change your app details on the Main Store Listing page of your Play Console.
I can't comment yet so this is my answer.
You can't change the name of the package once you've uploaded the first APK.
You also can't remove an app from the store as far as I can see. You can only deactivate an APK and un-publish the store listing. As far as I can tell, you can't remove it to allow you to upload a package of the same name again o_0 - bit of a problem for me considering I misspelled my package name first time round :/
You don't need to re-upload your package. All apps -> select app -> store presence -> store listing and change the title

Categories

Resources