[Q&A] Need help with Admob - Android Q&A, Help & Troubleshooting

Hi,
I have been a part of XDA developers for a long time. I dont post (coz I dont know as much as ou guys). But I visit almost everyday.
I decided to make an App for Android and I have very close to 0 knowledge in programming. I made the app and it works However, I have incorporated the Admob SDK and done exactly like all the tutorials say but the ads dont show up on the device. It shows perfectly on the emulator through...
My "main.xml"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
androidrientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="<I have put my Publisher ID <-- I hope that is correct"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>
my Main Activily has the following
AdView adv = (AdView)findViewById(R.id.adView);
AdRequest re = new AdRequest();
adv.loadAd(re);
My Manifest has the following
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
my Project Properties has this
target=android-15
I have added external JAR GoogleAdMobAdsSdk-6.1.0.jar into the LIbrary.
When i run it, i cant see the ad on my device but I can see it if I run it on the emumlator.
https://play.google.com/store/apps/...sMSwxLDEsImNvbS5vdXRnb2luZy5kZXRlY3RjYWxscyJd
That's my app. ( If someone helps me solve this, I will give my app ADD FREE to XDA Developers)
Thanks

If it works on the emulator you have done it correctly. I think it is a "lack of inventory" problem, so you only have to wait, usually this problem disappears when the number of installations increase.

Thank you so much. I can see in AdMob that the number of Requests is increasing so...

Related

[Q] Overlapping Layout XML

Hey Everybody!! I searched a lot on this forum and really don't know if I post this in the right section or whatsoever, it's a bit unclear. But I just post it and wait for the respons
For the first time I'm developing an Android application and so far it's going really well except for one thing. I made a webview layout and I wanted to show ads in the app. So I added the AdMob ads and they're working really well. But there's one problem.
The AdMob covers a part of the WebView, so it's not shifting the WebView layout up but it's covering it. And that's annoying because you can't read a part of the webview's text. How can I fix it?
This is my main.xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent" android:id="@+id/rltvLayout01"
android:layout_height="fill_parent" android:background="@color/white">
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<WebView android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:scrollbars="none" />
</ScrollView>
<LinearLayout android:id="@+id/ad_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:layout_alignParentBottom="true">
<com.google.ads.AdView android:id="@+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adUnitId="helloworldcode"
ads:loadAdOnCreate="true"
ads:adSize="BANNER" />
</LinearLayout>
</RelativeLayout>
You need to tell your scrollview to align to the top of the linearlayout. Try Adding this to your ScrollView definition:
android:layout_above="@+id/ad_layout"
You may need to change some "wrap_content" to "fill_parent" but without an IDE, I can't tell for sure.
Gene Poole said:
You need to tell your scrollview to align to the top of the linearlayout. Try Adding this to your ScrollView definition:
android:layout_above="@+id/ad_layout"
You may need to change some "wrap_content" to "fill_parent" but without an IDE, I can't tell for sure.
Click to expand...
Click to collapse
Thank you for the answer, but unfortunately for some reason I get a force close when I add the layout_above...

Editing AndroidManifest.xml .. formatting / localized to Chinese(?), Go SMS Pro Theme

Hi everyone,
I've created a GO SMS Pro theme using their webtool,
but it appears to have yet to implement various common aspects of functionality. I want to be able to modify the AndroidManifest.xml file myself, primarily to add Airpush (the presence of which I let people know of from the beginning), but the formatting is quite garbled. I'm guessing this may be due to the localization to Chinese that the Google Play developer console reports. Does anyone have a functional, readily editable version in English with all the required information for a GO SMS Pro Theme? I want to be assured I have all the required information, rather than hacking together another xml file with Eclipse. I figured I'd install the Chinese language on my computer, but it appears Microsoft did not include such functionality in Windows 7 Premium (64-bit). I've download other GO SMS Pro themes with Airpush, figuring I could use their AndroidManifest.xml and mail.xml files as templates, but found the same formatting / editability issue. Thank you for your help!
I've since found kantbstopped519's post at the end of page 3 in the following thread: http://forum.xda-developers.com/showthread.php?t=1125626&page=3
and used what was posted:
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="5" android:versionName="1.0" android:installLocation="auto" package="com.jb.gosms.theme.kxnt.dark"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="@string/app_name" android:icon="@drawable/jb_smsmms">
<activity android:theme="@android:style/Theme.Dialog" android:label="@string/app_name_desc" android:name=".GoSmsInstallDialog" android:excludeFromRecents="true" android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.INFO" />
</intent-filter>
<intent-filter>
<action android:name="com.jb.mms.theme.others" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="4" />
</manifest>
Click to expand...
Click to collapse
It appears this functioned for kantbstopped519.
I used this as a template (made no additions of Airpush or anything such) and made the supposedly appropriate changes, also changing anything referencing @string to plain text directly in AndroidManifest.xml. Now I'm getting that informative "The server could not process your apk. Try again."
I've been making various changes, deletions, and resigning after each change, to repeatedly the same message. Only re-adding my original garbled-de-goop AndroidManifest.xml file and resigning has thus far resulted in a successful processing upon upload. Could this have something to do with the resources.arsc and/or classes.dex files in the root of the apk?
If the APK is already compiled then you will need to decompile it with apktool to get the XML readable.

SOLVED

SOLVED
Dekill93 said:
hy all ... i want to modify systemui, but I do not understand a bit ... anyone please help me .. :crying: :crying: :crying:
1. how to remove or hide the time and date in the status bar pulldown?
2. how to change the background BBM into a Wi-Fi AP background?
for more details you can see my pictures ..
thank you
Click to expand...
Click to collapse
Number One Solved
IMO bbm background is in bbm app, so you should search for png there
godlesplay said:
IMO bbm background is in bbm app, so you should search for png there
Click to expand...
Click to collapse
I just want to change the background BBM as background Wifi AP ... I've found in the framework-res.apk when I change no change whatsoever ... do you know where to change it?
sory i don't using cm 11
Dekill93 said:
I just want to change the background BBM as background Wifi AP ... I've found in the framework-res.apk when I change no change whatsoever ... do you know where to change it?
sory i don't using cm 11
Click to expand...
Click to collapse
you missunderstand!!!
he said, if u want to change the shown BBM background, you need to change IT IN THE BBM app!!! (not in framework-res)
& i guess with ''sory i don't using cm 11'' you are reffering to his SIGNATURE. its his signature NOT A MESSAGE TO YOU
atleast give him a thx, as he found out that the png is located in bbm app
bejunk said:
you missunderstand!!!
he said, if u want to change the shown BBM background, you need to change IT IN THE BBM app!!! (not in framework-res)
& i guess with ''sory i don't using cm 11'' you are reffering to his SIGNATURE. its his signature NOT A MESSAGE TO YOU
atleast give him a thx, as he found out that the png is located in bbm app
Click to expand...
Click to collapse
you try to see the background ap wifi .. it is in the framework-res.apk when I using a cm 10 background bbm and wifi ap its same .. is there something wrong on my framewok-res.apk have? sorry I think it's a message for me
sory my bad english
paste here your framework and bbm app, I will try find it...
godlesplay said:
paste here your framework and bbm app, I will try find it...
Click to expand...
Click to collapse
oke... wait i think problem on systemui.apk
Solved guys... I have changed script in SystemUI/res/layout/status_bar_notification_row.xml
I change
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:background="@drawable/status_bar_notification_row_background_color" android:layout_width="fill_parent" android:layout_height="@dimen/notification_height"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button android:id="@id/veto" android:background="@null" androidaddingLeft="8.0dip" androidaddingRight="8.0dip" android:layout_width="48.0dip" android:layout_height="fill_parent" android:layout_marginRight="-80.0dip" android:layout_alignParentRight="true" android:layout_centerVertical="true" />
<ImageView android:id="@id/large_icon" android:background="@*android:drawable/minitab_lt_unselected_press" android:clickable="true" android:layout_width="@*android:dimen/notification_large_icon_width" android:layout_height="@*android:dimen/notification_large_icon_height" android:scaleType="center" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" />
<com.android.systemui.statusbar.LatestItemView android:id="@id/content" android:background="@drawable/notification_row_bg" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="64.0dip" android:layout_toRightOf="@id/large_icon" android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
<View android:background="@drawable/horiz_list_div" android:layout_width="fill_parent" android:layout_height="@dimen/notification_divider_height" android:layout_alignParentBottom="true" />
</RelativeLayout>
to
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout androidrientation="vertical" android:layout_width="fill_parent" android:layout_height="@dimen/notification_height"
xmlns:android="http://schemas.android.com/apk/res/android">
<View android:background="@drawable/horiz_list_div" android:layout_width="fill_parent" android:layout_height="1.0dip" />
<RelativeLayout android:background="@drawable/notification_item_background_color" android:layout_width="fill_parent" android:layout_height="61.0dip">
<Button android:id="@id/veto" android:background="@null" androidaddingLeft="8.0dip" androidaddingRight="8.0dip" android:layout_width="48.0dip" android:layout_height="fill_parent" android:layout_marginRight="-80.0dip" android:layout_alignParentRight="true" android:layout_centerVertical="true" />
<ImageView android:id="@id/large_icon" android:background="@*android:drawable/notify_panel_notification_icon_bg_tile" android:clickable="true" android:layout_width="@*android:dimen/notification_large_icon_width" android:layout_height="@*android:dimen/notification_large_icon_height" android:scaleType="center" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" />
<com.android.systemui.statusbar.LatestItemView android:id="@id/content" android:background="@drawable/notification_row_bg" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="61.0dip" android:layout_toRightOf="@id/large_icon" android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
</RelativeLayout>
<View android:background="@*android:color/transparent" android:layout_width="fill_parent" android:layout_height="2.0dip" />
</LinearLayout>
thx for participating..

Earn money from your huge uninsall

[Appjolt] Get money from uninstalls
Hello everybody, I just found a system allow you earn money from uninstalls, this is Appjolt, show advertisements when user uninstall your app. Sound’s good, right? I will guide you in detail:
1. Register your account with this link:
https://admin.appjolt.com/Landings/Monetize?rf=6F/+V7zzEdpJM73Iydu0EQ==
You will have 50$ in your account. The minium money to withdraw is 100$. You can use your paypal or bank account.
2. Download SDK in Android SDK or iOs SDK, it has unity plugin for android and ios, just 200kb
3. In Applications, click +Add Application
4. After submited your app, click +Add Campain to creat a campain (4 type):
- Monetize: show advertisements
- Winback: offer the user to re-install your app and win a prize (gem, gold, virtual item or something real)
- Cross Promote: present your another app
- Survey: asking the user why they are uninstalling your app
5. Analyze uninstall: mixpanel, omniata, appsee, coolaData
Example with Mixpanel, you register an Mixpanel account and copy the Token and paste to appjolt
6. Import Appjolt plugin to your unity game
- The first step of the integration is to import the appjolt Unity package. To do so, simply drag and drop Appjolt.unitypackage into the assets folder of your project in the Unity editor, and the following window will come up, Make sure all the resources are selected and press import:
- The next step is to add a GameObject to any scene that will integrated with Appjolt. To do so, create a new GameObject in the root of the scene’s hierarchy and rename it to “Appjolt”. Next, add an existing script component to the new Appjolt GameObject, select the AppjoltUnity.cs
script from your scripts. Your scene editor should then be configured to and look similar to the following screenshot:
Now, whenever you’ll need to call Appjolt in a Unity scene, to access the SDK’s main object, use the following code:
appjoltUnity = GameObject.Find ("Appjolt").GetComponent<AppjoltUnity> ();
That’s it. Your project’s now set up with Appjolt, now all that’s left is to implement specific
features.
End User License Agreement
(EULA)
We find great importance being in compliance with Google Play Developer Program Policies
If you are operating within Google's Play store and interacting with ads out of your application, it requires the user's consent in a form of an EULA. In the context of our service, if you're using Monetize or Ad
-Based Winback/Cross
-Promotion campaigns, please add the following code to your main menu or splash screen:
if (appjoltUnity.isGooglePlayInstall()) {
appjoltUnity.showEULA();
}
- Android manifest:
<!-- Appjolt - Required -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- Appjolt - Highly Recommended (Guaranteed $10 CPM US)-->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Trong tag <Application>
<!-- Appjolt -->
<!-- Appjolt Activity -->
<activity android:name="com.appjolt.sdk.AppjoltActivity"
android:taskAffinity="com.appjolt.sdk.twentyeight"
android:configChanges="orientation|keyboardHidden|screenSize"
android:hardwareAccelerated="false"/>
<!-- Appjolt Service -->
<service
android:name="com.appjolt.sdk.AppjoltService"
android:enabled="true"
androidrocess=":appjolt"
android:exported="true" />
<!-- Appjolt BOOT receiver -->
<receiver
android:name="com.appjolt.sdk.AppjoltReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver>
So simple. And now, lets earn money from the huge uninstall.
Cheers,

[TUTORIAL] How to play Mini Dayz on windows phone

How to play Mini DayZ on Windows Phone
This tutorial was written on Linux, however the process should be pretty much the same for Windows.
Requirements:
1. Mini DayZ apk
2. A computer with node and cordova installed
Steps:
First of all rename the apk to .zip and extract it.
Go inside the folder and go to the assets folder. Right click and open in terminal.
In the terminal type:
Code:
cordova platform add browser
Then in the same folder create a file called
Code:
config.xml
and paste the following into it:
Code:
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordova</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<preference name="windows-appx-target" value="uap" />
<preference name="windows-arch" value="arm" />
<preference name="windows-target-version" value="10.0" />
<preference name="windows-phone-target-version" value="10.0" />
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<platform name="windows">
<preference name="windows-appx-target" value="uap" />
<preference name="windows-arch" value="arm" />
<preference name="windows-target-version" value="10.0" />
<preference name="windows-phone-target-version" value="10.0" />
</platform>
</widget>
Then do:
Code:
cordova run
If you get the following error:
Code:
cordova-custom-config: Skipping auto-restore of config file backup(s)
Unable to load PlatformApi from platform. Error: Cannot find module 'cordova-common'
Unhandled error. ('The platform "browser" does not appear to be a valid cordova platform. It is missing API.js. browser not supported.')
Then do the following:
Code:
npm i cordova-common
Then do:
Code:
cordova run
Now if you get the following error:
Code:
Cannot find module 'cordova-serve'
Then do the following:
Code:
npm i cordova-serve
And finally do:
Code:
cordova run
You should see something like:
Code:
Static file server running @ http://localhost:8000/index.html
Go to that url in your browser and it should be working.
Now to get it working on your phone make sure both your phone and laptop are connected to the same network.
Now you must find your laptop's local ip. On Linux do the following:
Code:
hostname -I
You should see something like
Code:
192.168.0.xxx
Go to your phones browser and go to http://192.168.0.xxx:8000/index.html
AND VOILA IT SHOULD BE WORKING!!
Once everything is loaded it should be safe to shut down the server on your laptop. And the best part is your game gets saved in your browser so you can continue playing where you left off.
If someone is generous enough to host this on heroku or your own website, please let me know.
If you know any other games that are built with cordova please let me know.
ERRORS:
1. For some reason the audio works on my laptop but it doesn't work on my phone. If anyone can fix this please let me know.
2. I tried to pack this into an .appx file via Phonegap but it didnt work. The appx file was getting installed but whenever I opened it I just got a black screen. Can anyone get it to work?
Thanks for the guide! Check out https://nextdev65.github.io/MiniDayZ/

Categories

Resources