Java Question Try to finish appwiz library with me ^^

tuhatinhvn

Active Member
Licensed User
Longtime User
Here is my code and library have done for it, i have tested and it show EulaScreen, AdsExit, etc ....

But i think some thing is wrong because EulaScreen ALWAYS show when i run app -> it is wrong

I think we will find mistake and have a fully library appwiz

Manifest file
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

AddApplicationText(
        <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
        <service android:name="com.analitics.api.AnalyticsService" />
        <receiver android:name="com.analitics.api.OnBootReceiver"
            android:enabled="true"
            android:exported="false"
            android:label="Analytics" >
              <intent-filter>
                  <action android:name="android.intent.action.BOOT_COMPLETED" />
                <category android:name="android.intent.category.HOME" />
            </intent-filter>
  </receiver>
    <activity android:name="com.analitics.api.EULAScreen" android:configChanges="orientation|keyboardHidden"  android:theme="@android:style/Theme.Light" />
  <activity android:name="com.analitics.api.AdsScreen"
  android:configChanges="orientation|keyboardHidden"
  android:theme="@android:style/Theme.Light" />
  <meta-data android:name="appwiz_app_id" android:value="xxupx99cbhgsbim6" />   
) 'change xxupx99cbhgsbim6 to your app id

Activity Code:
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
Dim appw As appwiz
    Dim Button1 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("1")
appw.Initialize
End Sub
Sub Button1_Click
    appw.StartOfferwall
End Sub

Java code:

B4X:
package com.htsoft.appwiz;

import anywheresoftware.b4a.BA.ShortName;
import android.app.Activity;
import android.content.Context;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.ActivityObject;
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.Events;
import anywheresoftware.b4a.BA.Permissions;
import anywheresoftware.b4a.BA.DependsOn;
import anywheresoftware.b4a.BA.DontInheritEvents;
import anywheresoftware.b4a.objects.ViewWrapper;
import com.analitics.api.AppwizSDK;
import com.analitics.api.OnEulaScreenClosedHandler;
@DependsOn(values = { "appwizsdk" })
@ActivityObject
@Author("Tu Phan")
@ShortName("appwiz")
@Version(1)
public class Appwiz {
    private BA myba;
    public void Initialize(BA ba)
    {
     
        myba = ba; 
       
        AppwizSDK.init(myba.context, new OnEulaScreenClosedHandler()
        {
        /*
        * This function takes place, once the user passes the EULA screen
        * eulaResult possible values: Accepted = 0 Skipped = 1 Already Accepted = 3 Error = 4
        */
        @Override
        public void continueToApp (int eulaResult)
        {
        //Put you code here to continue to app
       
        }
        });
 
    }
   
    public void StartOfferwall()
      {
       
          AppwizSDK.startOfferWall(myba.context);
         
        }
    public void StartPremiumAd()
      {
          AppwizSDK.startPremiumAd(myba.context);
         
        }
   
}


Anyone can final it?
Thank you for your B4A ^^
 

Attachments

  • appwizdemo.zip
    153.8 KB · Views: 224
  • Library-appwiz.zip
    90.6 KB · Views: 242

tuhatinhvn

Active Member
Licensed User
Longtime User
no ok, eulascreen always show when app run
and appwiz not log any request or install from my app :(

can you help me @Erel ???? :(((((
 

tuhatinhvn

Active Member
Licensed User
Longtime User
who can check it and release a final library for it??

i will very glad to buy it or donate
 
Top