i'm implementing inapp billing in android app. works well, however, i'm trying decouple broadcast receiver activity manifest. suggestion in android's trivialdrive sample: // important: dynamically register broadcast messages updated purchases. // register receiver here instead of <receiver> in manifest // because call getpurchases() @ startup, therefore can ignore // broadcasts sent while app isn't running. // note: registering listener in activity bad idea, done here // because sample. regardless, receiver must registered after // iabhelper setup, before first call getpurchases(). currently there's class extends broadcastreceiver : public class iabbroadcastreceiver extends broadcastreceiver { /** * intent action receiver should filter for. */ public static final string action = "com.android.vending.billing.purchases_updated"; private final iabbroadcastlistener mlistener; public iabbroadcastreceiver(iabbroadcastlistener listener) { m...
i have bilingual site using i18n. i18n attaches classes , tags of site when renders. example, have: <html class="en"> <body class="i18n-en"> </body> </html> and when user switches languages, following renders: <html class="ar> <body class="i18n-ar"> </body> </html> i've created less file programmatically loads different font replace english default font when arabic version of site loads, follows: body.i18n-en { @font-face { font-family: 'dinalternatebold'; src: url('../fonts/din-alternate-bold.ttf') format('truetype'); } } body.i18n-ar { @font-face { font-family: 'dinalternatebold'; src: url('../fonts/harmattan-regular.woff') format('woff'); } } note calling "harmattan-regular.woff" same variable name "din-alternate-bold.ttf", replacement of instance of dinal...
Comments
Post a Comment