# oppo

## 模块引入

```
    //根据需求单确定要带哪个模块
    //如果是说 带oppo sdk 
    implementation WB.fixVersions('Pay:Oppo')
    //如果是说带oppo 超休闲sdk
    implementation WB.fixVersions('Pay:Oppo_Casual')
```

## Manifest参数选项

| 参数              | 说明             | 备注                                  |
| --------------- | -------------- | ----------------------------------- |
| OPPO\_APPKEY    | OPPO的APPKEY    | eg：59fc9873a2c244c9a085554ca31f63b5 |
| OPPO\_AppSecret | OPPO的AppSecret | eg：f2657ff4a6b44daf84a553061c8fff41 |

## 配置文件说明

需要在app的build.gradle的manifestPlaceholders中设置的值,如下：

```
manifestPlaceholders = [
....
    OPPO_APPKEY:"12345",
    OPPO_AppSecret:"12345",
...
        ]
}
```

## 配置文件说明

assets目录加入feedata\_oppo.xml

```
<?xml version="1.0" encoding="UTF-8"?>
<data>
    <feeinfo>
        <ID>1</ID>
        <price>600</price>
        <code>002</code>
        <desc>30赠25枚钻石</desc>
    </feeinfo>
</data>
```

## 混淆过滤

```
-keep class com.oppo.** {
public protected *;
}
-keep class okio.**{ *; }
-keep class com.squareup.wire.**{ *; }
-keep public class * extends com.squareup.wire.**{ *; }
# Keep methods with Wire annotations (e.g. @ProtoField)
-keepclassmembers class ** {
 @com.squareup.wire.ProtoField public *;
 @com.squareup.wire.ProtoEnum public *;
}
-keep public class com.cdo.oaps.base.**{ *; }
-keepattributes *Annotation*
-keepattributes *JavascriptInterface*
```

## 集成测试

如何判断sdk是否初始化成功？

游戏打开会有oppo对应的悬浮按钮
