archiveren

Tagarchief: app

Jeah, it contains prefabricated sms-messages :mrgreen:

Because my previous “reloader” app was denied from the marketplace because of some weird reasons… (promoting other mobile providers) I build around this issue…

The results is PrefabSMS.

It’s an application in which you can store sms-messages, and afterwards send them with one click of a button 🙂

So, you can create a messages, let’s say “sim topup 15”, to be send to a receiving side, lets say “8989”, and you can save this in PrefabSMS 🙂

Ofcourse you can use it for other things as wel, sending “<3” to your girlfriend or “spam” to random people ^^


Some usefull numbers and messages:

DL

Advertenties

I think I am the first one to create a real wake-on-lan app for WP7.

This one doesn’t use a intermediate proxy server or whatever, but opperates directely from your device thanks to the sockets in WPMango 🙂

The user interface is maybe a bit ugly 🙄

Anyway, this is how it looks:

You can download it trough the marketplace

There is an update waiting in the marketplace’s queue which brings live tiles to this app. Using them you can wake your computer with one click of a button 😎

Suggestions, comments, bug reports, … Everything is welcome here! 😀

Enjoy!

Allright, 1 app passed certification and can be found in the marketplace: RegularDommel. (It’s just a bandwidth meter for your dommel account)

But it’s a start! =)

On the other hand, MobileVikingsReloader still fails certification…
Main reason is the following…

So what this app does is sending an sms towards the phone number of mobile vikings, just to let you know you want a top-up (also see MV’s faq)

Apparently I cannot “promote” other voice plans… Trying to get around this… Any suggestions?

 

 

What I wanted to create was an app that parsed an html site. This because this specific site doesn’t has an official api, so I needed to work around this :mrgreen:

First of all, I needed to get back “into programming”, the last time I’ve programmed was like ages ago ^^ So, back into c#, jej :mrgreen:

After some googling I learned that silverlight in .net worked with an asynchronous call for internet-activities. This ofcourse because a cellular network connection is slow, and you don’t want to stall the GUI.

The method to do this is by using a class called “WebRequest”.
The method is started by using “BeginGetRequestStream“, which starts the fetch in another thread besides the GUI.
When the data is downloaded a callback function is called, so you need to create this as well…

This resulted in some code like the one below:


private void login(string username, string password) {
//the url where we want to go, here no postdata is specified, because the site only uses the postdata in the url
string url = "https://crm.schedom-europe.net/?op=login&username=" + username + "&password=" + password + "&new_language=english&submit=login";

//the initation of a request to a webpage
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
//something for cookies between different httprequests, later more
request.CookieContainer=cookies;
//webrequest are handled syncronous, on completion the callback is called
IAsyncResult result = (IAsyncResult)request.BeginGetResponse(new AsyncCallback(GetStatusesCallBack), request);
}

//callback thread
private void GetStatusesCallBack(IAsyncResult result)
{
string returnValue;
//get the state of the request
var request = (HttpWebRequest)result.AsyncState;
//if completed, put respons in variable
var response = request.EndGetResponse(result);
using (var stream = response.GetResponseStream())
//a streamreader to put the html in a string
using (var reader = new StreamReader(stream))
{
returnValue = reader.ReadToEnd();
}
response.Close();
//a third function to update the gui :-)
getinfo();
}

For my application I needed a method to store some information (email and password). Appearantly each application is given 1MB of datastorage in a database on your phone. More info on this site: http://msdn.microsoft.com/en-us/library/cc221360%28v=VS.95%29.aspx

//calling the default constructor
private IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;
//add a mail of a user to the windows phone database
appSettings.Add("email", "someone@contoso.com");
//to retrieve data from this db
tbResults.Text = (string)appSettings["email"];

I ran into an issue, because I used 2 different WebRequest because I need to fetch 2 different pages (1 to login, a second to get the information from). But when getting the 2nd page, the login was already gone. Probably a cookie issue. So I ran into this site http://cloudstore.blogspot.com/2010/09/clearing-cookies-on-windows-phone-7-or.html which solved my problem.

//first we define a cookie container: a context where our cookies are stored:
private CookieContainer cookies = new CookieContainer();
//in the first request we recall this container
request.CookieContainer=cookies;
//and again in the second request we recall the same container
secondrequest.CookieContainer=cookies;

Then, my second application I wanted to download an image from a website. After some googling found the following method to work: http://stackoverflow.com/questions/2455195/silverlight-windows-phone-7-load-images-from-url

//just to easy, placing an uri as an image source
Uri uri = new Uri("http://locationofimage.jpg", UriKind.Absolute)
image1.Source = new BitmapImage(uri);

And to create a nice and simple overview I wanted to use the default windows “listbox”, but I didn’t know how to use it. Thankfully this website helped me out: http://weblogs.asp.net/psheriff/archive/2010/10/27/windows-phone-list-box-with-images.aspx