I have made an android application and put adverts in using Google AdMob.
On Eclipse's Graphical Layout there is a white rectangle which says 'Ads by Google' in it, which shows that it has been set up properly.
However, when I run the app on the simulator and in real life, nothing shows up. Why would this be?
Thanks in advance!
You should make sure you have setup your Android Application properly with Ads, go over the following steps and ensure that you have done them correctly.
GoogleAdMob Jar in your libs folder
GoogleAdMob Activity in your manifest
GoogleAd AdView in your main activity XML file, with your adunitId correctly inputted
And Ensure your class in which your AdMob is coded in is correct.
Let me know if these steps help you or not.
Related
I am trying to pair my Sparkfun nRF52832 breakout board (programed through Arduino, using this link: nRF52832 Breakout Board Hookup Guide with a BLE android app (which I hope to make) so that I can turn on/off the LED on the board (baby steps). Since I am new to Bluetooth LE, I decided to use the BluetoothLeGatt source code on Android Studio. After going through the code, I understand how it works.
Picture of the BluetoothLeGatt source code sample page (image)
I connected my Samsung Galaxy S8+ and installed the BluetoothLeGatt source app to see if it can scan for the nRF52832. At first I got a red text in the logcat which said that I needed to give Coarse location permission, so I did that in the manifest.xml. Then I ran it again, but I still got the same red text in the logcat.
At first I googled the problem and found this somewhat similar question, however, I wasn't able to get a suitable answer. I also tried to see if I could find source code for the nRF connect app, however, that is also not available. So I'm super confused about what I should do to get rid of that and need help.
manifest.xml file with permissions (image)
Red text in logcat (image)
Thank you for taking the time to read my first post! I truly appreciate any help you can provide.
You need to request this permission in runtime.
More info: https://developer.android.com/training/permissions/requesting.html
there is this problem that is diving me crazy today.
I recently finished my first Android mobile app, though it was working just fine when I was Running in in my Phone inside Android studio. But once I Generated Signed APK file and installed it in my phone, I had these problems :
-> in the splash screen, Im supposed to see a StartAPP ad, but its saying : "Webpage not available" it looks like its floating over the screen( I am using both StartApp & Admob ads - I am using a webview in the screen ) .
enter image description here
-> one more thing, is the pictures. The app has only loaded 2 pictures from 20 pictures in my drawable directory.
enter image description here
For the first thing, I fixed it by disabling the Splash StartApp ad with StartAppAd.disableSplash();
, though the second thing about uploading images properly still doesnt work :/ HELP PLEASE
For the second problem, I just fixed it
HOW ?
- well, I tool my generated apk file, and then I decompiled it using 'Easy APK Tool' and then I added my drawable missing pictures, and re-compiled it.
Now the app is ready :-)
i'm a web developer so i don't have a large knowledge with android apps, but i have found a project on github to make a simple webview app to show a website i have created which is fully responsible and work fine with all browsers on desktop and android phones, when i run the app in android studio it works great and everything run smoothly in many emulators, but when i install the apk on physical phone some problems show include taking larger width than the device and some containers which displayed 'none' shows at the bottom of the page and there are many issues with the proportions of the pages, i hope someone can help me to locate the problem or guide me to where i can search for it and find it by myself
this is the url to the github project
thank you very much
I see, I think just adding this code to your MainActivity will do the trick!
mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setUseWideViewPort(true);
maybe try this too:
WebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
put the above code below :
mWebView.setWebViewClient(new WebViewClient());
hope this helps :D and please tell me if it does!
Before android 4.0 you could create and overlay over any app with TYPE_SYSTEM_OVERLAY and get touches with FLAG_WATCH_OUTSIDE_TOUCH... Now with android 4 you cant receive the touches.
basically the idea follows this app,
http://www.appbrain.com/app/smart-taskbar-%28sidebar%29/com.smart.taskbar
You can keep your app open, or always on top. it will run over any app.
Ive looked every where for information and even source code for the use on android 4.0 but no luck... Now.. I know for certain there are apps that still do this even on 4.0... there is still a way. Any ideas?
I found a full sample app here that works for Android 4.0
Here is the highlight:
To create an overlay view, when setting up the LayoutParams DON'T
set the type to TYPE_SYSTEM_OVERLAY.
Instead set it to TYPE_PHONE.
Use the following flags:
FLAG_NOT_TOUCH_MODAL
FLAG_WATCH_OUTSIDE_TOUCH
FLAG_NOT_TOUCH_MODAL << This one is quite important. Without it, focus is given to the overlay and soft-key (home, menu,
etc.) presses are not passed to the activity below.
Also make sure you add the SYSTEM_ALERT_WINDOW permission to the
mainifest file.
I'm just getting started with Android dev, done a few tutorials, now I'm working on a simple app. On both the emulator and my phone (Android 4.0.3 emulator, Android 4.1.1 Atrix HD) apps are displaying in what I think is Holo Light. I'd rather have it be Holo Dark, but when I add the following line to the application block in the Android Manifest file: android:theme="#android:style/Theme.Holo" the app compiles fine but force closes as soon as I open it.
What am I doing wrong? I'm sure it's something really simple, but as I said I'm new to this. Thanks in advance, y'all!
If you want to use a theme for all the activities of your application then you need to use
<application android:theme="#style/CustomTheme">
in AndroidManifest.xml.If you want a theme applied to just one Activity in your application, then add the android:theme attribute to the activity tag instead.So need to know what type you use in your application.However see these things which will clear you more..
http://developer.android.com/guide/topics/ui/themes.html
http://www.androidengineer.com/2010/06/using-themes-in-android-applications.html
The simplest thing you can do and you should always do is to read logs why does it crash. The log will tell you the reason of you crash. Please post the reason including logs from Logcat and only then ask about fixes:)