peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You can try Little Eye Labs performance tool. However as far I know it is commercial product, not sure how much you will get out of it as few months back was bought by Facebook for they internal usage

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Time is Android represented either by Date or Time objects. Each of these will return result in miliseconds as long variable (http://developer.android.com/reference/java/util/Date.html#getTime() http://developer.android.com/reference/android/text/format/Time.html#toMillis(boolean) ). Then you just need to compare time1 to time2 to find if it is lesser/equal/greater

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Most likely you are missing JDBC driver, or you have duplicate (at least that was problem with Tomcat if you had JDBC driver in Tomcat lib folder and another in your project lib folder).

Without seing your project hard to advice otherwise...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This is how simple it can be done

Button one = (Button)this.findViewById(R.id.button1);
final MediaPlayer mp = MediaPlayer.create(this, R.raw.soho);
one.setOnClickListener(new OnClickListener(){

    public void onClick(View v) {
        mp.start();
    }
});
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Peddi_1 read my previous replies

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@iConqueror was there any reason to digg out this thread when all what you did is post just silly remark....

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If i read it correctly your insertValue R.id.txtInsert is part of R.layout.add_item. If that is case then

final EditText insertValue = (EditText)findViewById(R.id.txtInsert);

will be null because edit text was not found. You have to find it in coresponding view, so it should be like

final EditText insertValue = (EditText) addView.findViewById(R.id.txtInsert);
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

i have some problem plz soloved

We are not telepats to know what problem you have if you do not provide neither error or actula code

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Internet is full of tutorials on specific topic!

Do not expect that someone will write solution for you that you can copy & paste

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

And what exactly is your question?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Here is full answer nancy

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

By posting your code so we can see what is happening...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Hiroshe you should spend more then minute because you would find there are multiple options that are explained here http://developer.android.com/guide/topics/data/data-storage.html
@Stefan the simplest and easiest is SharedPreference

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I recently moved both my eclipse and Android folder into the same location

Rather generic statement. What exactly did you do?

PS: Android Studio for the win. No silly ADT just point IDE where is Android SDK and setup your project where you want, not dependent on some stupid Workspace

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Would be nice if you provided solution not just close thread...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What ever library you use it will have something similar to default Android implementation of HttpResponse.getStatusLine()link from which you get StatusLine and here you can get actual code value. This is often in libraries simplyfied to something like HttpResponse.getStatusCode or similar

So all you have to do is fire your HttpRequest, wait for HttpResponse, then evaluate for what ever error messages you want.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I'm not Eclipse user, but did you updated Android SDK to latest version?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you explain why you are trying to manipulate the same button which you just did click?
From what you are doing it is look like you are just changing selection state that should be managed from button xml you can read about it here http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Resources constrains (cpu, ram, operating system), secondly current devices are more entertainment, quick search and not heavy duty computing devices

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Simple advice, do not do these computations on device. Send request to server, let server deal with it and then push alert to device

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@iamcreasy you may want to read whole thread before posting because @shadowsrose1 said

alright i fixed the errors and got the first part to commpile, now can someone explain the second part to me?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

To make a comment you have to do

/*
 Some comment here
 */

and not to do

*/
Some comment here
*/

Also most of the errors are rather self-explenatory and you should be able to fix them easily

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Then either you are on some restrictive company internet or your internet is "donkey" slow as I can open that page no problem

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Its all here http://ambraproject.org/trac/wiki/QuickStart

If you have problem to follow guideline, I suggest you ask on their mailing list

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Without knowing more about project, code wise, it will be hard to advise. Nevertheless it is obvious you need to create "a service" that will be querying whatever storage you decide to use in order to fetch existing appointments and push it to specific day listview

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Trying to re-invent the wheel
Did you check out default Android calendar? Would be good start and think why they di it this or that way.

Having multiple columns that are scrollable separatly is just bad idea.

If you still insist on re-inventing wheel then try to build around designs of existing Android calendar

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Sorry to say, but this is developer section not software support. You better ask on BalckBerry own tech forum

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Post moved

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You need to know Java, if you don't then go and learn it then come back.

If you know Java, then perhaps reading one of these books will be suficient enough

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I'm Android developer so to be fair no idea how services are done with Cordova. However here are some pointers

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

by the way cordova(phonegap)/Titanium is powerful tools to create native mobile apps

These tools are not native, they are cross platform, full stop.
Native mean Android written in Java or iOS writen in Objective C. Not bunch of html & JS or C#. They maybe useful for company that cannot or is not willing to invest in Android and iOS devs, however they will never be fast as native code and will always be behind with latest Android SDK.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

javascript , html5 and cSS3 is not native android development. PhoneGap is now called Cordova and you can find their documentation here and for Titanium over here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You failed to specify what operaring system you want to develop for ANdroid or iOS...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Never tried to do such think. However I found this post on stackoverflow that discusses extracting data from current connection. So based on that I looked up ServiceState and that has getOperatorAlphaLong() methd that according documentation

Get current registered operator name in long alphanumeric format.

So you are able to discover your current provider. Question is if you can trigger call for discovery of all available networks...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I used to be with DailyRazor before I moved to VPS with Linode

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Because you are missing @Override annotation with method call onCreate and onClick. These are there for reason!

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Apache Tomcat 7 - Security Manager HOW-TO happy reading

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You need to install one of the Java container or as they often called Java servers. Most common Tomcat, Jetty or JBoss

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

As Jwenting said there are free options such as iText, Apache PDFBox and others just search for them
Both of above mentioned libraries have very good documentation with plenty of examples and active communities to help out with issues one may face

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

List followed by code snippet does not render properly. Example

  • Item One
  • Item Two
  • Item Three

    Log.i(MainActivity.class().getSimpleName(), SOME_MESSAGE); //info
    Log.d(MainActivity.class().getSimpleName(), SOME_MESSAGE); //debug
    Log.w(MainActivity.class().getSimpleName(), SOME_MESSAGE); //warning
    Log.e(MainActivity.class().getSimpleName(), SOME_MESSAGE); //error

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Here is update, I added some comments in code and also at the end of post

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import co.uk.apptivation.nga.library.R;

import java.math.BigDecimal;

public class MainActivity extends FragmentActivity { //FragmentActivity is preferred over ActionBarActivity very few apps supports 7 and bellow

    private TextView textview;
    private Globals globals;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        textview = (TextView) findViewById(R.id.textView);
        globals = Globals.getInstance();
    }

    /* Function handles event when a number button is pressed */
    /* Including decimal point */
    public void numberPressed(View view) {

        Button button = (Button)view;
        textview.append(button.getText().toString());
    }

    /* Function handles event when "+" button is pressed */
    public void addPressed(View view) {
        //Global now available as class variable no need for creating it
        //Textview now available as class variables
        BigDecimal bd = new BigDecimal(textview.getText().toString());
        globals.setData(bd);
        globals.setlastoperation(1);
        textview.setText("");
        //no need to set local variables to null JVM garbage collector takes care of this
    }

    /* Function handles event when "=" button is pressed */
    public void equPressed(View view) {

        //Global now available as class variable no need for creating it
        //Textview now available as class variables
        int lasTop = globals.getlastoperation();
        BigDecimal bdg = new BigDecimal(globals.getData().toString());
        BigDecimal bd = new BigDecimal(textview.getText().toString());
        switch (lasTop) {
        case 1: {/* "+" button was the last operator button pressed*/
            BigDecimal sum = new BigDecimal(bdg.add(bd).toString());
            textview.setText(sum.toString());
            break; //do not forget to add break otherwise you may for get with next case and your process will felt through case 1 to case 2
        }
        default:
            //May want to …
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Back to layouts, here is something you maybe interested in to read https://plus.google.com/+AndroidDevelopers/posts/FJv7Pym2HtZ

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This can be managed by Intents, where your apllication invokes another application and listen for result. Few examples/explanations how calculator can be called by intent can be found here and here You can find more if you search for it ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Check what is maximum of RAM you can add to your PC. RAM these days is not very expensive and in this case worth upgrade. Company like Crucial can help you with hardware detection and potential memory upgrades

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you found solution please share with community, do not just mark thread as solved.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes difference been them is down to screen sizes, you would need to provide layouts for mdpi, hdpi etc. which do provide different sizes of buttons, fonts, spacing and other

  1. It is good to have at least 8GB RAM so you can assigned more memory to emulator then 128MB that it will get by default
  2. Give emulator more power, I use following on emulator for Nexus 4 Target: 4.1.2, CPU/ABI: Intel Atom (x86), Memory options RAM: 2048, VM Heap: 1024
  3. Unfortunately Android SDK or ADT doesn't have latest Intel® Hardware Accelerated Execution Manager, but you can get it here https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
  4. It is always better to test on real device, Motorola Moto G is as little as £120, also Nexus 7 is very cheap, and for 10" Asus Memo pads are great value for the money. You do not need all these gadgets but one real device makes hell of difference
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

GridLayout takes a collection of items. So you need to design layout of a singular item. Then you create adapter, tell it to use your item layout, provide and provide collection of data you want to populate your grid with. You can read on it here http://developer.android.com/guide/topics/ui/layout/gridview.html

BTW, if I can recommend it is better to learn hands about each view and code by hand at beginning and use UI builder later when you know what the component is expecting and what it will do for you.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster