Hi Developers at Nano M Husen, This is a notification that your Google Play Publisher account has been terminated. Publishing Status Status: Account Terminated Your Developer account remains terminated due to prior violations of the Developer Program Policies and Developer Distribution Agreement by this or associated, previously terminated Google Play Developer accounts. Please do not attempt to register a new developer account. Any new accounts will be closed, and your developer registration fee will not be refunded. View policy status Issue found: High Risk Behavior We have identified a pattern of high risk or abuse associated with your Developer Account and are taking this action pursuant to the Policy Coverage policy. About the Policy Coverage policy We don’t allow apps or app content that undermine user trust in the Google Play ecosystem. In assessing whether to include or remove apps from Google Play, we consider a number of factors including, but not limited to, a pattern of harmful behavior or high risk of abuse. We identify risk of abuse including, but not limited to, items such as app- and developer-specific complaints, news reporting, previous violation history, user feedback, and use of popular brands, characters, and other assets. Submit an Appeal Please read through this page to understand your policy violation. If you believe our decision may be incorrect, you can appeal. It may take up to 7 days to receive a response, or longer in exceptional cases. Please do not attempt to register a new developer account. We will not be restoring your account at this time. The Google Play TeamI've filed an appeal, but it was rejected. I'm very frustrated; my years-long struggle is now over. I feel this is very unfair to me, but there's nothing I can do. I surrender, and may God repay Google for its cruelty to me.
My google play console account was terminated
How to fix CLS issue in your blog or web ?
Fixing CLS issues is a big deal. That's because most of your competitors won't fix CLS problems and as a result won't rank well compared to those who fix CLS problems. So let's learn to understand the real CLS problem, and then fix the CLS problem.
Want to know how to fix CLS? Your visitors too! Actually, they don't care how to fix CLS - they care that it didn't happen.
I recently fixed a bad case of CLS and documented the process. Check out my hands-on demo and explanation or continue reading below.
What is CLS ?
Acceptable CLS Limits
- Good is <= .1
- Needs improvement is > .1 and <= .25
- And everything greater than .25 you need to get your shit together
How to Find CLS Issue
How to Solve CLS Issue
<img src="/cat.jpg">
<img src="/cat.jpg" width="100%" height="450">
How to Lazy Load Video YouTube Embed in Blogger?
Have you ever thought about how important it is to implement lazy loading on YouTube videos embedded in website/blog content? Yes, you are right, the application of lazy loading on youtube videos embedded on the website is certainly very important, because it will keep the optimation website's performance.
Therefore this time I will share the lazy load youtube video script to blogger friends for free. This is the best script for lazy loading youtube videos and has been proven to be able to maintain optimal website/blog performance even though there are many embedded youtube videos.
Don't believe it yet? Take a look at the comparison of the results of the following analysis before and after using the lazy load youtube video script.
I've done 3 website performance tests.
1. Test website performance without embed youtube video.
2. Test website performance with embed youtube video, but without lazy load script
3. Test website performance with embed youtube video and lazy load script.
How are you interested in using lazy load youtube videos? If so, follow the steps on how to install the lazy load youtube video script below.
Step 1. Go to your blogger admin dashboard. Select "Post" menu >> Fill the post title >> select "HTML View". And Copy this HTML Code :
<div class="youtube-iframe-container">
<iframe class="youtube-video iframe-video cordial-lazyload"
data-src="https://www.youtube.com/embed/xxxxxx"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
</div>Change red text color with your video embed id. and Publish.
Step 2. In your blogger admin dashboard. Select "Theme" menu >> select down arrow beside "Customize" then select "Edit HTML".
Step 3. In the box press "CTRL + F" to search type "</skin>" . Copy code bellow before "</skin>
.youtube-iframe-container {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
}
.iframe-video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
and Save theme.
Step 4. In your blogger admin dashboard. Select "Layout" menu >> in the navbar select "Add Widget" then select "HTML/Javascript". And copy javascript code below :
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function () {
if ("IntersectionObserver" in window) {
var iframes = document.querySelectorAll("iframe.cordial-lazyload");
var iframeObserver = new IntersectionObserver(function (entries, observer) {
entries.forEach(function (entry) {
if (entry.isIntersecting && entry.target.src.length == 0) {
entry.target.src = entry.target.dataset.src;
iframeObserver.unobserve(entry.target);
}
});
});
iframes.forEach(function (iframe) {
iframeObserver.observe(iframe);
});
} else {
var iframes = document.querySelector('iframe.cordial-lazyload');
for (var i = 0; i < iframes.length; i++) {
if (lazyVids[i].getAttribute('data-src')) {
lazyVids[i].setAttribute('src', lazyVids[i].getAttribute('data-src'));
}
}
}
})
</script>Then Save the widget.
And Finish, now you can test your blog/web performance with ligthouse.
How to solve the LCP Issue/ problem on core web vitals due to google adsense ads?
Performance blogs or websites will eventually drop when advertised by third parties such as ads on Google Adsense and other digital advertising. To avoid that, a special method is needed to load ads so that loading or website performance is maintained.
Generally the method used to load ads so as not to affect the performance of the website/blog is to apply lazy load to fish (adsense), therefore here I will give a fairly complete review of lazy load adsense.
You can solved the LCP Issue/ problem on core web vitals due to google adsense ads with Lazy Load Adsense.
Without Lazy Load Adsense your LCP can be poor or higher than 4s. The best LCP is lower than 2,5 s.
What is Lazy Load Adsense?
Why Should You Use Lazy Load Adsense?
- Third party webfont load
- JavaScript execution time
- Main-thread work
- Impact of third party code, etc
Instructions for Using Lazy Load Adsense
<script async="async" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"/>
//or a new version of the javascript library
<script async="async" data-ad-client="ca-pub-1234567890123456" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"/>
//or updated version
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4209467777280582" crossorigin="anonymous"></script>To :
<script type="text/javascript">//<![CDATA[
var lazyloadads=false;window.addEventListener("scroll",function(){(0!=document.documentElement.scrollTop&&false===lazyloadads||0!=document.body.scrollTop&&false===lazyloadads)&&(!function(){var e=document.createElement("script");e.type="text/javascript",e.async=true,e.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-420946777728xxxx";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyloadads=true)},true);
//]]></script>How the Lazy Load Adsense Script Works ?
Lazy Load Adsense From Adsense Policy Side
For detail step by step yo can watch this video below.
Reference
How to fix send button not working or Blogger contact form not working?
A blog should have a contact us page. This is to help users when they want to contact the blog admin, and also the requirements if the blog will be registered with google adsense later. There are several ways to add a contact us page in
How to Adding Google AdMob Ads to an Android application ?
AdMob is Google’s advertising platform specifically designed for mobile applications. AdMob allows you to monetize your apps by serving ads selected according to criteria you define. So if you’ve developed an Android app and now you want to make money with your app, in this article I show you how to do it, how to add different ad formats to your apps.
To get started, make sure you have integrated Firebase into your project. If you haven’t already done so, here’s how to do it.
Set up your application in your AdMob account :
- To get started you need to create an AdMob account or sign in if you already have one.
- Login to AdMob and open your dashboard. Now, go to Applications> Add an Application> Fill out the information required by AdMob> Click Add, which will generate an AdMob ID for your application.
- To link your newly added application to Firebase. Select the application, access the application settings and under Application Information you will see an option to link the application to Firebase.
- Add your AdMob Application ID to your AndroidManifest.xml file by adding the <meta-data>tag.
<meta-dataandroid:name="com.google.android.gms.ads.APPLICATION_ID"android:value="ADMOB_APP_ID"/>
implementation 'com.google.android.gms:play-services-ads:19.1.0'
class MainActivity : AppCompatActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)setContentView(R.layout.activity_main)MobileAds.initialize(this, "YOUR_ADMOB_APP_ID")}}
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"xmlns:ads="http://schemas.android.com/apk/res-auto"tools:context=".MainActivity"android:orientation="vertical"><com.google.android.gms.ads.AdViewandroid:id="@+id/adView"android:layout_height="wrap_content"android:layout_width="match_parent"ads:adSize = "BANNER"ads:adUnitId = "ca-app-pub-3940256099942544~3347511713"></com.google.android.gms.ads.AdView></LinearLayout>
import android.os.Bundleimport androidx.appcompat.app.AppCompatActivityimport com.google.android.gms.ads.AdRequestimport com.google.android.gms.ads.AdViewimport com.google.android.gms.ads.MobileAdsclass MainActivity : AppCompatActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)setContentView(R.layout.activity_main)MobileAds.initialize(this) {}val mAdView = findViewById<AdView> (R.id.adView)val adRequest = AdRequest.Builder (). build ()mAdView.loadAd (adRequest)}}
|
|
2. Creation of interstitial ad
class MainActivity : AppCompatActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)setContentView(R.layout.activity_main)MobileAds.initialize(this) {}val mInterstitialAd = InterstitialAd(this)mInterstitialAd.adUnitId = "ca-app-pub-3940256099942544/1033173712"}}
mInterstitialAd.loadAd(AdRequest.Builder().build())
clickButton.setOnClickListener {if (mInterstitialAd.isLoaded) {mInterstitialAd.show()} else {Log.d("TAG", "The ads wasn't loaded yet.")}}
App Id = ca-app-pub-3940256099942544~3347511713Ads Id =ca-app-pub-3940256099942544/1033173712
Working with Webview in android studio and project example
If we want to deliver a web application (or just a web page) as a part of a client application, we can do it using WebView. The WebView class is an extension of Android's View class that allows you to display web pages as a part of your activity layout. It does not include any features of a fully developed web browser, such as navigation controls or an address bar. All that WebView does, by default, is show a web page.
A common scenario in which using WebView is helpful is when you want to provide information in your app that you might need to update, such as an end-user agreement or a user guide. Within your Android app, you can create an Activity that contains a WebView, then use that to display your document that's hosted online.
To add a WebViewto your app in the layout, add the following code to your activity's layout XML file:
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
To load a web page in the WebView, use loadUrl(). For example in Java :
WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.loadUrl("http://www.example.com");
in Kotlin :
val myWebView: WebView = findViewById(R.id.webview)
myWebView.loadUrl("http://www.example.com")
All links the user clicks load in your WebView.
If you want more control over where a clicked link loads, create your own WebViewClient that overrides the shouldOverrideUrlLoading() method. The following example assumes that MyWebViewClient is an inner class of Activity. In Java :
private class MyWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
if ("www.example.com".equals(request.getUrl().getHost())) {
// This is my website, so do not override; let my WebView load the page
return false;
}
// Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs
Intent intent = new Intent(Intent.ACTION_VIEW, request.getUrl());
startActivity(intent);
return true;
}
}
In Kotlin :
private class MyWebViewClient : WebViewClient() {
override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
if (Uri.parse(url).host == "www.example.com") {
// This is my web site, so do not override; let my WebView load the page
return false
}
// Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs
Intent(Intent.ACTION_VIEW, Uri.parse(url)).apply {
startActivity(this)
}
return true
}
}
Here is an example basic project android studio with Webview
1. Create New Project
The first thing we have to do is of course create a new project in android studio. In this tutorial I named the project "My Application".
2. Create desain user interface
Open activity_main.xml in the folder layout, then add element as follows
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_marginTop="100dp">
<Button
android:id="@+id/btn_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Go to Website 1"/>
<Button
android:id="@+id/btn_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Go to Website 2"/>
</LinearLayout>
</RelativeLayout>
Right click on layout folder then select "New" and "Layout resource file " and then fill the file name with webview_activity , then add element as follows
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/webView"
/>
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="110dp"
android:id="@+id/progressBar2"
/>
</RelativeLayout>
4. Add Java File
Open MainActivity in java folder, then copy the code below
package com.nano.mywebview;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
Button btn1,btn2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btn1=findViewById(R.id.btn_1);
btn2=findViewById(R.id.btn_2);
btn1.setOnClickListener(web1);
btn2.setOnClickListener(web2);
}
private final View.OnClickListener web1 = v -> {
Intent theIntent = new Intent(this, WebViewActivity.class);
theIntent.putExtra("url", "https://nanokaryamandiri.com");
startActivity(theIntent);
};
private final View.OnClickListener web2 = v -> {
Intent theIntent = new Intent(this, WebViewActivity.class);
theIntent.putExtra("url", "https://www.thrizthan.com");
startActivity(theIntent);
};
}
Right click on java folder then select "New" and "Java Class File" and then fill the file name with "WebViewActivity" then copy the code below
package com.nano.mywebview;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
public class WebViewActivity extends AppCompatActivity {
WebView webView;
ProgressBar progressBar;
String dataUrl;
@SuppressLint("SetJavaScriptEnabled")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web_view);
webView = findViewById(R.id.webView);
progressBar= findViewById(R.id.progressBar2);
webView.setWebViewClient(new myWebclient());
webView.getSettings().setJavaScriptEnabled(true);
getIntent2();
Log.e("testwebview",dataUrl);
webView.loadUrl(dataUrl);
WebViewClient webViewClient = new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
Log.e("PAGE_URL", url);
if(url.equals(dataUrl)){
finish();
}
}
};
}
private void getIntent2() {
dataUrl = getIntent().getStringExtra("url");
};
public class myWebclient extends WebViewClient{
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
progressBar.setVisibility(View.GONE);
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return super.shouldOverrideUrlLoading(view, url);
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if((keyCode==KeyEvent.KEYCODE_BACK) && webView.canGoBack()){
finish();
webView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public void onBackPressed() {
finish();
}
}
5. Edit AndroidManifest XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nano.mywebview">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyWebView">
<activity
android:name=".WebViewActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
6. Run the project
7. Then click "Go To Website 1"
Then Click back and Then click "Go To Website 2"
Okay, that's enough for now from me, if you have any questions, please comment in the comments column. If something goes wrong I apologize. Hopefully helpful, and thank you.
Move from one activity to another activity with data in android studio
Hello everyone, in this post I will share a simple tutorial for those of you who are just learning to make android applications using android studio.
In this tutorial we will learn to move from one activity to another activity with data in android studio.
1. Create New Project
2. Create desain user interface
4. Add Java File
5. Edit AndroidManifest XML
6. Run the project
Convert Byte to Hex, Byte to Dec, Byte to Int java android studio
1. Convert Byte to Hex
To convert byte to Hexadecimal we can use void or function below :
2. Convert Byte to Reversed Hex
To convert byte to Reversed Hexadecimal we can use void or function below :
3. Convert Byte to Dec
To convert byte to Decimal we can use void or function below :
4. Convert Byte to Reversed Dec
5. Convert Byte to Int
6. Converter Class to Convert byte data
7. Convert byte to String
Featured Post
My google play console account was terminated
A few days ago I received a notification email from Google that my Play Console account has been terminated. The message content is as below...