Airpush Library

magarcan

Active Member
Licensed User
Longtime User
hi,

you manifest seems fine.

just out of curiosity, since you've moved the airpush code to a service module, where are you calling your startservice from?
This is what I'm doing.
 

Attachments

  • Sample.zip
    6 KB · Views: 192

ssg

Well-Known Member
Licensed User
Longtime User
Ahh... since you have moved the code to only be in the service module, you need to call StartService(BootReceiver) in your main's activity_create.

hope it starts working for you... cheers!
 

magarcan

Active Member
Licensed User
Longtime User
Ahh... since you have moved the code to only be in the service module, you need to call StartService(BootReceiver) in your main's activity_create.

hope it starts working for you... cheers!
:sign0104: Thanks!!

I upload the updated version, this is not a tutorial, but I thinks can help.

Can anyone, make some similar for the other way to use airpush??
 

Attachments

  • Template.zip
    6.1 KB · Views: 178

magarcan

Active Member
Licensed User
Longtime User
:sign0089:

I take it that it works for you now?

Thanks for the template.. would be very useful for everyone!
I have no time to compile my "Template" project (now I'm at work). But I've updated code in my main app and Airpush web isn't showing any new user...

I'll try to check this later.

PD: API key isn't used?? I only use App ID in my service module and in the manifest file.
 
Last edited:

magarcan

Active Member
Licensed User
Longtime User
API key is not used... only app id, thats right..

:( I do hope it works for others too...
It works. I only have to wait for few hours more :sign0060:

A question. If my app user reboot his phone, and doesn't open my app, ads won't be shown, doesn't it??
 
Last edited:

ssg

Well-Known Member
Licensed User
Longtime User
It works. I only have to wait for few hours more :sign0060:

A question. If my app user reboot his phone, and doesn't open my app, ads won't be shown, doesn't it??

The BootReceiver service should still be triggered, but I am not sure if it works right. The boot request is mad ein the manifest file, around where android.intent.action.BOOT_COMPLETED is mentioned.

Theoretically, if we can get the manifest right, it should still load ads in background even if your app is never ran after boot up.

cheers!

and thank you for the feedback...
 

magarcan

Active Member
Licensed User
Longtime User
Here you can see that it is working.

My phone tell me that there is a notification:
20111014_194224.jpg


I'm a good boy, and I open it:
20111014_194227.jpg

"Aviones Españoles Lite" is the name of my app. This windows is shown for a few seconds.

Add is opened in my web browser:
20111014_194237.jpg



The question is, are there any way to prevent my app window be opened?
 
Last edited:

magarcan

Active Member
Licensed User
Longtime User
Hmm, some how I cant see any pictures hosted in imageshack. All the pictures above show a frog in an ice cube...
Stupid frog... I've updated my previous post and images are now in picasa.
 

ssg

Well-Known Member
Licensed User
Longtime User
Hi magarcan,

The same thing happens to my phone also. No idea how we can avoid the window showing. I will check the library further if there is any setting on this.

Also, I've noticed, that when you click and ad and your browser loads. After that, if you are at home screen, and press and hold your "home button", the most recently accessed programs show up right?

Somehow clicking the shortcut there does not launch the app on my device. The app has to be launched again from the menu / app launcher / list thingy...
 
Hi magarcan,

The same thing happens to my phone also. No idea how we can avoid the window showing. I will check the library further if there is any setting on this.

Also, I've noticed, that when you click and ad and your browser loads. After that, if you are at home screen, and press and hold your "home button", the most recently accessed programs show up right?

Somehow clicking the shortcut there does not launch the app on my device. The app has to be launched again from the menu / app launcher / list thingy...

hi ssg,
i am getting an xml error when i compile. Can you please help? Here is my manifest:
B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="vartanian.android.InfiniteGeometricSeries"
      android:versionCode="5"
      android:versionName="1.3"
     android:installLocation="internalOnly">
      <uses-sdk android:minSdkVersion="4" />
      <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:anyDensity="true"/>
    <application android:icon="@drawable/icon" android:label="Infinite Geometric Series">
       
        <activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name=".main"
                  android:label="Infinite Geometric Series" android:screenOrientation="unspecified">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
      
      <!-- Airpush Code Start-->
      <activity android:name="com.airpush.android.PushAds"
      android:configChanges="orientation|keyboardHidden"/>
      <receiver android:name="com.airpush.android.UserDetailsReceiver"/>
      <receiver android:name="com.airpush.android.MessageReceiver" />
      <receiver android:name="com.airpush.android.DeliveryReceiver" />

      <!-- run on boot-->
      <service android:name="bootreceiver"></service>
      <receiver android:name="bootreceiver$bootreceiver_BR">
      <intent-filter>
      <action android:name="android.intent.action.BOOT_COMPLETED"/>
      </intent-filter>
      </receiver>
      <!--run on boot end-->

      <service android:name="com.airpush.android.PushService">
      <intent-filter>
      <action android:name="com.airpush.android.PushServiceStart<21275>"/>
      </intent-filter>
      </service>
      <!-- Airpush Code End-->
        
      <!-- *** For AdMob: manually added *** -->
        <activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation"/>

    </application>
   <!-- permissions required by AdMob (will probably already appear) -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
   <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
   <uses-permission android:name="android.permission.READ_PHONE_STATE" />
   <uses-permission android:name="android.permission.VIBRATE"/>
</manifest>
 

ssg

Well-Known Member
Licensed User
Longtime User
Hi,

This part:

<action android:name="com.airpush.android.PushServiceStart<21275>"/>

should be:

<action android:name="com.airpush.android.PushServiceStart21275"/>

remove the < and >

Hope that fixes the problem!

Note: no space between PushServiceStart and your app id
 
Top