[android-developers] can't restore deleted files

2012-12-08 Thread 乌拉拉
I deleted AndroidSource/external folder by accident. I typed repo status, 
the status of the folder was missing.
I tried repo sync but no lucky. The folder was still missing.
I tried git reset, the error message was fatal: Failed to resolve 'HEAD' as 
a valid ref.
I don't know what should I doWho can help me on that?
Thanks very much

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers]

2012-12-08 Thread sree android
See the below image their is a feed the cat in that horizantal display is
showed..Which concept is apply their.
i tried many using expandablelistview child horizantally,but not showed.
already one developer is said,it is contact Badge concept.but is not.plz
send which concept is followed here and any code also provide if it is
possible,

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] ...

2012-12-08 Thread skink

sree android wrote:
 See the below image their is a feed the cat in that horizantal display is
 showed..Which concept is apply their.
 i tried many using expandablelistview child horizantally,but not showed.
 already one developer is said,it is contact Badge concept.but is not.plz
 send which concept is followed here and any code also provide if it is
 possible,


what the heck are you talking about?

pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Can't Use Raw Links and Anchor Links in One TextView?

2012-12-08 Thread skink


TreKing wrote:
 On Fri, Dec 7, 2012 at 12:44 PM, skink psk...@gmail.com wrote:

  try this:
 
  String str = http://www.google.com a href=\
  http://www.google.com\;Google/a;
  Spanned html = Html.fromHtml(str);
  Object[] spans = html.getSpans(0, html.length(), URLSpan.class);
  tv.setAutoLinkMask(Linkify.ALL);
  tv.setText(html);
 
  SpannableString ss = (SpannableString) tv.getText();
  for (int i = 0; i  spans.length; i++) {
  URLSpan span = (URLSpan) spans[i];
  int end = html.getSpanEnd(span);
  int start = html.getSpanStart(span);
  ss.setSpan(span, start, end, 0);
  }
 

 Just want to add to this for posterity's sake.

me too, instead of passing 0 as the flags in setSpan it should be
rather:

int flags = html.getSpanFlags
(span);
ss.setSpan(span, start,
end, flags);

pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] NullPointerException in SharedPreferences Android

2012-12-08 Thread laxman k
if want full code.see in attachments

https://lh4.googleusercontent.com/-AdDdpB0vae4/UMMfnnPeOjI/APQ/LxQ1wlyfxb8/s1600/Capture.JPG

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=enpackage laxman.example.androcloud;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class CloudHome extends TabActivity 
{
 
 @Override
 public void onCreate(Bundle savedInstanceState)
 {
  super.onCreate(savedInstanceState);
  final TabHost tabHost = getTabHost();
  tabHost.addTab(tabHost.newTabSpec(tab1)
  .setIndicator(,getResources().getDrawable(R.drawable.cloud1))
  .setContent(new Intent(this, FileUloadDialog.class)));
  tabHost.addTab(tabHost.newTabSpec(tab2)
  .setIndicator(,getResources().getDrawable(R.drawable.sharing))
  .setContent(new Intent(this, AndroCloud.class)));
  tabHost.addTab(tabHost.newTabSpec(tab2)
  .setIndicator(,getResources().getDrawable(R.drawable.activity))
  .setContent(new Intent(this, AndroCloud.class)));
  tabHost.addTab(tabHost.newTabSpec(tab2)
  .setIndicator(,getResources().getDrawable(R.drawable.search))
  .setContent(new Intent(this, AndroCloud.class)));
 }
 
}
package laxman.example.androcloud;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class Session {
	
	Context context;
	
	public boolean start(String UserName)
	{
		SharedPreferences pref= context.getSharedPreferences(MyPref,Context.MODE_PRIVATE);
	SharedPreferences.Editor editor = pref.edit();
		editor.putBoolean(SessionState, true); 
		editor.putString(SessionName, UserName); 
		editor.commit();
		return true;
	}
	public String GetSessionName()
	{   SharedPreferences pref= context.getSharedPreferences(MyPref, Context.MODE_PRIVATE);
		String sessionN=pref.getString(SessionName, null);
		return sessionN;
	}
	public String GetSessionState()
	{   
		SharedPreferences pref= context.getSharedPreferences(MyPref, Context.MODE_PRIVATE);
		String SessionState=pref.getString(SessionState, null);
		
		return SessionState;
	}
	public boolean destroy()
	{
		SharedPreferences pref= context.getSharedPreferences(MyPref, Context.MODE_PRIVATE);
		Editor editor = pref.edit();
		editor.clear();
		editor.commit();
		return true;	
	}
	

}


[android-developers] Re: NullPointerException in SharedPreferences Android

2012-12-08 Thread skink


laxman k wrote:
 if want full code.see in attachments



and i want to be healthy, rich, handsome and forever young...

pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] eclipse run configuration to launch various activities with extras (or android app run arguments)

2012-12-08 Thread Mihai Badea
Dear friends,

I would like to create a launch configuration, to run any activity with 
arguments, for quick manually interactive testing.

I have one Android Application with many activities. Some of them are 
chained in a wizard, each activity is a step, so they are launched from one 
another, with put extras in the intent as arguments for the next step. I 
would like to quickly reach the read marked step marked in the flow below, 
in other words I would like to launch directly an activity towards the end 
of my wizard, without having to go through all the previous wizard steps.

   [extras]  [...] [...]*  [extras] 
 * [...] [...]
Activity_1  Activity_2 -- [...] -- Activity_6* -- 
Activity_7 *-- [...] -- Activity_9

I managed to create a run configuration that launches the activity I want. 
But I can't find how to define the extras in the run config, and without 
arguments running that activity doesn't make sense.

To create a run configuration for a different activity I added a LAUNCHER 
intent-filter in AndroidManifert.xml:
activity
android:name=.Activity_7
android:label=@string/label_activity_7 
meta-data
android:name=android.support.PARENT_ACTIVITY
android:value=com.example.hello.activity_6
/
intent-filter
action 
android:name=android.intent.action.WHATEVER_ELSE_THAN_MAIN_TO_AVOID_ICON_IN_LAUNCHER
 
/
category android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

I am following two paths that I think might achieve what I want - but so 
far to no avail:

*1. Trying to use ActivityManager in the ADB shell to launch the activity, 
then try to fit these parameters in the launch configuration file:*

~ $ adb shell
$ am start -a android.intent.action.MAIN -c 
android.intent.category.LAUNCHER -n com.example.hello/Activity_7 -e 
param_1 foo -e  param_2 boo

Starting: Intent { act=android.intent.action.MAIN 
cat=[android.intent.category.LAUNCHER] cmp=com.example.hello/.Activity_7 
(has extras) }

OK this worked fine in ADB Shell. I launched directly the 7th step in my 
wizard, with params: param_1=foo, param_2=boo and I can now manually test 
directly the activity I am working on. I didn't have to go jumping hoops 
through all previous 6 steps of the wizard so I can reach where I want and 
have a play at the UI.

Now I need to enter this params somehow in Eclipse-Run-Run 
Configurations...-Android Application. Seems there's no means to to that.
Trying to edit directly the launch file from 
workspace\.metadata\.plugins\org.eclipse.debug.core\.launches\Activity_2.launchxml
 file:

[...]
launchConfiguration 
type=com.android.ide.eclipse.adt.debug.LaunchConfigType
intAttribute key=com.android.ide.eclipse.adt.action value=1/
stringAttribute key=com.android.ide.eclipse.adt.activity 
value=com.example.hello.Activity_2/
stringAttribute key=com.android.ide.eclipse.adt.commandline value=/
[...]

No matter what I wrote in the value of 
com.android.ide.eclipse.adt.commandline or whatever other 
com.android.ide.eclipse.adt.* attributes I added, I could not manage a 
proper activity launch with extras.

I have no idea why I don't find this feature, it seems quite basic in an 
IDE, that when you have run configurations for software with various entry 
points, you should have a means to pass arguments to them too?

*2. Android JUnit Test*

I need interactive testing. I want to play myself with the UI and see how 
the user experience feels like. JUnit tests can do UI automation, monkey 
and other UI stuff, but what I want from it is to start the activity I want 
and then give me the control for a while.
So far I didn't find interactive support in Android Unit Test. Does such a 
feature exist?

Many thanks for your reading this and any helpful thoughts you might have.
Mihai

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] android searchview

2012-12-08 Thread Salih Gündüz
Hello. I have a textbox with large text. I want to search in text and go to 
the line search result.How can I connect searchview to textview? do you 
have any tutorials for it?thanks goodwork.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers]

2012-12-08 Thread skink


sree android wrote:
 See the below image their is a feed the cat in that horizantal display is


i dont see any image (or any link to that)

pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers]

2012-12-08 Thread Mihai Badea
has to be google translate

On Saturday, December 8, 2012 12:27:58 PM UTC, skink wrote:



 sree android wrote: 
  See the below image their is a feed the cat in that horizantal display 
 is 


 i dont see any image (or any link to that) 

 pskink 


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Android ListView Animation

2012-12-08 Thread Makrand
I am trying to add Animation for ListView I am using getView()to draw some 
views in list. all works fine.

public View getView(int position, View convertView, ViewGroup parent) { 
}

I am trying to add animation when user click on list cell then all list 
cells should slide left and new data should come from right at same time, 
means cell data is moving towards left and same time new data coming from 
right side. 

I Have implemented following code in OnItemClickListener

@Override
public void onItemClick(AdapterView? arg0, View arg1, int arg2, long 
arg3) {
Animation slideOutAnimation=AnimationUtils.loadAnimation(this, 
R.anim.slide_out);
slideOutAnimation.setDuration(900);

Animation slideInAnimation=AnimationUtils.loadAnimation(this, 
R.anim.slide_in);
slideInAnimation.setDuration(500);

listView.startAnimation(slideOutAnimation);

new Handler().postDelayed(new Runnable() {
@Override
public void run() {
data = newData();
listView.startAnimation(slideInAnimation);
myAdapterClass.notifyDataSetChanged();
}
}, slideOutAnimation.getDuration());
}
};

above code is working but not getting desire output I am getting one empty 
view while changing Animation.

Left Sliding Animation Starts--- Empty ViewRight Sliding Animation 
Starts  

Not getting why Empty view (shows empty screen for while) is coming, I have 
played with Animation time and handler but no luck. 

How to remove that empty view ? how to achieve this output ?

Left Sliding Animation Starts(Data moving)( Same time data coming from 
Right) Right Sliding Animation Starts  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers]android bluetooth multi-connect one after another

2012-12-08 Thread akash roy
please have a look on it..thankyou.



On Sat, Dec 8, 2012 at 9:26 AM, akash roy akashroy.n...@gmail.com wrote:

  **

 here i am trying to connect multiple devices one after another at one go.
 now if it connects to a device it will send the message else it will try to
 connect the next paired device. here the main problem is that its not
 connecting any device rather getting skipped one after other , before they
 get connected to each other.


 -

 for( BluetoothDevice device : PairedDevice)
 {
 mChatService.connect(device);
 try
 {
 SendMessage(message); //message is a string object
 }
 catch(Exception e)
 {
 e.printStackTrace();
 }
 }

 --




-- 
*AKASH ROY*
*3RD YEAR
*
*COMPUTER SCIENCE AND ENGG.*
*N.I.T. DURGAPUR*
*
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Download Manager : Getting Exception while getting Coloumn Index for local file name of downloaded file

2012-12-08 Thread vivek singh
   
 There is an activity in my android application which checks for the latest 
version of app
on app's server. When it finds a new version of the app, it initiates a 
download process of the apk file using DownloadManager. When activity 
receives the message that the application is downloaded, it tries to open 
the downloaded file. And when the apk file is opened, the installation 
process is automatically started.

Here is the code of my BroadCastReceiver:

   BroadcastReceiver broad= new BroadcastReceiver(){
  @Override
  public void onReceive(Context con,Intent inxc)
  {String sact=inxc.getAction();
   if(DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(sact))
{
 Query qer=new Query();
 qer.setFilterById(dloadid);
 final Cursor curr=dloadm.query(qer);
 if(curr.moveToFirst())
 {int 
cind=curr.getColumnIndex(DownloadManager.COLUMN_STATUS);
  
if(DownloadManager.STATUS_SUCCESSFUL==curr.getInt(cind))
  {final AlertDialog instd=new 
AlertDialog.Builder(fze).create();
   instd.setTitle(Test app );
   instd.setMessage(New apk for 
application Downloaded.\n Would you like to install it now);
   instd.setButton(-1,Yes,new 
DialogInterface.OnClickListener(){
   @Override
  public void onClick(DialogInterface 
dface,int fox)
   {/*EXCEPTION OCCURRED IN 
FOLLOWING LINE*/
String 
apkloc=curr.getString(curr.getColumnIndex(DownloadManager.COLUMN_LOCAL_FILENAME));
Intent installapk=new 
Intent(Intent.ACTION_VIEW);

installapk.setDataAndType(Uri.fromFile(new File(apkloc)), 
application/vnd.android.package-archive);
startActivity(installapk);
  }
   });
   instd.setButton(-3,No, new 
DialogInterface.OnClickListener(){
  @Override
  public void onClick(DialogInterface 
dface,int fox)
  {
 instd.dismiss();
  }
   });
   instd.show();
  }

 }
}

  }
 };


**This code is working fine.**

But recently I received some users' feedback mentioning they received 
Unfortunately Activity Stopped... message .

StackTrace


 java.lang.IllegalArgumentException: Invalid column index -1, 12 
columns exist
at 
android.app.DownloadManager$CursorTranslator.getColumnName(DownloadManager.java:1261)
at 
android.app.DownloadManager$CursorTranslator.getString(DownloadManager.java:1315)
at com.android.testdl.Fview$2$1.onClick(AppTest.java:146)
at 
com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:165)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)

Any suggestions?

All users who received this error messages were not on WI-FI connection. 
They were on mobile network.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Java knowledge

2012-12-08 Thread Kristopher Micinski
But it's very common for the services to be written in rails.
On Dec 8, 2012 12:13 AM, sree android android.sreeni...@gmail.com wrote:


 Every one say java basics is enough for learning android,But it is wrong
 as my experience.We should know complete knowledge on Core java for
 learning android.But, for working in real time  we should know basic
 knowledge on JDBC,Webservices,Servlets,JSP while developing real time
 projects,Now all the projects are developed on webservice based projects in
 android.

 All the best.
 Link for above topics
 http://www.coreservlets.com/

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] NullPointerException in SharedPreferences Android

2012-12-08 Thread laxman k


https://lh6.googleusercontent.com/-WAHssBbqNq4/UMNRDm7U4kI/APg/3uShQ1iY0kY/s1600/Capture.JPG

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Proximity Alerts Not Working on API Level 17 (Google APIs or otherwise)

2012-12-08 Thread Irwin Billing
Been wrestling with this for a couple of days now.  Thought something was 
wrong with my code but I think it has to do with the API level.
I was testing using Intellij IDEA on OSX when I first couldn't solved the 
problem.  In a last-ditch effort, I ran the code on my Windows machine with 
Eclipse and it worked perfectly fine.

After some testing, it seems to be that the culprit is API 17.  It works on 
16, no matter the environment.

*AndroidManifest.xml*

 uses-sdk

 android:minSdkVersion=8

 android:targetSdkVersion=17 /


*Code I used to register for the alert broadcast*

 private void addFence() {

LocationManager locManager = (LocationManager)

getSystemService(Context.LOCATION_SERVICE);


 Intent intent = new Intent(PROXIMITY_ALERT_INTENT);

intent.putExtra(INTENT_LOC_NAME, Somewhere);


 PendingIntent pendingIntent = PendingIntent.getBroadcast(

this, 0, intent,

PendingIntent.FLAG_UPDATE_CURRENT);


 locManager.addProximityAlert(

43.64767, -79.39631, 2000, -1, pendingIntent);


 IntentFilter filter = new IntentFilter(PROXIMITY_ALERT_INTENT);

registerReceiver(new ProximityIntentReceiver(), filter);

 


*Emulator settings that don't work*

https://lh3.googleusercontent.com/-YBgCdwD4BIQ/UMNQ9r9BXmI/AGQ/ic0MnlHJy2c/s1600/Screen+Shot+2012-12-08+at+9.37.52+AM.png
*
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Proximity Alerts Not Working on API Level 17 (Google APIs or otherwise)

2012-12-08 Thread Irwin Billing
Oh, almost forgot.  I haven't tested on my devices (didn't set up location 
spoofing).

Also, sometimes on the emulator, a pop-up would come up when deploying that 
said Unfortunately, Fused Location has stopped working.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] NullPointerException in SharedPreferences Android

2012-12-08 Thread Kristopher Micinski
why should Context be non null?  You don't get a context for free.  You
have to inherit from some object which has a context

Kris


On Sat, Dec 8, 2012 at 9:39 AM, laxman k laxman.k1...@gmail.com wrote:


 https://lh6.googleusercontent.com/-WAHssBbqNq4/UMNRDm7U4kI/APg/3uShQ1iY0kY/s1600/Capture.JPG

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: app distribution best practices

2012-12-08 Thread John Coryat
You didn't say what type of app you have or your monetization strategy. 
Those things influence your distribution methods.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] videochat application

2012-12-08 Thread nemi chhimpa
i am developing video chat/calling application. i am sending small video
file to server/callee. is this approach is right or i should try something
else? thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] videochat application

2012-12-08 Thread Michael Banzon
That is a very difficult question to answer. It is simple not precise enough.

Is the approach working for you? If so - you are doing it correctly -
if not: what have you tried? What isn't working as expected?

On Sat, Dec 8, 2012 at 4:20 PM, nemi chhimpa ern...@gmail.com wrote:
 i am developing video chat/calling application. i am sending small video
 file to server/callee. is this approach is right or i should try something
 else? thanks.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
Michael Banzon
http://michaelbanzon.com/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] chek the image

2012-12-08 Thread sree android
See the below image their is a feed the cat in that horizantal display is
showed..Which concept is apply their.
i tried many using expandablelistview child horizantally,but not showed.
already one developer is said,it is contact Badge concept.but is not.plz
send which concept is followed here and any code also provide if it is
possible,

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=enattachment: taspas.png

Re: [android-developers] videochat application

2012-12-08 Thread nemi chhimpa
other approach is send images and audio file to server. and then play in
sync.
On Dec 8, 2012 9:13 PM, Michael Banzon mich...@banzon.dk wrote:

 That is a very difficult question to answer. It is simple not precise
enough.

 Is the approach working for you? If so - you are doing it correctly -
 if not: what have you tried? What isn't working as expected?

 On Sat, Dec 8, 2012 at 4:20 PM, nemi chhimpa ern...@gmail.com wrote:
  i am developing video chat/calling application. i am sending small video
  file to server/callee. is this approach is right or i should try
something
  else? thanks.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



 --
 Michael Banzon
 http://michaelbanzon.com/

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 1

2012-12-08 Thread Nobu Games
Aside from what Jonathan says about the missing result.moveToFirst() call:*

Problem 1:*

It looks like you are mixing client with server code. It makes little sense 
to me why you want user authentication in your Android application. But 
maybe you're trying to create something like a web server that runs on 
Android.

*Problem 2:*

You don't use a prepared statement for your query. What if your user enters 
the name: 

' OR 1=1; --

That's a login without correct credentials. Your string concatenation gets 
you the following query:

SELECT user,password FROM user WHERE user='*' OR 1=1; --*'AND password=''

If you would use the following query instead you can avoid this problem:

db.rawQuery(SELECT count(*) FROM user WHERE user=? AND password=?, new 
String[] {user, password}); 

I also changed the projection in that SELECT query because it is kind of 
redundant to query data you already know.



On Saturday, December 8, 2012 1:10:11 AM UTC-6, laxman k wrote:


 https://lh3.googleusercontent.com/-52PJkgV5W3c/UMLnpoSeUNI/AOo/LpgB6v8DfIA/s1600/Capture.JPG



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: chek the image

2012-12-08 Thread Nobu Games
I guess that's just a custom view with image buttons. It could be embedded 
in each listview item and expanded on click.

On Saturday, December 8, 2012 10:33:27 AM UTC-6, sree wrote:

 See the below image their is a feed the cat in that horizantal display is 
 showed..Which concept is apply their.
 i tried many using expandablelistview child horizantally,but not showed.
 already one developer is said,it is contact Badge concept.but is not.plz 
 send which concept is followed here and any code also provide if it is 
 possible, 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] videochat application

2012-12-08 Thread Nobu Games
Yet another approach would be: using the server for just negotiating a 
direct connection between your clients by handing out the IP addresses. 
That way you could create a socket connection between the clients and keep 
that connection open for the duration of the video chat call.

That way you avoid the video / audio file storage step on your server in 
between.

On Saturday, December 8, 2012 10:48:23 AM UTC-6, Nemichand wrote:

 other approach is send images and audio file to server. and then play in 
 sync. 
 On Dec 8, 2012 9:13 PM, Michael Banzon mic...@banzon.dk javascript: 
 wrote:
 
  That is a very difficult question to answer. It is simple not precise 
 enough.
 
  Is the approach working for you? If so - you are doing it correctly -
  if not: what have you tried? What isn't working as expected?
 
  On Sat, Dec 8, 2012 at 4:20 PM, nemi chhimpa 
  ern...@gmail.comjavascript: 
 wrote:
   i am developing video chat/calling application. i am sending small 
 video
   file to server/callee. is this approach is right or i should try 
 something
   else? thanks.
  
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to 
   android-d...@googlegroups.comjavascript:
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com javascript:
   For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
 
 
 
  --
  Michael Banzon
  http://michaelbanzon.com/
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to 
  android-d...@googlegroups.comjavascript:
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com javascript:
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] videochat application

2012-12-08 Thread Kristopher Micinski
...

Which is exactly what SIP does.

But why make a video chat application when there are so many good ones
out there already?  Doing this correctly is a pretty big engineering
challenge...

kris

On Sat, Dec 8, 2012 at 12:23 PM, Nobu Games dev.nobu.ga...@gmail.com wrote:
 Yet another approach would be: using the server for just negotiating a
 direct connection between your clients by handing out the IP addresses. That
 way you could create a socket connection between the clients and keep that
 connection open for the duration of the video chat call.

 That way you avoid the video / audio file storage step on your server in
 between.


 On Saturday, December 8, 2012 10:48:23 AM UTC-6, Nemichand wrote:

 other approach is send images and audio file to server. and then play in
 sync.
 On Dec 8, 2012 9:13 PM, Michael Banzon mic...@banzon.dk wrote:
 
  That is a very difficult question to answer. It is simple not precise
  enough.
 
  Is the approach working for you? If so - you are doing it correctly -
  if not: what have you tried? What isn't working as expected?
 
  On Sat, Dec 8, 2012 at 4:20 PM, nemi chhimpa ern...@gmail.com wrote:
   i am developing video chat/calling application. i am sending small
   video
   file to server/callee. is this approach is right or i should try
   something
   else? thanks.
  
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-d...@googlegroups.com

   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
 
 
 
  --
  Michael Banzon
  http://michaelbanzon.com/
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-d...@googlegroups.com

  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Proximity Alert Location Strategy

2012-12-08 Thread Irwin Billing
What is the location strategy implemented by the proximity alert system? 
 The documentation only specifies that it uses both the network and GPS 
providers.  When does it use network and when does it use GPS?

For example, does it use the radius to decide (larger than some value, use 
network) weather to use the network or GPS provider or does it simply use 
the most accurate available provider?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Download web data out to usb automate repeat

2012-12-08 Thread Antonis Kanaris

 I make this service for download file.How convert code for output data to 
usb+arduino?

  public class DownloadService extends IntentService {

  private int result = Activity.RESULT_CANCELED;

  public DownloadService() {
super(DownloadService);
  }

  // Will be called asynchronously be Android
  @Override
  protected void onHandleIntent(Intent intent) {
Uri data = intent.getData();
String urlPath = intent.getStringExtra(urlpath);
String fileName = data.getLastPathSegment();
File output = new File(Environment.getExternalStorageDirectory(),
fileName);
if (output.exists()) {
  output.delete();
}

InputStream stream = null;
FileOutputStream fos = null;
try {

  URL url = new URL(urlPath);
  stream = url.openConnection().getInputStream();
  InputStreamReader reader = new InputStreamReader(stream);
  
  fos = new FileOutputStream(output.getPath());
  int next = -1;
  while ((next = reader.read()) != -1) {
fos.write(next);
  }
  // Sucessful finished
  result = Activity.RESULT_OK;

i call this intentservice every 30 secs with broadcast receiver and alarm 
manager...

i find this for usb

  private final BroadcastReceiver mUsbReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (ACTION_USB_PERMISSION.equals(action)) {
synchronized (this) {
UsbAccessory accessory = 
UsbManager.getAccessory(intent);
if (intent.getBooleanExtra(
UsbManager.EXTRA_PERMISSION_GRANTED, false)) {
openAccessory(accessory);
} else {
Log.d(TAG, permission denied for accessory 
+ accessory);
}
mPermissionRequestPending = false;
}
} else if 
(UsbManager.ACTION_USB_ACCESSORY_DETACHED.equals(action)) {
UsbAccessory accessory = UsbManager.getAccessory(intent);
if (accessory != null  accessory.equals(mAccessory)) {
closeAccessory();
}
}
}
};
 
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
 
mUsbManager = UsbManager.getInstance(this);
mPermissionIntent = PendingIntent.getBroadcast(this, 0, new 
Intent(ACTION_USB_PERMISSION), 0);
IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
filter.addAction(UsbManager.ACTION_USB_ACCESSORY_DETACHED);
registerReceiver(mUsbReceiver, filter);
 
if (getLastNonConfigurationInstance() != null) {
mAccessory = (UsbAccessory) getLastNonConfigurationInstance();
openAccessory(mAccessory);
}
 
setContentView(R.layout.main);
buttonLED = (ToggleButton) findViewById(R.id.toggleButtonLED);
 
}
 
@Override
public Object onRetainNonConfigurationInstance() {
if (mAccessory != null) {
return mAccessory;
} else {
return super.onRetainNonConfigurationInstance();
}
}
 
@Override
public void onResume() {
super.onResume();
 
if (mInputStream != null  mOutputStream != null) {
return;
}
 
UsbAccessory[] accessories = mUsbManager.getAccessoryList();
UsbAccessory accessory = (accessories == null ? null : 
accessories[0]);
if (accessory != null) {
if (mUsbManager.hasPermission(accessory)) {
openAccessory(accessory);
} else {
synchronized (mUsbReceiver) {
if (!mPermissionRequestPending) {

mUsbManager.requestPermission(accessory,mPermissionIntent);
mPermissionRequestPending = true;
}
}
}
} else {
Log.d(TAG, mAccessory is null);
}
}
 
private void openAccessory(UsbAccessory accessory) {
mFileDescriptor = mUsbManager.openAccessory(accessory);
if (mFileDescriptor != null) {
mAccessory = accessory;
FileDescriptor fd = mFileDescriptor.getFileDescriptor();
mInputStream = new FileInputStream(fd);
mOutputStream = new FileOutputStream(fd);
Log.d(TAG, accessory opened);
} else {
Log.d(TAG, accessory open fail);
}
}
 
private void closeAccessory() {
try {
if (mFileDescriptor != null) {
mFileDescriptor.close();
}
} catch (IOException e) {
} finally {
mFileDescriptor = null;
mAccessory = null;
}
}
 
public void blinkLED(View v){
 
byte[] buffer = new byte[1];