|
|
Member 13290839 wrote: how should i begin? By starting 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
|
|
|
|
|
I'm currently developing a mobile quiz app that is going to be used by multiple participants they will connect to the local server via wifi and I have this idea of issuing a command from the server that chooses what activity/screen to show in my app. Is this possible?
I just want to know the main logic of this, I'm still at the android app development and haven't started on the server side for my mobile app. I'm planning on using php, json and wamp to connect to my local server, is this a good idea? if not, what software should I use for this particular system? Any answer would be appreciated.
|
|
|
|
|
Gemson Gonzales wrote: issuing a command from the server that chooses what activity/screen to show in my app. Is this possible? Well it is only possible after the mobile calls into the server. I would suggest you go to Android Tutorials[^] first, and study Android programming.
|
|
|
|
|
A am a newbie in android, and I want to make a color detection app, but don't know where to start.
Can someone please point me in the right direction, and suggest some articles I could read and some examples I could view to make this app?
I found this example:
Color detection in android - Android Discussion Boards
But I don't know how to get int values for red green and blue from a camera.
If someone could please tell me how to do so, I would really appreciate it.
Thanks in advance.
modified 18-Jun-17 16:14pm.
|
|
|
|
|
Member 10850253 wrote: I found this example: What example? The link points to your original question.
Member 10850253 wrote: how to get int values for red green and blue from a camera. See this[^] SO answer to retrieve the image taken by the camera. Once you have the image, use the bitmap's getPixels() method to retrieve its pixels.
If you're just getting started in Android, you may have bitten off more than you can chew. I'm not saying you won't be able to solve your problem, but you may want to proceed step by step and first gain more familiarity with programming in Android.
/ravi
|
|
|
|
|
Member 10850253 wrote: A am a newbie in android, Go to [^] where you will find lots of useful information.
|
|
|
|
|
please help me send online appointment app code
|
|
|
|
|
Sorry, this site does not provide code to order. There are many free and commercial applications that can do what you want.
|
|
|
|
|
Sure. Ask a question first.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
How can I change tempo of a jetfile in android?
|
|
|
|
|
Does this help?
"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 world,
I'm working on an android app for cardboard. The purpose of the app is to make augmented reality and for the moment the only thing you can do with it is to see through the smartphone's camera. I got this functionnality from this project : https://github.com/SalahEddin/CardboardPassthrough
My problem is that I would like to show some text to the user but I don't know how to make it properly in order for the text to be shown in the two squares of the GvrView. In oder words I would like something like this : screenshot
Here are some code elements that you can find in the GitHub project.
MainActivity.Java
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_live_counting_vr);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
cardboardView = (GvrView) findViewById(R.id.cardboard_view);
cardboardView.setRenderer(this);
setGvrView(cardboardView);
}
activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<com.google.vrtoolkit.cardboard.CardboardView
android:id="@+id/cardboard_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
</RelativeLayout>
Thanks 
|
|
|
|
|
Thank you! I really need it 
|
|
|
|
|
|
The boss sent me the week's schedule.
He sent it as an attachment to a text message.
My Android displays a tab on that message with the word "Download" on it.
So I tap that tab.
Result...
* The word "Downloading" appears on my Android Screen
* This phrase appears on my Adroid screen: "...Couldn't download message (no subject) from So-And-So..."
Alms for the clueless will bring you blessings.
|
|
|
|
|
This is not a programming question, but I'll go ahead and offer:
1) What kind of attachment is it?
2) What happens when other people send you a text message with an attachment?
3) Does it happen with all of your boss' text messages to you, or just this particular one?
4) Are you using the stock messaging app, or a custom one?
"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
modified 4-Jun-17 22:44pm.
|
|
|
|
|
DavidCrow wrote: This is not a programming question, but I'll go ahead and offer: Ooops ! Sorry for my poor brain skills. Point me to the proper place to ask this, and I'll use that.
As best I can tell, no attachment (of any kind) to any text message from anyone works on my phone.
|
|
|
|
|
hi , how i can import telegram source code in android studio ?
|
|
|
|
|
First tell us, where did you even the get the source code, and how is it Android Studio project?
Typically, most of the projects come with a directory structure, that lets your IDE easily pick up, Android Studio is smart enough to do that, secondly you can easily read the methods from the location where you downloaded the project from.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
From the main screen, use the Import project (Eclipse ADT, Gradle, etc.) option.
"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 hv tried to add itext library to the dependency , if I type itex in the search am told there is nothing to show.
Thanks .
|
|
|
|
|
|
Member 13229874 wrote: ...add itext library to the dependency... Of what? Eclipse, Android Studio, or some other IDE?
Member 13229874 wrote: if I type itex in the search... In what?
Member 13229874 wrote: ...there is nothing to show. What should be shown?
"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
|
|
|
|
|
It's been a while since I've participated on CP, and I'm back with a doozy
I'm having a problem with MediaExtractor and using a MemoryFile as the data source. In the real world, this media viewer is part of a larger app that supplies a chunk of bytes that contains a complete MP4 video. To eliminate all the other stuff, I have created a little demo app that only contains the viewer and a test MemoryFile. Please note that not using a MemoryFile, i.e. saving the video data to storage and playing from there, is not an option.
First, the code. I create the MemoryFile in the test app's MainActivity.onCreate
InputStream inS = getResources ().getAssets ().open ("testmp4.mp4");
int length = inS.available ();
byte[] data = new byte[length];
inS.read (data);
inS.close ();
m_memFile = new MemoryFile (null, length);
m_memFile.writeBytes (data, 0, 0, length);
Method getFD = MemoryFile.class.getMethod ("getFileDescriptor");
m_memFileFD = (FileDescriptor) getFD.invoke (m_memFile);
This is in the MainActivity's Play button click listener:
if (m_player == null)
{
m_player = new MyPlayer (MainActivity.this.m_events, MainActivity.this.m_memFileFD, MainActivity.this.m_memFile.length (), (SurfaceView) findViewById (R.id.viewerMediaVideo));
}
m_player.play ();
The video player is in the class MyPlayer that extends Runnable:
protected MediaExtractor m_extractor = null;
protected PlayerStates m_state = PlayerStates.STOPPED;
private SurfaceHolder m_surface = null;
protected FileDescriptor m_memFileFD = null;
protected long m_memFileLen = 0;
public MyPlayer (PlayerEvents ev, FileDescriptor fd, long len, SurfaceView s)
{
m_events = ev;
m_memFileFD = fd;
m_memFileLen = len;
m_surface = s.getHolder ();
}
public void play ()
{
if (m_state == PlayerStates.STOPPED)
{
m_stop = false;
new Thread (this).start ();
}
...
}
public void run ()
{
android.os.Process.setThreadPriority (Process.THREAD_PRIORITY_URGENT_AUDIO);
m_extractor = new MediaExtractor ();
try
{
m_extractor.setDataSource (m_memFileFD, 0, m_memFileLen);
}
catch (final Exception excp)
{
m_extractor.release ();
m_extractor = null;
m_handler.post (new Runnable (){public void run ()
{m_events.onError ("can't create extractor: " + excp.getMessage ()); } });
return;
}
....
}
Now for the problem. I have tested the same APK on different devices, both actual physical phones and emulators and the results are:
S5 with 4.4.2 / API:19 emulator --> works
M9 with 5.0.2 / API:21 emulator / API:22 emulator --> works
Nexus6 with 6.0 / API:23 emulator --> works
S7 with 6.0.1 / (no emulator for this point release) --> fails
Nexus6 with 7.0 / API:24 emulator --> fails
works means the video plays correctly
fails means I get the error "can't create extractor: Failed to instantiate extractor". This is the catch at the very beginning of the player's run method
6.0.1 logcat shows thirteen lines like (only varying between the digit 0 and 4):
FileSource: seek to 0 failed
7.0 / API:24 emulator logcat contains a single line:
FileSource: offset/length adjusted from 0/547251 to 0/0
I've tried two versions of the app on the physical devices. One has a minimumSDK set to 19 and the targetSDK / compileSDK / build tools are version 21. The second version has minSDK 19 and the rest 23. The version running on the emulators has minSDK19, targetSDK 23, and compileSDK/ buildTools 25 -- the latest that I just downloaded yesterday. All three different builds of the same code fail in the same pattern based on OS version.
This points me to a change between OS versions 6.0 and 6.0.1 causing the issue. However, I've done some poking into the sources available on the net and don't see anything suspicious.
Any ideas? Do I need to go report a bug to Google?
Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|