|
|
rnbergren wrote: Has anyone installed and played with this one yet? Yes, I have.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Yes i am working on Android studio
|
|
|
|
|
how well or not well does it work. Good and bad points?
To err is human to really mess up you need a computer
|
|
|
|
|
|
|
I need to have detect any usb device while it connected.
what content should I include in device_filter file?
If I dont want filtering of device , still is it require to have device_filter file?
|
|
|
|
|
Have you tried registering a broadcast receiver, listening for ACTION_UMS_CONNECTED ? Some devices may not use this, however.
Also, lot's of examples here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Actually I Need to work with only Usb Host mode.
And I need to have recognize any connected device by OTG cable.
Then What should be the content of @Xml/device_filter file?
modified 15-Dec-14 4:57am.
|
|
|
|
|
i want to send message using visual c#.net to android mobile plz provide usb driver of android and also tell modem driver for android
|
|
|
|
|
muazam baig wrote: plz provide usb driver of android and also tell modem driver I am afraid that this site does not provide code to order. You will need to use Google to find an open source, or similar sample, or employ someone to do it for you.
|
|
|
|
|
How Could I retrive Input , Output stream of connected Usb Device in android?
I have following code.
Int fd = UsbDeviceConnection.getFileDescriptor();
FileDescriptor fdesc = new FileDescriptor(fd);
FileInputStream fin=new FileInputStream(fdesc);
but it did not work.
modified 10-Dec-14 23:41pm.
|
|
|
|
|
I have planed the following thing,please tell me will it possible?
1.Decided to execute lsof command in android program itself for the process
(Android each app is represented by separate process,so i will able to retrieve its process id)
so command will be
>lsof processIDOfApp
output will be table containing FD as well as is name including other information
2.Map the FD to its name
when we get the file name we will able to create the input/output stream.
|
|
|
|
|
hello
how i can make card game in unity
modified 9-Dec-14 12:23pm.
|
|
|
|
|
Start here and here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hi guys, I'm new in android programming and I want to start this on the right path. my current employer is working on a huge project (web/mobile) and was't me to start working on android version. I have studied it before know how it works, I'm looking for a guide, on how to develope it right, anything from naming folders to code structure. do we have such a thing ?
thanx alot
K1
|
|
|
|
|
|
mrkeivan wrote: I'm new in android programming......huge project...and was't (sic) me to start working on android version. Good luck with that. You should spend the better part of a year, if not more, working on smaller projects to get a feel for how things work on this new platform.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hello,
i am shree, can any one tell me about how to give the Google Maps API Key for Android , my system OS is Ubuntu, so how can i setting and found the Google map API key values...
|
|
|
|
|
Read here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
How to show up number of notification in application icon Android like Facebook, Skype
|
|
|
|
|
See if this helps.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
--I have a simple chat website http://mynotyfy.somee.com/[^]
-- And simple code Android , I recieved succeed from Server web but I send 1 message from client to web, application unfortunly
package com.signalr_client;
import java.util.concurrent.ExecutionException;
import microsoft.aspnet.signalr.client.Action;
import microsoft.aspnet.signalr.client.ConnectionState;
import microsoft.aspnet.signalr.client.ErrorCallback;
import microsoft.aspnet.signalr.client.MessageReceivedHandler;
import microsoft.aspnet.signalr.client.Platform;
import microsoft.aspnet.signalr.client.http.android.AndroidPlatformComponent;
import microsoft.aspnet.signalr.client.hubs.HubConnection;
import microsoft.aspnet.signalr.client.hubs.HubProxy;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
public class MainActivity extends Activity {
HubConnection chatConnection;
HubProxy SignalRChatHub;
Button ChatButton;
EditText ChatInput;
TextView ChatMessages;
<a href="http://www.codeproject.com/Members/override">@Override</a>
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
chatConnection = new HubConnection("http://www.mynotyfy.somee.com/");
SignalRChatHub = chatConnection.createHubProxy("ChatHub");
chatConnection.error(new ErrorCallback() {
<a href="http://www.codeproject.com/Members/override">@Override</a>
public void onError(final Throwable error) {
runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(),
error.getMessage(), Toast.LENGTH_LONG).show();
}
});
}
});
Init();
ChatButton.setOnClickListener(new View.OnClickListener() {
<a href="http://www.codeproject.com/Members/override">@Override</a>
public void onClick(View v) {
runThread();
}
});
SignalRChatHub.subscribe(new Object() {
@SuppressWarnings("unused")
public void broadcastMessage(final String name, final String message) {
runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(),
name + ": " + message, Toast.LENGTH_LONG)
.show();
}
});
}
});
chatConnection.start().done(new Action<Void>() {
<a href="http://www.codeproject.com/Members/override">@Override</a>
public void run(Void obj) throws Exception {
runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(),
"Done Connecting!", Toast.LENGTH_LONG).show();
}
});
}
});
chatConnection.received(new MessageReceivedHandler() {
<a href="http://www.codeproject.com/Members/override">@Override</a>
public void onMessageReceived(final JsonElement json) {
runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(),
"testing!", Toast.LENGTH_LONG).show();
JsonObject jsonObject = json.getAsJsonObject();
JsonArray jsonArray = jsonObject.getAsJsonArray("A");
String messagex = jsonArray.get(0).getAsString() + ": "
+ jsonArray.get(1).getAsString();
ChatMessages.append(messagex + "\n");
Toast.makeText(getApplicationContext(),
"loading!", Toast.LENGTH_LONG).show();
}
});
}
});
}
public void Init() {
ChatButton = (Button) findViewById(R.id.ChatButton);
ChatInput = (EditText) findViewById(R.id.ChatInput);
ChatMessages = (TextView) findViewById(R.id.ChatMessages);
}
public void runThread() {
new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
MainActivity.this.runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(),
"Click button1", Toast.LENGTH_SHORT).show();
try{
SignalRChatHub.invoke("Send", "Android", "hixhix");
}catch(Exception e){
ChatMessages.setText(e.getMessage().toString());
}
}
});
}
}).start();
}
}
modified 29-Nov-14 3:50am.
|
|
|
|
|
What is the problem, where does it occur, what is the error message ...? Please provide some useful detail if you want help.
|
|
|
|
|
When I call
ChatButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
runThread();
}
}); , occur this error
E/AndroidRuntime(2268): FATAL EXCEPTION: main
E/AndroidRuntime(2268): Process: com.signalr_client, PID: 2268
E/AndroidRuntime(2268): java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.gson.JsonElement com.google.gson.JsonArray.get(int)' on a null object reference
E/AndroidRuntime(2268): at com.signalr_client.MainActivity$5$1.run(MainActivity.java:104)
E/AndroidRuntime(2268): at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(2268): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(2268): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(2268): at android.app.ActivityThread.main(ActivityThread.java:5221)
E/AndroidRuntime(2268): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(2268): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(2268): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/AndroidRuntime(2268): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
|
|
|
|