Mobile publishers, iPhone or Android app developers. Be careful when placing ads on your sites, apps!

by nolovelust 23. July 2010 12:12

A rough advert slipped in to Admob's publisher network costed money to quite few people who use iPhone application called Talking Tom Cat.

Application designed for kids was using Admob adverts to support free version and some adverts was designed to trick users/children to click and dial premium rate numbers.

Admob said: "Click-to-call ads with premium numbers are classified as age-appropriate and normally would not appear in apps for children. We will work with the app developer to block these ads if we discover they are showing."

 

From TheRegister;

 

Tags: , , , , , ,

Android | iPhone | mobile internet | Mobile web | Useful

Grap some of $2 Million World Developer Fund from Inmobi for Android, iPhone and iPad developers

by nolovelust 18. June 2010 12:53

Developing apps for Android, iPhone and iPad ? Go to http://inmobi.com/smart-dev/worlddevfund/ to grap some of $2 Million from InMobi.

Inmobi offers 100% revenue share for  Android, iPhone and iPad untill $2 million depleted. You will be paid 100% of you advertising income! Hurry up, first come first serve!

Personally as a mobile web developer I am a bit disappointed. Mobile web developers left out of this fund. I understand InMobi's aim to grab some share from juicy App Market(s) but there are thousands of mobile web developers who would start to use InMobi with such campaing!

 

Tags: , , , , ,

Android | iPhone | Mobile web | Useful

Opera Mobile 10 on Maemo Nokia N900 with screen-shots

by nolovelust 11. May 2010 10:24

Yay!!! My favorite browser's Maemo version is ready for download as Alpha release at http://labs.opera.com/news/2010/05/11/. Scroll down to the bottom of the page for download.

I must say it is way better and faster than Firefox Mobile for Maemo/N900!

The only main problem I've noticed is that page load times are quite high when you compare to on board browser MicroB.

Opera Mobile for Maemo is a hobby project by Opera engineers and IS NOT OFFICIALLY supported.

Here are some screen-shots. To get original size right click and save images to your computer.

 

 

 

 

 

Tags: , , , ,

Building Simple Shoutcast Web Interface for Mobile Part 4

by nolovelust 30. March 2010 21:28

For part 3 click Building Simple Shoutcast Web Interface for Mobile Part 3

App_Data/Genres.xml

<?xml version="1.0" encoding="utf-8" ?>
<categories>
<cat>Top500</cat>
<cat>70s</cat>
<cat>80s</cat>
<cat>Alternative</cat>
<cat>Blues</cat>
<cat>Classical</cat>
<cat>Comedy</cat>
<cat>Country</cat>
<cat>Dance</cat>
<cat>Decades</cat>
<cat>Easy Listening</cat>
<cat>Electronic</cat>
<cat>Folk</cat>
<cat>Funk</cat>
<cat>Inspirational</cat>
<cat>International</cat>
<cat>Jazz</cat>
<cat>Latin</cat>
<cat>Live</cat>
<cat>Metal</cat>
<cat>Mixed</cat>
<cat>New Age</cat>
<cat>Old</cat>
<cat>Pop</cat>
<cat>Rap</cat>
<cat>Reggae</cat>
<cat>Regional</cat>
<cat>Rnb</cat>
<cat>Rock</cat>
<cat>Soundtracks</cat>
<cat>Talk</cat>
<cat>Themes</cat>
<cat>Techno</cat>
<cat>World</cat>
</categories>

 

Create Download folder under App_Data and give Write access. Feeds will be cached there.

Finally 500.htm. Shoutcast web server usually busy and gives 503 error

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Shoutcast Mobile</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
<meta name="keywords" content="shoutcast, online radio, mobile radio" />
<meta name="description" content="Shoutcast for mobile devices and iphone" />
</head>
<body>
    <div class="top">
    <a href="Default.aspx"><img src="logo.png" alt="Shoutcast mobile" title="Shoutcast mobile"/></a>
    <br />Shoutcast Mobile Internet radio database
    </div>
    <div class="gap"></div>
    <div class="title">Error</div>
    
    <div class="center">
    <span class="small">
    Shoutcast server didn't respond in time. Please go to <a href="Default.aspx">home page</a> and try again. This is a common error especially when Shoutcast server is busy.
    </span>
    <br /><a href="Default.aspx">Home</a>
    </div>

</body>
</html>

Tags: , ,

ASP.NET | Mobile web | Open Source

Building Simple Shoutcast Web Interface for Mobile Part 3

by nolovelust 30. March 2010 21:25

For part 2 click Building Simple Shoutcast Web Interface for Mobile Part 2

 App_Code/ScEngine.cs

using System;
using System.Data;
using System.IO;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Data.Common;

/// 
/// Summary description for ScEngine
/// 
public class ScEngine
{
    public DataSet GetStationList(string q, string job)
    {
        q = ScEngine.ReturnAlphaNumericForSearch(q);
        q = ScEngine.LimitString(q, 30);
        DataSet ds = new DataSet();
        string genreXmlFile = ScSettings.DownloadFolder + q + ".xml";

        if (File.Exists(genreXmlFile))
        {
            FileInfo fi = new FileInfo(genreXmlFile);

            if (DateTime.Now.Subtract(fi.LastWriteTime).TotalDays > 1)
            {
                File.WriteAllText(genreXmlFile, DownloadXML(q, job), Encoding.UTF8);
            }
            // read from local file
            ds.ReadXml(genreXmlFile);

        }
        else
        {
            string newDownload = DownloadXML(q, job);
            MemoryStream mStream = new MemoryStream(ASCIIEncoding.Default.GetBytes(newDownload));
            File.WriteAllText(genreXmlFile, newDownload, Encoding.UTF8);
            ds.ReadXml(mStream);
        }



        return ds;

    }
    public string DownloadXML(string q, string job)
    {
        string url = (job == "search") ? ScSettings.strURLsearch + q : ScSettings.strURLbrowse + q;

        StringBuilder sb = new StringBuilder();
        string tempString = null;
        int count = 0;
        byte[] buf = new byte[8192];
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
        request.Timeout = 4000; request.Accept = "*/*"; 
        request.Method = "GET"; 
        request.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; .NET CLR 3.5.30729; .NET CLR";
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        Stream resStream = response.GetResponseStream();
        do
        {
            count = resStream.Read(buf, 0, buf.Length);
            if (count != 0)
            {
                tempString = Encoding.UTF8.GetString(buf, 0, count);
                sb.Append(tempString);
            }
        }
        while (count > 0);

        return sb.ToString();
    }
    public static int ReturnNumeric(string input)
    {
        if (String.IsNullOrEmpty(input) == true)
        {
            return 0;
        }
        else
        {
            try
            {
                return Convert.ToInt32(input);
            }
            catch
            {
                return 0;
            }
        }
    }
    public static string ReturnAlphaNumeric(string input)
    {
        if (String.IsNullOrEmpty(input) == true)
        {
            return string.Empty;
        }
        else
        {
            try
            {
                return Regex.Replace(input, @"[^a-zA-Z0-9\.\-_]", "_").ToString();
            }
            catch
            {
                return string.Empty;
            }
        }
    }
    public static string ReturnAlphaNumericForSearch(string input)
    {
        if (String.IsNullOrEmpty(input) == true)
        {
            return string.Empty;
        }
        else
        {
            try
            {
                return Regex.Replace(input, @"[^a-zA-Z0-9\.\-_]", " ").ToString();
            }
            catch
            {
                return string.Empty;
            }
        }
    }
    public static string LimitString(string strToLimit, int limitTo)
    {
        if (strToLimit != null && strToLimit.Length > 0)
        {
            strToLimit = strToLimit.Trim();

            if (strToLimit.Length > limitTo)
            {
                return strToLimit.Substring(0, limitTo);
            }
            else
            {
                return strToLimit;
            }
        }
        return strToLimit;
    }
    public static void DeleteOldXML(int days)
    {
        try
        {
            // used in global.asax app start
            DateTime KeepDate = DateTime.Now.AddDays(days);
            DirectoryInfo fileListing = new DirectoryInfo(ScSettings.DownloadFolder);
            foreach (FileInfo f in new DirectoryInfo(ScSettings.DownloadFolder).GetFiles())
            {
                if (f.LastWriteTime <= KeepDate && f.Extension.ToLower() == ".xml")
                    f.Delete();
            }
        }
        catch
        {
        }

    }
}

 

App_Code/ScGenres.cs

using System;
using System.Data;
using System.IO;
using System.Web;

/// 
/// Summary description for ShoutCastCategoreies
/// 
public class ScGenres
{
    public DataSet GetGenres()
    {

        string myXMLfile = HttpContext.Current.Server.MapPath("~/App_Data/Genres.xml");
        DataSet ds = new DataSet();
        if (HttpContext.Current.Cache["SCGenres"] == null)
        {
            FileStream fsReadXml = new FileStream
                (myXMLfile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
            try
            {
                ds.ReadXml(fsReadXml);
                //HttpContext.Current.Cache["Genres"] = ds;
                HttpContext.Current.Cache.Insert("SCGenres", ds, null,
                            System.Web.Caching.Cache.NoAbsoluteExpiration,
                            TimeSpan.FromMinutes(60));
                return ds;
            }
            catch (Exception ex)
            {
                return null;
            }
            finally
            {
                fsReadXml.Close();
            }
        }
        else
        {
            ds = (DataSet)HttpContext.Current.Cache["SCGenres"]; ;
            return ds;
        }
    }
}

 

App_Code/ScSettings.cs

/// 
/// Summary description for Settings
/// 
using System.Web;
public class ScSettings
{
    public ScSettings()
    {

    }

    public static string strURLsearch = "http://www.shoutcast.com/sbin/newxml.phtml?search=";
    public static string strURLbrowse = "http://www.shoutcast.com/sbin/newxml.phtml?genre=";
    public static string DownloadFolder = HttpContext.Current.Server.MapPath("~/App_Data/Downloads/");

}

Tags: , ,

ASP.NET | Mobile web | Open Source

Welcome

Welcome to my blog

Adverts

Tag cloud