Related
Introduction
Hello and Welcome to android app development guide. In this [guide] i will teachyou how to develop applications for the android platform using java and some simple tools. I will also teach you to add audio/video to your apps and also teach how to make them location aware by adding gps function to it
Click to expand...
Click to collapse
What You Should Know
Here I am just letting you all Know the pre-requisites of making an app. But then if you dont match the pre-requisites..... its OKAY !! I started it without this xD
Some Experience Of Object Oriented Programming
Some Experience of JAVA
Experience of Using ECLIPSE
Have An ANDROID phone so that you know the capabilities of Android
Click to expand...
Click to collapse
Preface:Guide to make an android app
Click to expand...
Click to collapse
Setting Up the System
Setting Up the System
Downloading The Basic Equipment For Android App Development
Click to expand...
Click to collapse
Overview
Android Architecture
Runs on Linux 2.6
Dalvik Virtual Machine, Which Is optimised for mobiles
Integrated Browser, based On Webkit Engine
Optimized Graphics with Open GL ES
SQLite Database for Data storage
Click to expand...
Click to collapse
Android Application Fundamentals
Applications are written in JAVA programming Language
Compiled Into Android Package file (.apk)
Each Application runs in its own sandbox and linux processes
Applications consists of Components, Resources and a Manifest file
Click to expand...
Click to collapse
Components:
Activities
Single Screen with a UI [a screen seen by a user, it is an activity. basically a single screen, seen by the user IS an ACTIVITY ]
Multiple Activities are required to make a user friendly application
When a new activity starts, old activity is pushed on to the Back Stack [ it becomes handy and fast if you press the back button on the phone. the activity on the back stack is not needed to be loaded again ! ]
UI can be built with either by XML ( recommended) or in Java ( I hate doing that )
You can manipulate the lifetime of the activities by certain call back methods. such as onStart[], onPause[], etc.
Click to expand...
Click to collapse
Services
They perform long-running operations in the background.
Doesn't contain ANY user interface
Useful for network operations, playing music, etc.
Runs independently of the component that created it ! --> [ say a service that launches a Service is closed. the service is still running ]
They can be bound to other application components. [ IF allowed ]
Click to expand...
Click to collapse
Content Providers
Used to store and retrieve data and make it accessible to any application.
Since, there is no way to share data across the applications, it is the only way !
Exposes a public URI that identifies the data set with some unique method or codes.
The data is exposed by a simple table on a database model concept.
Android contains many providers for things like contacts, media, etc.
Click to expand...
Click to collapse
Broadcast Recievers
A component that responds to system-wide broadcast announcement.
For Example, if the battery is low, Android Sends a system-wide broadcast, and the application that is listening to it, is responded by a Broadcast Reciever.
Applications can also initiate a broadcast that different applications can respond to ! example --> if an application, app1, is dependent on another application, app2, it can start a broadcast for app2. if the app2 exists, it can proceed else it will pop up a message like --- "app2 doesn't exist. plz download it from the market"
They, like services, contain no UI
Can be used to create Status Bar Notifications
Click to expand...
Click to collapse
Android Manifest File
All applications MUST have an AndroidManifest.xml in its root directory.
Presents the information about the application to the Android System.
Declares the Components used in the application
Also Declares the permissions required from the user to run the application.
Declares the Minimum Android API level to run that application. [ eg: GingerBread, HoneyComb, IceCreamSandwich, etc. ]
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Details About Some Folders
Have You ever Decompiled any apk file ?? If not, do it, cuz it is really important part of app making. since there are many relative things to this.
In here I will Explain about some folders you get to see in a folder named "res" when you decompile.
layout
In This Folder, You will find some xmls, which looks more like a web page source
And Gibberish until you take a CLOSE LOOK !
It actually stores in the Layout of your activity. You will get to be familiar with this as we are going to use this
Click to expand...
Click to collapse
drawable
In this folder, You will get the things that makes the app look beautiful !
Ha! This contains "pngs" that are used in themes. We Will come to this as time passes
Click to expand...
Click to collapse
xml
In here, Again, XMLs with someting Gibberish till you get a closer Look ! These xmls store your preference activities.
Click to expand...
Click to collapse
anim
This folder, again xmls, which seem more unreadable. This folder, as the name says, it stores the anim files that has instructions for your animations that you (will) use in the app.
Click to expand...
Click to collapse
values
This folder, again xmls, which seem even more unreadable. This folder, stores the values for different stuff, like ids, integers color hex's, etc (we will get to this later) .
Click to expand...
Click to collapse
colors
This folder, again xmls, as the name says, stores the colors that you (will be) using in the app (we will get to this later) .
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Activities And Explicit Intents
Activities & Explicit Intents
As I've already told you that Activities are one of the primary building blocks of your app. here, we will learn how to create actiities, declare them in AndroidManifest.xml and We will also learn How to go to another activity from one activity. Okay. So now open up Eclipse. and sart a new Android Project.
Click on File >> New >> Android Project
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. now, modify the MainActivity.xml in the graphical part like this
make a new xml file by clicking
. Give a file name like... SecondActivity.xml or something you like Note: This Will be your Second Activity. and now click Finish
Now drag the " TextView " from the " form widgets" tab from the left side panel to the graphical editor of your second activity.
Now, Basically what i want to teach is Explicit Intents. Now what we want our app to do is the text written in the MainActivity should be shown to the user when he clicks the "go to second activity" button. So to do this, we need to declare and do something with JAVA !
navigate to the .java files -->
Double click the java file and you will et something like this ( gibberish... if you dont like java like me )
since we need to define the "EditText" field and the "Button" from the first activity !
Now, find this
Code:
setContentView(R.layout.main);
after that start typing
final EditText et = findView
now press ctrl+space (windows)
it will show you a list of commands. choose findViewById(id)
now it will automatically place you along the (id). now start typing ---> R.id.
and press ctrl+space (windows).
chose the EditText Value..... Now as you see, it will show an error there. press ctrl+1 to show quick fixes. Add a cast to EditText. Final text will be Like this
Code:
final EditText et = (EditText) findViewById(R.id.editText1);
Now do the same with the "Button"
Code:
Button b = (Button) findViewById(R.id.button1);
Now that you have defined the button. Now you will have to set an OnClickListener for that button. so the it allows User to go to the second activity.
now start typing
b.setOnclick... press ctrl+space and choose onClickListener. It will automatically place you in the "()" type there --> new OnClickListener press ctrl+space. you will get something like this
you will get an error. so go to the place ( marked red in the pic and put a semi-colon )
now, in the following method,
Code:
public void onClick(View arg0) {
// TODO Auto-generated method stub
}
start typing the following
Code:
Intent intent = newInt
press ctrl+space and choose this
It will automatically place you in packageContext.
NOTE:
packageContext == "The java file that is creating the Intent";
cls == " The java file to whom the Intent Should be passed";
so, edit it this way
Code:
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
NOTE:
MainActivity == "The java file that you are editing";
SecondActivity == " The java file That WILL represent the the SecondActivity.xml";
It will give you an error. press ctrl+1 and select--> create class "SecondActivity"
Fill in the details of the new java file and click finish. Now go back to previous java file.
Now, you have created an intent. But its not defined that what will that intent do !
So, now, Lets define that
start typing--> intent.putExtra and press ctrl+space. choose this.
now, you will be automatically placed in the "key". now for the key, you will have to type a string. i would like to call it "thetext". Now, Make sure you type the string WITHIN THE DOUBLE QUOTES..
For the value, you will have to give the reference of the "EditText" Field. here, i have given it as "et", i will type it this way.
intent.putExtra("thetext", et.getText().toString());
Click to expand...
Click to collapse
Now, you have successfully DEFINED what the intent does. but if you check the coding..... you will notice that the intent is never initialised ! now, to initialise it, type in this -->
startActivity(intent);
Click to expand...
Click to collapse
the final MainActivity.java should look like this.
Click to expand...
Click to collapse
Now, its almost done..... BUT.... ! what the hell is the use of the secondActivity.java ! ?
It is to be edited. only then the text written in the first activity by the user will be shown in the second activity. to do that, go to second activity. Now,
EASY PART
Find this in the first java file:
Copy all that stuff to the SecondActivity.java
Change the blue highlited text ( in eclipse ) to the name of the second xml file. (just dont add the extension)
Hard PART
Now, you gotta define the "TextView" on the SecondActivity.xml Since you have given the reference to the SecondActivity.xml by copying all that stuff.
so, start typing,
Code:
TextView tv = findView
NOTE: Here "tv" is the name you have assigned to the "TextView". You can change it if you want. BUT makesure you do the cahnges accordingly in the next steps.
hit ctrl + space. choose >> findViewById(id);
now again, as we already did that before, in the place of "id" just type in "R.id." hit ctrl+space and chose the "TextView"
Now, that You have defined it here, dosent mean that It will give you desired output....
You just have created an intent and have defined it and initialised it in the last java file.
But there is no-one to recieve that intent ! so, start typing the following:
And, in place of text, start typing "getI" and press ctrl+space. put a fullstop, type "getE" hit ctrl+space, put a fullstop again, start typing "getS", ctrl+space again now in the "()" put the string that you have defined in the last java file. since I have defined it as "thetext" i will type that in the "()" like this:
Code:
tv.setText(getIntent().getExtras().getString("thetext"));
Click to expand...
Click to collapse
Now, its done..... BUT.... ! .... AndroidManifest.xml
you didnt touch it till now. we have to register every activity there. or else, the app will cause a FC error. (Force Closes)
Now, open up the Androidmanifest.xml
go to the text editor :
and in the end before--> "</application>" add this
Code:
<activity
android:name="com.blksyn.explicitintents.SecondActivity">
</activity>
Click to expand...
Click to collapse
Now, its done. Lets start the emulator and Check this if it works !
Go to AVD Manager like this:
Start the AVD emulator.
click on run: and click on run again xD. Click on okay.
Bingo ! you have created an app which declares Explicit Intents and added a function to activities to catch that intent !
How to Make Android Apps: Explicit Intents
Click to expand...
Click to collapse
Implicit Intents
Implicit Intents
Now, you must have seen some applications with a "share" button. By clicking on this button, you can share a particular image/video/audio/etc....
What does that application actually do is send a message to other applications to search for the applications capable of handling such type of job. Then it pops up the list of such apps to the user. Now we can also have that list contain our app too !
Here is how.
Create a blank project. I gave it the name as "Implicit_intents". But you can choose whatever you want
Open up the "AndroidManifest.xml" file. (plz dont expect me to show how, cuz i have already shown that earlier and you should know that by now)
You will see something like this
Copy this from the main activity
Code:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
paste it again after the </intent-filter>
and change it to this
Code:
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
NOTE:
Code:
<action android:name="android.intent.action.SEND" />
(self explainatory)
Click to expand...
Click to collapse
Code:
<category android:name="android.intent.category.DEFAULT" />
This tells the android system waht the category of the intent is. If you dont know what the category really is, you should keep it DEAFAULT.
Click to expand...
Click to collapse
Code:
<data android:mimeType="image/*" />
This tells the Android system, What type of data can the application "SEND" (* reference to the first one). and "data/*" means that the application can handle any type of imge. Jpeg, png, bmp, etc....
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
So, this is how your AndroidManifest.xml should look like.
Now, go to the xml of your main activity and get rid of that text view. and add an "ImageView" from "Images and media" tab on the left
Now, go to your main java file and give a refernece to that ImageView
NOTE: "iv" is just a name given to the ImageView. so, you can change it if you want. But you will have to adapt to it and make changes in the steps accordingly.
Import the image view thing and add a cast by hitting ctrl+space
Now that you have specified the ImageView, you now have to set the ImageView to show the image the user wanna send. so, start typing in "iv.setImage" and press ctrl+space.
Now, since the image is IN the intent sent by the gallery after the user clicks the share button, we have to "get" the "EXTRAS" from the intent. So, start typing in in the "()". "getInt" press ctrl+space put a "." again type "getExt" choose the only option available, put a "." again and type "get" choose the first option. now, for the key, we are gonna use a constant from the INTENT class, that is called "EXTRA_STREAM". So ,just start typing in "Intent", put a ".", type "extra_" and choose "EXTRA_STREAM".
This "EXTRA_STREAM" is nothing but the "URI" to the image the user wants to send. You will have an error now in the line even after putting a ";" in the end. so press the quick fix combo "ctrl+1" and add a cast to (URI).
Click to expand...
Click to collapse
Now, you have successfully built an application that can handle the "share" kind of intent. now if you run this app in the emulator, you will probably have an FC. Since the app does not have any intent to process during the launch, it will FC. but if you go to gallery and click on share, you will get this app in the list. And also, if you click on this app, you will see the image you wanted to share.
So, this ends our chapter of Implicit Intents. You can now use your imaginations and use the combos of the previous and this chapter to build a pretty good basic app ! and the credit will be yours ! But dont forget to thank me for my efforts. haha... and also if i help you in some place.
And last but not the least in this chapter, If you have any questions, post a reply in this thread you will surely be answered :good:
How to Make Android Apps: Implicit Intents
Click to expand...
Click to collapse
Widgets
I am going to teach you how to make a widget.
This widget will go to a specified site !
So , make a new android application in eclipse
name it whatever you like !
Click on File >> New >> Android Project
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. Now, modify the activity_main.xml in the graphical part like this
You will get something like this:
Now Open Up the AndroidManifest.xml. and remove this part:
And add this part:
make a new xml file by clicking
. and change Resource type from Layout to "AppWidget Provider" and now click Finish
Note: This Will be your android:resource file. highlighted in the previous image.
Now Open up that xml. You will find it in the /res/xml directory. you will get something like this:
Now click on the "red" underlined part. you will get something like this:
Now, Basically we are making a 2x2 widget. You need to specify that somewhere right ? That is the place. but how do you specify ?? It can be calculated using this formula:
Code:
the min width =
[(number_of_cells) * 74] - 2
2x2
min widht = [2*74]-2 = 144
min height = 144 ! :)
so, fill in the details like this:
Now, the layout part of the widget is complete. What we want to do is the JAVA thing now. So, open up the MainActivity.java
Double click the java file and you will et something like this
since we Are making a widget, We cannot have Much functions in here. Unlike activities(which have loads of functions in it) widget restricts us to very few. So, we are not going to need all the stuff You are seeing in java file. so do one thing. delete all the things. Here is how it shoud look like:
Now, Since We are not making a regular activity, We are not going to extend activity. Now we are going to extend the "AppWidgetProvider"
Code:
public class MainActivity extends AppWidgetProvider {
Now "AppWidgetProvider" Does not allow "OnCreate" Methods. what we are allowed is onUpdate Method, Since this is going to be called every single time our widget updates (N/A in this widget, but still you have to write it)
In that method, start typing
Code:
onUpdate
now press ctrl+space (windows only)
You will have something like this:
Code:
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
// TODO Auto-generated method stub
super.onUpdate(context, appWidgetManager, appWidgetIds);
}
In this class you have to define everything. Now what we are going to do is we will have to define a for loop:
Code:
for(int i = 0; i<appWidgetIds.length; i++){
}
Now first thing in this for loop, we are gonna have to refer to our current appWidgetID. so,
Code:
int ID = appWidgetIds[i];
Done! now wahat we are goingg to do with this widget ??
ANS: We are going to launch a web site b opening our browser.
Okay, so how are we going to do it ??
Yes, exactly. like we did it before, we are going define an intent, like this:
Code:
Intent in = new Intent(Intent.ACTION_VIEW, Uri.parse("URL_OF_YOUR_WEBSITE"));
Now, It still isnt going to launch anything. What we have to do, is, set a "PendingIntent".
A pending intent is actually an intent which gives access to, um, ur app (widget, in this case,). so, start typing in
Code:
Pending
press ctrl+space. name it what you want. then put " = " . again type "PendingIntent." and press ctrl+space and select this:
Code:
getActivity(context, requestCode, intent, flags)
Now, for context, it has olready defined in your context (onUpdate method).
requestCode = flags 0 (we aren't using them here)
and for intent, put your intents name like I've put in "in". it will look something like this:
Code:
PendingIntent pen = PendingIntent.getActivity(context, 0, in, 0);
NOW, SINCE THIS IS A WIDGET AND NOT A SIMPLE, REGULAR ACTIVITY, WE CAN'T USE THE "findViewById(id)" THING HERE, WE HAVE TO USE "RemoteViews" since these views are
in the widget and not public.
So, we are going to create new instance of this
type in,
Code:
RemoteViews view = new Re
and press ctrl+space an choose this:
Code:
RemoteViews(packageName, layoutId)
for package name:
for layoutId:
Code:
R.layout.activity_main
now, after this, like we set onClickListener, We have to set onClickPendingIntent
like this:
Now, give respective arguments in the brackets. The final thing should look like this:
Code:
view.setOnClickPendingIntent(R.id.imageButton1, pen);
NOW, Last thing. it is to set up an "appWidgetManager"
so, Start typing:
and give the respective arguments.
final MainActivity.java should look like this
It wil Never launch a browser yet,, think why ???
We havent yet given up the permissions yet !!!
So, open up the AndroidManifest.xml
Go to permissions tab, youll see something like this:
click on Add.
edit like this.
Click to expand...
Click to collapse
Now, its done. Lets start the emulator and Check this if it works !
Go to AVD Manager like this:
Start the AVD emulator.
click on run: and click on run again xD. Click on okay.
Bingo ! you have created aWidget !!
Audio/Video and multimedia
Audio
In this one, i will tell you how to use the "raw" folder to play audio(s) from the folder using MediaPlayer thingy. Okay. So now open up Eclipse. and start a new Android Project.
Click on File >> New >> Android Project
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. now, modify the MainActivity.xml in the graphical part by adding a button to it and save it.
Now, in the project, right click on res folder, new>>folder. name the folder as "raw". THEY ALL SHOULD BE IN SMALLS. NONE OF THE LETTER SHOULD BE IN CAPS
Now, have a short mp3 file like the one in attachments, and drag it to the newly created folder.
Now, its all set, what our app will do is it will play that short mp3 file i the "raw" folder as soon as we press that button. Now, for that sake we are going to use MediaPlayer class. Open up the MainActivity.java fir this.
navigate to the .java files -->
Double click the java file and you will et something like this ( gibberish... if you dont like java like me )
we need to define the field and the "Button" from the first activity !
NOTE: as we advance in the tutorial, i will assume that you have done it from the start, hence i will not show such small things everytime, to make the tut short, sweet and simple. refer the first tutorial for this step.
It should look like this:
Code:
Button b = (Button) findViewById(R.id.button1);
Now that you have defined the button. Now you will have to set an OnClickListener for that button. so the it allows User to go to the second activity.
now start typing
b.setOnclick... press ctrl+space and choose onClickListener. It will automatically place you in the "()" type there --> new OnClickListener press ctrl+space. you will get something like this
you will get an error. so go to the place ( marked red in the pic and put a semi-colon )
now, in the following method,
Code:
public void onClick(View arg0) {
// TODO Auto-generated method stub
}
start typing the following
Code:
MediaPlayer mp = MediaPlayer.
press ctrl+space and choose this
It will automatically place you in "context".
NOTE:
context == "The java file that is creating the Intent";
resid == " The id of the resource (here, id of the mp3 file in the folder"raw")";
so, edit it this way
Code:
MediaPlayer mp = MediaPlayer.create(MainActivity.this, R.raw.beep);
NOTE:
MainActivity == "The java file that you are editing";
R.raw.beep == "Here , the name of the mp3 file in my "raw" folder is beep, it can be according to you";
So, we have just defined the mp class.
BUT, who is invoking it ?
Nobody, we need to invoke it ourselves. here, there is no relation or job to be done by "intent" like we did in earlier tutorials MediaPlayer class is totally different....
We need to do this in order to invoke.
Code:
mp.start();
NOTE:
mp == "the name that i gave to MediaPlayer object";
Code:
MediaPlayer [COLOR="SeaGreen"]mp[/COLOR] = MediaPlayer.create(MainActivity.this, R.raw.beep);
.
Click to expand...
Click to collapse
Save it and run it on your AVD
Now, its done. Lets start the emulator and Check this if it works !
Go to AVD Manager like this:
Start the AVD emulator.
click on run: and click on run again xD. Click on okay.
YAY ! it works !! click on that button
Click to expand...
Click to collapse
Video
In this one, I will tell you how to play video(s) which are already in your sdcard. Okay. So now open up Eclipse. and start a new Android Project.
Click on File >> New >> Android Project
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. now, modify the MainActivity.xml in the graphical part by adding a button to it and save it.
Now, place a video in ur sdcard (wherever you want, will explain later).
NOTE:
Video should be in mp4 format, as android has built-in encoders for that.
Now, its all set, what our app will do is it will play that short mp4 video file in the sdcard as soon as activity is invoked. Now, for that sake we are going to use VideoView class.
Go to res/layout/activity_main.xml
Delete the text view and add a VideoView:
Save it
Open up the MainActivity.java like this.
navigate to the .java files -->
Double click the java file and you will see something like this ( gibberish... if you dont like java like me )
we need to define the VideoView class.
NOTE: as we advance in the tutorial, i will assume that you have done it from the start, hence i will not show such small things everytime, to make the tut short, sweet and simple. refer the first tutorial for this step.Its just like defining a button
It should look like this:
Code:
VideoView vv = (VideoView) findViewById(R.id.videoView1);
Now that you have defined the VV. Now you will have to set properties of the VV so that we can play the video and offer controls(rewind, play/pause, fast fwd) and etc.
now start typing
vv.setV... press ctrl+space and you will get something like this
choose that, and enter string path:
Code:
vv.setVideoPath("/sdcard/path/to/video.mp4");
note that the /sdcard is a must. it can also be written as /mnt/sdcard/ however. not all phones have this functionability.
so, its better to write /sdcard.
Since we need to have controls while playing the video, we need to instantiate that first, so,
Code:
vv.setMediaController(new MediaController(this));
Disstection:: MediaCOntroller, Name explains itself. since we didnt create the MediaController anywhere, we made a new controller
and passed in the context as "this"
-_- "java". lol
Now that we want to start it as soon as the activity is started.
we add this:
Code:
vv.start();
we also do not want the backlights to be down while playing the video so,
Code:
vv.requestFocus();
Save it and run it on your ACTUAL ANDROID DEVICE.
NOTE: Please do not test this on emulator.[/size]
Click to expand...
Click to collapse
Images and Camera
In this one, i will tell you how to use the Mediastore and device's camera to get the picture/photo from the camera. Okay. So now open up Eclipse. and start a new Android Project.
Click on File >> New >> Android Project
Fill in the details as you wish.... and click finish.
After you make a Project. You will get A full working Hello world Application. now, modify the MainActivity.xml in the graphical part by adding a button to it and save it.
Now, its all set, what our app will do is it will click a picture using device's camera, and give you the picture. so, open up your main_activity.xml and delete the TextView. Add a button (which will initiate device's camera) and an ImageView (which will show you the pic that the user will click).
Then open up your MainActivity.java
navigate to the .java files -->
Double click the java file and you will et something like this ( gibberish... if you dont like java like me )
we need to define the field and the "Button" from the first activity !
NOTE: as we advance in the tutorial, i will assume that you have done it from the start, hence i will not show such small things everytime, to make the tut short, sweet and simple. refer the first tutorial for this step.
It should look like this:
Code:
Button b = (Button) findViewById(R.id.button1);
Now that you have defined the button. Now you will have to set an OnClickListener for that button. so the it allows User to go to the second activity.
now start typing
b.setOnclick... press ctrl+space and choose onClickListener. It will automatically place you in the "()" type there --> new OnClickListener press ctrl+space. you will get something like this
you will get an error. so go to the place ( marked red in the pic and put a semi-colon )
now, in the following method,
Code:
public void onClick(View arg0) {
// TODO Auto-generated method stub
}
Make an instance on Intent
Code:
Intent intent = new Intent();
now in the arguments, pass in "android.provider.MediaStore.ACTION_IMAGE_CAPTURE"
this allows us to actually launch the camera app(s) installed on the device. so as to
get a captured image.
Till now, we started intents just like starting any activity.
but in this particular case, we are starting another activity,
with an expectation of recieving some data back.
that is, result.
so, next, start typing "startAct...."
and choose this
Code:
startActivityForResult(intent, requestCode)
NOTE:
intent = "The Intent that we already created"; (since I've named it as "intent" , ill pass in
"intent")
requstCode == "we will not be using this, so, skip it, pass in a zero";
Code:
startActivityForResult(intent, 0);
now then, we are expecting a result.
so, we must set a reciever for it, right ?
lets do that first and then play with the ImageView
so, after the method, make a new method, start typing
Now, we have set the reciever.
now, we need to give an instance of ImageView.
so, declaration has to be before the onCreate method.
and definition can be in both the methods.
so, declare an ImageView outside the onCreate method
Code:
ImageView iv;
and in the onCreate method,
Code:
iv = (ImageView) findViewById(R.id.imageView1);
and lastly, in the onActivityResult method,
declare and define a bitmap, which will save the clicked pic.
Code:
Bitmap bm = (Bitmap) data.getExtras().get("data");
now, bm will save the clicked pic in itself.
and to display it, we use iv. so type in this:
Code:
iv.setImageBitmap(bm);
At The End, this is how the MainActivity.java should look like:
Code:
package com.example.camtut;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
public class MainActivity extends Activity {
ImageView iv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
iv = (ImageView) findViewById(R.id.imageView1);
Button b = (Button) findViewById(R.id.button1);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 0);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
Bitmap bm = (Bitmap) data.getExtras().get("data");
iv.setImageBitmap(bm);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
[/hide]
Click to expand...
Click to collapse
Now, its done, Check this if it works !
P.S. do not use emulator for this, test it on actual device
Click to expand...
Click to collapse
https://www.youtube.com/watch?v=HpmjwddBdxY
Click to expand...
Click to collapse
Apology for the delay (over one year )
but I will start writing this off afresh will include something more too
stay tuned
Regards,
Nachiket.Namjoshi
Thank you all of you for your support...
Since there are MANY time issues right now,
I will be updating this guide whenever I get time...
I hope you all understand.
Reserved for GPS and stuff
Sent from my GT-S5360 using xda app-developers app
5 more to be reserved for the sake of finding them on one place
Sent from my GT-S5360 using xda app-developers app
4 more
Sent from my GT-S5360 using xda app-developers app
3 more
Sent from my GT-S5360 using xda app-developers app
2 more for really important stuff
Sent from my GT-S5360 using xda app-developers app
Done.... it's the last one
Sent from my GT-S5360 using xda app-developers app
great bro. You reserved a lot
thanks
The JRE and JDK link is not working. Also downloading the JDK alone contains the JRE package, and downloading JRE separately is not needed.
Link: http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html (JDK6 is recommended to use with Android development, as JDK7 has compatibility issues)
coolsandie said:
The JRE and JDK link is not working. Also downloading the JDK alone contains the JRE package, and downloading JRE separately is not needed.
Link: http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html (JDK6 is recommended to use with Android development, as JDK7 has compatibility issues)
Click to expand...
Click to collapse
Thanks bro... I did it from the xda app. So plz forgive...
Sent from my GT-S5360 using xda app-developers app
nice work on it....cool bro but update links
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Release notes
This build includes a totally new kernel and Amlogic code based on their latest SDK, and I took the chance to get rid of Amlogic DVB drivers and use those from WeTek Play's OpenELEC build; by doing this I am able to run DVBAPI apps like Tvheadend.
Kodi Live TV support under Android was one of the most requested features, this experimental build allows you to run Kitkat (CyanogenMOD 11) or Lollipop (CyanogenMOD 12 or Android TV) and Kodi Live TV (WeTek Theater is no longer supported with the provided drivers).
The new 3.10 kernel brings OMX support as well (Android libstagefright media decoding), while Amlogic's prebuilt libraries work very good on KitKat they don't work at all with Lollipop.
Just to be sure to have a good media experience use Kodi, at the end of the post you will find latest stable official Kodi packed in a flashable zip and in the second post you will find a link to a modified version that should give a better experience on the WeTek device.
Now I will give you some details on how to configure Tvheadend, if you already know what to do you can skip this section.
Tvheadend will run automatically at boot and you can access to it from a web browser (even from a different device, you are not forced to do it from the box) at http://wetek_ip_address:9981
From this WebUI click "Configuration" -> "DVB Inputs" -> "Networks" and add a new Network according to the type of tuner you have (for example I created a DVB-S network called "Hotbird" and assigned the E13.0 pre-defined muxes, just pay attention that they are not bleeding edge updated so if you don't find a channel you might have to insert manually the transponder by looking at frequencies on sites like kingofsat or lyngsat).
After that go to "TV Adapters", click the link with a folder icon showing your adapter's name (if you're running the dual DVB-S2 tuner you will see two of them, #1 is the input closer to the edge of the box, while #0 the one closer to the rear usb ports), and click "Enabled", configure the eventual parameters (DiseqC, Unicable, etc.) and save the settings.
Go to the option right under the adapter name, assign it to the network that you have created and configure the eventual parameters.
Now go back to "Networks", after a couple of minutes you should see the "Scan Q length" lowering its value, when in reaches 0 everything has been scanned and you can proceed mapping the channels from "Services" section.
For further instructions, here you can find a tutorial to show you how to configure the DVB-T/C tuner, and here one for the DVB-S tuner.
Before leaving the configuration go to "Recordings" and set a "Recording System Path" pointing it to your external storage (on my roms it will be "/storage/sdcard1" for the MicroSD, "/storage/usbdisk0" for the lower rear usb port, "/storage/usbdisk1" for the upper rear usb port and "/storage/usbdisk2" for the side usb port).
Not doing that will drive Kodi's Tvheadend client plugin crazy trying to determine the available space for recordings.
Now you can launch Kodi, go to its settings, enable Live TV and select the "Tvheadend backend".
Remember that this is still something EXPERIMENTAL
Like the other Lollipop buils, remember, this is not a bug, but a consequence of the switch to art from dalvik: first boot, updates and apps installation will take longer; this happens because art compiles the apk and does not work like dalvik that was using a just-in-time approach (so expect almost 10 minutes for the first boot and future upgrades)
First install instructions
* As really first thing get this CWM recovery, unrar it and copy "recovery.img" to a MicroSD.
* Power off your device and unplug the AC power cord.
* Get the latest available ROM and GAPPS version from the links below and copy them to a MicroSD card.
* Now insert the MicroSD card in your STB.
* Plug the AC power cord while you keep pressed the little reset pinhole (located on the bottom of the device) for 10 seconds (just count slowly to ten and it will be good).
* Once the device has booted to recovery perform a factory reset and flash the ROM's zip for first followed by the GAPPS zip.
* Reboot and enjoy CyanogenMOD.
Update instructions
* If you're coming from the "regular", not "experimental" builds, please follow the "First install instructions"
* Get the latest available ROM and GAPPS version from the links below and copy them to a MicroSD card.
* Now insert the MicroSD card in your STB.
* Enable "Developer options" following this tutorial and from it enable the "Reboot to recovery" option.
* Bring up power menu by keeping pressed the power button on the STB for a couple of seconds (or pushing F4 if you have a keyboard plugged in) and select "Reboot -> recovery".
* Once the device has booted to recovery flash the ROM's zip for first followed by the GAPPS zip.
* Reboot and enjoy your updated CyanogenMOD.
Downloads
* ROM (CM12) 2015-03-20
* GAPPS 2015-01-07 (LITE)
* ROM (Android TV) 2015-03-20
* GAPPS (Android TV) 2015-01-30
* ROM (CM11) 2015-04-06 - Real 1080p output (r1)
* GAPPS 2014-06-06 (LITE)
* Kodi 14.1 "Preinstall"
Misc tips
* If you wanna start Kodi at boot go to "Developer options" and enable the last entry called "Start Kodi at boot"
* There are some keyboard shortcuts: F1 (Home), F2 (Menu), F3 (App switch) and F4 (Power menu) and some CEC remote shortcuts: Red (Power off the device), Green (Home), Yellow (Menu) and Blue (Search).
* By enabling "Google remote support" in "Other" section of "Network" configuration you will be able to control your device from your Android smartphone / tablet by using this app on it.
* When an app forces the portrait orientation, the default behavior is to simulate a portrait / phone-like UI adding black bars to the sides (an example is Antutu when it runs the benchmark, or Box.com). If you prefer to have a landscape stretched UI flash this zip. To revert to the default behavior flash this one instead.
Note that the setting will persist even if you upgrade the ROM so you have to flash that zip only once.
* Once you have configured your OSCam reader, set-up Tvheadend this way.
Real 1080p output (optional zip for CM11)
On Android Amlogic MX SOC uses a 1280x720 framebuffer coupled with a scaler to do the up/down scaling.
They did it for a good reason, 720p resolution has half the pixels of the 1080p one so the UI will be snappier and 3D performance will be better but if you don't care about that and you just wanna the best image quality (I noticed the scaler gives me a weird motion when watching sports) you can flash that optional zip.
Once flashed if you wanna change resolution go to Android Display settings, set your resolution and reboot the device (this step is required because some stuff has to be set at boot because Android is not meant to change resolution while it's running).
I didn't do it for Lollipop builds because it runs already slower than Kitkat, adding this mod might be too much
Since you have this option (WeTek Play is the only MX device that allows you to do that) I would give it a try, if you have a good TV set you will clearly see the difference.
Kodi 14.2 WeTek_mod_v1
This is a Kodi build that includes some patches not included upstream that will improve (hopefully) your overall experience.
Since it's been signed with different keys respect those from Kodi build server you won't be able to install it over the older Kodi but you'll have to uninstall it.
Take a backup of /sdcard/Android/data/org.xbmc.kodi folder before uninstalling or Android will delete it and you'll lose your configuration; restore it after installing the new APK.
Download
You can use OE's /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/advancedsettings.xml file
Code:
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<network>
<cachemembuffersize>20971520</cachemembuffersize>
</network>
<samba>
<clienttimeout>30</clienttimeout>
</samba>
<network>
<readbufferfactor>4.0</readbufferfactor>
</network>
<pvr>
<minvideocachelevel>5</minvideocachelevel>
<minaudiocachelevel>20</minaudiocachelevel>
</pvr>
</advancedsettings>
or (this is what I'm using)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<network>
<buffermode>1</buffermode>
<cachemembuffersize>31457280</cachemembuffersize>
<readbufferfactor>10</readbufferfactor>
</network>
<gui>
<algorithmdirtyregions>0</algorithmdirtyregions>
</gui>
</advancedsettings>
External disk spindown for WeTek Play
Flash this zip from recovery, once booted to android use a root capable file explorer (like Solid Explorer for example) and edit "/system/etc/spindown.conf" to fit your needs.
The default configuration is set-up to spin down "sda" disk after 3600 seconds (60 minutes) using sg3-tools.
You don't need to flash the zip again if you do a rom update because I've added the addon.d backup script.
Note: your drive have to ne able to be set to sleep using "sg_start --stop /dev/block/$disk", I've tried it with 3 drives, 2 WDs and 1 Seagate and it worked.
Debian chroot
As very first thing you have to set-up a MicroSD card with two primary partitions, the first one must be formatted in FAT32, the second one can be left unformatted because the "sdcardfiles" zip will format it (I suggest you to give at least 1GB of space to the secondary partition).
After that grab the two zips: wetek-debian-chroot-sdcardfiles.zip and wetek-debian-chroot-systemfiles-rc1.zip and copy them (together with CWM's recovery.img) to the FAT32 partition of the MicroSD (the primary one).
Boot to recovery and flash the two zips (the order doesn't matter).
How to actually use it:
The "systemfiles" zip will add an helper file that I called "debian-chroot", together with the init.d script it will set up the chroot at boot and run the configured services (as a template the /system/xbin/debian-chroot file includes the execution of dropbear daemon, so you can use it as starting point for your own stuff).
To access Debian you can just type as root from terminal emulator / serial console / adb over network "debian-chroot chroot", othwerise you can access using an SSH client to the configured Dropbear SSH server that is listening on port 2222.
There are two default users: 'root' (pwd: wetek) and a regular user 'wetek' (pwd: wetek), both can be used to access to the ssh server.
* ROM 2015-01-30
* GAPPS 2015-01-07 (LITE)
* ROM (Android TV) 2015-01-30
* GAPPS (Android TV) 2015-01-30
In the "regular" CM12 build added some things I had forgotten when upgrading the device tree from the old to the new kernel (the most important, I had forgotten to mkdir the paths for the hard drives mounting).
Included the new tvheadend posted in OpenELEC section (the one with the different decsa algorithm)
Added Android TV build and just a tip for the first boot of it...
Don't change the language, use the default english already selected (don't know why but changing language is VERY sluggish/laggy), when you're doing configuring it you can change it to your preferred one in Android's settings.
Another thing, if the screen stays black after allowing or denying the "Network location" option (the last step of the wizard) for more than 10 seconds just bring up power menu and perform a reboot, the Wizard will kick in again, you'll have to just click continue because everything is configured and it will work. I don't know why it acts like this sometimes!
Guys if you experience some freezes of the box after running for certain time an encrypted channel (I noticed that it happens to me between 45/60 minutes after tuning to such channels) it might be caused by the new decsa library, it looks like it has a memory leak.
I will revert to the older binary, in the meantime you can flash this zip to go back to the one from the older build.
After reverting I'm tuned on an encrypted channel since an hour and I don't see any weird memory issue
Oh, guys, I forgot to mention that in this build I've enabled Amlogic's "anymote" support (the backend to be remotely controlled use Google TV remote app).
To use it go to "Network -> Other" options in Android's settings and enable "Google TV Remote support", after that install this app on your Android phone/tablet and you'll be able to use it as a remote.
PS: I didn't have much luck running the "Google TV Remote" app from the Play Store, it wouldn't find the device at all, maybe they are enforcing a private key handshake like in newer Google Cast Receiver to be able to run it only on official Google TV devices.
PPS: remote audio input doesn't work, the Amlogic's anymote throws an exception regarding a class not found. Can't do much about that since it comes as a precompiled APK (and I already had to do some smali hack to be able to run it on Lollipop)
* ROM (CM12) 2015-01-31
* GAPPS 2015-01-07 (LITE)
* ROM (Android TV) 2015-01-31
* GAPPS (Android TV) 2015-01-30
* ROM (CM11) 2015-01-31
* GAPPS 2014-06-06 (LITE)
Lollipop ROMs:
* Reverted tvheadend to the older version that doesn't suffer of memory leak
* Introduced a workaround to prevent Netflix from using OMX
* Updated upstream sources
Kitkat ROM:
Added CM11 based on the new kernel. It's generally faster than Lollipop, as I have said ART probably is too much for the MX
I haven't added the extra stuff to Android settings so I'm including the ugly MboxSettings app, I have given more love to Lollipop, I have to admit it, in case if you people prefer this rom I can start customizing it more.
I suggest you to install SuperSU from Play Store, let it update the "su" binary choosing the normal way and converting it into a system app + installing the backup script to let it survive rom updates. This because CM11's SuperUser doesn't work nicely with the way Kodi request root rights.
Beside the same F1/F4 shortcuts as the Lollipop roms above, there's a further shortcut with F8 to toggle expanded desktop mode.
* ROM (CM11) 2015-02-01
* Added the most important things of MboxSettings to Android settings (display resolution, overscan, cec, digital audio and google tv remote).
* Added an entry, accessible through developer settings (at the very end of the list), to enable the autostart of Kodi at boot
* ROM (CM11) 2015-02-02
* added the new suspension method (I will quote my previous post to describe it)
ChristianTroy said:
Guys I've been trying a new suspension method, it's a better solution IMHO.
I'm going to use Android's capabilities to prevent the device from entering suspension (with wakelocks) to only let the kernel turn off everything but without really entering suspension, something like flashing the "wetek-disable-shutdown.zip" that you find in the second post of all my other rom's threads.
But I did a modification in the kernel: it will turn the power led blue/red if the display is on/off so you'll know if you actually turned it off. I decided to mantain on the eventually enabled wifi or eth led so you'll see if you have connection or not.
This thing is very useful if you're going to program a recording in tvheadend, otherwise the device won't wake from sleep (at least not with easy work without using Android's AlarmManager to create a new wake up task) and in this way the device won't have to perform boot from scratch once you put it to sleep, but it will be instantly on again.
It will consume a little bit more of power though (haven't run much tests but since this device when it's on runs at 7w, I guess it will be <5w) but I think that many of you keep it running all the time, in this way it's like if it was running but just with the output turned off
Click to expand...
Click to collapse
* corrected an unwanted (by me) behavior of Amlogic's android ethernet service that was putting off the interface when the display was being turned off. If you were connected using eth you would find yourself without network with the new suspension method... if for some reason you want your eth to be turned off when the display is off add "ro.screen_off.disable_ethernet=true" to /system/build.prop
* disabled google setup wizard that was causing a black screen on first boot because it was invoking the AOSP version of setWifiEnabled instead of CM's one with AppOps support
* enabled the execution of a boot service to set up the remote (you couldn't power off the device using the remote before this build) that I had forgotten to set up after moving to the new kernel branch
ps: let me know what you think about this new suspension method, personally I do really love it and was thinking about that since quite some time
Debian chroot
As very first thing you have to set-up a MicroSD card with two primary partitions, the first one must be formatted in FAT32, the second one can be left unformatted because the "sdcardfiles" zip will format it (I suggest you to give at least 1GB of space to the secondary partition).
After that grab the two zips: wetek-debian-chroot-sdcardfiles.zip and wetek-debian-chroot-systemfiles.zip and copy them (together with CWM's recovery.img) to the FAT32 partition of the MicroSD (the primary one).
Boot to recovery and flash the two zips (the order doesn't matter), after each ROM upgrade you'll have to flash only "wetek-debian-chroot-systemfiles.zip" (the other one is just to set up Debian, flash it in case you mess up the system and wanna start from scratch).
How to actually use it:
The "systemfiles" zip will add an helper file that I called "debian-chroot", together with the init.d script it will set up the chroot at boot and run the configured services (as a template the /system/xbin/debian-chroot file includes the execution of dropbear daemon, so you can use it as starting point for your own stuff).
To access Debian you can just type as root from terminal emulator / serial console / adb over network "debian-chroot chroot", othwerise you can access using an SSH client to the configured Dropbear SSH server that is listening on port 2222.
There are two default users: 'root' (pwd: wetek) and a regular user 'wetek' (pwd: wetek), both can be used to access to the ssh server.
Regarding the random black screen on channel change can anyone try this advancedsettings.xml (location on Android is "/sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/") and tell me if it acts better? I didn't have any black channel since using it (3 days) but I don't wanna that it's just a lucky coincidence
Code:
<advancedsettings>
<network>
<buffermode>1</buffermode>
<cachemembuffersize>52428800</cachemembuffersize>
<readbufferfactor>10</readbufferfactor>
</network>
<pvr>
<minvideocachelevel>10</minvideocachelevel>
<minaudiocachelevel>15</minaudiocachelevel>
</pvr>
</advancedsettings>
Regarding the XMLTV EPG I set up xmltv to use tv_grab_it for some channels (47 to be precise, and it takes ~1 hour per fetched day with the --slow parameter that includes descriptions) and fix it using tv_sort on the generated output because some channels don't have a stop time and this won't let tvheadend add them to its database.
I used a Debian chroot in my Synology NAS and set up a crontab job in Synology's crond to execute a script, located at '/root/xmltv.cron' with this content:
Code:
#!/bin/sh
# Package
PACKAGE="debian-chroot"
DNAME="Debian Chroot"
# Others
INSTALL_DIR="/usr/local/${PACKAGE}"
PATH="${INSTALL_DIR}/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin"
CHROOTTARGET=`realpath ${INSTALL_DIR}/var/chroottarget`
chroot ${CHROOTTARGET}/ su -c 'tv_grab_it --output /volume1/homes/alan/www/tvguide_wip.xml --days 3 --quiet --slow --cache-slow && tv_sort --output /volume1/homes/alan/www/tvguide.xml /volume1/homes/alan/www/tvguide_wip.xml' alan
After that I enabled "Web Station" for the users and I can access my EPG from "http://NAS_IP/~alan/tvguide.xml" and use this URL as w*g*e*t parameter for tv_grab_file
This is the result:
If you install on your Play the Debian chroot that I posted yesterday you can practically do the same, just install xmltv on it running
Code:
sudo aptitude install xmltv
(or, if you know what you're doing, compile it from sources installing the required dependencies, some perl modules)
Install a cron daemon like "vixie-cron" and add it to "/system/xbin/debian-chroot" in the "start_services" function (like the template that runs the SSH server).
Set it up, save the XML output somewhere like "/home/wetek/tvguide.xml" and replace the "w*g*e*t" line in tv_grab_file with "cat /storage/debian/debian-chroot/home/wetek/tvguide.xml"
* ROM (CM12) 2015-02-07
* ROM (Android TV) 2015-02-07
Both Lollipop roms have been updated to match features/fixes of latest CM11 builds, plus upstream sources have been updated
New builds:
* ROM (CM12) 2015-02-14
* ROM (Android TV) 2015-02-14
* ROM (CM11) 2015-02-14
* OSCam (r10566)
Oscam zip for these builds, just flash it from recovery, when booted into Android access to http://wetek_ip:8888 and add your server (remember to add it to group 1, that is the group assigned to the dvbapi user).
Open TVH configuration page and in "CAs" section add a new "CAPMT (Linux DVBApi)" with these content:
ps: this oscam has Smargo (libusb) and PCSC support
tvh-3.9.2509_oscam-r10566_android-wetekplay.zip
New Tvheadend built from sources (updated this morning), no more using OE's libraries but with another approach instead. I've built it with some enhancements in CFLAGS for the cortex-a9 cpu.
OSCam included, if you set it up the way I explained yesterday you're good to go, otherwise just configure it that way
ps: it looks like this version recognizes the hybrid c/t tuner as c only so if you need dvb-t keep using the one you're already using
* ROM (CM12) 2015-02-22
* ROM (Android TV) 2015-02-22
* ROM (CM11) 2015-02-22
tvh-3.9.2515_oscam-r10607_android-wetekplay.zip
Test zip that will change the following things:
- update tvh to latest sources (synced this morning)
- update oscam to r10607
- update wetekdvb.ko with the one from OE 5.0.4
PS: now the hybrid tuner is recognized, I had to change a couple of things
* ROM (CM12) 2015-03-05
* ROM (Android TV) 2015-03-05
* ROM (CM11) 2015-03-05
If you're upgrading from a build where you were running oscam, go to "mounts and storage -> format /system" before flashing the new stuff (or manually delete "/system/addon.d/80-oscam.sh" if you know what you're doing).
Changes:
* updated upstream code
* updated WeTek DVB kernel driver
* updated Tvheadend
* added OSCam (no support for it, it's a "grey area" thing)
* fixed a bug where the resolution was resetted to 720p @ 60hz under certain conditions (like when swapping HDMI input in some TVs), and use 1080p @ 50hz as fallback resolution
In case you wanna try a test zip with brand new OSCam and Tvheadend built with Android toolchain (NDK) flash THIS zip on top of today's build. I'd really like some reports about any crash using the native binaries.
Kodi 14.2 BETA 1 apk
This is a Kodi 14.2 BETA 1 based build with two patches added that add support for automatic frame rate switch (you have to enable it in settings) and that should behave better with the black screen bug.
Since it's been signed with different keys respect those from Kodi build server you won't be able to install it over the older Kodi but you'll have to uninstall it.
Take a backup of /sdcard/Android/data/org.xbmc.kodi folder before uninstalling or Android will delete it and you'll lose your configuration; restore it after installing the new APK.
Download
I'm using this /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/advancedsettings.xml file
Code:
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<network>
<cachemembuffersize>20971520</cachemembuffersize>
</network>
<samba>
<clienttimeout>30</clienttimeout>
</samba>
<network>
<readbufferfactor>4.0</readbufferfactor>
</network>
<pvr>
<minvideocachelevel>5</minvideocachelevel>
<minaudiocachelevel>20</minaudiocachelevel>
</pvr>
</advancedsettings>
* ROM (CM12) 2015-03-10
* ROM (Android TV) 2015-03-10
* ROM (CM11) 2015-03-10
- CEC improvements (codesnake's OE fix)
- Mapped CEC red/green/yellow/blue buttons to power/home/menu/search
- upgrade tvheadend and oscam with the native (android ndk) ones
- updated dvb code (same code as latest OE)
- few other minor things at kernel level
- updated upstream sources
Notes: run it with Kodi that I posted yesterday (and that you can find in the second post) with Aeon Nox skin + Live TV mod and you will get a very good experience, specially if using CM11 or, if you don't mind it being a bit more laggy, ATV
* ROM (CM12) 2015-03-11
* ROM (Android TV) 2015-03-11
* ROM (CM11) 2015-03-11
Fixed a problem with the dual tuner and the new bootloader (the one flashed by NAND version of OE and latest WeTek OS)
hi guys, i found this custom rom in Chinese website(im not try yet)
[V3.0 update content]
Based on C9PRO State Bank official latest C9000ZCU1AQC4 bottom package modified production.
Status bar The virtual key is set to remove the background color when the screenshot is taken.
Fixed an error with Bluetooth exception.
Add the alarm flash function (different from the official notification flash (all notifications will flash), the function is turned on only when the alarm sounded when the flash).
Drop-down style icon to S7 7.0 style, more beautiful, thanks to the oil supply.
Add application disable / enable function.
If you find that WIFI can not be opened, please download the latest BL in the share and use ODIn to brush.
.
[ROM Features]
System:
Based on C9PRO State Bank official latest C9000ZCU1AQA6 bottom package modified production.
Perfect ROOT privilege, comes with SUPERSU management program.
Remove the official kernel to automatically encrypt the built-in card (Brune later into the TWRP can directly access the built-in card).
Streamline the official useless APP.
Desktop weather widgets add lunar display and support custom switches.
Remove APK signature verification.
Remove headphones or Bluetooth large volume warnings.
Add 6.0 style power key menu switch.
Support custom 6.0 style power key menu items, Aurora first!
Power key menu Add a mobile data switch.
Power key menu Add screenshots.
Power key menu Add auxiliary light function.
Power key menu Add screen recording function.
Power key menu to add sound options.
You can customize the power off menu options.
Add advanced restart options.
Open the lock screen flashlight.
Add lock screen flash timeout settings.
Add the GOOGLE component and add the switch (the default is not enabled).
Remove the verification prompt when installing a third party APK.
By default, install an unknown source.
Turn on the key light switch (Setup - Display - click on the button lamp duration).
Crack split support for any application.
Crack the default option to open the document (only once, default).
Activate the outdoor mode switch in the display.
Activate the key lamp duration switch in the display.
Add long press the HOME key function to customize (default to end the current process).
Add custom double click HOME key function.
Add a custom long press the task key function.
Add a custom long press the return key function.
Add WIFI management, easy to view has been saved WIFI password.
Add lock screen left and right sliding palm function custom, Aurora exclusive first function!
Add the usual left and right sliding palm function custom, Aurora exclusive first function!
Add the black domain (application to prevent) features, open or close after the need to Kai Kai to take effect (as the black area is what ferry about).
Add lock screen weather display (data source for the official weather components) and free switch, Aurora exclusive first!
The screen lights up when the USB is connected or disconnected.
Desktop page switching effect settings (multiple effects optional).
Add from the screen four edges to the center of the multi-finger sliding gesture custom function (support for the number of custom fingers, the default for the three-finger lock screen), Aurora first!
Lock screen time to add seconds display (thanks to the dragon in the embarrassing to provide guidance).
Add a screenshot sound switch.
Add password to unlock the function quickly (digital password and mixed password input is automatically unlocked) (new algorithm, ultra-fast, Aurora first).
Customize key function list:
Turn off screen, return key, display task list, HOME key, menu key, volume increase, volume reduction, call record, search key, volume switch (normal / vibration / mute), end process, open / close flashlight, screenshots, turn on the camera, split-screen multitasking, pull down the status bar, WIFI switch, mobile data switch, Bluetooth switch, run APP .
Status Bar:
Support for custom display or hide alarm icon.
Support for custom display or hide of Bluetooth icons.
Support for custom display or hide vibration and mute icons.
Support custom switch virtual upper left virtual key and can customize the key long press and short press function.
Support custom switch virtual intermediate virtual keys and can customize the key long press and short press function.
Support custom switch virtual right corner of the virtual key and can customize the key long press and short press function.
Support for custom switch speed display.
Support for custom switch week display.
Pull down the lunar display.
Pull-down quick connect area function extension, optional 8 key style, 6 key style and custom program.
The drop-down custom program supports detailed function settings (quantity, name switch, add button switch, font color, and background color).
Support for the definition of four battery style, hidden battery, the original power, the original + power display, third-party power display (dozens of styles by your choice).
Add a linear battery display (can be customized color, custom height, support for charging animation switch).
Add the default SIM icon to display the switch.
Add drop-down dual card function to set the display switch.
Add the default SIM card to select the frame display switch.
Add status bar background color customization function.
Increase the phone signal display position setting function (left, right).
Increase the status bar time position setting function (left, center, right).
Add a status bar operator to display the switch.
Add a status bar to customize the operator settings.
Add double-click the status bar lock screen function.
When the status bar is not connected, the default network type display switch (PBX features such as 4G, H, etc.) is also displayed.
The status bar adds some support for automatic perfect immersion display.
Status bar immersed display, a number of details set, non-XPOSED implementation (thanks to 52 Samsung U brother).
Status bar to add memory display (the last act is available, the next line for all), support for details of the custom (font, color, etc.).
Status bar to add date display, while supporting the details of the custom (font, format, color, etc.).
Telecom card double - layer signal switch.
Call SMS:
Dial-up to add the operator to show (official no operator).
The call interface adds the operator display function.
Add a call log to the home display.
Add SMS attribution, while supporting special service number display.
Support custom to call the recording switch.
To send voice to automatically distinguish between calls or outgoing calls.
Support call end screen delay setting.
Add flash function (support different scene mode independent switch, support flash frequency settings).
The call interface retains the home display switch.
Aurora settings (Aurora settings in the advanced function menu, eliminating the need for input engineering instructions):
Support for quick opening of APN settings.
Support to quickly turn on the phone USB mode setting function.
Support to quickly open the phone software version view function.
Support the quick opening of the battery information proofing function.
Support for quick access to hardware information detection.
Support for quick viewing of IMEI.
Support for quick viewing of CPU information.
Please carefully read the following important information:
1, part of the settings need to restart the phone to take effect.
2, ROM does not contain any malware and in addition to the official outside the system applications, download ROM brush machine before you first check the MD5 value.
3, ROM to add a small amount of promotional software, if not in the brush machine after the deletion, if we support please use a few days after the free uninstall.
4, the default post reply can be seen as you reply and download and brush the ROM package, that means you default to agree to their own risk! Please choose carefully!
5, Note: Brush before you keep the habit of backup data, so as to avoid data loss!
6,6.0 ROM first brush after the need to wait a long time, it is estimated to 10-15 minutes, please be patient.
Thanks again for all the friends who invited us to drink beer.
Would like to invite me a cup of coffee or beer friends please donate directly to the Aurora settings mentioned in the Alipay account number can be donated to us a great encouragement and affirmation, please leave the forum in the Alipay ID or your name The
[Brush tool]
Baidu network disk: pan.baidu.com/s/1i4ZTO5B
Password: s0mx
Brush tool includes the following files:
Samsung driver: Samsung_USB_Driver_1.5.16.0.exe .
File MD5 Verification Tool: File Verification Tool .exe .
TWRP Recovery (thanks Xiao1u God): C9000-TWRP-3.0.2. Tar .
[For TWRP REC]
If you are
currently in the official ROM, please press the HOME + power + volume directly before restarting the REC . If you enter the system REC, you may be restored to the official REC.
[On the DATA partition decryption]
DATA partition decryption after all the built-in mobile phone all the data and files will be lost, please back up important data to the computer or external card.
[First Brush Flow]
Note: 1, line brush mode need to install the mobile phone driver, please in the forum or Baidu installed before the driver can continue the following steps.
2, please confirm that your CROM has been unlocked, if not please download and install the tools in the CROM.apk to complete the unlock process.
3, please open the developer option in the OEM unlock option.
4, please first exit the Samsung account on the phone, GOOGLE account.
Please download the brush machine package and save to the external card and plugged in!
Use the ODIN brush into the C9000-TWRP-3.0.2.tar , brush the restart immediately please press the HOME + power + volume immediately enter the TWRP Recovery.
After entering the REC system will prompt DATA partition encryption, sliding slider directly.
Decrypt the DATA partition ( this will cause all the data on the built-in memory of the phone to be lost !): Point Clear -> Format Data Partition -> Enter "yes" OK.
Return to the main interface of TWRP, point to install, point storage location, select the SD card, then choose a good download before the ROM ZIP file, and then slide the slider to the right to start brush machine process.
Brush machine will automatically restart after the phone.
[Conventional brush machine process]
Note: 1, line brush mode need to install the mobile phone driver, please in the forum or Baidu installed before the driver can continue the following steps.
2, please confirm that your CROM has been unlocked, if not please download and install the tools in the CROM.apk to complete the unlock process.
3, please open the developer option in the OEM unlock option.
4, please first exit the Samsung account on the phone, GOOGLE account.
5, please decrypt the DATA partition, at the same time, to ensure that the built-in card or external card brush package can only continue after the following process.
Make sure that TWRP or other third party RECOVERY has been flushed on the machine.
Put the ROM and the required patch file after downloading it into the SD card.
Turn on the power while pressing the + HOME + volume up key to enter Recovery.
Confirm that recovery is not (Team Win Recovery Project) or other unofficial Recovery, the following steps to TWRP as an example.
Point the Wipe button, and then the Advanced Wipe button, select Dalvik Cache, System, Data and Cache, note that here can not choose Internal Storage (SD card) and SDCard (external SD card), of course, unless you do not want these data can Together on the election. Finally slide the slider below to empty the data.
Press the return key twice to return to the main interface, click the Install button. Click on the top of the Storage to select the location where you will save the ROM, if it is external card, select Micro SDCard (**** MB), click OK, then select Aurora _ ****. Zip, then slide down the slide Block brush into, after the completion of the need for a patch if the oil can be directly press the back button to re-brush the required patch file.
Restart the machine.
[FAQ]
1, open the GOOGLE framework and restart GOOGLE error?
Please in the Intelligent Manager application rights management location information (display system application) authorized GOOGLE component access.
2, can not synchronize contacts after opening GOOGLE framework?
Please authorize GOOGLE component access in three branches (display system application) in address book management in Intelligent Manager Application Privilege Management.
3, the camera's original settings in the fast enabled (double-click) the camera is missing?
Please set the Aurora in the Aurora settings to enhance the custom button function to redefine the double-click HOME key function can be.
download link:
Baidu network disk:
link: pan.baidu.com/s/1c1DhpQS
password: 86zj
Tencent micro-cloud: url.cn/47dKy2P
card brush package file information (card brush package does not contain baseband, need to download in the shared (CP at the beginning TAR file) and use the ODIN to select the CP brush can be):
File name: Aurora_M_C9000_QC4_V3.0.zip
File size: 1430303444 bytes (1.33G)
MD5: EAE97648546E21EC1721F4BD41C64877
SHA1: 40D2AACEE1372A5A2BA66888BB5552BA28DC5EE6
the source:
http://bbs.gfan.com/forum.php?mod=viewthread&tid=9032520
u can see the screenshots in source
finally i hope anyone upload the rom to another website like Google drive or mega
note: im not try to flash this rom before and i think u need to flash cp befor flash this rom(u can found the cp in the download link in bl folder)
Have you tried it? Please post some screenshots.
we'll wait for the nougat update then f root & flash some rom. cheer mate..
please a non chinesse mirror
Link is not working I can't dowload it ? Can anybody upload this mega or google drive.
Rom???
SM-C9000 cihazımdan Tapatalk kullanılarak gönderildi
thank you
there are new rom Aurora ROM-C9000-V4.0,
http://bbs.gfan.com/android-9153325-1-1.html
please can you past the download link
abutalal171 said:
thank you
there are new rom Aurora ROM-C9000-V4.0,
http://bbs.gfan.com/android-9153325-1-1.html
please can you past the download link
Click to expand...
Click to collapse
Türkçe destek yok.
Ben v3 kurdum diller eksik , google play yok..
SM-C9000 cihazımdan Tapatalk kullanılarak gönderildi
Please anyone give download link in MEGA or anything else,because I can't be able to download this ROM from Chinese website.stuck at image verification for signup
In Xiaomi devices, 'Show over lockscreen' and 'Show popup dialogs' permissions are considered special perms. Now in previous question there are some methods to ask user to manually allow them BUT there is no default way to enable them.
When you install Skype or similar apps from Google Playstore, by default these permissions are turned on for those devices. I need Show over Lockscreen permission to show my app when I am getting a VOIP call.
Code:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
{
setShowWhenLocked(true);
setTurnScreenOn(true);
KeyguardManager keyguardManager = (KeyguardManager) getSystemService(getApplicationContext().KEYGUARD_SERVICE);
if(keyguardManager!=null)
keyguardManager.requestDismissKeyguard(this, null);
}
else
{
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
}
I have allowed showOverLockedScreen in manifest.xml file and also setShowWhenLocked(true); but none of them enables those special permissions.
I have asked this similar question on multiple forums but I am unable to find the answer. Any help would be highly appreciated. I need to solve this issue to show my app over lockscreen when I am getting an incoming call.
devwaleed said:
In Xiaomi devices, 'Show over lockscreen' and 'Show popup dialogs' permissions are considered special perms. Now in previous question there are some methods to ask user to manually allow them BUT there is no default way to enable them.
When you install Skype or similar apps from Google Playstore, by default these permissions are turned on for those devices. I need Show over Lockscreen permission to show my app when I am getting a VOIP call.
Code:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
{
setShowWhenLocked(true);
setTurnScreenOn(true);
KeyguardManager keyguardManager = (KeyguardManager) getSystemService(getApplicationContext().KEYGUARD_SERVICE);
if(keyguardManager!=null)
keyguardManager.requestDismissKeyguard(this, null);
}
else
{
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
}
I have allowed showOverLockedScreen in manifest.xml file and also setShowWhenLocked(true); but none of them enables those special permissions.
I have asked this similar question on multiple forums but I am unable to find the answer. Any help would be highly appreciated. I need to solve this issue to show my app over lockscreen when I am getting an incoming call.
Click to expand...
Click to collapse
I also have the same issue. I tried every possible solution available on the internet. but still no success.
Hello Everyone, My name is Kaliswaran, I am a Image customizing Developer, actually I was trying to update Win 11 21H2 version with recent February patch update and sysprep the machine, but when I try to boot the machine again in Audit mode, I am unable to see some of default applications like calculator, paint, snipping tool etc. But if I try to create any local user profile, there I can able to get all applications without issues. So anyone please kindly help on this. (so as I mentioned, Once I am done with Patch update, then only I am facing with this issue, earlier without patch update I can able to see all applications fine in Audit mode). Can anybody help.
It sounds like you are experiencing an issue with the default applications not appearing in Audit mode after patching and sysprepping the machine. Here are a few suggestions to help troubleshoot the issue:
Check the Sysprep configuration file: The Sysprep configuration file can be found at C:\Windows\System32\Sysprep\sysprep.xml. Make sure that the following lines are set to "true" in the file:
<CopyProfile>true</CopyProfile> <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>
Check the Group Policy settings: The Group Policy settings may be preventing the default applications from appearing in Audit mode. Check the Group Policy settings to ensure that the following policy settings are not configured:
Computer Configuration\Administrative Templates\System\Audit Mode\Remove all Apps from the Start menu Computer Configuration\Administrative Templates\System\Audit Mode\Do not show Windows Store apps on the taskbar User Configuration\Administrative Templates\Start Menu and Taskbar\Remove All Programs list from the Start menu
Reset the Start menu: Try resetting the Start menu to see if it brings back the default applications. To do this, open PowerShell as an administrator and run the following command:
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
After running this command, restart the computer and see if the default applications appear in Audit mode.
I hope this helps! Let me know if you have any further questions or concerns.