-
Notifications
You must be signed in to change notification settings - Fork 7
ログ出力
NendAdLogger
クラスを使用することで、nendに関するログの出力について制御することができます。
ログレベルを設定することで、出力されるログ情報の種別を制御することができます。
設定可能なログレベルは下表の通りです。
レベル | 内容 | 補足 |
---|---|---|
LogLevel.DEBUG | デバッグ情報をログに出力します | |
LogLevel.INFO | 情報をログに出力します | 広告取得成功等 |
LogLevel.WARN | 警告をログに出力します | パラメーター不正等 |
LogLevel.ERROR | エラーをログに出力します | 広告取得に失敗した場合等 |
LogLevel.OFF | ログ出力を行いません | デフォルト |
Kotlin
import net.nend.android.NendAdLogger
// 情報をログに出力します
NendAdLogger.setLogLevel(NendAdLogger.LogLevel.INFO)
Java
import net.nend.android.NendAdLogger;
// 情報をログに出力します
NendAdLogger.setLogLevel(NendAdLogger.LogLevel.INFO);
NendAdLogger
クラスは内部でLog.isLoggableを使用しているため、デフォルトで出力されるログレベルがINFOに設定されています。
このデフォルトのレベルを変更したい場合は、システムプロパティsetprop log.tag.<YOUR_LOG_TAG> <LEVEL>
を設定することで変更が可能です。
NendAdLogger
クラスで使用しているログ出力用のタグ名はnend_SDKとなります。
端末またはエミュレータを接続した状態でadb
コマンドを実行後、アプリを走らせます。
$ adb shell setprop log.tag.nend_SDK DEBUG
NendAdLogging
インターフェースを利用してlogger
に設定することで、ログ出力処理をオーバーライドすることができます。
Kotlin
import net.nend.android.NendAdLogger
import net.nend.android.NendAdLogging
class SampleActivity : AppCompatActivity() {
companion object {
private const val TAG = "SampleActivity"
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_sample)
NendAdLogger.setLogLevel(NendAdLogger.LogLevel.INFO)
NendAdLogger.sharedInstance().logger = NendAdLogging { message, logLevel ->
when (logLevel) {
NendAdLogger.LogLevel.DEBUG -> Log.d(TAG, message)
NendAdLogger.LogLevel.INFO -> Log.i(TAG, message)
NendAdLogger.LogLevel.WARN -> Log.w(TAG, message)
NendAdLogger.LogLevel.ERROR -> Log.e(TAG, message)
else -> {
}
}
}
}
}
Java
import net.nend.android.NendAdLogger;
import net.nend.android.NendAdLogging;
public class SampleActivity extends AppCompatActivity {
private static final String TAG = "SampleActivity";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
NendAdLogger.setLogLevel(NendAdLogger.LogLevel.INFO);
NendAdLogger.sharedInstance().logger = new NendAdLogging() {
@Override
public void logMessage(@NonNull String message, @NonNull NendAdLogger.LogLevel logLevel) {
switch (logLevel) {
case DEBUG:
Log.d(TAG, message);
break;
case INFO:
Log.i(TAG, message);
break;
case WARN:
Log.w(TAG, message);
break;
case ERROR:
Log.e(TAG, message);
break;
default:
break;
}
}
};
}
}
-
2023年9月1日より、SDK v6.0.0未満では動画広告の配信を停止いたします。新しいバージョンのご利用をご検討ください。
-
Google Play Consoleのデータセーフティに関して、nendSDKのデータ収集項目のページを追加しました。詳しくはこちらをご覧ください。
-
Android 13より、Google Advertising IDのアクセスのために権限の追加を強く推奨しています。詳しくはSDKの組み込み方法をご覧ください。
-
v9.0.0よりSDK内部の依存性及び位置情報機能の完全な削除を行いました。詳しくは更新履歴を御覧ください。
-
らくらくスマートフォンの
F-01L
にて、特定のOSバージョンでバナー広告利用時にアプリがクラッシュするという報告を一部のメディア様から頂いております。詳細はこちらをご確認ください。 -
Google Play Services r30 よりライブラリプロジェクトの提供がなくなり、今後はEclipseプロジェクトへのGoogle Play Servicesの導入が不可能となったため、nendSDKにおいてもEclispeでの導入・開発のサポートを終了させていただきました。
EclipseからAndroidStudioへの移行はこちらをご参照ください。 -
Googleのデベロッパーポリシーの更新に伴い、v3.1.0のSDKよりインタースティシャル広告のアプリ終了時表示機能を廃止させていただきました。
-
Effective September 1, 2023, we will stop serving video ads with SDK under v6.0.0. Please consider using a newer version.
-
For data safety section in Google Play Console, We added a page about data collection used on nendSDK. For details, please see here.
-
Since Android 13, we highly recommend add the permision to access Google Advertising ID. For details, please see About integrate the SDK.
-
In v9.0.0, a new dependency had been added to the sdk and all functions of collecting location data are completely deleted.
-
We have received reports from some media that a model of smartphone,
F-01L
crashes when using banner ads on a specific OS version. For details, please check here. -
nendSDK terminated the introduction and development support of Eclispe as Google Play Services (r30) no longer provides library project and impossible to install Google Play Services to the Eclispe project.
Please check the link below for how to transfer from Eclipse to AndroidStudio. -
With the update of Google Developer Policy, we terminated the function to show interstitial ads before the user closes the app from v3.1.0 SDK.
- バナー型広告
- アイコン型広告
- インタースティシャル広告
- ネイティブ広告
- フルボード広告
- 動画広告
- 動画ネイティブ広告
- Release Notes
- Preparation
- Supported Devices and IDE
- nendSDK Data Collection Items
- nendSDK Privacy Policy
- About Information Button
- Banner Ad
- Icon Ads
- Interstitial Ad
- Native Ad
- Fullscreen Ad
- Video Ad
- Native Video Ad