Author Archive

Hi, I guess some of you like to get a simple demo how to listen to gestures on Android.
I could write now a lot of code, but more simple, just DOWNLOAD the archive I made for you with a simple Demo Gesture APP. Its written under sdk 1.5 but also works in sdk 1.1

But anyhow… this could be very useful to know.
@Override
public boolean dispatchTouchEvent(MotionEvent me) {

gestureScanner.onTouchEvent(me);
return super.dispatchTouchEvent(me);
}

when you do that, the demo listener works also on buttons ! I was looking quit long for that to know.. but its all included in the demo.
greets
chris

Category: android  Leave a Comment

Do you need a Coder, Hacker, Programmer, or are you just interested to improve and monetize your Homepage? Do you need to fix your existing Homepage or implement some new Features on it?

I am a honored Programmer since more than 20 Years and in this Days most specialist on PHP and MySQL.

Why I wrote Hacker :) Because I have had several Inquieres to mix Systems of Perl, PHP, Javascript, ASP and so on and here it is more hacking into the code first than just coding. There are not so many people out there who can do this just by experience.

I worked in my past on so many different Systems and with quit a few Computer Languages, that I am able to help in many cases. I its not able to solve by a usual Coding I mostly find a Turnaround (Hack) how to do different.

Or are you interested in your own Marketing Tools (SEO) like an automized Advertising System:
for example see: http://www.guruk.com/referalads

Any cool Idea you have in Mind, why you just dont start?
That does not cost thousand of Dollars, many Ideas let come realized much less. You may also just improve some technical Stuff on your Homepage or create a new Template. Let me know, my Job is to help you.

Please understand, i am not a freeware Coder. My usual Rate is between 39$ and 99$ an Hour, depends on the size of the Company I am working for. But in one Hour I can do quit a lot, where many other who may charge you less and work 3-4 Hours longer on it. So finaly you save Money, Nerves, get a fast, professional and tested Solution.

It does not cost you anything to tell me about your Problem and in most cases we find a Solution.

Invest in your Business with the right Partners for Success.

So feel free to contact me at: coding@christian-albert-mueller.com
or just by clicking at the top on Contact and writing your Inquiry in the Form.

Bookmark this Side in your Favourites, to remember yourself when you need a coder :)

Testimonials:

This is a recommendation of the highest regard for Christian Albert Mueller. He is an excellent coder in PEARL and PHP, works fast, understand quickly what is needed, and is extremely fair and reasonable when it comes to pricing. The job he has done for me, was difficult for others I approached and yet Chris quickly worked a way round and saved me money. What more could you want?

Gerald Sharp
Sharp Arrow Music (Pty) Ltd

http://www.sharparrow.org

Mr. Christian Mueller was working with us as a coworker Web Design, Web mastering & Multimedia. His working field contained the following emphasis: – interface function to our software development, Web Design and on-line editorship – responsible persons for Relaunch of the TV1.DE Website – implementation of the project NetCall – Research and development for 360 degrees applications – Research for Videostreaming to PDAs and pocket PC – graphics Design and Multimedia – conversion from internal and external Web TV projects – programming in HTML, shtml, Javascript, Perl, SMIL – production of Templates for the TV1.DE CMS on basis of JSP – work with graphics and applications of Designs such as PhotoImpact, Photoshop, Flash, premiere, QuarkXPress, Illustrator. Mr. Mueller settled the to him transferred tasks goal- oriented, accurate and always to our full satisfaction. He was able to handle a lot of work and we was positiv suprised how much he can do. Also strongly Stress situations he did in a souveran way. Special compliment applies for his commitment and marked independence how he handled the extensive field of applications. To emphasize is his high work moral, his distinct claim to the own achievement as well as his ability to motivate himself. As a result of his friendly and obligatory nature, his readiness for constructional co-operation he was an all-side recognized and respected dialog partner. His personal commitment and his cooperative behavior as his helpfulness to customers, superiors and colleagues made Mr. Mueller a popular colleague. His attitude was perfect at any time. (Johannes Soukup TV1.DE)


Chris made a great job on my existing webside, he implemented a blog, he help me updating my webside any time I want . Also the layout and the flashfilms, where created by chris. He always found a solution, where others could not help me anymore. He is very fair in price and what you get for as also he is fast and honest. thank you chris!
Barbara Gissler ( http://swipin.ch )

Christian Mueller a Webmaster and Programmer for any Case, reliable, prompt and good, also for complex cases. Thanks.

Maitreyi Piontek

http://www.isisplus.com

Thanks Chris, your are unbeatable :)

Klaus Altersberger

http://www.dahab-realestate.com

What is my Offer?

  • Consulting, Research & Development in all Fields of the Internet.

Worked together with:

  • BMW, TV1.de Siemens, Eurosport,
  • DataComp, Pearl Agency, Harlekin Inc.,
  • Budlight …

Awards for Projects I was involved in:

  • German multimedia award (BMW for connecting
    220 compaq HP IPaq PDAs wireless for the BMW Golf Open)
  • Teledart worldrecord (Harlekin Inc. playing simultaneous an
    eDart between USA and Germany)
  • Several Awards for Innovative Development and Interfaces

I prefer:

  • To work with open minded People in a personal also
    professional Environment

Actual Work:

  • Teleworking for and with Computerwelt.at

Telework:

  • We are living in the Internet Timeage and many people still just ignore the full options that this technology does offer us. We can meet online, saving money by working from home and also we are steady connected. Yes, we can see us full time by Videoconferencing, like sitting in another room in the same office.

Teamwork:

  • that is something i got best to learn in my time while living 5 Years in Sinai/Egypt. While there is a total different cultur its a good practice. Different language is not always the most difficult, its the culture, the different thinking of how work have to be done. As Africans say “The europeans have to clock, we have the time”. Teamwork is like in a football team, some are more defence and some more the runner. And the good mix of that, make a successfull team. That is what i learned from my experience and I really can say I love good Teamwork.

OutSourcing:

  • When you are looking for a fair price and fast process you can hire me for teleworking with you. While our cooperation we work close together in all steps of the project and use all options of modern technology (videoconferening for example). With my Network of international Specialists from all over the World (USA, Europe, India, China, Middle East), you get all out of one hand.

Service Examples:

  • Advertising
  • Keyword Improvment (more User for your Homepage)
  • WebCam Installation and Promotion
  • Online Radio
  • Live Streaming http://ilovedahab.com/radio/player.html
  • Picture Upload, Automatic Resize, Gallery Function
  • Embed actual Weather
  • World News RSS
  • Integrating Google Maps (for your Location and Hotspots of Interest)
  • Statistic (Generate Detail Informations from your Homepage)
  • eCards (also with WebCam Snapshot)
  • Guestbooks (where u can filter Spam and add your own Comments)
  • Shoutbox http://www.guruk.com/yshout5/example/
  • Joomla (Content Management System) (example Rocksea.net)
  • WordPress (Easy Blogging)
  • 360 Degree Panoramas of your Place
  • Video (with and without Bluebox)
  • WebCam, a Webcam can be realized with very cheap tools (around 50$)
  • Automatic Google Notebook Notes converting into Joomla Content

Work Examples Online:

  • webcampostcord.com send your WebCam Snapshot as online Postcard (my work: coding & design)
  • ellenraven.com innovative Clothes Designer (my work: technical interface, design by owner)
  • inmodivers.eu awarded Dive Center (my work: complete design, coding)
  • ilovedahab.com local Community Platform (my work: complete , design, coding)
  • RockSea.net Camp in Sinai (my work: installation content management system)
  • WebCam Directory List of international CamSpots (my work: coding database, GUI)
  • Dahab.TV YouTube Application (my work: complete design, coding)
  • Dahab-RealEstate.net a Real Estate Company (my work: coding, content by owner)
  • oricanahotel.com Midrange Hotel (my work: complete design, coding)
  • … please request more detailed examples if you need.

Free Software Utilities:

Work Priorities:

  • Consulting, Utilities, PHP Interfaces, GUI, Research & Developing, Testing

Main Skills:

  • Speed, Integration, Projectmanagement,
    Networking, supporting StartUps
  • I am quit unconventional and so I like to
    work on innovative Ideas rather than on
    standart development.

Branches:

  • Entertainment, Real Estate, Hospitality, Finance

OS-System:

  • Win Vista, 9x/NT/XP, Macintosh (Leopard 10.5.x)
  • Linux(Ubuntu), Amiga/Atari/C64, AS 400

Graphictools:

  • Paint, Photoshop , Quark, Illustrator
  • Flash, 3D Max, Corel Draw, Gimp

OS-Languages:

  • Linear/ OOP,Assembler,
  • Java,Modula, Pascal,
  • Purebasic, Delphi, Visual Basic

Databases:

  • MySQL, MS SQL Server,
  • Access, DBase


Internet:

  • HTML, DHTML, JavaScript , PHP, Perl , Ajax
  • XML, CSS, JSP, ASP, Frontpage, Dreamwaver


StandartTools:

  • Word, Access, Excel,
    PowerPoint, Open Office


Other:

  • 360° Panorama, Real/MS/Emblaze/OPlayo ,
  • Stream-En/Decoder, Lotus Notes, NetCall,
  • $ZoomTour,
Networks:
  • LAN/WAN, TCP/IP, IPX, RS232, Novell,
  • Microsoft, Wireless, Bluetooth, Infrared, Laser

Hardware:

  • Systemassembling, PictureTel Video,
  • Basics Electronic, Cisco Router, SpeedTouch Router

As you can imagine, it is impossible I am a specialist in all the technologies listed above. But, yes, I worked with all of them, so I really got a very wide range of experience and knowledge, how to use different technologies and connect them together, to be effective and fast.

Languages:

  • German – Motherlanguage
  • English – Fluently
  • Arabic – Basic
References
(excerpt, alphabetic)
Adventure Spot, Sport
Aladawy Group, Real Estate
Alibaba, Hotel
Alf Leila, Hotel
BAUVE, Verlag
BMW, Automobile
Budlight, Drinks
Cairo Holiday Appartments, Travel
Commoda, Houses
Consenso, Advertisment
Datacomp, Time Management
DHR, Real Estate
DreamWay, InternetService
Dt. Telekom, Telecommunikation
Ellen Raven, Design
Eurosport, Television
Fliegenpilz, Drug Consulting
GinaB, Luxury Interior
Harlekin Inc., Entertainment
Hilton, Hotel
Inmo Divers, Water Sport
ImmoWorld, Real Estate
King Safari, Travel
La Reine, Hotel
Rock Sea, Travel
Sheikh Salem House, Travel
Siemens, Technik
Sub Sinai, Travel
Swipin, Travel
Pearl Agency, e-shop
TV1.DE, Videostreaming

Click here for your Inquiry

Now there is a new application for every woman who would like to track her Period and Ovulation. I know there are several applications on the Android Market, but I promised to my wife to write my own version and make it a little bit different than that what was already available for the G1 Mobile.

  • Speciality:
    A full month calender where you can see all your special days (“My Days”) in an graphical overview. Just with a fingertip you are able to add a new “Start of Period”.
    Now all upcoming Periods and Days of highest fertility are calculated for the Future. It is just safer to plan your next holiday or trip, knowing if you will have your days in that time or not. Maybe you are planing to make your baby while you are in vacation, just have a look if your Ovulation happens in that time.
    .
  • Extras:
    You may not only Track your Period, its easy now to keep in Mind when you had last Time Sex or when you took your Pill. All this additional Informations make it comfortable to have all important days tracked with your Mobile Phone.
  • Users:
    Some Woman really have fun to share there Application with her best Friends (if they dont have an own Period Calculator), or within the Family (Mother, Daugther)
    ..
  • ListView:
    Should u like to see just all your Entries in a Listview, also thats possible just by a Click.
    .
  • It’s FREE !!
    This Software does not cost you a Cent. If you like to donate my Work, you are Welcome :)
    .
  • Where do I get this Application?
    http://www.guruk.com/android/mydays03a.apk
    .
  • How to install?
    I am working on to get my Google Developer Account soon as possible to post it in the Market. For now you can download and install the Software “Apps Installer” from the Market. Put “mydays03a.apk” on your SD-Card and run the “Apps Installer” to install this File from your SD-Card
    .
  • What else…
    This is a Alpha Version, so please understand if its not perfect and I am willed to improve with your Help and Response.  Feel free to send your constructive Critics in the Comments, also any positive Comment is welcomed to see if it works with you. Also if you like to help with a translation in any foreign language or even improve my English (i am original german), just send me a Note.

Now, just start to download your “My Days 0.3a”:
http://www.guruk.com/android/mydays03a.apk

Enjoy this Application …. and dont forget, I am not responsible or anything that happens while you use this Program. The final Responsibility is always on yourself :)
.
All the Best and have a great Day
Yours Chris

Hi,

today I got my commercial API from Orb (thanks to Orb).

Now I am able to share with you my little App I wrote for Android.

—- Info

With this Application ( i called it Androrb) you may request your media list that is stored on your pc from the orb server and open a video, audio, webradio or photo on your Android G1 Mobile.

Its still Alpha and there are several things to improve. Please keep in mind this is just a hobby from me and the only reason I give it into the public is to share my joy that I do not need to login by browser into orb, just to listen my music.

— Where to get the Pre-Version?

Here you find the Alpha Version to install on your G1.
http://www.guruk.com/android/androrb03a.apk

You can install this APK with a Tool you find in the Android Market called “Apps Installer”

When you open it first Time you have to enter your ORB UserID and Passwort.

I am only able to test this Version with WIFI on a G1 RC33 . So I am glad you send me your response and experience in your Environment.

—— Develop with me

Should you like helping in development, you may have a look on: https://developer.orb.com/wiki/Main_Page

There you find how to access the API and what commands are possible for he XML Response.
For example:
1. https://api.orb.com/orb/xml/session.login?apiKey=evcphjpgribp&l=myorbid&password=myorbpw
creates a session Key

2. https://api.orb.com/orb/xml/media.search?q=mediaType%3Dvideo&groupBy=author
now we request all Videos.

You may construct and explain XML Feeds you need and I can implement them by time.

—- Finaly :)

All the best and Enjoy.

Yours
Chris

—some pics:

http://www.guruk.com/android/1-registerdata.jpg
http://www.guruk.com/android/2-about.jpg
http://www.guruk.com/android/3-login.jpg
http://www.guruk.com/android/4-showfolders.jpg
http://www.guruk.com/android/5-listcontent.jpg
http://www.guruk.com/android/6-loadmedia.jpg

Category: android, coding  Tags: , ,  19 Comments

Dear Friends,

I was reading a lot about Orb and how great it is to stream Media direct from my PC to my Mobile.
Anyway I did not found an APP for my Android G1 and as I was reading there is no APP from ORB to expect till June.

As I am a Coder I was unable to wait. Especialy I am a Newbie in learning Android (usually PHP COder), that was a little challenge for me to do.

Finaly I got a small Version to work that I like to share with you. Its not at all a real Orb Client as you may expect, but it works for me to scan for all my Video Media that I shared in my Orb, let it display in a Listview and when I click on one of the Titles it starts playing :)

Btw. I was only able to test it with a WIFI Network.

There are several improvments to do. Like:
- a selection for Audio, Photos, Documents, Playlists …
- a Thread that the loading happens in the Background
- a Setup Feature to store and change Userid, Password and APiKey.

But as I make it opensource you can help to improve it.

The most work for me was to understand and test out the API Function from ORB.
Also when there is a API Description from ORB http://developer.orb.com
it was not always really understandable how to do.

You may like to change the Code as you like. Remember when you publish it into the Market
you need a Commercial APi Key from ORb. Yes, I know on Orb is written you need a Commercial Key when
you like to make Money from it or it is business in any other way. Finaly I thought to make it freeware
but after I nice Talk with Luc Julia from Orb he told me: “Remember that you can’t distribute an application using a developer key, it will be invalidated. You need to get a commercial key for that purpose.”

I asked 3 Times but at all it looks for any Case you publish it you need commercial key.

Ok, here is my Prework and I hope you can use it for your Purposes.
Btw: I called it “OrbAnd” :)

You can download the full OrbAnd Source here (prepared for SDK1.1 and Eclipse)

Yours
Chris

–Orband.Java


/*
 * OrbAnd 0.1 Alpha
 *
 * Copyright (C) 2009 Christian Albert Müller
 * http://www.christian-albert-mueller.com
 *
 * This Source Code is Freeware, OpenSource as you like to call it.
 * I do not take any responsibility for its usage and also I dont have
 * Time to explain the Source.
 *
 * If you like to Develop this Version you are welcome to send me your
 * Updates and I will check them and keep the right to publish it for
 * other Users on my Page.
 *
 * If you can make some Explanations for other Users may be helpful.
 *
 * Should you distribute this Version you need a Commercial Key from Orb
 *
 * I am not related with ORB and its not an official Work from ORB
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *
 * You can extend this Copyright with your Changes and keep Responsible
 * for your Work.
 *
 *
 * To start:
 * - go to: https://mycast.orb.com/orb/html/createAPIKey.html
 *   - Enter your ORB Login and request an Developer API Key
 *   - Enter your Login, Password and API Key into the Source Code Bellow
 *   - Compile the Source ... and Enjoy Orb on your Android Mobile :)
 *
 * Infos about Error Codes and XML Requests at: http://developer.orb.com
 *
 */

package com.development.orband;

import java.io.BufferedInputStream;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.HashMap;

import org.apache.http.util.ByteArrayBuffer;
import org.apache.http.util.EncodingUtils;

import android.app.ListActivity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;

public class Orband extends ListActivity
{
	/** Called when the activity is first created. */

	private static final String TAG = "Orband";

	String Username = "yourUsername";
	String Password = "yourPassword";
	String apikey   = "yourApiKey";

	String html;
	String dummystr;
	String sid;

	//Initializing the ListView
	private ArrayAdapter<String> mAdapter;
	private ArrayList<String> mStrings = new ArrayList<String>();

	//Just a small Status Line in the Top
	TextView toptext;

	static int countlistentries;
	static Bitmap[] inipics;

	//ArrayList for Orb Responses (MediaTitle, Url ...)
	ArrayList<HashMap<String,String>> list = new ArrayList<HashMap<String,String>>();
	HashMap<String,String> item = new HashMap<String,String>(); 

	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		toptext = (TextView) findViewById(R.id.toptext);

		mAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, mStrings);

		setListAdapter(mAdapter);
		ListView MyOrbList = getListView();

		MyOrbList.setOnItemClickListener(new OnItemClickListener()
		{
			public void onItemClick(AdapterView<?> parent, View v,
					int position, long id)
			{
				String Mid =   list.get(position).get("id");

				//Get STREAM Information
				html = loaddata("http://api.orb.com/orb/xml/stream?sid="+sid+"&mediumId="+Mid+"&streamFormat=3gp&type=pda&width=480&height=360");

				int status = Integer.parseInt(GetXmlInnerNr("status", "code", html, 1));
				String uril = GetXmlInnerNr("item","url",html,1);

				Toast.makeText(Orband.this, "Status: "+status+" URL: "+uril,Toast.LENGTH_SHORT).show();

				if (status == 0)
				{
					Intent i = new Intent(Intent.ACTION_VIEW);
					Uri u = Uri.parse(uril);
					i.setData(u);
					startActivity(i);
				}

			}
		});

		do_main();

	}

	private void do_main()
	{

		Log.i(TAG, " *------ Login Orb -----*: ");
		html = loaddata("http://api.orb.com/orb/xml/session.login?apiKey="+apikey+"&l="+Username+"&password="+Password+"");

		int status = Integer.parseInt(GetXmlInnerNr("status", "code", html, 1));
		sid = GetXmlNr("orbSessionId", html, 1);
		toptext.setText("sid:" + sid + " status:" + status);

		if (status == 0)
		{

			Log.i(TAG, " *------ Load Media Data-----*: ");
			html = loaddata("http://api.orb.com/orb/xml/media.search?sid="+ sid + "&q=mediaType%3Dvideo&groupBy=author");

			// for AUDIO just change the Line above with this
			// html = loaddata("http://api.orb.com/orb/xml/media.search?sid="+ sid + "&q=mediaType%3Daudio&groupBy=author");

			status = Integer.parseInt(GetXmlInnerNr("status", "code", html, 1));
			Log.i(TAG, " *------ Media Result Status: " + status);

			if (status != 0)
			{
				toptext.setText("Status Error (2) : " + status);
			} else
			{
				int results = Integer.parseInt(GetXmlInnerNr("searchResult","itemCount", html, 1));
				//String ausgabe = "" + results + " Ergebnisse\n";
				Log.i(TAG, " *------ Media Result add 1: ");
				for (int i = 0; i < results; i++)
				{
					dummystr=GetXmlNr("field name=\"title\"", html, i);
					mAdapter.add(dummystr);
					item = new HashMap<String,String>();
					item.clear();
					item.put("title",dummystr);
					item.put("id",GetXmlInnerNr("item","orbMediumId", html, i));
					list.add(item);
				}
				Log.i(TAG, " *------ Media Result add 2: ");
			}
		} else
		{
			toptext.setText("Status Error (1) : " + status);
		}
	}

	private String loaddata(String Urli)
	{
		try
		{

			String mediaUrl = Urli;
			URLConnection conn;
			conn = new URL(mediaUrl).openConnection();

			InputStream is = conn.getInputStream();
			BufferedInputStream bis = new BufferedInputStream(is);
			ByteArrayBuffer baf = new ByteArrayBuffer(50);

			// loading part
			int current = 0;
			while ((current = bis.read()) != -1)
			{
				baf.append((byte) current);
			}
			// Log.i(TAG, " *------ Load Data done -----*: ");
			html = EncodingUtils.getString(baf.toByteArray(), "UTF-8");
			// ------
		} catch (Exception e)
		{
			Toast.makeText(this, "Shit, Loading Error!", Toast.LENGTH_SHORT).show();
		}

		return html;
	}

	public String GetXmlNr(String xtag, String xhtml, int pos)
	{
		// Log.i(TAG, " *xhtml: " + xhtml);
		String x1tag = "";
		String x2tag = "";
		String retstr = "";
		int xstart = 0;
		int dummy = 0;
		int xend = 0;
		int xcont = 0;
		int xcounter = 0;

		x1tag = "<" + xtag;
		dummy = xtag.indexOf(" ");
		if (dummy != -1)
			xtag = xtag.substring(0, dummy);
		x2tag = "</" + xtag + ">";

		do
		{
			xcounter++;
			xhtml = xhtml.substring(xcont);
			xstart = xhtml.indexOf(x1tag);
			// Log.i(TAG, " *xstart1: " + xstart);
			xstart = xhtml.indexOf(">", xstart);
			if (xstart < 0)
				return "";
			xend = xhtml.indexOf(x2tag, xstart);
			if (xend < 0)
				return "";

			retstr = xhtml.substring(xstart + 1, xend);

			xcont = xend + x2tag.length();

		} while (xcounter < pos);

		return retstr;
	}

	public String GetXmlInnerNr(String xtag, String Attrib, String xhtml,
			int pos)
	{

		String x1tag;
		int x1len;
		String x2tag;
		String retstr;
		int xstart;
		int xend;
		int xcont = 0;
		int xcounter = 0;

		do
		{
			xcounter++;
			xhtml = xhtml.substring(xcont);
			// Log.i(TAG, "* xhtml: " + xhtml);
			x1tag = "<" + xtag;
			x1len = x1tag.length();
			x2tag = ">";

			xstart = xhtml.indexOf(x1tag);
			if (xstart < 0)
				return "";

			xend = xhtml.indexOf(x2tag, xstart);
			if (xend < 0)
				return "";

			// Log.i(TAG, "* xstart: " + xstart + " xend: " + xend);

			String Innerhtml = xhtml.substring(xstart + x1len, xend);

			// now search in the innerarea
			x1tag = Attrib + "=\"";
			x2tag = "\"";
			x1len = x1tag.length();
			xstart = Innerhtml.indexOf(x1tag);

			if (xstart < 0)
				return "";

			xcont = xend + 1;

			xend = Innerhtml.indexOf(x2tag, xstart + x1len);
			if (xend < 0)
				return "";
			retstr = Innerhtml.substring(xstart + x1len, xend);
			;

		} while (xcounter < pos);

		return retstr;
	}

}

— and here the Main.XML


<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

>

<TextView

android:id="@+id/toptext"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/hello"

/>

<ListView android:id="@android:id/list"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:transcriptMode="normal"/>

</LinearLayout>
<div>

—AndroidManifext.XML


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.development.orband"
android:versionCode="1"
android:versionName="1.0.0">
<uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Orband"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Category: android  Tags: , , ,  3 Comments

Thats quit simple and cool.

3D without Glasses, just by flipping the 2 Views

http://www.well.com/user/jimg/index.html

 

http://worshiptheglitch.com/2005/12/3d-without-glasses.html

Somtimes you may like to pause your javascript for a while (milliseconds). Here is a simple script i found from sean.co.uk that do exactly this:

<script language=”javascript”>

// www.sean.co.uk

function pausecomp(millis) 
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); } 
while(curDate-date < millis);

</script>

When you need to jump to a specific URL direct after you choosed a Statement from a Selectbox:

 

<select onchange=”window.open(this.options[this.selectedIndex].value,’_self’)”>

    <option value=”">Choose a Language…</option>

    <option value=”database.php?lang=en”>English</option>

    <option value=”database.php?lang=de”>Deutsch</option>

    <option value=”database.php?lang=id”>Italian</option>

    <option value=”database.php?lang=ru”>Russian</option>

</select>

If you need a Browser Language Detection for your Coding, try this. At the end it come stored in a Session.

< ? php
  
function lixlpixel_get_env_var($Var)
    {
      if (empty(
$GLOBALS[$Var]))
        {
          
$GLOBALS[$Var] = (!empty($GLOBALS['_SERVER'][$Var])) ? $GLOBALS['_SERVER'][$Var] : (!empty($GLOBALS['HTTP_SERVER_VARS'][$Var])) ? $GLOBALS['HTTP_SERVER_VARS'][$Var] : ;
        }
    }
  
  function 
lixlpixel_detect_lang()
    {
      
// Detect HTTP_ACCEPT_LANGUAGE & HTTP_USER_AGENT.
      
lixlpixel_get_env_var(‘HTTP_ACCEPT_LANGUAGE’);
      
lixlpixel_get_env_var(‘HTTP_USER_AGENT’);
      
      
$_AL 
strtolower($GLOBALS['HTTP_ACCEPT_LANGUAGE']);
      
$_UA 
strtolower($GLOBALS['HTTP_USER_AGENT']);
      
      
// Try to detect Primary language if several languages are accepted.
      
foreach ($GLOBALS['_LANG'] as $K
)
        {
          if (
strpos($_AL$K) === 0)
              return 
$K;
        }
      
      
// Try to detect any language if not yet detected.
      
foreach ($GLOBALS['_LANG'] as $K
)
        {
          if (
strpos($_AL$K) !== false)
              return 
$K;
        }
      foreach (
$GLOBALS['_LANG'] as $K
)
        {
          if (
preg_match(“/[\[\( ]{$K}[;,_\-\)]/”$_UA))
              return 
$K;
        }
      
      
// Return default language if language is not yet detected.
      
return $GLOBALS['_DLANG'];
    }
  
  
// Define default language.
  
$GLOBALS['_DLANG'] = ‘en’;
  
  
// Define all available languages.
  // WARNING: uncomment all available languages
  
  
$GLOBALS['_LANG'] = array(‘af’// afrikaans.
  
‘ar’// arabic.
  
‘bg’// bulgarian.
  
‘ca’// catalan.
  
‘cs’// czech.
  
‘da’// danish.
  
‘de’// german.
  
‘el’// greek.
  
‘en’// english.
  
‘es’// spanish.
  
‘et’// estonian.
  
‘fi’// finnish.
  
‘fr’// french.
  
‘gl’// galician.
  
‘he’// hebrew.
  
‘hi’// hindi.
  
‘hr’// croatian.
  
‘hu’// hungarian.
  
‘id’// indonesian.
  
‘it’// italian.
  
‘ja’// japanese.
  
‘ko’// korean.
  
‘ka’// georgian.
  
‘lt’// lithuanian.
  
‘lv’// latvian.
  
‘ms’// malay.
  
‘nl’// dutch.
  
‘no’// norwegian.
  
‘pl’// polish.
  
‘pt’// portuguese.
  
‘ro’// romanian.
  
‘ru’// russian.
  
‘sk’// slovak.
  
‘sl’// slovenian.
  
‘sq’// albanian.
  
‘sr’// serbian.
  
‘sv’// swedish.
  
‘th’// thai.
  
‘tr’// turkish.
  
‘uk’// ukrainian.
  
‘zh’ // chinese.);
  
  // Redirect to the correct location.
  
  //header(‘location: http://www.your_site.com/index_’.lixlpixel_detect_lang().’.php’); // Example Implementation
  //echo ’The Language detected is: ’.lixlpixel_detect_lang(); // For Demonstration
  
  
  
function setautolang()
    {
      
// start up your PHP session!
      
session_start();
      
      
$sprache lixlpixel_detect_lang();
      
      if (
$sprache == “de”)
        {
          
$_SESSION['lang'] = “deutsch”;
        }
      elseif (
$sprache == “en”)
        {
          
$_SESSION['lang'] = “english”;
        }
      elseif (
$sprache == “cs”)
        {
          
$_SESSION['lang'] = “tschechisch”;
        }
      elseif (
$sprache == “ru”)
        {
          
$_SESSION['lang'] = “russian”;
        }
      elseif (
$sprache == “it”)
        {
          
$_SESSION['lang'] = “italian”;
        }
      else
        {
          
$_SESSION['lang'] = “english”;
        }
    }
?>

Category: php  One Comment