This may be a matter of implementation, but I’ve checked and rechecked to make sure that I have implemented things as they should be.
Whenever I try out giftgaming, I get the webview. It shows the text immediately (that I setup on the giftgaming website). Then it goes away pretty fast. Looking at the logcat as this happens, it prints out:
01-24 16:28:19.448 20168-20168/? W/ResourcesManager: getTopLevelResources: /data/app/com.google.android.webview-1/base.apk / 1.0 running in org.chris.washington.lettytapgo rsrc of package com.google.android.webview
01-24 16:28:20.078 20168-20461/? D/libGLESv2: DTS_GLAPI : DTS is not allowed for Package : org.chris.washington.lettytapgo
When I try to close out the webview, I then get the following error:
Failure retrieving text 0x0 in package org.chris.washington.lettytapgo
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:1468)
at android.app.ApplicationPackageManager.getText(ApplicationPackageManager.java:1898)
at com.android.server.wm.MultiWindowPointerEventListener.getApplicationName(MultiWindowPointerEventListener.java:430)
at com.android.server.wm.MultiWindowPointerEventListener.startResizing(MultiWindowPointerEventListener.java:566)
at com.android.server.wm.MultiWindowPointerEventListener.onPointerEvent(MultiWindowPointerEventListener.java:208)
at com.android.server.wm.PointerEventDispatcher.onInputEvent(PointerEventDispatcher.java:53)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:143)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
I will try this out on my Nexus 9 when I get home to see if I’m getting the same error. But any help would be great.
Here is my code setting up giftgaming and executing it…
init() Setting the listener
function init(self)
if iac and webview then
iac.set_listener(function(self, payload, type)
msg.post("main:/giftgaming", "iac", { payload = payload })
end)
end
end
Prefetch (from off of a button press)
msg.post("main:/giftgaming", "prefetch", { apikey = "MJO2WCBFYVWTEV2IDQFUWZ1XNQK0NGF4", test = false })
on_message() “show” the ad
function on_message(self, message_id, message, sender)
if message_id == hash("ad_closed") or message_id == hash("ad_error") then
print("ad should close")
pprint(message)
msg.post("main:/controller#script", "hide_loader")
elseif message_id == hash("prefetch_failed") then
print("Ad prefetch failed", sender)
msg.post("main:/controller#script", "hide_loader")
elseif message_id == hash("prefetch_ok") then
print("Ad prefetch ok", sender)
if sender.path == hash("/giftgaming") then
msg.post("main:/giftgaming", "show", { apikey = "MJO2WCBFYVWTEV2IDQFUWZ1XNQK0NGF4", test = false })
end
end
end